class Ingenico::Connect::SDK::Domain::Payout::CardPayoutMethodSpecificInput

@attr [Ingenico::Connect::SDK::Domain::Definitions::Card] card @attr [Integer] payment_product_id @attr [Ingenico::Connect::SDK::Domain::Payout::PayoutRecipient] recipient @attr [String] token

Attributes

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

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payout/card_payout_method_specific_input.rb, line 37
def from_hash(hash)
  super
  if hash.has_key? 'card'
    raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
    @card = Ingenico::Connect::SDK::Domain::Definitions::Card.new_from_hash(hash['card'])
  end
  if hash.has_key? 'paymentProductId'
    @payment_product_id = hash['paymentProductId']
  end
  if hash.has_key? 'recipient'
    raise TypeError, "value '%s' is not a Hash" % [hash['recipient']] unless hash['recipient'].is_a? Hash
    @recipient = Ingenico::Connect::SDK::Domain::Payout::PayoutRecipient.new_from_hash(hash['recipient'])
  end
  if hash.has_key? 'token'
    @token = hash['token']
  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/payout/card_payout_method_specific_input.rb, line 28
def to_h
  hash = super
  hash['card'] = @card.to_h unless @card.nil?
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash['recipient'] = @recipient.to_h unless @recipient.nil?
  hash['token'] = @token unless @token.nil?
  hash
end