Class: EwayRapid::Message::CustomerProcess::QueryCustomerMsgProcess

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

Overview

Query customer message process

Class Method Summary collapse

Methods included from RestProcess

#do_get, #do_post

Class Method Details

.create_request(token_customer_id) ⇒ DirectCustomerSearchRequest

Parameters:

  • token_customer_id (String)

Returns:



125
126
127
128
129
# File 'lib/eway_rapid/message/process/customer_process.rb', line 125

def self.create_request(token_customer_id)
  request = DirectCustomerSearchRequest.new
  request.token_customer_id = token_customer_id
  request
end

.make_result(response) ⇒ DirectCustomerSearchResponse

Parameters:

  • response (String)

Returns:



139
140
141
142
143
# File 'lib/eway_rapid/message/process/customer_process.rb', line 139

def self.make_result(response)
  direct_customer_response = DirectCustomerSearchResponse.from_json(response)
  converter = Convert::Response::DirectCustomerToQueryCustomer.new
  converter.do_convert(direct_customer_response)
end

.send_request(url, api_key, password, version, request) ⇒ String

Parameters:

Returns:

  • (String)


133
134
135
# File 'lib/eway_rapid/message/process/customer_process.rb', line 133

def self.send_request(url, api_key, password, version, request)
  QueryCustomerMsgProcess.new.do_post(url, api_key, password, version, request)
end