class Ingenico::Direct::SDK::Domain::SessionResponse
@attr [String] asset_url
@attr [String] client_api_url
@attr [String] client_session_id
@attr [String] customer_id
@attr [Array<String>] invalid_tokens
Attributes
asset_url[RW]
client_api_url[RW]
client_session_id[RW]
customer_id[RW]
invalid_tokens[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/session_response.rb, line 33 def from_hash(hash) super @asset_url = hash['assetUrl'] if hash.key? 'assetUrl' @client_api_url = hash['clientApiUrl'] if hash.key? 'clientApiUrl' @client_session_id = hash['clientSessionId'] if hash.key? 'clientSessionId' @customer_id = hash['customerId'] if hash.key? 'customerId' if hash.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 end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/session_response.rb, line 23 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 end