class MailUp::Stats::Recipient
Attributes
Public Class Methods
# File lib/mailup/stats/recipient.rb, line 6 def initialize(id, api) @api = api @id = id end
Public Instance Methods
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]
@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
Count of bounces returned by the specified recipient.
@return [Integer] Count of bounces.
@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
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]
@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
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]
@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
Count of clicks on a link in the specified email.
@return [Integer] Count of clicks.
@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
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]
@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
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]
@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
Count of messages received by the specified recipient.
@return [Integer] Count of deliveries.
@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
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]
@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
Count of unsubscriptions done by the specified recipient.
@return [Integer] Count of unsubscribes.
@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
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]
@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
Count of messages viewed by the specified recipient.
@return [Integer] Count of views.
@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