Class: OnlinePayments::SDK::Domain::CrmToken
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::CrmToken
- Defined in:
- lib/onlinepayments/sdk/domain/crm_token.rb
Instance Attribute Summary collapse
-
#unique_account_identifier ⇒ String
The current value of unique_account_identifier.
-
#unique_card_identifier ⇒ String
The current value of unique_card_identifier.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#unique_account_identifier ⇒ String
Returns the current value of unique_account_identifier.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/crm_token.rb', line 11 def unique_account_identifier @unique_account_identifier end |
#unique_card_identifier ⇒ String
Returns the current value of unique_card_identifier.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/crm_token.rb', line 11 def unique_card_identifier @unique_card_identifier end |
Instance Method Details
#from_hash(hash) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/onlinepayments/sdk/domain/crm_token.rb', line 25 def from_hash(hash) super if hash.has_key? 'uniqueAccountIdentifier' @unique_account_identifier = hash['uniqueAccountIdentifier'] end if hash.has_key? 'uniqueCardIdentifier' @unique_card_identifier = hash['uniqueCardIdentifier'] end end |
#to_h ⇒ Hash
18 19 20 21 22 23 |
# File 'lib/onlinepayments/sdk/domain/crm_token.rb', line 18 def to_h hash = super hash['uniqueAccountIdentifier'] = @unique_account_identifier unless @unique_account_identifier.nil? hash['uniqueCardIdentifier'] = @unique_card_identifier unless @unique_card_identifier.nil? hash end |