Class: SendGrid4r::REST::Mail::MailSettings
- Inherits:
-
Struct
- Object
- Struct
- SendGrid4r::REST::Mail::MailSettings
- Defined in:
- lib/sendgrid4r/rest/mail/mail_settings.rb
Instance Attribute Summary collapse
-
#bcc ⇒ Object
Returns the value of attribute bcc.
-
#bypass_list_management ⇒ Object
Returns the value of attribute bypass_list_management.
-
#footer ⇒ Object
Returns the value of attribute footer.
-
#sandbox_mode ⇒ Object
Returns the value of attribute sandbox_mode.
-
#spam_check ⇒ Object
Returns the value of attribute spam_check.
Instance Method Summary collapse
- #disable_bcc ⇒ Object
- #disable_bypass_list_management ⇒ Object
- #disable_footer ⇒ Object
- #disable_sandbox_mode ⇒ Object
- #disable_spam_check ⇒ Object
- #enable_bcc(email) ⇒ Object
- #enable_bypass_list_management ⇒ Object
- #enable_footer(text, html) ⇒ Object
- #enable_sandbox_mode ⇒ Object
- #enable_spam_check(threshold, post_to_url) ⇒ Object
- #to_h ⇒ Object
Instance Attribute Details
#bcc ⇒ Object
Returns the value of attribute bcc
8 9 10 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 8 def bcc @bcc end |
#bypass_list_management ⇒ Object
Returns the value of attribute bypass_list_management
8 9 10 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 8 def bypass_list_management @bypass_list_management end |
#footer ⇒ Object
Returns the value of attribute footer
8 9 10 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 8 def @footer end |
#sandbox_mode ⇒ Object
Returns the value of attribute sandbox_mode
8 9 10 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 8 def sandbox_mode @sandbox_mode end |
#spam_check ⇒ Object
Returns the value of attribute spam_check
8 9 10 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 8 def spam_check @spam_check end |
Instance Method Details
#disable_bcc ⇒ Object
15 16 17 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 15 def disable_bcc tap { |s| s[:bcc] = { enable: false } } end |
#disable_bypass_list_management ⇒ Object
23 24 25 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 23 def disable_bypass_list_management tap { |s| s[:bypass_list_management] = { enable: false } } end |
#disable_footer ⇒ Object
31 32 33 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 31 def tap { |s| s[:footer] = { enable: false } } end |
#disable_sandbox_mode ⇒ Object
39 40 41 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 39 def disable_sandbox_mode tap { |s| s[:sandbox_mode] = { enable: false } } end |
#disable_spam_check ⇒ Object
53 54 55 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 53 def disable_spam_check tap { |s| s[:spam_check] = { enable: false } } end |
#enable_bcc(email) ⇒ Object
11 12 13 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 11 def enable_bcc(email) tap { |s| s[:bcc] = { enable: true, email: email } } end |
#enable_bypass_list_management ⇒ Object
19 20 21 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 19 def enable_bypass_list_management tap { |s| s[:bypass_list_management] = { enable: true } } end |
#enable_footer(text, html) ⇒ Object
27 28 29 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 27 def (text, html) tap { |s| s[:footer] = { enable: true, text: text, html: html } } end |
#enable_sandbox_mode ⇒ Object
35 36 37 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 35 def enable_sandbox_mode tap { |s| s[:sandbox_mode] = { enable: true } } end |
#enable_spam_check(threshold, post_to_url) ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 43 def enable_spam_check(threshold, post_to_url) tap do |s| s[:spam_check] = { enable: true, threshold: threshold, post_to_url: post_to_url } end end |
#to_h ⇒ Object
57 58 59 |
# File 'lib/sendgrid4r/rest/mail/mail_settings.rb', line 57 def to_h super.reject { |_key, value| value.nil? } end |