class EwayRapid::Message::CustomerProcess::CustTransparentRedirectMsgProcess
Create customer with transparent redirect message process
Public Class Methods
create_request(input)
click to toggle source
@param [Models::Customer] input @return [CreateAccessCodeRequest]
# File lib/eway_rapid/message/process/customer_process.rb, line 91 def self.create_request(input) request = CreateAccessCodeRequest.new convert = Convert::CustomerToInternalCustomer.new(false) request.customer = convert.do_convert(input) request.method = Constants::CREATE_TOKEN_CUSTOMER_METHOD request.transaction_type = Enums::TransactionType::PURCHASE request.redirect_url = input.redirect_url request end
make_result(response)
click to toggle source
@param [String] response @return [CreateCustomerResponse]
# File lib/eway_rapid/message/process/customer_process.rb, line 112 def self.make_result(response) access_code_response = CreateAccessCodeResponse.from_json(response) convert = Convert::Response::AccessCodeToCreateCust.new convert.do_convert(access_code_response) end
send_request(url, api_key, password, version, request)
click to toggle source
@param [String] url @param [String] api_key @param [String] password @param [CreateAccessCodeRequest] request @return [String]
# File lib/eway_rapid/message/process/customer_process.rb, line 106 def self.send_request(url, api_key, password, version, request) CustTransparentRedirectMsgProcess.new.do_post(url, api_key, password, version, request) end