Class: BtcPay::Client::Api::ApiKeys
- Inherits:
-
Base
show all
- Defined in:
- lib/btcpay/client/api/api_keys.rb
Constant Summary
collapse
- PATH =
'/api-keys'
Instance Method Summary
collapse
Methods inherited from Service
#initialize
Instance Method Details
#create(payload, **opts) ⇒ Object
18
19
20
|
# File 'lib/btcpay/client/api/api_keys.rb', line 18
def create(payload, **opts)
client.post(path, payload: payload, options: opts)
end
|
#current(**opts) ⇒ Object
Also known as:
get, info
10
11
12
|
# File 'lib/btcpay/client/api/api_keys.rb', line 10
def current(**opts)
client.get(path('current'), options: opts)
end
|
#revoke(key, **opts) ⇒ Object
Also known as:
delete
23
24
25
|
# File 'lib/btcpay/client/api/api_keys.rb', line 23
def revoke(key, **opts)
client.delete(path(key), options: opts)
end
|
#revoke!(**opts) ⇒ Object
Also known as:
delete!
30
31
32
|
# File 'lib/btcpay/client/api/api_keys.rb', line 30
def revoke!(**opts)
client.delete(path('current'), options: opts)
end
|