Class: OnlinePayments::SDK::Domain::GetHostedFieldsSessionResponse
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::GetHostedFieldsSessionResponse
- Defined in:
- lib/onlinepayments/sdk/domain/get_hosted_fields_session_response.rb
Instance Attribute Summary collapse
-
#session_id ⇒ String
The current value of session_id.
-
#token ⇒ OnlinePayments::SDK::Domain::TokenInfo
The current value of token.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#session_id ⇒ String
Returns the current value of session_id.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/get_hosted_fields_session_response.rb', line 12 def session_id @session_id end |
#token ⇒ OnlinePayments::SDK::Domain::TokenInfo
Returns the current value of token.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/get_hosted_fields_session_response.rb', line 12 def token @token 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_fields_session_response.rb', line 26 def from_hash(hash) super if hash.has_key? 'sessionId' @session_id = hash['sessionId'] end 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::TokenInfo.new_from_hash(hash['token']) end end |
#to_h ⇒ Hash
19 20 21 22 23 24 |
# File 'lib/onlinepayments/sdk/domain/get_hosted_fields_session_response.rb', line 19 def to_h hash = super hash['sessionId'] = @session_id unless @session_id.nil? hash['token'] = @token.to_h unless @token.nil? hash end |