class Ingenico::Connect::SDK::Domain::Hostedcheckout::PaymentProductFiltersHostedCheckout
@attr [Ingenico::Connect::SDK::Domain::Definitions::PaymentProductFilter] exclude @attr [Ingenico::Connect::SDK::Domain::Definitions::PaymentProductFilter] restrict_to
@attr [true/false] tokens_only
Attributes
exclude[RW]
restrict_to[RW]
tokens_only[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/hostedcheckout/payment_product_filters_hosted_checkout.rb, line 32 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 if hash.has_key? 'tokensOnly' @tokens_only = hash['tokensOnly'] 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/hostedcheckout/payment_product_filters_hosted_checkout.rb, line 24 def to_h hash = super hash['exclude'] = @exclude.to_h unless @exclude.nil? hash['restrictTo'] = @restrict_to.to_h unless @restrict_to.nil? hash['tokensOnly'] = @tokens_only unless @tokens_only.nil? hash end