Sha256: 9dce2ba9f870e917e6d0141c807efc4ade456c46d931183ef6dded444e17b2fd

Contents?: true

Size: 1.61 KB

Versions: 5

Compression:

Stored size: 1.61 KB

Contents

# Cfita

Check italian fiscal code

Intentionally this gem does not claim to "calculate" the tax code, which can be issued by the tax authorities of the Italian Republic (Revenue Agency).

see:
https://www.agenziaentrate.gov.it/wps/content/Nsilib/Nsi/Schede/Istanze/Richiesta+TS_CF/Informazioni+codificazione+pf

The purpose that it intends to achieve is exclusively to check if the personal data of the subject are consistent with the tested code.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'cfita'
```

And then execute:

```shell
bundle
```
## Usage

```ruby
require 'cfita'

p Cfita::CodiceFiscale.new('AAABBB50A50F839X')
=> #<Cfita::CodiceFiscale:0x00007fa4efd09558 @fiscal_code="AAABBB50A50F839X", @birth_place=nil, @birth_date=nil, @name=nil, @surname=nil, @sex=nil, @errors=["Checksum errato"]>

p Cfita::CodiceFiscale(
  'AAABBB50A50F839U',
  birth_place: 'Roma',
  birth_date: '19600530',
  sex: 'M',
  name: 'MARIO',
  surname: 'Rossi'
 )
=> #<Cfita::CodiceFiscale:0x00007fa4e75abf98 @fiscal_code="AAABBB50A50F839U", @birth_place="ROMA", @birth_date=Mon, 30 May 1960, @name="MARIO", @surname="ROSSI", @sex="M", @errors=["Il nome non corrisponde al codice 'MRA'", "Il cognome non corrisponde al codice 'RSS'", "Luogo di nascita ROMA non coerente, al codice catastale F839 corrisponde a NAPOLI", "Sesso errato"]>

```

## Contributing

1. Fork it ( https://github.com/stefsava/cfita/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## 

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cfita-0.3.0 README.md
cfita-0.2.1 README.md
cfita-0.1.3 README.md
cfita-0.1.2 README.md
cfita-0.1.1 README.md