class Ingenico::Connect::SDK::Domain::Sessions::SessionResponse
@attr [String] asset_url
@attr [String] client_api_url
@attr [String] client_session_id
@attr [String] customer_id
@attr [Array<String>] invalid_tokens
@attr [String] region
Attributes
asset_url[RW]
client_api_url[RW]
client_session_id[RW]
customer_id[RW]
invalid_tokens[RW]
region[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# File lib/ingenico/connect/sdk/domain/sessions/session_response.rb, line 43 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()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/sessions/session_response.rb, line 32 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