Class: OrbipayPaymentsapiClient::OrbipayPaymentsapiClientHandlers::DeleteFundingAccountHandler
- Inherits:
-
Base
- Object
- Base
- OrbipayPaymentsapiClient::OrbipayPaymentsapiClientHandlers::DeleteFundingAccountHandler
- Defined in:
- lib/orbipay_paymentsapi_client/handlers/delete_funding_account_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
- #populate_request_body(funding_account) ⇒ Object
- #process(funding_account) ⇒ Object
- #wrap_response_body(delete_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
#populate_request_body(funding_account) ⇒ Object
[View source]
63 64 65 66 67 |
# File 'lib/orbipay_paymentsapi_client/handlers/delete_funding_account_handler.rb', line 63 def populate_request_body(funding_account) funding_account_json_object = CommonUtil::CommonUtil.object_to_http_body(funding_account) delete_funding_account_request = CommonUtil::CommonUtil.deserialize(funding_account_json_object,"DeleteFundingAccountRequest") delete_funding_account_request end |
#process(funding_account) ⇒ 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 |
# File 'lib/orbipay_paymentsapi_client/handlers/delete_funding_account_handler.rb', line 13 def process(funding_account) configuration = Configuration::Configuration.new if funding_account.invocation_context.secret != nil configuration.set_values(secret: funding_account.invocation_context.secret) end if funding_account.invocation_context.api_key != nil configuration.set_values(client_api_key: funding_account.invocation_context.api_key) end if funding_account.invocation_context.auth_scheme != nil configuration.set_values(algorithm: funding_account.invocation_context.auth_scheme) end configuration.set_values(api_end_point: funding_account.api_end_point) if funding_account.invocation_context.idempotent_request_key != nil configuration.logger.info "Idempotent Request Key: #{ funding_account.invocation_context.idempotent_request_key}" end api_client = ApiClient::ApiClient.new(configuration) api_instance = OrbipayPaymentsapiClientApis::FundingAccountApi.new(api_client) channel = funding_account.invocation_context.channel client_key = funding_account.invocation_context.client_key product = funding_account.invocation_context.product if funding_account.invocation_context. != nil = funding_account.invocation_context. else = CommonUtil::CommonUtil.time_stamp end idempotent_request_key = funding_account.invocation_context.idempotent_request_key requestor_type = funding_account.invocation_context.requestor_type id_funding_account = funding_account.id_funding_account id_customer = funding_account.id_customer delete_funding_account_request = self.populate_request_body(funding_account) requestor = funding_account.invocation_context.requestor x_opay_headers = funding_account.invocation_context.x_opay_headers trace_id = funding_account.invocation_context.trace_id opts = { requestor: requestor, x_opay_headers: x_opay_headers, trace_id: trace_id, } data, http_status_code, headers = api_instance.delete_funding_account(channel, client_key, product, , idempotent_request_key, requestor_type, id_funding_account, id_customer, delete_funding_account_request, opts) response = wrap_response_body(data) if response == nil response = FundingAccount.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(delete_response) ⇒ Object
[View source]
69 70 71 72 |
# File 'lib/orbipay_paymentsapi_client/handlers/delete_funding_account_handler.rb', line 69 def wrap_response_body(delete_response) funding_account_json_object = CommonUtil::CommonUtil.object_to_http_body(delete_response) CommonUtil::CommonUtil.deserialize(funding_account_json_object,"FundingAccount") end |
#wrap_response_headers(headers) ⇒ Object
[View source]
74 75 76 77 |
# File 'lib/orbipay_paymentsapi_client/handlers/delete_funding_account_handler.rb', line 74 def wrap_response_headers(headers) headers_json_object = CommonUtil::CommonUtil.object_to_http_body(headers) CommonUtil::CommonUtil.deserialize(headers_json_object,"InvocationContext") end |