Class: AhoSdk::Account::WebhooksResource Private
- Inherits:
-
Object
- Object
- AhoSdk::Account::WebhooksResource
- Defined in:
- lib/aho_sdk/account.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Webhooks resource operations
Instance Method Summary collapse
-
#create(body: nil, idempotency_key: nil) ⇒ Hash
private
Create webhook.
-
#delete ⇒ Hash
private
Delete webhook.
-
#get ⇒ Hash
private
Get webhook details.
-
#initialize(client) ⇒ WebhooksResource
constructor
private
A new instance of WebhooksResource.
-
#list ⇒ Hash
private
List webhooks.
-
#test(idempotency_key: nil) ⇒ Hash
private
Test webhook.
-
#update(body: nil, idempotency_key: nil) ⇒ Hash
private
Update webhook.
Constructor Details
#initialize(client) ⇒ WebhooksResource
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of WebhooksResource.
199 200 201 |
# File 'lib/aho_sdk/account.rb', line 199 def initialize(client) @client = client end |
Instance Method Details
#create(body: nil, idempotency_key: nil) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create webhook
213 214 215 |
# File 'lib/aho_sdk/account.rb', line 213 def create(body: nil, idempotency_key: nil) @client.post("/v1/account/webhooks", body: body, idempotency_key: idempotency_key) end |
#delete ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Delete webhook
234 235 236 |
# File 'lib/aho_sdk/account.rb', line 234 def delete @client.delete("/v1/account/webhooks/primary") end |
#get ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get webhook details
220 221 222 |
# File 'lib/aho_sdk/account.rb', line 220 def get @client.get("/v1/account/webhooks/primary") end |
#list ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
List webhooks
206 207 208 |
# File 'lib/aho_sdk/account.rb', line 206 def list @client.get("/v1/account/webhooks") end |
#test(idempotency_key: nil) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test webhook
241 242 243 |
# File 'lib/aho_sdk/account.rb', line 241 def test(idempotency_key: nil) @client.post("/v1/account/webhooks/primary/test", idempotency_key: idempotency_key) end |
#update(body: nil, idempotency_key: nil) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Update webhook
227 228 229 |
# File 'lib/aho_sdk/account.rb', line 227 def update(body: nil, idempotency_key: nil) @client.patch("/v1/account/webhooks/primary", body: body, idempotency_key: idempotency_key) end |