Class: CheckoutSdk::Instruments::BaseInstrumentsClient
- Defined in:
- lib/checkout_sdk/instruments/base_instruments_client.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary collapse
- #delete(instrument_id) ⇒ Object
- #get(instrument_id) ⇒ Object
-
#revoke(instrument_id) ⇒ Object
Revoke a payment instrument.
Instance Method Details
#delete(instrument_id) ⇒ Object
15 16 17 |
# File 'lib/checkout_sdk/instruments/base_instruments_client.rb', line 15 def delete(instrument_id) api_client.invoke_delete(build_path(INSTRUMENTS, instrument_id), ) end |
#get(instrument_id) ⇒ Object
10 11 12 |
# File 'lib/checkout_sdk/instruments/base_instruments_client.rb', line 10 def get(instrument_id) api_client.invoke_get(build_path(INSTRUMENTS, instrument_id), ) end |
#revoke(instrument_id) ⇒ Object
Revoke a payment instrument. The instrument status is set to INVALID with the reason ‘revoked_by_merchant`. The instrument record is retained for audit purposes.
23 24 25 26 |
# File 'lib/checkout_sdk/instruments/base_instruments_client.rb', line 23 def revoke(instrument_id) api_client.invoke_patch(build_path(INSTRUMENTS, instrument_id, 'revoke'), ) end |