class Ingenico::Direct::SDK::Domain::RefundEWalletMethodSpecificOutput

@attr [Ingenico::Direct::SDK::Domain::RefundPaymentProduct840SpecificOutput] payment_product840_specific_output @attr [Long] total_amount_paid @attr [Long] total_amount_refunded

Attributes

payment_product840_specific_output[RW]
total_amount_paid[RW]
total_amount_refunded[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/refund_e_wallet_method_specific_output.rb, line 28
def from_hash(hash)
  super
  if hash.key? 'paymentProduct840SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct840SpecificOutput']] unless hash['paymentProduct840SpecificOutput'].is_a? Hash
    @payment_product840_specific_output = Ingenico::Direct::SDK::Domain::RefundPaymentProduct840SpecificOutput.new_from_hash(hash['paymentProduct840SpecificOutput'])
  end
  @total_amount_paid = hash['totalAmountPaid'] if hash.key? 'totalAmountPaid'
  @total_amount_refunded = hash['totalAmountRefunded'] if hash.key? 'totalAmountRefunded'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/refund_e_wallet_method_specific_output.rb, line 20
def to_h
  hash = super
  hash['paymentProduct840SpecificOutput'] = @payment_product840_specific_output.to_h if @payment_product840_specific_output
  hash['totalAmountPaid'] = @total_amount_paid unless @total_amount_paid.nil?
  hash['totalAmountRefunded'] = @total_amount_refunded unless @total_amount_refunded.nil?
  hash
end