class MailchimpTransactional::WebhooksApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/MailchimpTransactional/api/webhooks_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

add(body = {}) click to toggle source

Add webhook Add a new webhook. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20072, Fixnum, Hash)>] InlineResponse20072 data, response status code and response headers

# 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 = {}) click to toggle source

Delete webhook Delete an existing webhook. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20075, Fixnum, Hash)>] InlineResponse20075 data, response status code and response headers

# 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 = {}) click to toggle source

Get webhook info Given the ID of an existing webhook, return the data about it. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20073, Fixnum, Hash)>] InlineResponse20073 data, response status code and response headers

# 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 = {}) click to toggle source

List webhooks Get the list of all webhooks defined on the account. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20071>, Fixnum, Hash)>] Array<InlineResponse20071> data, response status code and response headers

# 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 = {}) click to toggle source

Update webhook Update an existing webhook. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20074, Fixnum, Hash)>] InlineResponse20074 data, response status code and response headers

# File lib/MailchimpTransactional/api/webhooks_api.rb, line 68
def update(body = {})
  data = @api_client.call_api(:POST, '/webhooks/update', body)
  data
end