class Ingenico::Connect::SDK::Domain::Sessions::SessionRequest
@attr [Ingenico::Connect::SDK::Domain::Sessions::PaymentProductFiltersClientSession] payment_product_filters
@attr [Array<String>] tokens
Attributes
payment_product_filters[RW]
tokens[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_request.rb, line 28 def from_hash(hash) super if hash.has_key? 'paymentProductFilters' raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']] unless hash['paymentProductFilters'].is_a? Hash @payment_product_filters = Ingenico::Connect::SDK::Domain::Sessions::PaymentProductFiltersClientSession.new_from_hash(hash['paymentProductFilters']) end if hash.has_key? 'tokens' raise TypeError, "value '%s' is not an Array" % [hash['tokens']] unless hash['tokens'].is_a? Array @tokens = [] hash['tokens'].each do |e| @tokens << e end 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_request.rb, line 21 def to_h hash = super hash['paymentProductFilters'] = @payment_product_filters.to_h unless @payment_product_filters.nil? hash['tokens'] = @tokens unless @tokens.nil? hash end