Class: MailchimpTransactional::WebhooksApi
- Inherits:
-
Object
- Object
- MailchimpTransactional::WebhooksApi
- Defined in:
- lib/MailchimpTransactional/api/webhooks_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add(body = {}) ⇒ Array<(InlineResponse20075, Fixnum, Hash)>
Add webhook Add a new webhook.
-
#delete(body = {}) ⇒ Array<(InlineResponse20078, Fixnum, Hash)>
Delete webhook Delete an existing webhook.
-
#info(body = {}) ⇒ Array<(InlineResponse20076, Fixnum, Hash)>
Get webhook info Given the ID of an existing webhook, return the data about it.
-
#initialize(api_client = ApiClient.default) ⇒ WebhooksApi
constructor
A new instance of WebhooksApi.
-
#list(body = {}) ⇒ Array<(Array<InlineResponse20074>, Fixnum, Hash)>
List webhooks Get the list of all webhooks defined on the account.
-
#update(body = {}) ⇒ Array<(InlineResponse20077, Fixnum, Hash)>
Update webhook Update an existing webhook.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WebhooksApi
Returns a new instance of WebhooksApi.
19 20 21 |
# File 'lib/MailchimpTransactional/api/webhooks_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/MailchimpTransactional/api/webhooks_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add(body = {}) ⇒ Array<(InlineResponse20075, Fixnum, Hash)>
Add webhook Add a new webhook.
28 29 30 31 |
# File 'lib/MailchimpTransactional/api/webhooks_api.rb', line 28 def add(body = {}) data = @api_client.call_api(:POST, '/webhooks/add', body) data end |
#delete(body = {}) ⇒ Array<(InlineResponse20078, Fixnum, Hash)>
Delete webhook Delete an existing webhook.
38 39 40 41 |
# File 'lib/MailchimpTransactional/api/webhooks_api.rb', line 38 def delete(body = {}) data = @api_client.call_api(:POST, '/webhooks/delete', body) data end |
#info(body = {}) ⇒ Array<(InlineResponse20076, Fixnum, Hash)>
Get webhook info Given the ID of an existing webhook, return the data about it.
48 49 50 51 |
# File 'lib/MailchimpTransactional/api/webhooks_api.rb', line 48 def info(body = {}) data = @api_client.call_api(:POST, '/webhooks/info', body) data end |
#list(body = {}) ⇒ Array<(Array<InlineResponse20074>, Fixnum, Hash)>
List webhooks Get the list of all webhooks defined on the account.
58 59 60 61 |
# File 'lib/MailchimpTransactional/api/webhooks_api.rb', line 58 def list(body = {}) data = @api_client.call_api(:POST, '/webhooks/list', body) data end |
#update(body = {}) ⇒ Array<(InlineResponse20077, Fixnum, Hash)>
Update webhook Update an existing webhook.
68 69 70 71 |
# File 'lib/MailchimpTransactional/api/webhooks_api.rb', line 68 def update(body = {}) data = @api_client.call_api(:POST, '/webhooks/update', body) data end |