class Ingenico::Connect::SDK::Domain::Payment::OrderLineDetails

@attr [Integer] discount_amount @attr [Integer] google_product_category_id @attr [Integer] line_amount_total @attr [String] product_category @attr [String] product_code @attr [String] product_name @attr [Integer] product_price @attr [String] product_type @attr [Integer] quantity @attr [Integer] tax_amount @attr [String] unit

Attributes

discount_amount[RW]
google_product_category_id[RW]
line_amount_total[RW]
product_category[RW]
product_code[RW]
product_name[RW]
product_price[RW]
product_type[RW]
quantity[RW]
tax_amount[RW]
unit[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payment/order_line_details.rb, line 63
def from_hash(hash)
  super
  if hash.has_key? 'discountAmount'
    @discount_amount = hash['discountAmount']
  end
  if hash.has_key? 'googleProductCategoryId'
    @google_product_category_id = hash['googleProductCategoryId']
  end
  if hash.has_key? 'lineAmountTotal'
    @line_amount_total = hash['lineAmountTotal']
  end
  if hash.has_key? 'productCategory'
    @product_category = hash['productCategory']
  end
  if hash.has_key? 'productCode'
    @product_code = hash['productCode']
  end
  if hash.has_key? 'productName'
    @product_name = hash['productName']
  end
  if hash.has_key? 'productPrice'
    @product_price = hash['productPrice']
  end
  if hash.has_key? 'productType'
    @product_type = hash['productType']
  end
  if hash.has_key? 'quantity'
    @quantity = hash['quantity']
  end
  if hash.has_key? 'taxAmount'
    @tax_amount = hash['taxAmount']
  end
  if hash.has_key? 'unit'
    @unit = hash['unit']
  end
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/payment/order_line_details.rb, line 47
def to_h
  hash = super
  hash['discountAmount'] = @discount_amount unless @discount_amount.nil?
  hash['googleProductCategoryId'] = @google_product_category_id unless @google_product_category_id.nil?
  hash['lineAmountTotal'] = @line_amount_total unless @line_amount_total.nil?
  hash['productCategory'] = @product_category unless @product_category.nil?
  hash['productCode'] = @product_code unless @product_code.nil?
  hash['productName'] = @product_name unless @product_name.nil?
  hash['productPrice'] = @product_price unless @product_price.nil?
  hash['productType'] = @product_type unless @product_type.nil?
  hash['quantity'] = @quantity unless @quantity.nil?
  hash['taxAmount'] = @tax_amount unless @tax_amount.nil?
  hash['unit'] = @unit unless @unit.nil?
  hash
end