class Ingenico::Connect::SDK::Domain::Payment::LineItemLevel3InterchangeInformation

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

Attributes

discount_amount[RW]
line_amount_total[RW]
product_code[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/line_item_level3_interchange_information.rb, line 51
def from_hash(hash)
  super
  if hash.has_key? 'discountAmount'
    @discount_amount = hash['discountAmount']
  end
  if hash.has_key? 'lineAmountTotal'
    @line_amount_total = hash['lineAmountTotal']
  end
  if hash.has_key? 'productCode'
    @product_code = hash['productCode']
  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/line_item_level3_interchange_information.rb, line 38
def to_h
  hash = super
  hash['discountAmount'] = @discount_amount unless @discount_amount.nil?
  hash['lineAmountTotal'] = @line_amount_total unless @line_amount_total.nil?
  hash['productCode'] = @product_code unless @product_code.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