class MailchimpTransactional::SubaccountsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/MailchimpTransactional/api/subaccounts_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 subaccount Add a new subaccount. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20048, Fixnum, Hash)>] InlineResponse20048 data, response status code and response headers

# File lib/MailchimpTransactional/api/subaccounts_api.rb, line 28
def add(body = {})
  data = @api_client.call_api(:POST, '/subaccounts/add', body)
  data
end
delete(body = {}) click to toggle source

Delete subaccount Delete an existing subaccount. Any email related to the subaccount will be saved, but stats will be removed and any future sending calls to this subaccount will fail. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20051, Fixnum, Hash)>] InlineResponse20051 data, response status code and response headers

# File lib/MailchimpTransactional/api/subaccounts_api.rb, line 38
def delete(body = {})
  data = @api_client.call_api(:POST, '/subaccounts/delete', body)
  data
end
info(body = {}) click to toggle source

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

# File lib/MailchimpTransactional/api/subaccounts_api.rb, line 48
def info(body = {})
  data = @api_client.call_api(:POST, '/subaccounts/info', body)
  data
end
list(body = {}) click to toggle source

List subaccounts Get the list of subaccounts defined for the account, optionally filtered by a prefix. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20047>, Fixnum, Hash)>] Array<InlineResponse20047> data, response status code and response headers

# File lib/MailchimpTransactional/api/subaccounts_api.rb, line 58
def list(body = {})
  data = @api_client.call_api(:POST, '/subaccounts/list', body)
  data
end
pause(body = {}) click to toggle source

Pause subaccount Pause a subaccount&#39;s sending. Any future emails delivered to this subaccount will be queued for a maximum of 3 days until the subaccount is resumed. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20052, Fixnum, Hash)>] InlineResponse20052 data, response status code and response headers

# File lib/MailchimpTransactional/api/subaccounts_api.rb, line 68
def pause(body = {})
  data = @api_client.call_api(:POST, '/subaccounts/pause', body)
  data
end
resume(body = {}) click to toggle source

Resume subaccount Resume a paused subaccount&#39;s sending. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20053, Fixnum, Hash)>] InlineResponse20053 data, response status code and response headers

# File lib/MailchimpTransactional/api/subaccounts_api.rb, line 78
def resume(body = {})
  data = @api_client.call_api(:POST, '/subaccounts/resume', body)
  data
end
update(body = {}) click to toggle source

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

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