class Ingenico::Connect::SDK::Domain::Token::UpdateTokenRequest
@attr [Ingenico::Connect::SDK::Domain::Token::TokenCard] card @attr [Ingenico::Connect::SDK::Domain::Token::TokenEWallet] e_wallet
@attr [Ingenico::Connect::SDK::Domain::Token::TokenNonSepaDirectDebit] non_sepa_direct_debit
@attr [Integer] payment_product_id
@attr [Ingenico::Connect::SDK::Domain::Token::TokenSepaDirectDebitWithoutCreditor] sepa_direct_debit
Attributes
card[RW]
e_wallet[RW]
non_sepa_direct_debit[RW]
payment_product_id[RW]
sepa_direct_debit[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# File lib/ingenico/connect/sdk/domain/token/update_token_request.rb, line 43 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::Token::TokenCard.new_from_hash(hash['card']) end if hash.has_key? 'eWallet' raise TypeError, "value '%s' is not a Hash" % [hash['eWallet']] unless hash['eWallet'].is_a? Hash @e_wallet = Ingenico::Connect::SDK::Domain::Token::TokenEWallet.new_from_hash(hash['eWallet']) end if hash.has_key? 'nonSepaDirectDebit' raise TypeError, "value '%s' is not a Hash" % [hash['nonSepaDirectDebit']] unless hash['nonSepaDirectDebit'].is_a? Hash @non_sepa_direct_debit = Ingenico::Connect::SDK::Domain::Token::TokenNonSepaDirectDebit.new_from_hash(hash['nonSepaDirectDebit']) end if hash.has_key? 'paymentProductId' @payment_product_id = hash['paymentProductId'] end if hash.has_key? 'sepaDirectDebit' raise TypeError, "value '%s' is not a Hash" % [hash['sepaDirectDebit']] unless hash['sepaDirectDebit'].is_a? Hash @sepa_direct_debit = Ingenico::Connect::SDK::Domain::Token::TokenSepaDirectDebitWithoutCreditor.new_from_hash(hash['sepaDirectDebit']) 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/token/update_token_request.rb, line 33 def to_h hash = super hash['card'] = @card.to_h unless @card.nil? hash['eWallet'] = @e_wallet.to_h unless @e_wallet.nil? hash['nonSepaDirectDebit'] = @non_sepa_direct_debit.to_h unless @non_sepa_direct_debit.nil? hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash['sepaDirectDebit'] = @sepa_direct_debit.to_h unless @sepa_direct_debit.nil? hash end