Class: EwayRapid::DirectSettlementSearchResponse
- Inherits:
-
Object
- Object
- EwayRapid::DirectSettlementSearchResponse
- Defined in:
- lib/eway_rapid/entities/direct_settlement_search_response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#settlement_summaries ⇒ Object
Returns the value of attribute settlement_summaries.
-
#settlement_transactions ⇒ Object
Returns the value of attribute settlement_transactions.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
5 6 7 |
# File 'lib/eway_rapid/entities/direct_settlement_search_response.rb', line 5 def error @error end |
#settlement_summaries ⇒ Object
Returns the value of attribute settlement_summaries.
3 4 5 |
# File 'lib/eway_rapid/entities/direct_settlement_search_response.rb', line 3 def settlement_summaries @settlement_summaries end |
#settlement_transactions ⇒ Object
Returns the value of attribute settlement_transactions.
4 5 6 |
# File 'lib/eway_rapid/entities/direct_settlement_search_response.rb', line 4 def settlement_transactions @settlement_transactions end |
Class Method Details
.from_hash(hash) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/eway_rapid/entities/direct_settlement_search_response.rb', line 18 def self.from_hash(hash) settlement_search_response = DirectSettlementSearchResponse.new settlement_search_response.settlement_summaries = InternalModels::SettlementSummary.from_array(hash[Constants::SETTLEMENT_SUMMARIES]) settlement_search_response.settlement_transactions = InternalModels::SettlementTransaction.from_array(hash[Constants::SETTLEMENT_TRANSACTIONS]) settlement_search_response.error = hash[Constants::ERRORS_CAPITALIZED] settlement_search_response end |
.from_json(json) ⇒ Object
13 14 15 16 |
# File 'lib/eway_rapid/entities/direct_settlement_search_response.rb', line 13 def self.from_json(json) hash = JSON.parse(json) from_hash(hash) end |
Instance Method Details
#to_json(summaries = {}, transactions = {}) ⇒ Object
7 8 9 10 11 |
# File 'lib/eway_rapid/entities/direct_settlement_search_response.rb', line 7 def to_json(summaries={}, transactions={}) {Constants::SETTLEMENT_SUMMARIES => summaries, Constants::SETTLEMENT_TRANSACTIONS => transactions, Constants::ERRORS_CAPITALIZED => error}.to_json end |