class Ingenico::Connect::SDK::Domain::Refund::RefundsResponse
@attr [Array<Ingenico::Connect::SDK::Domain::Refund::RefundResult>] refunds
Attributes
refunds[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/refund/refunds_response.rb, line 24 def from_hash(hash) super if hash.has_key? 'refunds' raise TypeError, "value '%s' is not an Array" % [hash['refunds']] unless hash['refunds'].is_a? Array @refunds = [] hash['refunds'].each do |e| @refunds << Ingenico::Connect::SDK::Domain::Refund::RefundResult.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/refund/refunds_response.rb, line 18 def to_h hash = super hash['refunds'] = @refunds.collect{|val| val.to_h} unless @refunds.nil? hash end