Class: SendGrid::SubscriptionTracking
- Inherits:
-
Object
- Object
- SendGrid::SubscriptionTracking
- Defined in:
- lib/sendgrid/helpers/mail/subscription_tracking.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.
5 6 7 8 9 10 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 5 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
16 17 18 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 16 def enable @enable end |
#enable=(enable) ⇒ Object
12 13 14 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 12 def enable=(enable) @enable = enable end |
#html ⇒ Object
32 33 34 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 32 def html @html end |
#html=(html) ⇒ Object
28 29 30 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 28 def html=(html) @html = html end |
#substitution_tag ⇒ Object
40 41 42 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 40 def substitution_tag @substitution_tag end |
#substitution_tag=(substitution_tag) ⇒ Object
36 37 38 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 36 def substitution_tag=(substitution_tag) @substitution_tag = substitution_tag end |
#text ⇒ Object
24 25 26 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 24 def text @text end |
#text=(text) ⇒ Object
20 21 22 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 20 def text=(text) @text = text end |
#to_json ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/sendgrid/helpers/mail/subscription_tracking.rb', line 44 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 |