Class: EwayRapid::DirectCustomerSearchResponse
- Inherits:
-
Object
- Object
- EwayRapid::DirectCustomerSearchResponse
- Defined in:
- lib/eway_rapid/entities/direct_customer_search_response.rb
Instance Attribute Summary collapse
-
#customers ⇒ Object
Returns the value of attribute customers.
-
#errors ⇒ Object
Returns the value of attribute errors.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#customers ⇒ Object
Returns the value of attribute customers.
3 4 5 |
# File 'lib/eway_rapid/entities/direct_customer_search_response.rb', line 3 def customers @customers end |
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/eway_rapid/entities/direct_customer_search_response.rb', line 4 def errors @errors end |
Class Method Details
.from_hash(hash) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/eway_rapid/entities/direct_customer_search_response.rb', line 16 def self.from_hash(hash) response = DirectCustomerSearchResponse.new response.customers = InternalModels::Customer.from_array(hash[Constants::CUSTOMERS]) response.errors = hash[Constants::ERRORS_CAPITALIZED] response end |
.from_json(json) ⇒ Object
11 12 13 14 |
# File 'lib/eway_rapid/entities/direct_customer_search_response.rb', line 11 def self.from_json(json) hash = JSON.parse(json) from_hash(hash) end |