Class: CheckoutSdk::Previous::Instruments::InstrumentsClient

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

Instance Attribute Summary

Attributes inherited from Client

#api_client, #authorization_type, #configuration

Instance Method Summary collapse

Methods inherited from Instruments::BaseInstrumentsClient

#delete, #get

Constructor Details

#initialize(api_client, configuration) ⇒ InstrumentsClient

Returns a new instance of InstrumentsClient.

Parameters:



9
10
11
# File 'lib/checkout_sdk/instruments/previous/instruments_client.rb', line 9

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

Instance Method Details

#create(create_instrument_request) ⇒ Object

Parameters:

  • create_instrument_request (Hash, CustomerRequest)


14
15
16
# File 'lib/checkout_sdk/instruments/previous/instruments_client.rb', line 14

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

#update(instrument_id, update_instrument_request) ⇒ Object

Parameters:



20
21
22
23
24
# File 'lib/checkout_sdk/instruments/previous/instruments_client.rb', line 20

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