Class: WebmaniabrNfeRuby::Models::Product
- Inherits:
-
Object
- Object
- WebmaniabrNfeRuby::Models::Product
- Defined in:
- lib/models/product.rb
Instance Attribute Summary collapse
-
#cest ⇒ Object
Returns the value of attribute cest.
-
#cnpj_product ⇒ Object
Returns the value of attribute cnpj_product.
-
#ean ⇒ Object
Returns the value of attribute ean.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ncm ⇒ Object
Returns the value of attribute ncm.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#sku ⇒ Object
Returns the value of attribute sku.
-
#subtotal ⇒ Object
Returns the value of attribute subtotal.
-
#tax_class ⇒ Object
Returns the value of attribute tax_class.
-
#total ⇒ Object
Returns the value of attribute total.
-
#unit ⇒ Object
Returns the value of attribute unit.
-
#weight ⇒ Object
Returns the value of attribute weight.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Product
constructor
A new instance of Product.
- #to_hash ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Product
Returns a new instance of Product.
7 8 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 |
# File 'lib/models/product.rb', line 7 def initialize( = {}) @name = [:name] @sku = [:sku] @ean = [:ean] @ncm = [:ncm] @cest = [:cest] @nve = [:nve] @cnpj_maker = [:cnpj_maker] @special = [:special] @drawback = [:drawback] @reg_exportation = [:reg_exportation] @nfe_exportation = [:nfe_exportation] @qtd_exportation = [:qtd_exportation] @ndoc_import = [:ndoc_import] @ddoc_import = [:ddoc_import] @local_clearance = [:local_clearance] @uf_clearance = [:uf_clearance] @clearance_date = [:clearance_date] @ship_type = [:ship_type] @afrmm = [:afrmm] @intermediation = [:intermediation] @cnpj_requester = [:cnpj_requester] @cod_exportation = [:cod_exportation] @nfci = [:nfci] @addition = [:addition] @seq_addition = [:seq_addition] @maker = [:maker] @customs_expenses = [:customs_expenses] @quantity = [:quantity] @unit = [:unit] @weight = [:weight] @origin = [:origin] @subtotal = [:subtotal] @total = [:total] @tax_class = [:tax_class] end |
Instance Attribute Details
#cest ⇒ Object
Returns the value of attribute cest.
4 5 6 |
# File 'lib/models/product.rb', line 4 def cest @cest end |
#cnpj_product ⇒ Object
Returns the value of attribute cnpj_product.
4 5 6 |
# File 'lib/models/product.rb', line 4 def cnpj_product @cnpj_product end |
#ean ⇒ Object
Returns the value of attribute ean.
4 5 6 |
# File 'lib/models/product.rb', line 4 def ean @ean end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/models/product.rb', line 4 def name @name end |
#ncm ⇒ Object
Returns the value of attribute ncm.
4 5 6 |
# File 'lib/models/product.rb', line 4 def ncm @ncm end |
#origin ⇒ Object
Returns the value of attribute origin.
4 5 6 |
# File 'lib/models/product.rb', line 4 def origin @origin end |
#quantity ⇒ Object
Returns the value of attribute quantity.
4 5 6 |
# File 'lib/models/product.rb', line 4 def quantity @quantity end |
#sku ⇒ Object
Returns the value of attribute sku.
4 5 6 |
# File 'lib/models/product.rb', line 4 def sku @sku end |
#subtotal ⇒ Object
Returns the value of attribute subtotal.
4 5 6 |
# File 'lib/models/product.rb', line 4 def subtotal @subtotal end |
#tax_class ⇒ Object
Returns the value of attribute tax_class.
4 5 6 |
# File 'lib/models/product.rb', line 4 def tax_class @tax_class end |
#total ⇒ Object
Returns the value of attribute total.
4 5 6 |
# File 'lib/models/product.rb', line 4 def total @total end |
#unit ⇒ Object
Returns the value of attribute unit.
4 5 6 |
# File 'lib/models/product.rb', line 4 def unit @unit end |
#weight ⇒ Object
Returns the value of attribute weight.
4 5 6 |
# File 'lib/models/product.rb', line 4 def weight @weight end |
Instance Method Details
#to_hash ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/models/product.rb', line 44 def to_hash { nome: @name, sku: @sku, ncm: @ncm, cest: @cest, nve: @nve, cnpj_produtor: @cnpj_produtor, especial: @special, drawback: @drawback, reg_exportacao: @reg_exportation, nfe_exportacao: @nfe_exportation, qtd_exportacao: @qtd_exportation, ndoc_importacao: @ndoc_import, ddoc_importacao: @ddoc_import, local_desembaraco: @local_clearance, uf_desembaraco: @uf_clearance, data_desembaraco: @clearance_date, via_transporte: @ship_type, afrmm: @afrmm, intermediacao: @intermediacao, cnpj_terceiro: @cnpj_requester, nfci: @nfci, seq_adicao: @seq_addition, fabricante: @maker, despesas_aduaneiras: @customs_expenses, quantidade: @quantity, unidade: @unit, peso: @weight, origem: @origin, subtotal: @subtotal, total: @total, classe_imposto: @tax_class } end |