Class: PaysonAPI::V2::Models::OrderItem
- Inherits:
-
Object
- Object
- PaysonAPI::V2::Models::OrderItem
- Defined in:
- lib/payson_api/v2/models/order_item.rb
Instance Attribute Summary collapse
-
#credited_amount ⇒ Object
Returns the value of attribute credited_amount.
-
#discount_rate ⇒ Object
Returns the value of attribute discount_rate.
-
#ean ⇒ Object
Returns the value of attribute ean.
-
#image_uri ⇒ Object
Returns the value of attribute image_uri.
-
#item_id ⇒ Object
Returns the value of attribute item_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#tax_rate ⇒ Object
Returns the value of attribute tax_rate.
-
#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.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unit_price ⇒ Object
Returns the value of attribute unit_price.
-
#uri ⇒ Object
Returns the value of attribute uri.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
rubocop:disable Metrics/AbcSize.
Instance Attribute Details
#credited_amount ⇒ Object
Returns the value of attribute credited_amount.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def credited_amount @credited_amount end |
#discount_rate ⇒ Object
Returns the value of attribute discount_rate.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def discount_rate @discount_rate end |
#ean ⇒ Object
Returns the value of attribute ean.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def ean @ean end |
#image_uri ⇒ Object
Returns the value of attribute image_uri.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def image_uri @image_uri end |
#item_id ⇒ Object
Returns the value of attribute item_id.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def item_id @item_id end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def name @name end |
#quantity ⇒ Object
Returns the value of attribute quantity.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def quantity @quantity end |
#reference ⇒ Object
Returns the value of attribute reference.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def reference @reference end |
#tax_rate ⇒ Object
Returns the value of attribute tax_rate.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def tax_rate @tax_rate 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_item.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_item.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_item.rb', line 7 def total_tax_amount @total_tax_amount end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def type @type end |
#unit_price ⇒ Object
Returns the value of attribute unit_price.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def unit_price @unit_price end |
#uri ⇒ Object
Returns the value of attribute uri.
7 8 9 |
# File 'lib/payson_api/v2/models/order_item.rb', line 7 def uri @uri end |
Class Method Details
.from_hash(hash) ⇒ Object
rubocop:disable Metrics/AbcSize
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/payson_api/v2/models/order_item.rb', line 11 def self.from_hash(hash) # rubocop:disable Metrics/AbcSize new.tap do |item| item.item_id = hash['itemId'] item.discount_rate = hash['discountRate'] item.ean = hash['ean'] item.image_uri = hash['imageUri'] item.name = hash['name'] item.quantity = hash['quantity'] item.reference = hash['reference'] item.tax_rate = hash['taxRate'] item.total_price_excluding_tax = hash['totalPriceExcludingTax'] item.total_price_including_tax = hash['totalPriceIncludingTax'] item.total_tax_amount = hash['totalTaxAmount'] item.credited_amount = hash['creditedAmount'] item.type = hash['type'] item.unit_price = hash['unitPrice'] item.uri = hash['uri'] end end |