Class: EwayRapid::InternalModels::SettlementSummary
- Inherits:
-
Object
- Object
- EwayRapid::InternalModels::SettlementSummary
- Defined in:
- lib/eway_rapid/models/internal_models.rb
Instance Attribute Summary collapse
-
#balance_per_card_type ⇒ Object
Returns the value of attribute balance_per_card_type.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#settlement_id ⇒ Object
Returns the value of attribute settlement_id.
-
#total_balance ⇒ Object
Returns the value of attribute total_balance.
-
#total_credit ⇒ Object
Returns the value of attribute total_credit.
-
#total_debit ⇒ Object
Returns the value of attribute total_debit.
Class Method Summary collapse
Instance Attribute Details
#balance_per_card_type ⇒ Object
Returns the value of attribute balance_per_card_type.
458 459 460 |
# File 'lib/eway_rapid/models/internal_models.rb', line 458 def balance_per_card_type @balance_per_card_type end |
#currency ⇒ Object
Returns the value of attribute currency.
453 454 455 |
# File 'lib/eway_rapid/models/internal_models.rb', line 453 def currency @currency end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
454 455 456 |
# File 'lib/eway_rapid/models/internal_models.rb', line 454 def currency_code @currency_code end |
#settlement_id ⇒ Object
Returns the value of attribute settlement_id.
452 453 454 |
# File 'lib/eway_rapid/models/internal_models.rb', line 452 def settlement_id @settlement_id end |
#total_balance ⇒ Object
Returns the value of attribute total_balance.
457 458 459 |
# File 'lib/eway_rapid/models/internal_models.rb', line 457 def total_balance @total_balance end |
#total_credit ⇒ Object
Returns the value of attribute total_credit.
455 456 457 |
# File 'lib/eway_rapid/models/internal_models.rb', line 455 def total_credit @total_credit end |
#total_debit ⇒ Object
Returns the value of attribute total_debit.
456 457 458 |
# File 'lib/eway_rapid/models/internal_models.rb', line 456 def total_debit @total_debit end |
Class Method Details
.from_array(array) ⇒ Object
477 478 479 480 481 482 483 484 |
# 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) ⇒ Object
465 466 467 468 469 470 471 472 473 474 475 |
# 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) ⇒ Object
460 461 462 463 |
# File 'lib/eway_rapid/models/internal_models.rb', line 460 def self.from_json(json) hash = JSON.parse(json) from_hash(hash) end |