class MailUp::Stats::Message
Attributes
Public Class Methods
# File lib/mailup/stats/message.rb, line 6 def initialize(id, api) @api = api @id = id end
Public Instance Methods
Paged list of bounces from the specified email.
@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]
@example
bounces = mailup.stats.message(9).bounces bounces['TotalElementsCount'] => 10
# File lib/mailup/stats/message.rb, line 126 def bounces(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Bounces", params: params) end
Count of bounces from the specified mail.
@return [Integer] Count of bounces.
@example
bounces = mailup.stats.message(9).bounces_count => 3453
# File lib/mailup/stats/message.rb, line 142 def bounces_count @api.get("#{@api.path}/Message/#{@id}/Count/Bounces") end
Paged list of clicks on a link in the specified email.
@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]
@example
clicks = mailup.stats.message(9).clicks clicks['TotalElementsCount'] => 10 clicks['Items'].first['Count'] => 3
# File lib/mailup/stats/message.rb, line 216 def clicks(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Clicks", params: params) end
Count of clicks on a link in the specified email.
@return [Integer] Count of bounces.
@example
clicks = mailup.stats.message(9).clicks_count => 3453
# File lib/mailup/stats/message.rb, line 232 def clicks_count @api.get("#{@api.path}/Message/#{@id}/Count/Clicks") end
Paged list of recipients who received the specified email.
@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]
@example
recipients = mailup.stats.message(9).recipients recipients['TotalElementsCount'] => 10 recipients['Items'].first['Email'] => "joe@public.com"
# File lib/mailup/stats/message.rb, line 37 def recipients(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Recipients", params: params) end
Count of recipients who received the specified email.
@return [Integer] Count of recipients.
@example
recipients = mailup.stats.message(9).recipients_count => 10
# File lib/mailup/stats/message.rb, line 53 def recipients_count @api.get("#{@api.path}/Message/#{@id}/Count/Recipients") end
Paged list of unsubscriptions from the specified email.
@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]
@example
unsubs = mailup.stats.message(9).unsubscribes unsubs['TotalElementsCount'] => 10
# File lib/mailup/stats/message.rb, line 170 def unsubscribes(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Unsubscriptions", params: params) end
Count of unsubscriptions from the specified email.
@return [Integer] Count of unsubscribes.
@example
unsubs = mailup.stats.message(9).unsubscribes_count => 234
# File lib/mailup/stats/message.rb, line 186 def unsubscribes_count @api.get("#{@api.path}/Message/#{@id}/Count/Unsubscriptions") end
Paged list of clicks on a link in the specified email.
@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]
@example
url_clicks = mailup.stats.message(9).url_clicks url_clicks['TotalElementsCount'] => 10 url_clicks['Items'].first['Count'] => 3
# File lib/mailup/stats/message.rb, line 262 def url_clicks(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/UrlClicks", params: params) end
Count of clicks on a link in the specified email.
@return [Integer] Count of bounces.
@example
url_clicks = mailup.stats.message(9).url_clicks_count => 3453
# File lib/mailup/stats/message.rb, line 278 def url_clicks_count @api.get("#{@api.path}/Message/#{@id}/Count/UrlClicks") end
Paged list of views of the specified email.
@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]
@example
views = mailup.stats.message(9).views views['TotalElementsCount'] => 10
# File lib/mailup/stats/message.rb, line 82 def views(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Views", params: params) end
Count of views of the specified email.
@return [Integer] Count of views.
@example
views = mailup.stats.message(9).views_count => 3453
# File lib/mailup/stats/message.rb, line 98 def views_count @api.get("#{@api.path}/Message/#{@id}/Count/Views") end