class Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData

@attr [Integer] discount_amount @attr [Integer] duty_amount @attr [Integer] shipping_amount @deprecated Use ShoppingCart.amountBreakdown instead

Attributes

discount_amount[RW]

@deprecated Use ShoppingCart.amountBreakdown with type DISCOUNT instead

duty_amount[RW]

@deprecated Use ShoppingCart.amountBreakdown with type DUTY instead

shipping_amount[RW]

@deprecated Use ShoppingCart.amountBreakdown with type SHIPPING instead

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb, line 38
def from_hash(hash)
  super
  if hash.has_key? 'discountAmount'
    @discount_amount = hash['discountAmount']
  end
  if hash.has_key? 'dutyAmount'
    @duty_amount = hash['dutyAmount']
  end
  if hash.has_key? 'shippingAmount'
    @shipping_amount = hash['shippingAmount']
  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/level3_summary_data.rb, line 30
def to_h
  hash = super
  hash['discountAmount'] = @discount_amount unless @discount_amount.nil?
  hash['dutyAmount'] = @duty_amount unless @duty_amount.nil?
  hash['shippingAmount'] = @shipping_amount unless @shipping_amount.nil?
  hash
end