Class: EwayRapid::Message::TransactionProcess::SettlementSearchMsgProcess

Inherits:
Object
  • Object
show all
Includes:
RestProcess
Defined in:
lib/eway_rapid/message/process/transaction_process.rb

Overview

Settlement search message process

Class Method Summary collapse

Methods included from RestProcess

#do_get, #do_post

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