class Ingenico::Connect::SDK::Domain::Sessions::PaymentProductFiltersClientSession

@attr [Ingenico::Connect::SDK::Domain::Definitions::PaymentProductFilter] exclude @attr [Ingenico::Connect::SDK::Domain::Definitions::PaymentProductFilter] restrict_to

Attributes

exclude[RW]
restrict_to[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/sessions/payment_product_filters_client_session.rb, line 28
def from_hash(hash)
  super
  if hash.has_key? 'exclude'
    raise TypeError, "value '%s' is not a Hash" % [hash['exclude']] unless hash['exclude'].is_a? Hash
    @exclude = Ingenico::Connect::SDK::Domain::Definitions::PaymentProductFilter.new_from_hash(hash['exclude'])
  end
  if hash.has_key? 'restrictTo'
    raise TypeError, "value '%s' is not a Hash" % [hash['restrictTo']] unless hash['restrictTo'].is_a? Hash
    @restrict_to = Ingenico::Connect::SDK::Domain::Definitions::PaymentProductFilter.new_from_hash(hash['restrictTo'])
  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/payment_product_filters_client_session.rb, line 21
def to_h
  hash = super
  hash['exclude'] = @exclude.to_h unless @exclude.nil?
  hash['restrictTo'] = @restrict_to.to_h unless @restrict_to.nil?
  hash
end