Class: Mailtrap::EmailCampaignStats

Inherits:
Struct
  • Object
show all
Defined in:
lib/mailtrap/email_campaign.rb

Overview

Data Transfer Object for Email Campaign Stats

Aggregated campaign performance metrics. All counts and rates are 0 when the campaign has not been started.

Instance Attribute Summary collapse

Instance Attribute Details

#bounce_countInteger (readonly)

Number of bounced messages

Returns:

  • (Integer)

    the current value of bounce_count



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def bounce_count
  @bounce_count
end

#bounce_rateFloat (readonly)

Share of sent messages that bounced (0–1)

Returns:

  • (Float)

    the current value of bounce_rate



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def bounce_rate
  @bounce_rate
end

#click_countInteger (readonly)

Number of clicked messages

Returns:

  • (Integer)

    the current value of click_count



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def click_count
  @click_count
end

#click_rateFloat (readonly)

Share of delivered messages that were clicked (0–1)

Returns:

  • (Float)

    the current value of click_rate



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def click_rate
  @click_rate
end

#delivery_countInteger (readonly)

Number of delivered messages

Returns:

  • (Integer)

    the current value of delivery_count



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def delivery_count
  @delivery_count
end

#delivery_rateFloat (readonly)

Share of sent messages that were delivered (0–1)

Returns:

  • (Float)

    the current value of delivery_rate



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def delivery_rate
  @delivery_rate
end

#open_countInteger (readonly)

Number of opened messages

Returns:

  • (Integer)

    the current value of open_count



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def open_count
  @open_count
end

#open_rateFloat (readonly)

Share of delivered messages that were opened (0–1)

Returns:

  • (Float)

    the current value of open_rate



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def open_rate
  @open_rate
end

#sent_countInteger (readonly)

Number of sent messages

Returns:

  • (Integer)

    the current value of sent_count



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def sent_count
  @sent_count
end

#spam_countInteger (readonly)

Number of spam complaints

Returns:

  • (Integer)

    the current value of spam_count



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def spam_count
  @spam_count
end

#spam_rateFloat (readonly)

Share of sent messages marked as spam (0–1)

Returns:

  • (Float)

    the current value of spam_rate



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def spam_rate
  @spam_rate
end

#unsubscription_countInteger (readonly)

Number of unsubscriptions

Returns:

  • (Integer)

    the current value of unsubscription_count



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def unsubscription_count
  @unsubscription_count
end

#unsubscription_rateFloat (readonly)

Share of delivered messages that unsubscribed (0–1)

Returns:

  • (Float)

    the current value of unsubscription_rate



22
23
24
# File 'lib/mailtrap/email_campaign.rb', line 22

def unsubscription_rate
  @unsubscription_rate
end