Class: Nfe::Importation
- Inherits:
-
Object
- Object
- Nfe::Importation
- Defined in:
- lib/nfe_reader/product/importation.rb
Overview
Declaração de Importação
Instance Attribute Summary collapse
-
#addition_descount ⇒ Object
readonly
Returns the value of attribute addition_descount.
-
#addition_number ⇒ Object
readonly
Returns the value of attribute addition_number.
-
#addition_sequence ⇒ Object
readonly
Returns the value of attribute addition_sequence.
-
#customs_clearance ⇒ Object
readonly
Returns the value of attribute customs_clearance.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#drawn ⇒ Object
readonly
Returns the value of attribute drawn.
-
#exporter ⇒ Object
readonly
Returns the value of attribute exporter.
-
#local ⇒ Object
readonly
Returns the value of attribute local.
-
#manufacturer ⇒ Object
readonly
Returns the value of attribute manufacturer.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Importation
constructor
A new instance of Importation.
Constructor Details
#initialize(attrs = {}) ⇒ Importation
Returns a new instance of Importation.
9 10 11 12 13 14 15 16 17 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 45 46 47 |
# File 'lib/nfe_reader/product/importation.rb', line 9 def initialize(attrs = {}) # Número do Documento de Importação @number = attrs[:nDI] # Data de Registro do documento @date = attrs[:dDI] # Local de desembaraço @local = attrs[:xLocDesemb] # Sigla da UF onde ocorreu o Desembaraço Aduaneiro @state = attrs[:UFDesemb] # Data do Desembaraço Aduaneiro @customs_clearance = attrs[:dDesemb] # Código do Exportador @exporter = attrs[:cExportador] # Via de transporte internacional @transport = attrs[:tpViaTransp] # Valor da AFRMM - Adicional ao Frete para Renovação da Marinha Mercante @afrmm = attrs[:vAFRMM] # Forma de importação @intermediate_kind = attrs[:tpIntermedio] # CNPJ do adquirente @cnpj = attrs[:CNPJ] # Sigla da UF @uf_customer = attrs[:UFTerceiro] # Adições if attrs[:adi] # Numero da Adição @addition_number = attrs[:adi][:nAdicaonSeqAdic] # Numero sequencial do item @addition_sequence = attrs[:adi][:nSeqAdic] # Código do fabricante estrangeiro @manufacturer = attrs[:adi][:cFabricante] # Valor do desconto do item @addition_descount = attrs[:adi][:vDescDI] # Drawback @drawn = attrs[:adi][:nDraw] end end |
Instance Attribute Details
#addition_descount ⇒ Object (readonly)
Returns the value of attribute addition_descount.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def addition_descount @addition_descount end |
#addition_number ⇒ Object (readonly)
Returns the value of attribute addition_number.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def addition_number @addition_number end |
#addition_sequence ⇒ Object (readonly)
Returns the value of attribute addition_sequence.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def addition_sequence @addition_sequence end |
#customs_clearance ⇒ Object (readonly)
Returns the value of attribute customs_clearance.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def customs_clearance @customs_clearance end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def date @date end |
#drawn ⇒ Object (readonly)
Returns the value of attribute drawn.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def drawn @drawn end |
#exporter ⇒ Object (readonly)
Returns the value of attribute exporter.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def exporter @exporter end |
#local ⇒ Object (readonly)
Returns the value of attribute local.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def local @local end |
#manufacturer ⇒ Object (readonly)
Returns the value of attribute manufacturer.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def manufacturer @manufacturer end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def number @number end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
5 6 7 |
# File 'lib/nfe_reader/product/importation.rb', line 5 def state @state end |