Class: OnlinePayments::SDK::Domain::GetHostedTokenizationResponse
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::GetHostedTokenizationResponse
- Defined in:
- lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb
Instance Attribute Summary collapse
-
#token ⇒ OnlinePayments::SDK::Domain::TokenResponse
The current value of token.
-
#token_status ⇒ String
The current value of token_status.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#token ⇒ OnlinePayments::SDK::Domain::TokenResponse
Returns the current value of token.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb', line 12 def token @token end |
#token_status ⇒ String
Returns the current value of token_status.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb', line 12 def token_status @token_status end |
Instance Method Details
#from_hash(hash) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb', line 26 def from_hash(hash) super if hash.has_key? 'token' raise TypeError, "value '%s' is not a Hash" % [hash['token']] unless hash['token'].is_a? Hash @token = OnlinePayments::SDK::Domain::TokenResponse.new_from_hash(hash['token']) end if hash.has_key? 'tokenStatus' @token_status = hash['tokenStatus'] end end |
#to_h ⇒ Hash
19 20 21 22 23 24 |
# File 'lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb', line 19 def to_h hash = super hash['token'] = @token.to_h unless @token.nil? hash['tokenStatus'] = @token_status unless @token_status.nil? hash end |