Class: Worldline::Connect::SDK::V1::Domain::TokenCardData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::TokenCardData
- Defined in:
- lib/worldline/connect/sdk/v1/domain/token_card_data.rb
Instance Attribute Summary collapse
-
#card_without_cvv ⇒ Worldline::Connect::SDK::V1::Domain::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 Domain::DataObject
Instance Attribute Details
#card_without_cvv ⇒ Worldline::Connect::SDK::V1::Domain::CardWithoutCvv
Returns the current value of card_without_cvv.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/token_card_data.rb', line 16 def card_without_cvv @card_without_cvv end |
#first_transaction_date ⇒ String
Returns the current value of first_transaction_date.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/token_card_data.rb', line 16 def first_transaction_date @first_transaction_date end |
#provider_reference ⇒ String
Returns the current value of provider_reference.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/token_card_data.rb', line 16 def provider_reference @provider_reference end |
Instance Method Details
#from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/worldline/connect/sdk/v1/domain/token_card_data.rb', line 33 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 = Worldline::Connect::SDK::V1::Domain::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
25 26 27 28 29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/token_card_data.rb', line 25 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 |