Class: WebmaniabrNfeRuby::Models::Order
- Inherits:
-
Object
- Object
- WebmaniabrNfeRuby::Models::Order
- Defined in:
- lib/models/order.rb
Instance Attribute Summary collapse
-
#discount ⇒ Object
Returns the value of attribute discount.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#presence ⇒ Object
Returns the value of attribute presence.
-
#ship_tax ⇒ Object
Returns the value of attribute ship_tax.
-
#ship_value ⇒ Object
Returns the value of attribute ship_value.
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Order
constructor
A new instance of Order.
- #to_hash ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Order
Returns a new instance of Order.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/models/order.rb', line 7 def initialize( = {}) @payment = [:payment] @presence = [:presence] @ship_type = [:ship_type] @ship_value = [:ship_value] @discount = [:discount] @total = [:total] @other_costs = [:other_costs] @fisco_informations = [:fisco_informations] @complement_information = [:complement_information] end |
Instance Attribute Details
#discount ⇒ Object
Returns the value of attribute discount.
4 5 6 |
# File 'lib/models/order.rb', line 4 def discount @discount end |
#payment ⇒ Object
Returns the value of attribute payment.
4 5 6 |
# File 'lib/models/order.rb', line 4 def payment @payment end |
#presence ⇒ Object
Returns the value of attribute presence.
4 5 6 |
# File 'lib/models/order.rb', line 4 def presence @presence end |
#ship_tax ⇒ Object
Returns the value of attribute ship_tax.
4 5 6 |
# File 'lib/models/order.rb', line 4 def ship_tax @ship_tax end |
#ship_value ⇒ Object
Returns the value of attribute ship_value.
4 5 6 |
# File 'lib/models/order.rb', line 4 def ship_value @ship_value end |
#total ⇒ Object
Returns the value of attribute total.
4 5 6 |
# File 'lib/models/order.rb', line 4 def total @total end |
Instance Method Details
#to_hash ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/models/order.rb', line 19 def to_hash { pagamento: @payment, presenca: @presence, modalidade_frete: @ship_type, frete: @ship_value, discount: @discount, total: @total, despesas_acessorias: @other_costs, informacoes_fisco: @fisco_informations, informacoes_complementares: @complement_information } end |