Class: AhoSdk::Account::WebhooksResource Private

Inherits:
Object
  • Object
show all
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

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

Returns:

  • (Hash)


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

#deleteHash

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

Returns:

  • (Hash)


234
235
236
# File 'lib/aho_sdk/account.rb', line 234

def delete
  @client.delete("/v1/account/webhooks/primary")
end

#getHash

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

Returns:

  • (Hash)


220
221
222
# File 'lib/aho_sdk/account.rb', line 220

def get
  @client.get("/v1/account/webhooks/primary")
end

#listHash

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

Returns:

  • (Hash)


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

Returns:

  • (Hash)


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

Returns:

  • (Hash)


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