Class: Worldline::Acquiring::SDK::V1::Acquirer::Merchant::Balanceinquiries::BalanceInquiriesClient
- Inherits:
-
ApiResource
- Object
- ApiResource
- Worldline::Acquiring::SDK::V1::Acquirer::Merchant::Balanceinquiries::BalanceInquiriesClient
- Defined in:
- lib/worldline/acquiring/sdk/v1/acquirer/merchant/balanceinquiries/balance_inquiries_client.rb
Overview
BalanceInquiries client. Thread-safe.
Instance Attribute Summary
Attributes inherited from ApiResource
Instance Method Summary collapse
-
#initialize(parent, path_context) ⇒ BalanceInquiriesClient
constructor
A new instance of BalanceInquiriesClient.
-
#process_balance_inquiry(body, context = nil) ⇒ Worldline::Acquiring::SDK::V1::Domain::ApiBalanceInquiryResponse
Resource /processing/v1/{acquirerId}/{merchantId}/balance-inquiries - Balance inquiry.
Constructor Details
#initialize(parent, path_context) ⇒ BalanceInquiriesClient
Returns a new instance of BalanceInquiriesClient.
22 23 24 |
# File 'lib/worldline/acquiring/sdk/v1/acquirer/merchant/balanceinquiries/balance_inquiries_client.rb', line 22 def initialize(parent, path_context) super(parent: parent, path_context: path_context) end |
Instance Method Details
#process_balance_inquiry(body, context = nil) ⇒ Worldline::Acquiring::SDK::V1::Domain::ApiBalanceInquiryResponse
Resource /processing/v1/{acquirerId}/{merchantId}/balance-inquiries - Balance inquiry
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/worldline/acquiring/sdk/v1/acquirer/merchant/balanceinquiries/balance_inquiries_client.rb', line 39 def process_balance_inquiry(body, context = nil) uri = instantiate_uri('/processing/v1/{acquirerId}/{merchantId}/balance-inquiries', nil) @communicator.post( uri, nil, nil, body, Worldline::Acquiring::SDK::V1::Domain::ApiBalanceInquiryResponse, context) rescue Worldline::Acquiring::SDK::Communication::ResponseException => e error_type = Worldline::Acquiring::SDK::V1::Domain::ApiPaymentErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise Worldline::Acquiring::SDK::V1.create_exception(e.status_code, e.body, error_object, context) end |