Class: Worldline::Connect::SDK::V1::Domain::SessionRequest
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::SessionRequest
- Defined in:
- lib/worldline/connect/sdk/v1/domain/session_request.rb
Instance Attribute Summary collapse
-
#payment_product_filters ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductFiltersClientSession
The current value of payment_product_filters.
-
#tokens ⇒ Array<String>
The current value of tokens.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#payment_product_filters ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductFiltersClientSession
Returns the current value of payment_product_filters.
15 16 17 |
# File 'lib/worldline/connect/sdk/v1/domain/session_request.rb', line 15 def payment_product_filters @payment_product_filters end |
#tokens ⇒ Array<String>
Returns the current value of tokens.
15 16 17 |
# File 'lib/worldline/connect/sdk/v1/domain/session_request.rb', line 15 def tokens @tokens end |
Instance Method Details
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/worldline/connect/sdk/v1/domain/session_request.rb', line 29 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 = Worldline::Connect::SDK::V1::Domain::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 ⇒ Hash
22 23 24 25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/session_request.rb', line 22 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 |