class Ingenico::Connect::SDK::Domain::Payout::FindPayoutsResponse

@attr [Integer] limit @attr [Integer] offset @attr [Array<Ingenico::Connect::SDK::Domain::Payout::PayoutResult>] payouts @attr [Integer] total_count

Attributes

limit[RW]
offset[RW]
payouts[RW]
total_count[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payout/find_payouts_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? 'payouts'
    raise TypeError, "value '%s' is not an Array" % [hash['payouts']] unless hash['payouts'].is_a? Array
    @payouts = []
    hash['payouts'].each do |e|
      @payouts << Ingenico::Connect::SDK::Domain::Payout::PayoutResult.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/payout/find_payouts_response.rb, line 27
def to_h
  hash = super
  hash['limit'] = @limit unless @limit.nil?
  hash['offset'] = @offset unless @offset.nil?
  hash['payouts'] = @payouts.collect{|val| val.to_h} unless @payouts.nil?
  hash['totalCount'] = @total_count unless @total_count.nil?
  hash
end