Class: OnlinePayments::SDK::Domain::NetworkTokenEssentials
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::NetworkTokenEssentials
- Defined in:
- lib/onlinepayments/sdk/domain/network_token_essentials.rb
Instance Attribute Summary collapse
-
#bin ⇒ String
The current value of bin.
-
#country_code ⇒ String
The current value of country_code.
-
#network_token ⇒ String
The current value of network_token.
-
#network_token_state ⇒ String
The current value of network_token_state.
-
#network_token_used ⇒ true/false
The current value of network_token_used.
-
#token_expiry_date ⇒ String
The current value of token_expiry_date.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#bin ⇒ String
Returns the current value of bin.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 15 def bin @bin end |
#country_code ⇒ String
Returns the current value of country_code.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 15 def country_code @country_code end |
#network_token ⇒ String
Returns the current value of network_token.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 15 def network_token @network_token end |
#network_token_state ⇒ String
Returns the current value of network_token_state.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 15 def network_token_state @network_token_state end |
#network_token_used ⇒ true/false
Returns the current value of network_token_used.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 15 def network_token_used @network_token_used end |
#token_expiry_date ⇒ String
Returns the current value of token_expiry_date.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 15 def token_expiry_date @token_expiry_date end |
Instance Method Details
#from_hash(hash) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 41 def from_hash(hash) super if hash.has_key? 'bin' @bin = hash['bin'] end if hash.has_key? 'countryCode' @country_code = hash['countryCode'] end if hash.has_key? 'networkToken' @network_token = hash['networkToken'] end if hash.has_key? 'networkTokenState' @network_token_state = hash['networkTokenState'] end if hash.has_key? 'networkTokenUsed' @network_token_used = hash['networkTokenUsed'] end if hash.has_key? 'tokenExpiryDate' @token_expiry_date = hash['tokenExpiryDate'] end end |
#to_h ⇒ Hash
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 30 def to_h hash = super hash['bin'] = @bin unless @bin.nil? hash['countryCode'] = @country_code unless @country_code.nil? hash['networkToken'] = @network_token unless @network_token.nil? hash['networkTokenState'] = @network_token_state unless @network_token_state.nil? hash['networkTokenUsed'] = @network_token_used unless @network_token_used.nil? hash['tokenExpiryDate'] = @token_expiry_date unless @token_expiry_date.nil? hash end |