class Ingenico::Direct::SDK::Domain::PaymentProductFiltersHostedCheckout

@attr [Ingenico::Direct::SDK::Domain::PaymentProductFilter] exclude @attr [Ingenico::Direct::SDK::Domain::PaymentProductFilter] restrict_to

Attributes

exclude[RW]
restrict_to[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/payment_product_filters_hosted_checkout.rb, line 25
def from_hash(hash)
  super
  if hash.key? 'exclude'
    raise TypeError, "value '%s' is not a Hash" % [hash['exclude']] unless hash['exclude'].is_a? Hash
    @exclude = Ingenico::Direct::SDK::Domain::PaymentProductFilter.new_from_hash(hash['exclude'])
  end
  if hash.key? 'restrictTo'
    raise TypeError, "value '%s' is not a Hash" % [hash['restrictTo']] unless hash['restrictTo'].is_a? Hash
    @restrict_to = Ingenico::Direct::SDK::Domain::PaymentProductFilter.new_from_hash(hash['restrictTo'])
  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/payment_product_filters_hosted_checkout.rb, line 18
def to_h
  hash = super
  hash['exclude'] = @exclude.to_h if @exclude
  hash['restrictTo'] = @restrict_to.to_h if @restrict_to
  hash
end