Class: Mandrill::Senders

Inherits:
Object
  • Object
show all
Defined in:
lib/mandrill/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(master) ⇒ Senders

Returns a new instance of Senders.



848
849
850
# File 'lib/mandrill/api.rb', line 848

def initialize(master)
    @master = master
end

Instance Attribute Details

#masterObject

Returns the value of attribute master.



846
847
848
# File 'lib/mandrill/api.rb', line 846

def master
  @master
end

Instance Method Details

#domainsArray

Returns the sender domains that have been added to this account.

Returns:

  • (Array)

    an array of sender domain data, one for each sending domain used by the account

    • Hash

      return[] the information on each sending domain for the account

      - [String] domain the sender domain name
      - [String] created_at the date and time that the sending domain was first seen as a UTC string in YYYY-MM-DD HH:MM:SS format
      


875
876
877
878
# File 'lib/mandrill/api.rb', line 875

def domains()
    _params = {}
    return @master.call 'senders/domains', _params
end

#info(address) ⇒ Hash

Return more detailed information about a single sender, including aggregates of recent stats

Parameters:

  • address (String)

    the email address of the sender

Returns:

  • (Hash)

    the detailed information on the sender

    • String

      address the sender’s email address

    • String

      created_at the date and time that the sender was first seen by Mandrill as a UTC date string in YYYY-MM-DD HH:MM:SS format

    • Integer

      sent the total number of messages sent by this sender

    • Integer

      hard_bounces the total number of hard bounces by messages by this sender

    • Integer

      soft_bounces the total number of soft bounces by messages by this sender

    • Integer

      rejects the total number of rejected messages by this sender

    • Integer

      complaints the total number of spam complaints received for messages by this sender

    • Integer

      unsubs the total number of unsubscribe requests received for messages by this sender

    • Integer

      opens the total number of times messages by this sender have been opened

    • Integer

      clicks the total number of times tracked URLs in messages by this sender have been clicked

    • Hash

      stats an aggregate summary of the sender’s sending stats

      - [Hash] today stats for this sender so far today
          - [Integer] sent the number of emails sent for this sender so far today
          - [Integer] hard_bounces the number of emails hard bounced for this sender so far today
          - [Integer] soft_bounces the number of emails soft bounced for this sender so far today
          - [Integer] rejects the number of emails rejected for sending this sender so far today
          - [Integer] complaints the number of spam complaints for this sender so far today
          - [Integer] unsubs the number of unsubscribes for this sender so far today
          - [Integer] opens the number of times emails have been opened for this sender so far today
          - [Integer] unique_opens the number of unique opens for emails sent for this sender so far today
          - [Integer] clicks the number of URLs that have been clicked for this sender so far today
          - [Integer] unique_clicks the number of unique clicks for emails sent for this sender so far today
      - [Hash] last_7_days stats for this sender in the last 7 days
          - [Integer] sent the number of emails sent for this sender in the last 7 days
          - [Integer] hard_bounces the number of emails hard bounced for this sender in the last 7 days
          - [Integer] soft_bounces the number of emails soft bounced for this sender in the last 7 days
          - [Integer] rejects the number of emails rejected for sending this sender in the last 7 days
          - [Integer] complaints the number of spam complaints for this sender in the last 7 days
          - [Integer] unsubs the number of unsubscribes for this sender in the last 7 days
          - [Integer] opens the number of times emails have been opened for this sender in the last 7 days
          - [Integer] unique_opens the number of unique opens for emails sent for this sender in the last 7 days
          - [Integer] clicks the number of URLs that have been clicked for this sender in the last 7 days
          - [Integer] unique_clicks the number of unique clicks for emails sent for this sender in the last 7 days
      - [Hash] last_30_days stats for this sender in the last 30 days
          - [Integer] sent the number of emails sent for this sender in the last 30 days
          - [Integer] hard_bounces the number of emails hard bounced for this sender in the last 30 days
          - [Integer] soft_bounces the number of emails soft bounced for this sender in the last 30 days
          - [Integer] rejects the number of emails rejected for sending this sender in the last 30 days
          - [Integer] complaints the number of spam complaints for this sender in the last 30 days
          - [Integer] unsubs the number of unsubscribes for this sender in the last 30 days
          - [Integer] opens the number of times emails have been opened for this sender in the last 30 days
          - [Integer] unique_opens the number of unique opens for emails sent for this sender in the last 30 days
          - [Integer] clicks the number of URLs that have been clicked for this sender in the last 30 days
          - [Integer] unique_clicks the number of unique clicks for emails sent for this sender in the last 30 days
      - [Hash] last_60_days stats for this sender in the last 60 days
          - [Integer] sent the number of emails sent for this sender in the last 60 days
          - [Integer] hard_bounces the number of emails hard bounced for this sender in the last 60 days
          - [Integer] soft_bounces the number of emails soft bounced for this sender in the last 60 days
          - [Integer] rejects the number of emails rejected for sending this sender in the last 60 days
          - [Integer] complaints the number of spam complaints for this sender in the last 60 days
          - [Integer] unsubs the number of unsubscribes for this sender in the last 60 days
          - [Integer] opens the number of times emails have been opened for this sender in the last 60 days
          - [Integer] unique_opens the number of unique opens for emails sent for this sender in the last 60 days
          - [Integer] clicks the number of URLs that have been clicked for this sender in the last 60 days
          - [Integer] unique_clicks the number of unique clicks for emails sent for this sender in the last 60 days
      - [Hash] last_90_days stats for this sender in the last 90 days
          - [Integer] sent the number of emails sent for this sender in the last 90 days
          - [Integer] hard_bounces the number of emails hard bounced for this sender in the last 90 days
          - [Integer] soft_bounces the number of emails soft bounced for this sender in the last 90 days
          - [Integer] rejects the number of emails rejected for sending this sender in the last 90 days
          - [Integer] complaints the number of spam complaints for this sender in the last 90 days
          - [Integer] unsubs the number of unsubscribes for this sender in the last 90 days
          - [Integer] opens the number of times emails have been opened for this sender in the last 90 days
          - [Integer] unique_opens the number of unique opens for emails sent for this sender in the last 90 days
          - [Integer] clicks the number of URLs that have been clicked for this sender in the last 90 days
          - [Integer] unique_clicks the number of unique clicks for emails sent for this sender in the last 90 days
      


