Class: OnlinePayments::SDK::Domain::TokenInfo
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::TokenInfo
- Defined in:
- lib/onlinepayments/sdk/domain/token_info.rb
Instance Attribute Summary collapse
-
#expiry_date ⇒ String
The current value of expiry_date.
-
#is_temporary ⇒ true/false
The current value of is_temporary.
-
#masked_pan ⇒ String
The current value of masked_pan.
-
#token_id ⇒ String
The current value of token_id.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#expiry_date ⇒ String
Returns the current value of expiry_date.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/token_info.rb', line 13 def expiry_date @expiry_date end |
#is_temporary ⇒ true/false
Returns the current value of is_temporary.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/token_info.rb', line 13 def is_temporary @is_temporary end |
#masked_pan ⇒ String
Returns the current value of masked_pan.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/token_info.rb', line 13 def masked_pan @masked_pan end |
#token_id ⇒ String
Returns the current value of token_id.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/token_info.rb', line 13 def token_id @token_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/onlinepayments/sdk/domain/token_info.rb', line 33 def from_hash(hash) super if hash.has_key? 'expiryDate' @expiry_date = hash['expiryDate'] end if hash.has_key? 'isTemporary' @is_temporary = hash['isTemporary'] end if hash.has_key? 'maskedPan' @masked_pan = hash['maskedPan'] end if hash.has_key? 'tokenId' @token_id = hash['tokenId'] end end |
#to_h ⇒ Hash
24 25 26 27 28 29 30 31 |
# File 'lib/onlinepayments/sdk/domain/token_info.rb', line 24 def to_h hash = super hash['expiryDate'] = @expiry_date unless @expiry_date.nil? hash['isTemporary'] = @is_temporary unless @is_temporary.nil? hash['maskedPan'] = @masked_pan unless @masked_pan.nil? hash['tokenId'] = @token_id unless @token_id.nil? hash end |