Class: EwayRapid::TransactionSearchResponse
- Inherits:
-
Object
- Object
- EwayRapid::TransactionSearchResponse
- Defined in:
- lib/eway_rapid/entities/transaction_search_response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#transactions ⇒ Object
Returns the value of attribute transactions.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
4 5 6 |
# File 'lib/eway_rapid/entities/transaction_search_response.rb', line 4 def error @error end |
#transactions ⇒ Object
Returns the value of attribute transactions.
3 4 5 |
# File 'lib/eway_rapid/entities/transaction_search_response.rb', line 3 def transactions @transactions end |
Class Method Details
.from_hash(hash) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/eway_rapid/entities/transaction_search_response.rb', line 16 def self.from_hash(hash) transaction_search_response = TransactionSearchResponse.new transaction_search_response.transactions = InternalModels::Transaction.from_array(hash[Constants::TRANSACTIONS]) transaction_search_response.error = hash[Constants::ERRORS_CAPITALIZED] transaction_search_response end |
.from_json(json) ⇒ Object
11 12 13 14 |
# File 'lib/eway_rapid/entities/transaction_search_response.rb', line 11 def self.from_json(json) hash = JSON.parse(json) from_hash(hash) end |
Instance Method Details
#to_json(options = {}) ⇒ Object
6 7 8 9 |
# File 'lib/eway_rapid/entities/transaction_search_response.rb', line 6 def to_json(={}) {Constants::TRANSACTIONS => transactions, Constants::ERRORS_CAPITALIZED => error}.to_json end |