Class: Worldline::Connect::SDK::V1::Merchant::Installments::InstallmentsClient
- Inherits:
-
ApiResource
- Object
- ApiResource
- Worldline::Connect::SDK::V1::Merchant::Installments::InstallmentsClient
- Defined in:
- lib/worldline/connect/sdk/v1/merchant/installments/installments_client.rb
Overview
Installments client. Thread-safe.
Instance Attribute Summary
Attributes inherited from ApiResource
#client_meta_info, #communicator
Instance Method Summary collapse
-
#get_installments_info(body, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::InstallmentOptionsResponse
Resource /{merchantId}/installments/getInstallmentsInfo - Get installment information.
-
#initialize(parent, path_context) ⇒ InstallmentsClient
constructor
A new instance of InstallmentsClient.
Constructor Details
#initialize(parent, path_context) ⇒ InstallmentsClient
Returns a new instance of InstallmentsClient.
22 23 24 |
# File 'lib/worldline/connect/sdk/v1/merchant/installments/installments_client.rb', line 22 def initialize(parent, path_context) super(parent: parent, path_context: path_context) end |
Instance Method Details
#get_installments_info(body, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::InstallmentOptionsResponse
Resource /{merchantId}/installments/getInstallmentsInfo - Get installment information
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/worldline/connect/sdk/v1/merchant/installments/installments_client.rb', line 40 def get_installments_info(body, context = nil) uri = instantiate_uri('/v1/{merchantId}/installments/getInstallmentsInfo', nil) @communicator.post( uri, client_headers, nil, body, Worldline::Connect::SDK::V1::Domain::InstallmentOptionsResponse, context) rescue ResponseException => e error_type = Worldline::Connect::SDK::V1::Domain::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise Worldline::Connect::SDK::V1.create_exception(e.status_code, e.body, error_object, context) end |