Class: PaysonAPI::V2::Models::Order
- Inherits:
-
Object
- Object
- PaysonAPI::V2::Models::Order
- Defined in:
- lib/payson_api/v2/models/order.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#items ⇒ Object
Returns the value of attribute items.
-
#total_credited_amount ⇒ Object
Returns the value of attribute total_credited_amount.
-
#total_fee_excluding_tax ⇒ Object
Returns the value of attribute total_fee_excluding_tax.
-
#total_fee_including_tax ⇒ Object
Returns the value of attribute total_fee_including_tax.
-
#total_price_excluding_tax ⇒ Object
Returns the value of attribute total_price_excluding_tax.
-
#total_price_including_tax ⇒ Object
Returns the value of attribute total_price_including_tax.
-
#total_tax_amount ⇒ Object
Returns the value of attribute total_tax_amount.
Class Method Summary collapse
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
7 8 9 |
# File 'lib/payson_api/v2/models/order.rb', line 7 def currency @currency end |
#items ⇒ Object
Returns the value of attribute items.
7 8 9 |
# File 'lib/payson_api/v2/models/order.rb', line 7 def items @items end |
#total_credited_amount ⇒ Object
Returns the value of attribute total_credited_amount.
7 8 9 |
# File 'lib/payson_api/v2/models/order.rb', line 7 def total_credited_amount @total_credited_amount end |
#total_fee_excluding_tax ⇒ Object
Returns the value of attribute total_fee_excluding_tax.
7 8 9 |
# File 'lib/payson_api/v2/models/order.rb', line 7 def total_fee_excluding_tax @total_fee_excluding_tax end |
#total_fee_including_tax ⇒ Object
Returns the value of attribute total_fee_including_tax.
7 8 9 |
# File 'lib/payson_api/v2/models/order.rb', line 7 def total_fee_including_tax @total_fee_including_tax end |
#total_price_excluding_tax ⇒ Object
Returns the value of attribute total_price_excluding_tax.
7 8 9 |
# File 'lib/payson_api/v2/models/order.rb', line 7 def total_price_excluding_tax @total_price_excluding_tax end |
#total_price_including_tax ⇒ Object
Returns the value of attribute total_price_including_tax.
7 8 9 |
# File 'lib/payson_api/v2/models/order.rb', line 7 def total_price_including_tax @total_price_including_tax end |
#total_tax_amount ⇒ Object
Returns the value of attribute total_tax_amount.
7 8 9 |
# File 'lib/payson_api/v2/models/order.rb', line 7 def total_tax_amount @total_tax_amount end |
Class Method Details
.from_hash(hash) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/payson_api/v2/models/order.rb', line 11 def self.from_hash(hash) new.tap do |order| order.currency = hash['currency'] order.total_fee_excluding_tax = hash['totalFeeExcludingTax'] order.total_fee_including_tax = hash['totalFeeIncludingTax'] order.total_price_excluding_tax = hash['totalPriceIncludingTax'] order.total_price_including_tax = hash['totalPriceIncludingTax'] order.total_tax_amount = hash['totalTaxAmount'] order.total_credited_amount = hash['totalCreditedAmount'] if hash['items'] order.items = [] hash['items'].each do |item| order.items << PaysonAPI::V2::Models::OrderItem.from_hash(item) end end end end |