Method: Mandrill::Subaccounts#update

Defined in:
lib/mandrill/api.rb

#update(id, name = nil, notes = nil, custom_quota = nil) ⇒ Hash

Update an existing subaccount

Parameters:

  • id (String)

    the unique identifier of the subaccount to update

  • name (String) (defaults to: nil)

    an optional display name to further identify the subaccount

  • notes (String) (defaults to: nil)

    optional extra text to associate with the subaccount

  • custom_quota (Integer) (defaults to: nil)

    an optional manual hourly quota for the subaccount. If not specified, Mandrill will manage this based on reputation

Returns:

  • (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’s current reputation on a scale from 0 to 100

    • String

      created_at the date and time that the subaccount was created as a UTC string in YYYY-MM-DD HH:MM:SS format

    • String

      first_sent_at the date and time that the subaccount first sent as a UTC string in YYYY-MM-DD HH:MM:SS format

    • Integer

      sent_weekly the number of emails the subaccount has sent so far this week (weeks start on midnight Monday, UTC)

    • Integer

      sent_monthly the number of emails the subaccount has sent so far this month (months start on midnight of the 1st, UTC)

    • Integer

      sent_total the number of emails the subaccount has sent since it was created



1540
1541
1542
1543
# File 'lib/mandrill/api.rb', line 1540

def update(id, name=nil, notes=nil, custom_quota=nil)
    _params = {:id => id, :name => name, :notes => notes, :custom_quota => custom_quota}
    return @master.call 'subaccounts/update', _params
end