class PaysonAPI::V2::Models::OrderItem
Attributes
credited_amount[RW]
discount_rate[RW]
ean[RW]
image_uri[RW]
item_id[RW]
name[RW]
quantity[RW]
reference[RW]
tax_rate[RW]
total_price_excluding_tax[RW]
total_price_including_tax[RW]
total_tax_amount[RW]
type[RW]
unit_price[RW]
uri[RW]
Public Class Methods
from_hash(hash)
click to toggle source
# 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