Class: Nfe::Reader::Provider
- Inherits:
-
Object
- Object
- Nfe::Reader::Provider
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/provider.rb
Overview
Identificação do Emitente 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.
-
#cnae ⇒ Object
readonly
Returns the value of attribute cnae.
-
#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.
-
#fantasy ⇒ Object
readonly
Returns the value of attribute fantasy.
-
#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.
-
#regime ⇒ Object
readonly
Returns the value of attribute regime.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#state_registration ⇒ Object
readonly
Returns the value of attribute state_registration.
-
#state_registration_st ⇒ Object
readonly
Returns the value of attribute state_registration_st.
-
#zip_code ⇒ Object
readonly
Returns the value of attribute zip_code.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Provider
constructor
Fields Values.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Provider
Fields Values
CRT: 1 - Simples Nacional,
2 - Simples Nacional – excesso de sublimite de receita bruta,
3 - Regime Normal
18 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 |
# File 'lib/nfe_reader/provider.rb', line 18 def initialize(attrs = {}) # Provider Info @cnpj = attrs[:CNPJ] @cpf = attrs[:CPF] @name = attrs[:xNome] @fantasy = attrs[:xFant] @state_registration = attrs[:IE] @state_registration_st = attrs[:IEST] @city_registration = attrs[:IM] @regime = attrs[:CRT] @cnae = attrs[:CNAE] # Address if attrs[:enderEmit] @phone = attrs[:enderEmit][:fone] @address = attrs[:enderEmit][:xLgr] @number = attrs[:enderEmit][:nro] @complement = attrs[:enderEmit][:xCpl] @neighborhood = attrs[:enderEmit][:xBairro] @city_code = attrs[:enderEmit][:cMun] @city = attrs[:enderEmit][:xMun] @zip_code = attrs[:enderEmit][:CEP] @country_code = attrs[:enderEmit][:cPais] @country = attrs[:enderEmit][:xPais] @state = attrs[:enderEmit][:UF] end end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def address @address end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
8 9 10 |
# File 'lib/nfe_reader/provider.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/provider.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/provider.rb', line 8 def city_registration @city_registration end |
#cnae ⇒ Object (readonly)
Returns the value of attribute cnae.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def cnae @cnae end |
#cnpj ⇒ Object (readonly)
Returns the value of attribute cnpj.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def cnpj @cnpj end |
#complement ⇒ Object (readonly)
Returns the value of attribute complement.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def complement @complement end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
8 9 10 |
# File 'lib/nfe_reader/provider.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/provider.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/provider.rb', line 8 def cpf @cpf end |
#fantasy ⇒ Object (readonly)
Returns the value of attribute fantasy.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def fantasy @fantasy end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def name @name end |
#neighborhood ⇒ Object (readonly)
Returns the value of attribute neighborhood.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def neighborhood @neighborhood end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def number @number end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def phone @phone end |
#regime ⇒ Object (readonly)
Returns the value of attribute regime.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def regime @regime end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
8 9 10 |
# File 'lib/nfe_reader/provider.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/provider.rb', line 8 def state_registration @state_registration end |
#state_registration_st ⇒ Object (readonly)
Returns the value of attribute state_registration_st.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def state_registration_st @state_registration_st end |
#zip_code ⇒ Object (readonly)
Returns the value of attribute zip_code.
8 9 10 |
# File 'lib/nfe_reader/provider.rb', line 8 def zip_code @zip_code end |