949
950
951
952
# File 'lib/mandrill/api.rb', line 949

def info(address)
    _params = {:address => address}
    return @master.call 'senders/info', _params
end

#listArray

Return the senders that have tried to use this account.

Returns:

  • (Array)

    an array of sender data, one for each sending addresses used by the account

    • Hash

      return[] the information on each sending address in the account

      - [String] address the sender's email address
      - [String] created_at the date and time that the sender was first seen by Mandrill as a UTC date string in YYYY-MM-DD HH:MM:SS format
      - [Integer] sent the total number of messages sent by this sender
      - [Integer] hard_bounces the total number of hard bounces by messages by this sender
      - [Integer] soft_bounces the total number of soft bounces by messages by this sender
      - [Integer] rejects the total number of rejected messages by this sender
      - [Integer] complaints the total number of spam complaints received for messages by this sender
      - [Integer] unsubs the total number of unsubscribe requests received for messages by this sender
      - [Integer] opens the total number of times messages by this sender have been opened
      - [Integer] clicks the total number of times tracked URLs in messages by this sender have been clicked
      


865
866
867
868
# File 'lib/mandrill/api.rb', line 865

def list()
    _params = {}
    return @master.call 'senders/list', _params
end

#time_series(address) ⇒ Array

Return the recent history (hourly stats for the last 30 days) for a sender

Parameters:

  • address (String)

    the email address of the sender

Returns:

  • (Array)

    the array of history information

    • Hash

      return[] the stats for a single hour

      - [String] time the hour as a UTC date string in YYYY-MM-DD HH:MM:SS format
      - [Integer] sent the number of emails that were sent during the hour
      - [Integer] hard_bounces the number of emails that hard bounced during the hour
      - [Integer] soft_bounces the number of emails that soft bounced during the hour
      - [Integer] rejects the number of emails that were rejected during the hour
      - [Integer] complaints the number of spam complaints received during the hour
      - [Integer] opens the number of emails opened during the hour
      - [Integer] unique_opens the number of unique opens generated by messages sent during the hour
      - [Integer] clicks the number of tracked URLs clicked during the hour
      - [Integer] unique_clicks the number of unique clicks generated by messages sent during the hour
      


968
969
970
971
# File 'lib/mandrill/api.rb', line 968

def time_series(address)
    _params = {:address => address}
    return @master.call 'senders/time-series', _params
end