Class: OnlinePayments::SDK::Domain::NetworkTokenEssentials
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::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.
-
#token_expiry_date ⇒ String
The current value of token_expiry_date.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#bin ⇒ String
Returns the current value of bin.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 13 def bin @bin end |
#country_code ⇒ String
Returns the current value of country_code.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 13 def country_code @country_code end |
#network_token ⇒ String
Returns the current value of network_token.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 13 def network_token @network_token end |
#token_expiry_date ⇒ String
Returns the current value of token_expiry_date.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 13 def token_expiry_date @token_expiry_date end |
Instance Method Details
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 29 def from_hash(hash) super @bin = hash['bin'] if hash.key? 'bin' @country_code = hash['countryCode'] if hash.key? 'countryCode' @network_token = hash['networkToken'] if hash.key? 'networkToken' @token_expiry_date = hash['tokenExpiryDate'] if hash.key? 'tokenExpiryDate' end |
#to_h ⇒ Hash
20 21 22 23 24 25 26 27 |
# File 'lib/onlinepayments/sdk/domain/network_token_essentials.rb', line 20 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['tokenExpiryDate'] = @token_expiry_date unless @token_expiry_date.nil? hash end |