class Ingenico::Connect::SDK::Domain::Dispute::DisputesResponse

@attr [Array<Ingenico::Connect::SDK::Domain::Dispute::Dispute>] disputes

Attributes

disputes[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/dispute/disputes_response.rb, line 24
def from_hash(hash)
  super
  if hash.has_key? 'disputes'
    raise TypeError, "value '%s' is not an Array" % [hash['disputes']] unless hash['disputes'].is_a? Array
    @disputes = []
    hash['disputes'].each do |e|
      @disputes << Ingenico::Connect::SDK::Domain::Dispute::Dispute.new_from_hash(e)
    end
  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/dispute/disputes_response.rb, line 18
def to_h
  hash = super
  hash['disputes'] = @disputes.collect{|val| val.to_h} unless @disputes.nil?
  hash
end