Class: OrbipayPaymentsapiClient::OrbipayPaymentsapiClientHandlers::RetrievePaymentSetupsHandler
- Inherits:
-
Base
- Object
- Base
- OrbipayPaymentsapiClient::OrbipayPaymentsapiClientHandlers::RetrievePaymentSetupsHandler
- Defined in:
- lib/orbipay_paymentsapi_client/handlers/retrieve_payment_setups_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(payment_setups) ⇒ Object
- #wrap_response_body(payment_setups_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(payment_setups) ⇒ 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 78 79 80 |
# File 'lib/orbipay_paymentsapi_client/handlers/retrieve_payment_setups_handler.rb', line 13 def process(payment_setups) configuration = Configuration::Configuration.new if payment_setups.invocation_context.secret != nil configuration.set_values(secret: payment_setups.invocation_context.secret) end if payment_setups.invocation_context.api_key != nil configuration.set_values(client_api_key: payment_setups.invocation_context.api_key) end if payment_setups.invocation_context.auth_scheme != nil configuration.set_values(algorithm: payment_setups.invocation_context.auth_scheme) end configuration.set_values(api_end_point: payment_setups.api_end_point) if payment_setups.invocation_context.idempotent_request_key != nil configuration.logger.info "Idempotent Request Key: #{ payment_setups.invocation_context.idempotent_request_key}" end api_client = ApiClient::ApiClient.new(configuration) api_instance = OrbipayPaymentsapiClientApis::PaymentSetupApi.new(api_client) channel = payment_setups.invocation_context.channel client_key = payment_setups.invocation_context.client_key product = payment_setups.invocation_context.product if payment_setups.invocation_context. != nil = payment_setups.invocation_context. else = CommonUtil::CommonUtil.time_stamp end idempotent_request_key = payment_setups.invocation_context.idempotent_request_key requestor_type = payment_setups.invocation_context.requestor_type requestor = payment_setups.invocation_context.requestor x_opay_headers = payment_setups.invocation_context.x_opay_headers id_customer = payment_setups.id_customer id_funding_account = payment_setups.id_funding_account id_customer_account = payment_setups.id_customer_account confirmation_number = payment_setups.confirmation_number status = payment_setups.status payment_setup_schedule_type = payment_setups.payment_setup_schedule_type from_date = payment_setups.from_date to_date = payment_setups.to_date page_size = payment_setups.page_size query_id = payment_setups.query_id from_index = payment_setups.from_index to_index = payment_setups.to_index opts = { requestor: requestor, x_opay_headers: x_opay_headers, id_customer: id_customer, id_funding_account: id_funding_account, id_customer_account: id_customer_account, confirmation_number: confirmation_number, status: status, payment_setup_schedule_type: payment_setup_schedule_type, 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_payment_setups(channel, client_key, product, , idempotent_request_key, requestor_type, opts) response = wrap_response_body(data) if response == nil response = PaymentSetups.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(payment_setups_response) ⇒ Object
[View source]
82 83 84 85 |
# File 'lib/orbipay_paymentsapi_client/handlers/retrieve_payment_setups_handler.rb', line 82 def wrap_response_body(payment_setups_response) payment_setups_json_object = CommonUtil::CommonUtil.object_to_http_body(payment_setups_response) CommonUtil::CommonUtil.deserialize(payment_setups_json_object,"PaymentSetups") end |
#wrap_response_headers(headers) ⇒ Object
[View source]
87 88 89 90 |
# File 'lib/orbipay_paymentsapi_client/handlers/retrieve_payment_setups_handler.rb', line 87 def wrap_response_headers(headers) headers_json_object = CommonUtil::CommonUtil.object_to_http_body(headers) CommonUtil::CommonUtil.deserialize(headers_json_object,"InvocationContext") end |