class PlatformAPI::AppWebhook

Represents the details of a webhook subscription

Public Class Methods

new(client) click to toggle source
# File lib/platform-api/client.rb, line 1374
def initialize(client)
  @client = client
end

Public Instance Methods

create(app_id_or_app_name, body = {}) click to toggle source

Create an app webhook subscription.

@param app_id_or_app_name: unique identifier of app or unique name of app @param body: the object to pass as the request payload

# File lib/platform-api/client.rb, line 1382
def create(app_id_or_app_name, body = {})
  @client.app_webhook.create(app_id_or_app_name, body)
end
delete(app_id_or_app_name, app_webhook_id) click to toggle source

Removes an app webhook subscription.

@param app_id_or_app_name: unique identifier of app or unique name of app @param app_webhook_id: the webhook's unique identifier

# File lib/platform-api/client.rb, line 1390
def delete(app_id_or_app_name, app_webhook_id)
  @client.app_webhook.delete(app_id_or_app_name, app_webhook_id)
end
info(app_id_or_app_name, app_webhook_id) click to toggle source

Returns the info for an app webhook subscription.

@param app_id_or_app_name: unique identifier of app or unique name of app @param app_webhook_id: the webhook's unique identifier

# File lib/platform-api/client.rb, line 1398
def info(app_id_or_app_name, app_webhook_id)
  @client.app_webhook.info(app_id_or_app_name, app_webhook_id)
end
list(app_id_or_app_name) click to toggle source

List all webhook subscriptions for a particular app.

@param app_id_or_app_name: unique identifier of app or unique name of app

# File lib/platform-api/client.rb, line 1405
def list(app_id_or_app_name)
  @client.app_webhook.list(app_id_or_app_name)
end
update(app_id_or_app_name, app_webhook_id, body = {}) click to toggle source

Updates the details of an app webhook subscription.

@param app_id_or_app_name: unique identifier of app or unique name of app @param app_webhook_id: the webhook's unique identifier @param body: the object to pass as the request payload

# File lib/platform-api/client.rb, line 1414
def update(app_id_or_app_name, app_webhook_id, body = {})
  @client.app_webhook.update(app_id_or_app_name, app_webhook_id, body)
end