Class: Nfe::Reader::Customer
- Inherits:
-
Object
- Object
- Nfe::Reader::Customer
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/customer.rb
Overview
Identificação do Destinatário da Nota Fiscal eletrônica
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#city_code ⇒ Object
readonly
Returns the value of attribute city_code.
-
#city_registration ⇒ Object
readonly
Returns the value of attribute city_registration.
-
#cnpj ⇒ Object
readonly
Returns the value of attribute cnpj.
-
#complement ⇒ Object
readonly
Returns the value of attribute complement.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#cpf ⇒ Object
readonly
Returns the value of attribute cpf.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#foreign_code ⇒ Object
readonly
Returns the value of attribute foreign_code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#neighborhood ⇒ Object
readonly
Returns the value of attribute neighborhood.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#state_registration ⇒ Object
readonly
Returns the value of attribute state_registration.
-
#state_registration_code ⇒ Object
readonly
Returns the value of attribute state_registration_code.
-
#suframa ⇒ Object
readonly
Returns the value of attribute suframa.
-
#zip_code ⇒ Object
readonly
Returns the value of attribute zip_code.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Customer
constructor
Fields Values.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Customer
Fields Values
indIEDest: 1 - Contribuinte ICMS (informar a IE do destinatário),
2 - Contribuinte isento de Inscrição no cadastro de Contribuintes do ICMS,
9 - Não Contribuinte, que pode ou não possuir Inscrição Estadual
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/nfe_reader/customer.rb', line 19 def initialize(attrs = {}) @cnpj = attrs[:CNPJ] @cpf = attrs[:CPF] # Razão Social ou nome do destinatário @name = attrs[:xNome] # Inscrição Estadual do Destinatário @state_registration = attrs[:IE] # Inscrição na SUFRAMA @suframa = attrs[:ISUF] # Inscrição Municipal do Tomador do Serviço @city_registration = attrs[:IM] # Indicador da IE do Destinatário @state_registration_code = attrs[:indIEDest] # Email @email = attrs[:email] # Identificação do destinatário no caso de comprador estrangeiro @foreign_code = attrs[:idEstrangeiro] # Address if attrs[:enderDest] # Logradouro @address = attrs[:enderDest][:xLgr] # Numero @number = attrs[:enderDest][:nro] # Complemento @complement = attrs[:enderDest][:xCpl] # Bairro @neighborhood = attrs[:enderDest][:xBairro] # Código do município @city_code = attrs[:enderDest][:cMun] # Nome do município @city = attrs[:enderDest][:xMun] # Sigla da UF @state = attrs[:enderDest][:UF] # Código do CEP @zip_code = attrs[:enderDest][:CEP] # Codigo Pais @country_code = attrs[:enderDest][:cPais] # Nome do Pais @country = attrs[:enderDest][:xPais] # Telefone @phone = attrs[:enderDest][:fone] end end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def address @address end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def city @city end |
#city_code ⇒ Object (readonly)
Returns the value of attribute city_code.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def city_code @city_code end |
#city_registration ⇒ Object (readonly)
Returns the value of attribute city_registration.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def city_registration @city_registration end |
#cnpj ⇒ Object (readonly)
Returns the value of attribute cnpj.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def cnpj @cnpj end |
#complement ⇒ Object (readonly)
Returns the value of attribute complement.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def complement @complement end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def country @country end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def country_code @country_code end |
#cpf ⇒ Object (readonly)
Returns the value of attribute cpf.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def cpf @cpf end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def email @email end |
#foreign_code ⇒ Object (readonly)
Returns the value of attribute foreign_code.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def foreign_code @foreign_code end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def name @name end |
#neighborhood ⇒ Object (readonly)
Returns the value of attribute neighborhood.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def neighborhood @neighborhood end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def number @number end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def phone @phone end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def state @state end |
#state_registration ⇒ Object (readonly)
Returns the value of attribute state_registration.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def state_registration @state_registration end |
#state_registration_code ⇒ Object (readonly)
Returns the value of attribute state_registration_code.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def state_registration_code @state_registration_code end |
#suframa ⇒ Object (readonly)
Returns the value of attribute suframa.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def suframa @suframa end |
#zip_code ⇒ Object (readonly)
Returns the value of attribute zip_code.
8 9 10 |
# File 'lib/nfe_reader/customer.rb', line 8 def zip_code @zip_code end |