Class: CheckoutSdk::Instruments::InstrumentsClient

Inherits:
BaseInstrumentsClient show all
Defined in:
lib/checkout_sdk/instruments/instruments_client.rb

Instance Attribute Summary

Attributes inherited from Client

#api_client, #authorization_type, #configuration

Instance Method Summary collapse

Methods inherited from BaseInstrumentsClient

#delete, #get

Constructor Details

#initialize(api_client, configuration) ⇒ InstrumentsClient

Returns a new instance of InstrumentsClient.

Parameters:



11
12
13
# File 'lib/checkout_sdk/instruments/instruments_client.rb', line 11

def initialize(api_client, configuration)
  super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH
end

Instance Method Details

#create(create_instrument_request) ⇒ Object

Parameters:



16
17
18
# File 'lib/checkout_sdk/instruments/instruments_client.rb', line 16

def create(create_instrument_request)
  api_client.invoke_post(INSTRUMENTS, sdk_authorization, create_instrument_request)
end

#get_bank_account_field_formatting(country, currency, bank_account_field_query) ⇒ Object

Parameters:



31
32
33
34
35
# File 'lib/checkout_sdk/instruments/instruments_client.rb', line 31

def (country, currency, )
  api_client.invoke_get(build_path(VALIDATION, country, currency),
                        sdk_authorization(CheckoutSdk::AuthorizationType::OAUTH),
                        )
end

#update(instrument_id, update_instrument_request) ⇒ Object

Parameters:



22
23
24
25
26
# File 'lib/checkout_sdk/instruments/instruments_client.rb', line 22

def update(instrument_id, update_instrument_request)
  api_client.invoke_patch(build_path(INSTRUMENTS, instrument_id),
                          sdk_authorization,
                          update_instrument_request)
end