Class: Ingenico::Connect::SDK::Domain::Token::TokenCardData
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Token::TokenCardData
- Defined in:
- lib/ingenico/connect/sdk/domain/token/token_card_data.rb
Instance Attribute Summary collapse
-
#card_without_cvv ⇒ Ingenico::Connect::SDK::Domain::Definitions::CardWithoutCvv
The current value of card_without_cvv.
-
#first_transaction_date ⇒ String
The current value of first_transaction_date.
-
#provider_reference ⇒ String
The current value of provider_reference.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#card_without_cvv ⇒ Ingenico::Connect::SDK::Domain::Definitions::CardWithoutCvv
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/token/token_card_data.rb', line 15 def card_without_cvv @card_without_cvv end |
#first_transaction_date ⇒ String
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/token/token_card_data.rb', line 15 def first_transaction_date @first_transaction_date end |
#provider_reference ⇒ String
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/token/token_card_data.rb', line 15 def provider_reference @provider_reference end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# 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 ⇒ Hash
24 25 26 27 28 29 30 |
# 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 |