Class: Ingenico::Connect::SDK::Domain::Dispute::DisputesResponse
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Dispute::DisputesResponse
- Defined in:
- lib/ingenico/connect/sdk/domain/dispute/disputes_response.rb
Instance Attribute Summary collapse
-
#disputes ⇒ Array<Ingenico::Connect::SDK::Domain::Dispute::Dispute>
The current value of disputes.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#disputes ⇒ Array<Ingenico::Connect::SDK::Domain::Dispute::Dispute>
Returns the current value of disputes.
14 15 16 |
# File 'lib/ingenico/connect/sdk/domain/dispute/disputes_response.rb', line 14 def disputes @disputes end |
Instance Method Details
#from_hash(hash) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ingenico/connect/sdk/domain/dispute/disputes_response.rb', line 25 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 ⇒ Hash
19 20 21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/dispute/disputes_response.rb', line 19 def to_h hash = super hash['disputes'] = @disputes.collect{|val| val.to_h} unless @disputes.nil? hash end |