Class: OrbipayPaymentsapiClient::OrbipayPaymentsapiClientHandlers::RetrieveRecordPaymentsHandler
- Inherits:
-
Base
- Object
- Base
- OrbipayPaymentsapiClient::OrbipayPaymentsapiClientHandlers::RetrieveRecordPaymentsHandler
- Defined in:
- lib/orbipay_paymentsapi_client/handlers/retrieve_record_payments_handler.rb
Overview
.
############################################################################################
## This class subject to change without prior notice, Please dont use this class directly.##
############################################################################################
Instance Attribute Summary
Attributes inherited from Base
#api_end_point, #http_status_code, #invocation_context, #live_mode
Instance Method Summary collapse
- #process(recorded_payments) ⇒ Object
- #wrap_response_body(recorded_payments_response) ⇒ Object
- #wrap_response_headers(headers) ⇒ Object
Methods inherited from Base
attribute_map, #for_client, #initialize, #requested_by, #set_api_end_point, #set_values, swagger_types, #vide_channel, #with_context
Constructor Details
This class inherits a constructor from OrbipayPaymentsapiClient::Base
Instance Method Details
#process(recorded_payments) ⇒ Object
[View source]
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/orbipay_paymentsapi_client/handlers/retrieve_record_payments_handler.rb', line 13 def process(recorded_payments) configuration = Configuration::Configuration.new if recorded_payments.invocation_context.secret != nil configuration.set_values(secret: recorded_payments.invocation_context.secret) end if recorded_payments.invocation_context.api_key != nil configuration.set_values(client_api_key: recorded_payments.invocation_context.api_key) end if recorded_payments.invocation_context.auth_scheme != nil configuration.set_values(algorithm: recorded_payments.invocation_context.auth_scheme) end configuration.set_values(api_end_point: recorded_payments.api_end_point) if recorded_payments.invocation_context.idempotent_request_key != nil configuration.logger.info "Idempotent Request Key: #{ recorded_payments.invocation_context.idempotent_request_key}" end api_client = ApiClient::ApiClient.new(configuration) api_instance = OrbipayPaymentsapiClientApis::RecordedPaymentApi.new(api_client) channel = recorded_payments.invocation_context.channel client_key = recorded_payments.invocation_context.client_key product = recorded_payments.invocation_context.product if recorded_payments.invocation_context. != nil = recorded_payments.invocation_context. else = CommonUtil::CommonUtil.time_stamp end idempotent_request_key = recorded_payments.invocation_context.idempotent_request_key requestor_type = recorded_payments.invocation_context.requestor_type id_customer = recorded_payments.id_customer requestor = recorded_payments.invocation_context.requestor x_opay_headers = recorded_payments.invocation_context.x_opay_headers id_customer_account = recorded_payments.id_customer_account confirmation_number = recorded_payments.confirmation_number payment_method = recorded_payments.payment_method status = recorded_payments.status from_date = recorded_payments.from_date to_date = recorded_payments.to_date page_size = recorded_payments.page_size query_id = recorded_payments.query_id from_index = recorded_payments.from_index to_index = recorded_payments.to_index opts = { requestor: requestor, x_opay_headers: x_opay_headers, id_customer_account: id_customer_account, confirmation_number: confirmation_number, payment_method: payment_method, status: status, from_date: from_date, to_date: to_date, page_size: page_size, query_id: query_id, from_index: from_index, to_index: to_index, } data, http_status_code, headers = api_instance.retrieve_record_payments(channel, client_key, product, , idempotent_request_key, requestor_type, id_customer, opts) response = wrap_response_body(data) if response == nil response = RecordedPayments.new end response.set_values(invocation_context: wrap_response_headers(headers)) response.set_values(http_status_code: http_status_code) response end |
#wrap_response_body(recorded_payments_response) ⇒ Object
[View source]
79 80 81 82 |
# File 'lib/orbipay_paymentsapi_client/handlers/retrieve_record_payments_handler.rb', line 79 def wrap_response_body(recorded_payments_response) recorded_payments_json_object = CommonUtil::CommonUtil.object_to_http_body(recorded_payments_response) CommonUtil::CommonUtil.deserialize(recorded_payments_json_object,"RecordedPayments") end |
#wrap_response_headers(headers) ⇒ Object
[View source]
84 85 86 87 |
# File 'lib/orbipay_paymentsapi_client/handlers/retrieve_record_payments_handler.rb', line 84 def wrap_response_headers(headers) headers_json_object = CommonUtil::CommonUtil.object_to_http_body(headers) CommonUtil::CommonUtil.deserialize(headers_json_object,"InvocationContext") end |