class Ingenico::Direct::SDK::Domain::CardPayoutMethodSpecificInput

@attr [Ingenico::Direct::SDK::Domain::Card] card @attr [Integer] payment_product_id @attr [String] token

Attributes

card[RW]
payment_product_id[RW]
token[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/card_payout_method_specific_input.rb, line 28
def from_hash(hash)
  super
  if hash.key? 'card'
    raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
    @card = Ingenico::Direct::SDK::Domain::Card.new_from_hash(hash['card'])
  end
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
  @token = hash['token'] if hash.key? 'token'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/card_payout_method_specific_input.rb, line 20
def to_h
  hash = super
  hash['card'] = @card.to_h if @card
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash['token'] = @token unless @token.nil?
  hash
end