class Ingenico::Connect::SDK::Domain::Payment::FindPaymentsResponse
@attr [Integer] limit @attr [Integer] offset @attr [Array<Ingenico::Connect::SDK::Domain::Payment::Payment>] payments @attr [Integer] total_count
Attributes
limit[RW]
offset[RW]
payments[RW]
total_count[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/payment/find_payments_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? 'payments' raise TypeError, "value '%s' is not an Array" % [hash['payments']] unless hash['payments'].is_a? Array @payments = [] hash['payments'].each do |e| @payments << Ingenico::Connect::SDK::Domain::Payment::Payment.new_from_hash(e) end end if hash.has_key? 'totalCount' @total_count = hash['totalCount'] 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/payment/find_payments_response.rb, line 27 def to_h hash = super hash['limit'] = @limit unless @limit.nil? hash['offset'] = @offset unless @offset.nil? hash['payments'] = @payments.collect{|val| val.to_h} unless @payments.nil? hash['totalCount'] = @total_count unless @total_count.nil? hash end