Class: Workarea::Listrak::Models::MessageForm
- Inherits:
-
Object
- Object
- Workarea::Listrak::Models::MessageForm
- Defined in:
- app/services/workarea/listrak/models/message_form.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#body_html ⇒ String
HTML body that will be sent in the message.
-
#body_text ⇒ String
Text body that will be sent in the message.
-
#campaign_id ⇒ Integer
Identifier of the campaign associated with the message.
-
#code_page ⇒ Integer
Type of CodePage used in the message.
-
#enable_passalong ⇒ Boolean
Whether passalong is enabled.
-
#enable_tracking ⇒ Boolean
Whether tracking is enabled.
-
#from_email ⇒ String
The from email address that will be used for the message.
-
#from_name ⇒ String
The from name that will be used for the message.
-
#google_analytics_campaign_content ⇒ String
The Google Analytics campaign content to be used for message tracking.
-
#google_analytics_campaign_name ⇒ String
The Google Analytics campaign name to be used for message tracking.
-
#initialize(from_email:, from_name:, subject:, **options) ⇒ MessageForm
constructor
A new instance of MessageForm.
-
#reply_email ⇒ String
The reply email address that will be used for the message.
-
#save_audience_id ⇒ Integer
Identifier of the SavedAudience to use for recipient filtering.
-
#subject ⇒ String
Subject of the message.
- #to_json ⇒ Object
-
#to_name ⇒ String
The to name that will be used for the message.
Constructor Details
#initialize(from_email:, from_name:, subject:, **options) ⇒ MessageForm
Returns a new instance of MessageForm.
7 8 9 10 11 12 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 7 def initialize(from_email:, from_name:, subject:, **) @from_email = from_email @from_name = from_name @subject = subject @options = .symbolize_keys end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 5 def @options end |
Instance Method Details
#body_html ⇒ String
HTML body that will be sent in the message.
45 46 47 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 45 def body_html [:body_html] end |
#body_text ⇒ String
Text body that will be sent in the message.
53 54 55 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 53 def body_text [:body_text] end |
#campaign_id ⇒ Integer
Identifier of the campaign associated with the message.
37 38 39 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 37 def campaign_id [:campaign_id] end |
#code_page ⇒ Integer
Type of CodePage used in the message.
61 62 63 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 61 def code_page [:code_page] end |
#enable_passalong ⇒ Boolean
Whether passalong is enabled.
69 70 71 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 69 def enable_passalong [:enable_passalong] end |
#enable_tracking ⇒ Boolean
Whether tracking is enabled.
77 78 79 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 77 def enable_tracking [:enable_tracking] end |
#from_email ⇒ String
The from email address that will be used for the message.
85 86 87 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 85 def from_email @from_email end |
#from_name ⇒ String
The from name that will be used for the message.
93 94 95 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 93 def from_name @from_name end |
#google_analytics_campaign_content ⇒ String
The Google Analytics campaign content to be used for message tracking.
109 110 111 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 109 def google_analytics_campaign_content [:google_analytics_campaign_content] end |
#google_analytics_campaign_name ⇒ String
The Google Analytics campaign name to be used for message tracking.
101 102 103 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 101 def google_analytics_campaign_name [:google_analytics_campaign_name] end |
#reply_email ⇒ String
The reply email address that will be used for the message.
117 118 119 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 117 def reply_email [:reply_email] end |
#save_audience_id ⇒ Integer
Identifier of the SavedAudience to use for recipient filtering.
125 126 127 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 125 def save_audience_id [:save_audience_id] end |
#subject ⇒ String
Subject of the message.
133 134 135 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 133 def subject @subject end |
#to_json ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 14 def to_json { campaignId: campaign_id, bodyHtml: body_html, bodyText: body_text, codePage: code_page, enablePassalong: enable_passalong, enableTracking: enable_tracking, fromEmail: from_email, fromName: from_name, googleAnalyticsCampaignName: google_analytics_campaign_name, googleAnalyticsCampaignContent: google_analytics_campaign_content, replyEmail: reply_email, savedAudienceId: save_audience_id, subject: subject, toName: to_name }.compact.to_json end |
#to_name ⇒ String
The to name that will be used for the message.
141 142 143 |
# File 'app/services/workarea/listrak/models/message_form.rb', line 141 def to_name [:to_name] end |