class Ingenico::Connect::SDK::Domain::Token::TokenCardData
@attr [Ingenico::Connect::SDK::Domain::Definitions::CardWithoutCvv] card_without_cvv
@attr [String] first_transaction_date
@attr [String] provider_reference
Attributes
card_without_cvv[RW]
first_transaction_date[RW]
provider_reference[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/token_card_data.rb, line 32 def from_hash(hash) super if hash.has_key? 'cardWithoutCvv' raise TypeError, "value '%s' is not a Hash" % [hash['cardWithoutCvv']] unless hash['cardWithoutCvv'].is_a? Hash @card_without_cvv = Ingenico::Connect::SDK::Domain::Definitions::CardWithoutCvv.new_from_hash(hash['cardWithoutCvv']) end if hash.has_key? 'firstTransactionDate' @first_transaction_date = hash['firstTransactionDate'] end if hash.has_key? 'providerReference' @provider_reference = hash['providerReference'] 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/token_card_data.rb, line 24 def to_h hash = super hash['cardWithoutCvv'] = @card_without_cvv.to_h unless @card_without_cvv.nil? hash['firstTransactionDate'] = @first_transaction_date unless @first_transaction_date.nil? hash['providerReference'] = @provider_reference unless @provider_reference.nil? hash end