Class: EwayRapid::Message::TransactionProcess::SettlementSearchMsgProcess
- Inherits:
-
Object
- Object
- EwayRapid::Message::TransactionProcess::SettlementSearchMsgProcess
- Includes:
- RestProcess
- Defined in:
- lib/eway_rapid/message/process/transaction_process.rb
Overview
Settlement search message process
Class Method Summary collapse
- .create_request(input) ⇒ Object
- .make_result(response) ⇒ Object
- .send_request(url, api_key, password) ⇒ Object
Methods included from RestProcess
Class Method Details
.create_request(input) ⇒ Object
142 143 144 145 146 147 148 149 |
# File 'lib/eway_rapid/message/process/transaction_process.rb', line 142 def self.create_request(input) hash = {} input.instance_variables.map do |var| hash[var.to_s.delete('@').split('_').collect(&:capitalize).join] = input.instance_variable_get(var) end URI.encode_www_form(hash) end |
.make_result(response) ⇒ Object
155 156 157 158 159 |
# File 'lib/eway_rapid/message/process/transaction_process.rb', line 155 def self.make_result(response) settlement_search_resp = DirectSettlementSearchResponse.from_json(response) converter = Convert::Response::DirectSettlementToSettlement.new converter.do_convert(settlement_search_resp) end |
.send_request(url, api_key, password) ⇒ Object
151 152 153 |
# File 'lib/eway_rapid/message/process/transaction_process.rb', line 151 def self.send_request(url, api_key, password) SettlementSearchMsgProcess.new.do_get(url, api_key, password) end |