Class: SendGrid::MailSettings
- Inherits:
-
Object
- Object
- SendGrid::MailSettings
- Defined in:
- lib/sendgrid/helpers/mail/mail_settings.rb
Instance Attribute Summary collapse
- #bcc ⇒ Object
- #bypass_list_management ⇒ Object
- #footer ⇒ Object
- #sandbox_mode ⇒ Object
- #spam_check ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ MailSettings
constructor
A new instance of MailSettings.
- #to_json ⇒ Object
Constructor Details
#initialize ⇒ MailSettings
Returns a new instance of MailSettings.
7 8 9 10 11 12 13 |
# File 'lib/sendgrid/helpers/mail/mail_settings.rb', line 7 def initialize @bcc = nil @bypass_list_management = nil @footer = nil @sandbox_mode = nil @spam_check = nil end |
Instance Attribute Details
#bcc ⇒ Object
27 28 29 |
# File 'lib/sendgrid/helpers/mail/mail_settings.rb', line 27 def bcc @bcc.nil? ? nil : @bcc.to_json end |
#bypass_list_management ⇒ Object
19 20 21 |
# File 'lib/sendgrid/helpers/mail/mail_settings.rb', line 19 def bypass_list_management @bypass_list_management.nil? ? nil : @bypass_list_management.to_json end |
#footer ⇒ Object
23 24 25 |
# File 'lib/sendgrid/helpers/mail/mail_settings.rb', line 23 def @footer.nil? ? nil : @footer.to_json end |
#sandbox_mode ⇒ Object
15 16 17 |
# File 'lib/sendgrid/helpers/mail/mail_settings.rb', line 15 def sandbox_mode @sandbox_mode.nil? ? nil : @sandbox_mode.to_json end |
#spam_check ⇒ Object
31 32 33 |
# File 'lib/sendgrid/helpers/mail/mail_settings.rb', line 31 def spam_check @spam_check.nil? ? nil : @spam_check.to_json end |
Instance Method Details
#to_json ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/sendgrid/helpers/mail/mail_settings.rb', line 35 def to_json(*) { 'bcc' => bcc, 'bypass_list_management' => bypass_list_management, 'footer' => , 'sandbox_mode' => sandbox_mode, 'spam_check' => spam_check }.delete_if { |_, value| value.to_s.strip == '' } end |