Class: SendGrid::SubscriptionTracking
- Inherits:
-
Object
- Object
- SendGrid::SubscriptionTracking
- Defined in:
- lib/sendgrid/helpers/mail/mail.rb
Instance Method Summary collapse
- #enable ⇒ Object
- #enable=(enable) ⇒ Object
- #html ⇒ Object
- #html=(html) ⇒ Object
-
#initialize(enable: nil, text: nil, html: nil, substitution_tag: nil) ⇒ SubscriptionTracking
constructor
A new instance of SubscriptionTracking.
- #substitution_tag ⇒ Object
- #substitution_tag=(substitution_tag) ⇒ Object
- #text ⇒ Object
- #text=(text) ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(enable: nil, text: nil, html: nil, substitution_tag: nil) ⇒ SubscriptionTracking
Returns a new instance of SubscriptionTracking.
78 79 80 81 82 83 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 78 def initialize(enable: nil, text: nil, html: nil, substitution_tag: nil) @enable = enable @text = text @html = html @substitution_tag = substitution_tag end |
Instance Method Details
#enable ⇒ Object
89 90 91 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 89 def enable @enable end |
#enable=(enable) ⇒ Object
85 86 87 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 85 def enable=(enable) @enable = enable end |
#html ⇒ Object
105 106 107 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 105 def html @html end |
#html=(html) ⇒ Object
101 102 103 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 101 def html=(html) @html = html end |
#substitution_tag ⇒ Object
113 114 115 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 113 def substitution_tag @substitution_tag end |
#substitution_tag=(substitution_tag) ⇒ Object
109 110 111 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 109 def substitution_tag=(substitution_tag) @substitution_tag = substitution_tag end |
#text ⇒ Object
97 98 99 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 97 def text @text end |
#text=(text) ⇒ Object
93 94 95 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 93 def text=(text) @text = text end |
#to_json ⇒ Object
117 118 119 120 121 122 123 124 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 117 def to_json(*) { 'enable' => self.enable, 'text' => self.text, 'html' => self.html, 'substitution_tag' => self.substitution_tag }.delete_if { |_, value| value.to_s.strip == '' } end |