Class: Targetdata::Entities::Person
- Inherits:
-
Object
- Object
- Targetdata::Entities::Person
- Defined in:
- lib/targetdata/entities/person.rb
Instance Attribute Summary collapse
-
#birth ⇒ Object
Returns the value of attribute birth.
-
#cpf ⇒ Object
Returns the value of attribute cpf.
-
#death ⇒ Object
Returns the value of attribute death.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#marital_status ⇒ Object
Returns the value of attribute marital_status.
-
#middle_name ⇒ Object
Returns the value of attribute middle_name.
-
#minor ⇒ Object
Returns the value of attribute minor.
-
#mother_first_name ⇒ Object
Returns the value of attribute mother_first_name.
-
#mother_last_name ⇒ Object
Returns the value of attribute mother_last_name.
-
#mother_middle_name ⇒ Object
Returns the value of attribute mother_middle_name.
-
#nationality ⇒ Object
Returns the value of attribute nationality.
-
#rg_number ⇒ Object
Returns the value of attribute rg_number.
-
#rg_orgao_emissor ⇒ Object
Returns the value of attribute rg_orgao_emissor.
-
#rg_uf ⇒ Object
Returns the value of attribute rg_uf.
-
#schooling ⇒ Object
Returns the value of attribute schooling.
-
#status_receita_federal ⇒ Object
Returns the value of attribute status_receita_federal.
-
#voter_registration ⇒ Object
Returns the value of attribute voter_registration.
Instance Method Summary collapse
- #full_name ⇒ Object
-
#initialize(params = {}) ⇒ Person
constructor
A new instance of Person.
- #to_json ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Person
Returns a new instance of Person.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/targetdata/entities/person.rb', line 25 def initialize params = {} @cpf = params['CPF'] @email = params['email'] @first_name = params['nomePrimeiro'] @middle_name = params['nomeMeio'] @last_name = params['nomeUltimo'] @gender = params['sexo'] @birth = params['dataNascimento'] @status_receita_federal = params['statusReceitaFederal'] @rg_number = params['rgNumero'] @rg_orgao_emissor = params['rgOrgaoEmissor'] @rg_uf = params['rgUf'] @voter_registration = params['tituloEleitoral'] @death = params['obito'] @nationality = params['nacionalidade'] @minor = params['menorDeIdade'] @marital_status = params['estadoCivil'] @mother_first_name = params['maeNomePrimeiro'] @mother_middle_name = params['maeNomeMeio'] @mother_last_name = params['maeNomeUltimo'] @schooling = params['escolaridade'] end |
Instance Attribute Details
#birth ⇒ Object
Returns the value of attribute birth.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def birth @birth end |
#cpf ⇒ Object
Returns the value of attribute cpf.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def cpf @cpf end |
#death ⇒ Object
Returns the value of attribute death.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def death @death end |
#email ⇒ Object
Returns the value of attribute email.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def first_name @first_name end |
#gender ⇒ Object
Returns the value of attribute gender.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def gender @gender end |
#last_name ⇒ Object
Returns the value of attribute last_name.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def last_name @last_name end |
#marital_status ⇒ Object
Returns the value of attribute marital_status.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def marital_status @marital_status end |
#middle_name ⇒ Object
Returns the value of attribute middle_name.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def middle_name @middle_name end |
#minor ⇒ Object
Returns the value of attribute minor.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def minor @minor end |
#mother_first_name ⇒ Object
Returns the value of attribute mother_first_name.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def mother_first_name @mother_first_name end |
#mother_last_name ⇒ Object
Returns the value of attribute mother_last_name.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def mother_last_name @mother_last_name end |
#mother_middle_name ⇒ Object
Returns the value of attribute mother_middle_name.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def mother_middle_name @mother_middle_name end |
#nationality ⇒ Object
Returns the value of attribute nationality.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def nationality @nationality end |
#rg_number ⇒ Object
Returns the value of attribute rg_number.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def rg_number @rg_number end |
#rg_orgao_emissor ⇒ Object
Returns the value of attribute rg_orgao_emissor.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def rg_orgao_emissor @rg_orgao_emissor end |
#rg_uf ⇒ Object
Returns the value of attribute rg_uf.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def rg_uf @rg_uf end |
#schooling ⇒ Object
Returns the value of attribute schooling.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def schooling @schooling end |
#status_receita_federal ⇒ Object
Returns the value of attribute status_receita_federal.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def status_receita_federal @status_receita_federal end |
#voter_registration ⇒ Object
Returns the value of attribute voter_registration.
4 5 6 |
# File 'lib/targetdata/entities/person.rb', line 4 def voter_registration @voter_registration end |
Instance Method Details
#full_name ⇒ Object
48 49 50 |
# File 'lib/targetdata/entities/person.rb', line 48 def full_name "#{@first_name} #{@middle_name} #{@last_name}".strip end |
#to_json ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/targetdata/entities/person.rb', line 52 def to_json { cpf: @cpf, first_name: @first_name, middle_name: @middle_name, last_name: @last_name, gender: @gender, birth: @birth, status_receita_federal: @status_receita_federal, rg_number: @rg_number, rg_orgao_emissor: @rg_orgao_emissor, rg_uf: @rg_uf, voter_registration: @voter_registration, death: @death, nationality: @nationality, minor: @minor, marital_status: @marital_status, mother_first_name: @mother_first_name, mother_middle_name: @mother_middle_name, mother_last_name: @mother_last_name, schooling: @schooling }.to_json end |