class EwayRapid::InternalModels::SettlementSummary
Attributes
balance_per_card_type[RW]
currency[RW]
currency_code[RW]
settlement_id[RW]
total_balance[RW]
total_credit[RW]
total_debit[RW]
Public Class Methods
from_array(array)
click to toggle source
# File lib/eway_rapid/models/internal_models.rb, line 477 def self.from_array(array) summaries = [] Array(array).each {|summary_hash| obj = from_hash(summary_hash) summaries.push(obj) } summaries end
from_hash(hash)
click to toggle source
# File lib/eway_rapid/models/internal_models.rb, line 465 def self.from_hash(hash) settlement_summary = SettlementSummary.new settlement_summary.settlement_id = hash[Constants::SETTLEMENT_ID] settlement_summary.currency = hash[Constants::CURRENCY] settlement_summary.currency_code = hash[Constants::CURRENCY_CODE] settlement_summary.total_credit = hash[Constants::TOTAL_CREDIT] settlement_summary.total_debit = hash[Constants::TOTAL_DEBIT] settlement_summary.total_balance = hash[Constants::TOTAL_BALANCE] settlement_summary.balance_per_card_type = BalancePerCardType.from_array(hash[Constants::BALANCE_PER_CARD_TYPE]) settlement_summary end
from_json(json)
click to toggle source
# File lib/eway_rapid/models/internal_models.rb, line 460 def self.from_json(json) hash = JSON.parse(json) from_hash(hash) end