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:



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

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:



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

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, request) ⇒ String

Parameters:

Returns:

  • (String)


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

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