class Ingenico::Direct::SDK::Domain::PaymentProduct302SpecificData

@attr [Array<String>] networks

Attributes

networks[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/payment_product302_specific_data.rb, line 21
def from_hash(hash)
  super
  if hash.key? 'networks'
    raise TypeError, "value '%s' is not an Array" % [hash['networks']] unless hash['networks'].is_a? Array
    @networks = []
    hash['networks'].each do |e|
      @networks << 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/payment_product302_specific_data.rb, line 15
def to_h
  hash = super
  hash['networks'] = @networks unless @networks.nil?
  hash
end