Class: Worldline::Connect::SDK::V1::Domain::SessionResponse
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::SessionResponse
- Defined in:
- lib/worldline/connect/sdk/v1/domain/session_response.rb
Instance Attribute Summary collapse
-
#asset_url ⇒ String
The current value of asset_url.
-
#client_api_url ⇒ String
The current value of client_api_url.
-
#client_session_id ⇒ String
The current value of client_session_id.
-
#customer_id ⇒ String
The current value of customer_id.
-
#invalid_tokens ⇒ Array<String>
The current value of invalid_tokens.
-
#region ⇒ String
The current value of region.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#asset_url ⇒ String
Returns the current value of asset_url.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/session_response.rb', line 18 def asset_url @asset_url end |
#client_api_url ⇒ String
Returns the current value of client_api_url.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/session_response.rb', line 18 def client_api_url @client_api_url end |
#client_session_id ⇒ String
Returns the current value of client_session_id.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/session_response.rb', line 18 def client_session_id @client_session_id end |
#customer_id ⇒ String
Returns the current value of customer_id.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/session_response.rb', line 18 def customer_id @customer_id end |
#invalid_tokens ⇒ Array<String>
Returns the current value of invalid_tokens.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/session_response.rb', line 18 def invalid_tokens @invalid_tokens end |
#region ⇒ String
Returns the current value of region.
18 19 20 |
# File 'lib/worldline/connect/sdk/v1/domain/session_response.rb', line 18 def region @region end |
Instance Method Details
#from_hash(hash) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/worldline/connect/sdk/v1/domain/session_response.rb', line 44 def from_hash(hash) super if hash.has_key? 'assetUrl' @asset_url = hash['assetUrl'] end if hash.has_key? 'clientApiUrl' @client_api_url = hash['clientApiUrl'] end if hash.has_key? 'clientSessionId' @client_session_id = hash['clientSessionId'] end if hash.has_key? 'customerId' @customer_id = hash['customerId'] end if hash.has_key? 'invalidTokens' raise TypeError, "value '%s' is not an Array" % [hash['invalidTokens']] unless hash['invalidTokens'].is_a? Array @invalid_tokens = [] hash['invalidTokens'].each do |e| @invalid_tokens << e end end if hash.has_key? 'region' @region = hash['region'] end end |
#to_h ⇒ Hash
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/worldline/connect/sdk/v1/domain/session_response.rb', line 33 def to_h hash = super hash['assetUrl'] = @asset_url unless @asset_url.nil? hash['clientApiUrl'] = @client_api_url unless @client_api_url.nil? hash['clientSessionId'] = @client_session_id unless @client_session_id.nil? hash['customerId'] = @customer_id unless @customer_id.nil? hash['invalidTokens'] = @invalid_tokens unless @invalid_tokens.nil? hash['region'] = @region unless @region.nil? hash end |