Class: PlatformAPI::AddonWebhook
- Inherits:
-
Object
- Object
- PlatformAPI::AddonWebhook
- Defined in:
- lib/platform-api/client.rb
Overview
Represents the details of a webhook subscription
Instance Method Summary collapse
-
#create(addon_id_or_addon_name, body = {}) ⇒ Object
Create an add-on webhook subscription.
-
#delete(addon_id_or_addon_name, app_webhook_id) ⇒ Object
Removes an add-on webhook subscription.
-
#info(addon_id_or_addon_name, app_webhook_id) ⇒ Object
Returns the info for an add-on webhook subscription.
-
#initialize(client) ⇒ AddonWebhook
constructor
A new instance of AddonWebhook.
-
#list(addon_id_or_addon_name) ⇒ Object
List all webhook subscriptions for a particular add-on.
-
#update(addon_id_or_addon_name, app_webhook_id, body = {}) ⇒ Object
Updates the details of an add-on webhook subscription.
Constructor Details
#initialize(client) ⇒ AddonWebhook
Returns a new instance of AddonWebhook.
1059 1060 1061 |
# File 'lib/platform-api/client.rb', line 1059 def initialize(client) @client = client end |
Instance Method Details
#create(addon_id_or_addon_name, body = {}) ⇒ Object
Create an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.
1067 1068 1069 |
# File 'lib/platform-api/client.rb', line 1067 def create(addon_id_or_addon_name, body = {}) @client.addon_webhook.create(addon_id_or_addon_name, body) end |
#delete(addon_id_or_addon_name, app_webhook_id) ⇒ Object
Removes an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.
1075 1076 1077 |
# File 'lib/platform-api/client.rb', line 1075 def delete(addon_id_or_addon_name, app_webhook_id) @client.addon_webhook.delete(addon_id_or_addon_name, app_webhook_id) end |
#info(addon_id_or_addon_name, app_webhook_id) ⇒ Object
Returns the info for an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.
1083 1084 1085 |
# File 'lib/platform-api/client.rb', line 1083 def info(addon_id_or_addon_name, app_webhook_id) @client.addon_webhook.info(addon_id_or_addon_name, app_webhook_id) end |
#list(addon_id_or_addon_name) ⇒ Object
List all webhook subscriptions for a particular add-on. Can only be accessed by the add-on partner providing this add-on.
1090 1091 1092 |
# File 'lib/platform-api/client.rb', line 1090 def list(addon_id_or_addon_name) @client.addon_webhook.list(addon_id_or_addon_name) end |
#update(addon_id_or_addon_name, app_webhook_id, body = {}) ⇒ Object
Updates the details of an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.
1099 1100 1101 |
# File 'lib/platform-api/client.rb', line 1099 def update(addon_id_or_addon_name, app_webhook_id, body = {}) @client.addon_webhook.update(addon_id_or_addon_name, app_webhook_id, body) end |