class Ingenico::Direct::SDK::Domain::GetPaymentProductGroupsResponse
@attr [Array<Ingenico::Direct::SDK::Domain::PaymentProductGroup>] payment_product_groups
Attributes
payment_product_groups[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/get_payment_product_groups_response.rb, line 22 def from_hash(hash) super if hash.key? 'paymentProductGroups' raise TypeError, "value '%s' is not an Array" % [hash['paymentProductGroups']] unless hash['paymentProductGroups'].is_a? Array @payment_product_groups = [] hash['paymentProductGroups'].each do |e| @payment_product_groups << Ingenico::Direct::SDK::Domain::PaymentProductGroup.new_from_hash(e) end 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/get_payment_product_groups_response.rb, line 16 def to_h hash = super hash['paymentProductGroups'] = @payment_product_groups.collect(&:to_h) if @payment_product_groups hash end