Class: Mailtrap::EmailCampaign
- Inherits:
-
Struct
- Object
- Struct
- Mailtrap::EmailCampaign
- Defined in:
- lib/mailtrap/email_campaign.rb
Overview
Data Transfer Object for Email Campaign
Instance Attribute Summary collapse
-
#contact_list_ids ⇒ Array<Integer>
readonly
IDs of the contact lists included in the campaign's audience.
-
#contact_segment_ids ⇒ Array<Integer>
readonly
IDs of the contact segments included in the campaign's audience.
-
#created_at ⇒ String
readonly
The creation timestamp.
-
#current_state ⇒ String
readonly
Lifecycle state (+draft+,
scheduled,started,queued,paused,terminating,under_review,finished,failed,failed_immediately). -
#current_state_metadata ⇒ Hash?
readonly
Metadata about the most recent state transition (+reason+,
error,errorsas an array of{message, rcpt_index}objects,scheduled_at). -
#delivery_mode ⇒ String
readonly
How the campaign is delivered (+rapid+ or
gradual). -
#delivery_options ⇒ Hash?
readonly
Delivery throttling options (+emails_per_hour+).
-
#domain_id ⇒ Integer
readonly
ID of the sending domain used for the campaign, as returned by the Sending Domains endpoints.
-
#domain_name ⇒ String
readonly
Name of the sending domain used for the campaign.
-
#from_display_name ⇒ String
readonly
Display name shown in the From header.
-
#from_local_part ⇒ String
readonly
Local part (before the @) of the From address.
-
#id ⇒ Integer
readonly
The email campaign ID.
-
#last_started_at ⇒ String?
readonly
When the campaign was last started, or
nil. -
#last_started_at_date ⇒ String?
readonly
Date the campaign was last started, present only when started.
-
#name ⇒ String
readonly
Campaign name.
-
#recipient_total_count ⇒ Integer?
readonly
Total number of recipients, or
niluntil the audience is resolved. -
#reply_to ⇒ Hash?
readonly
Reply-To address parts (+display_name+,
local_part,domain). -
#template ⇒ Hash?
readonly
The campaign template (+id+,
subject,merge_tags,body_html,body_text; bodies are omitted on list responses). -
#updated_at ⇒ String
readonly
The last update timestamp.
Instance Attribute Details
#contact_list_ids ⇒ Array<Integer> (readonly)
IDs of the contact lists included in the campaign's audience
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def contact_list_ids @contact_list_ids end |
#contact_segment_ids ⇒ Array<Integer> (readonly)
IDs of the contact segments included in the campaign's audience
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def contact_segment_ids @contact_segment_ids end |
#created_at ⇒ String (readonly)
The creation timestamp
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def created_at @created_at end |
#current_state ⇒ String (readonly)
Lifecycle state (+draft+, scheduled, started, queued,
paused, terminating, under_review, finished, failed, failed_immediately)
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def current_state @current_state end |
#current_state_metadata ⇒ Hash? (readonly)
Metadata about the most recent state transition
(+reason+, error, errors as an array of {message, rcpt_index} objects, scheduled_at)
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def @current_state_metadata end |
#delivery_mode ⇒ String (readonly)
How the campaign is delivered (+rapid+ or gradual)
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def delivery_mode @delivery_mode end |
#delivery_options ⇒ Hash? (readonly)
Delivery throttling options (+emails_per_hour+)
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def @delivery_options end |
#domain_id ⇒ Integer (readonly)
ID of the sending domain used for the campaign, as returned by the Sending Domains endpoints
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def domain_id @domain_id end |
#domain_name ⇒ String (readonly)
Name of the sending domain used for the campaign
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def domain_name @domain_name end |
#from_display_name ⇒ String (readonly)
Display name shown in the From header
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def from_display_name @from_display_name end |
#from_local_part ⇒ String (readonly)
Local part (before the @) of the From address
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def from_local_part @from_local_part end |
#id ⇒ Integer (readonly)
The email campaign ID
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def id @id end |
#last_started_at ⇒ String? (readonly)
When the campaign was last started, or nil
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def last_started_at @last_started_at end |
#last_started_at_date ⇒ String? (readonly)
Date the campaign was last started, present only when started
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def last_started_at_date @last_started_at_date end |
#name ⇒ String (readonly)
Campaign name
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def name @name end |
#recipient_total_count ⇒ Integer? (readonly)
Total number of recipients,
or nil until the audience is resolved
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def recipient_total_count @recipient_total_count end |
#reply_to ⇒ Hash? (readonly)
Reply-To address parts (+display_name+, local_part, domain)
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def reply_to @reply_to end |
#template ⇒ Hash? (readonly)
The campaign template (+id+, subject, merge_tags,
body_html, body_text; bodies are omitted on list responses)
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def template @template end |
#updated_at ⇒ String (readonly)
The last update timestamp
65 66 67 |
# File 'lib/mailtrap/email_campaign.rb', line 65 def updated_at @updated_at end |