class Mandrill::Subaccounts

Defined in:

mandrill/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(master) #

[View source]

Instance Method Detail

def add(id, name = nil, notes = nil, custom_quota = nil) #

Add a new subaccount @param [String] id a unique identifier for the subaccount to be used in sending calls @param [String] name an optional display name to further identify the subaccount @param [String] notes optional extra text to associate with the subaccount @param [Integer] custom_quota an optional manual hourly quota for the subaccount. If not specified, Mandrill will manage this based on reputation @return [Hash] the information saved about the new subaccount

- [String] id a unique indentifier for the subaccount
- [String] name an optional display name for the subaccount
- [Integer] custom_quota an optional manual hourly quota for the subaccount. If not specified, the hourly quota will be managed based on reputation
- [String] status the current sending status of the subaccount, one of "active" or "paused"
- [Integer] reputation the subaccount

[View source]
def delete(id) #

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 [String] id the unique identifier of the subaccount to delete @return [Hash] the information for the deleted subaccount

- [String] id a unique indentifier for the subaccount
- [String] name an optional display name for the subaccount
- [Integer] custom_quota an optional manual hourly quota for the subaccount. If not specified, the hourly quota will be managed based on reputation
- [String] status the current sending status of the subaccount, one of "active" or "paused"
- [Integer] reputation the subaccount

[View source]
def info(id) #

Given the ID of an existing subaccount, return the data about it @param [String] id the unique identifier of the subaccount to query @return [Hash] the information about the subaccount

- [String] id a unique indentifier for the subaccount
- [String] name an optional display name for the subaccount
- [String] notes optional extra text to associate with the subaccount
- [Integer] custom_quota an optional manual hourly quota for the subaccount. If not specified, the hourly quota will be managed based on reputation
- [String] status the current sending status of the subaccount, one of "active" or "paused"
- [Integer] reputation the subaccount

[View source]
def list(q = nil) #

Get the list of subaccounts defined for the account, optionally filtered by a prefix @param [String] q an optional prefix to filter the subaccounts' ids and names @return [Array] the subaccounts for the account, up to a maximum of 1,000

- [Hash] return[] the individual subaccount info
    - [String] id a unique indentifier for the subaccount
    - [String] name an optional display name for the subaccount
    - [Integer] custom_quota an optional manual hourly quota for the subaccount. If not specified, the hourly quota will be managed based on reputation
    - [String] status the current sending status of the subaccount, one of "active" or "paused"
    - [Integer] reputation the subaccount

[View source]
def pause(id) #

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 [String] id the unique identifier of the subaccount to pause @return [Hash] the information for the paused subaccount

- [String] id a unique indentifier for the subaccount
- [String] name an optional display name for the subaccount
- [Integer] custom_quota an optional manual hourly quota for the subaccount. If not specified, the hourly quota will be managed based on reputation
- [String] status the current sending status of the subaccount, one of "active" or "paused"
- [Integer] reputation the subaccount

[View source]
def resume(id) #

Resume a paused subaccount's sending @param [String] id the unique identifier of the subaccount to resume @return [Hash] the information for the resumed subaccount

- [String] id a unique indentifier for the subaccount
- [String] name an optional display name for the subaccount
- [Integer] custom_quota an optional manual hourly quota for the subaccount. If not specified, the hourly quota will be managed based on reputation
- [String] status the current sending status of the subaccount, one of "active" or "paused"
- [Integer] reputation the subaccount

[View source]
def update(id, name = nil, notes = nil, custom_quota = nil) #

Update an existing subaccount @param [String] id the unique identifier of the subaccount to update @param [String] name an optional display name to further identify the subaccount @param [String] notes optional extra text to associate with the subaccount @param [Integer] custom_quota an optional manual hourly quota for the subaccount. If not specified, Mandrill will manage this based on reputation @return [Hash] the information for the updated subaccount

- [String] id a unique indentifier for the subaccount
- [String] name an optional display name for the subaccount
- [Integer] custom_quota an optional manual hourly quota for the subaccount. If not specified, the hourly quota will be managed based on reputation
- [String] status the current sending status of the subaccount, one of "active" or "paused"
- [Integer] reputation the subaccount

[View source]