Class: EwayRapid::Message::CustomerProcess::CustResponsiveSharedMsgProcess
- Inherits:
-
Object
- Object
- EwayRapid::Message::CustomerProcess::CustResponsiveSharedMsgProcess
- Includes:
- RestProcess
- Defined in:
- lib/eway_rapid/message/process/customer_process.rb
Overview
Create customer with responsive shared method message process
Class Method Summary collapse
- .create_request(input) ⇒ CreateAccessCodeSharedRequest
- .make_result(response) ⇒ CreateCustomerResponse
- .send_request(url, api_key, password, request) ⇒ String
Methods included from RestProcess
Class Method Details
.create_request(input) ⇒ CreateAccessCodeSharedRequest
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/eway_rapid/message/process/customer_process.rb', line 55 def self.create_request(input) request = CreateAccessCodeSharedRequest.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.cancel_url = input.cancel_url request end |
.make_result(response) ⇒ CreateCustomerResponse
77 78 79 80 81 |
# File 'lib/eway_rapid/message/process/customer_process.rb', line 77 def self.make_result(response) code_shared_response = CreateAccessCodeSharedResponse.from_json(response) convert = Convert::Response::AccessCodeSharedToCreateCust.new convert.do_convert(code_shared_response) end |
.send_request(url, api_key, password, request) ⇒ String
71 72 73 |
# File 'lib/eway_rapid/message/process/customer_process.rb', line 71 def self.send_request(url, api_key, password, request) CustResponsiveSharedMsgProcess.new.do_post(url, api_key, password, request) end |