class MailchimpTransactional::SubaccountsApi
Attributes
Public Class Methods
# File lib/MailchimpTransactional/api/subaccounts_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
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 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
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 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 subaccount Pause a subaccount'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 subaccount Resume a paused subaccount'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 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