class MailUp::Stats::Recipient

Attributes

api[RW]

Public Class Methods

new(id, api) click to toggle source
# File lib/mailup/stats/recipient.rb, line 6
def initialize(id, api)
    @api = api
    @id = id
end

Public Instance Methods

bounces(params = {}) click to toggle source

Paged list of bounces returned by the specified recipient.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListRecipientMessageBounces

@example

bounces = mailup.console.recipient(154).bounces
bounces['TotalElementsCount']
=> 10
bounces['Items'].first['Subject']
=> "Message Subject"
# File lib/mailup/stats/recipient.rb, line 159
def bounces(params = {})
  @api.get("#{@api.path}/Recipient/#{@id}/List/Bounces", params: params)
end
bounces_count() click to toggle source

Count of bounces returned by the specified recipient.

@return [Integer] Count of bounces.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountRecipientMessageBounces

@example

views = mailup.console.recipient(154).bounces_count
=> 324
# File lib/mailup/stats/recipient.rb, line 175
def bounces_count
  @api.get("#{@api.path}/Recipient/#{@id}/Count/Bounces")
end
bounces_details(params = {}) click to toggle source

Paged list of bounces with details returned by the specified recipient.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListRecipientMessageBouncesDetails

@example

bounces = mailup.console.recipient(154).bounces_details
bounces['TotalElementsCount']
=> 10
bounces['Items'].first['Subject']
=> "Message Subject"
# File lib/mailup/stats/recipient.rb, line 129
def bounces_details(params = {})
  @api.get("#{@api.path}/Recipient/#{@id}/List/BouncesDetails", params: params)
end
clicks(params = {}) click to toggle source

Paged list of message clicks on a link done by the specified recipient.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListRecipientMessageClicks

@example

clicks = mailup.console.recipient(154).clicks
clicks['TotalElementsCount']
=> 10
clicks['Items'].first['Subject']
=> "Message Subject"
# File lib/mailup/stats/recipient.rb, line 281
def clicks(params = {})
  @api.get("#{@api.path}/Recipient/#{@id}/List/Clicks", params: params)
end
clicks_count() click to toggle source

Count of clicks on a link in the specified email.

@return [Integer] Count of clicks.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountRecipientClicks

@example

clicks = mailup.console.recipient(154).clicks_count
=> 324
# File lib/mailup/stats/recipient.rb, line 297
def clicks_count
  @api.get("#{@api.path}/Recipient/#{@id}/Count/Clicks")
end
clicks_details(params = {}) click to toggle source

Verbose paged list of message clicks on a link done by the specified recipient.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods#Emailstatisticsmethods-ListRecipientClickDetailsByDate

@example

clicks = mailup.console.recipient(154).clicks_details
clicks['TotalElementsCount']
=> 10
clicks['Items'].first['Subject']
=> "Message Subject"
# File lib/mailup/stats/recipient.rb, line 251
def clicks_details(params = {})
  @api.get("#{@api.path}/Recipient/#{@id}/List/ClicksDetails", params: params)
end
deliveries(params = {}) click to toggle source

Paged list of messages received by the specified recipient.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListRecipientMessageDeliveries

@example

deliveries = mailup.console.recipient(154).deliveries
deliveries['TotalElementsCount']
=> 10
deliveries['Items'].first['Subject']
=> "Message Subject"
# File lib/mailup/stats/recipient.rb, line 37
def deliveries(params = {})
  @api.get("#{@api.path}/Recipient/#{@id}/List/Deliveries", params: params)
end
deliveries_count() click to toggle source

Count of messages received by the specified recipient.

@return [Integer] Count of deliveries.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountRecipientMessageDeliveries

@example

deliveries = mailup.console.recipient(154).deliveries_count
=> 324
# File lib/mailup/stats/recipient.rb, line 53
def deliveries_count
  @api.get("#{@api.path}/Recipient/#{@id}/Count/Deliveries")
end
unsubscribes(params = {}) click to toggle source

Paged list of unsubscriptions done by the specified recipient.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListRecipientUnsubscriptions

@example

unsubscribes = mailup.console.recipient(154).unsubscribes
unsubscribes['TotalElementsCount']
=> 10
unsubscribes['Items'].first['Subject']
=> "Message Subject"
# File lib/mailup/stats/recipient.rb, line 205
def unsubscribes(params = {})
  @api.get("#{@api.path}/Recipient/#{@id}/List/Unsubscriptions", params: params)
end
unsubscribes_count() click to toggle source

Count of unsubscriptions done by the specified recipient.

@return [Integer] Count of unsubscribes.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountRecipientUnsubscriptions

@example

unsubscribes = mailup.console.recipient(154).unsubscribes_count
=> 324
# File lib/mailup/stats/recipient.rb, line 221
def unsubscribes_count
  @api.get("#{@api.path}/Recipient/#{@id}/Count/Unsubscriptions")
end
views(params = {}) click to toggle source

Paged list of messages viewed by the specified recipient.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListRecipientMessageViews

@example

views = mailup.console.recipient(154).views
views['TotalElementsCount']
=> 10
views['Items'].first['Subject']
=> "Message Subject"
# File lib/mailup/stats/recipient.rb, line 83
def views(params = {})
  @api.get("#{@api.path}/Recipient/#{@id}/List/Views", params: params)
end
views_count() click to toggle source

Count of messages viewed by the specified recipient.

@return [Integer] Count of views.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountRecipientMessageViews

@example

views = mailup.console.recipient(154).views_count
=> 324
# File lib/mailup/stats/recipient.rb, line 99
def views_count
  @api.get("#{@api.path}/Recipient/#{@id}/Count/Views")
end