Class: Ingenico::Connect::SDK::Domain::Refund::FindRefundsResponse
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Refund::FindRefundsResponse
- Defined in:
- lib/ingenico/connect/sdk/domain/refund/find_refunds_response.rb
Instance Attribute Summary collapse
-
#limit ⇒ Integer
The current value of limit.
-
#offset ⇒ Integer
The current value of offset.
-
#refunds ⇒ Array<Ingenico::Connect::SDK::Domain::Refund::RefundResult>
The current value of refunds.
-
#total_count ⇒ Integer
The current value of total_count.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#limit ⇒ Integer
Returns the current value of limit.
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/refund/find_refunds_response.rb', line 16 def limit @limit end |
#offset ⇒ Integer
Returns the current value of offset.
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/refund/find_refunds_response.rb', line 16 def offset @offset end |
#refunds ⇒ Array<Ingenico::Connect::SDK::Domain::Refund::RefundResult>
Returns the current value of refunds.
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/refund/find_refunds_response.rb', line 16 def refunds @refunds end |
#total_count ⇒ Integer
Returns the current value of total_count.
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/refund/find_refunds_response.rb', line 16 def total_count @total_count end |
Instance Method Details
#from_hash(hash) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/ingenico/connect/sdk/domain/refund/find_refunds_response.rb', line 36 def from_hash(hash) super if hash.has_key? 'limit' @limit = hash['limit'] end if hash.has_key? 'offset' @offset = hash['offset'] end 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 if hash.has_key? 'totalCount' @total_count = hash['totalCount'] end end |
#to_h ⇒ Hash
27 28 29 30 31 32 33 34 |
# File 'lib/ingenico/connect/sdk/domain/refund/find_refunds_response.rb', line 27 def to_h hash = super hash['limit'] = @limit unless @limit.nil? hash['offset'] = @offset unless @offset.nil? hash['refunds'] = @refunds.collect{|val| val.to_h} unless @refunds.nil? hash['totalCount'] = @total_count unless @total_count.nil? hash end |