Class: SendGrid::OpenTracking
- Inherits:
-
Object
- Object
- SendGrid::OpenTracking
- Defined in:
- lib/sendgrid/helpers/mail/open_tracking.rb
Instance Attribute Summary collapse
-
#enable ⇒ Object
Returns the value of attribute enable.
-
#substitution_tag ⇒ Object
Returns the value of attribute substitution_tag.
Instance Method Summary collapse
-
#initialize(enable: nil, substitution_tag: nil) ⇒ OpenTracking
constructor
A new instance of OpenTracking.
- #to_json ⇒ Object
Constructor Details
#initialize(enable: nil, substitution_tag: nil) ⇒ OpenTracking
Returns a new instance of OpenTracking.
7 8 9 10 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 7 def initialize(enable: nil, substitution_tag: nil) @enable = enable @substitution_tag = substitution_tag end |
Instance Attribute Details
#enable ⇒ Object
Returns the value of attribute enable.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 5 def enable @enable end |
#substitution_tag ⇒ Object
Returns the value of attribute substitution_tag.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 5 def substitution_tag @substitution_tag end |
Instance Method Details
#to_json ⇒ Object
12 13 14 15 16 17 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 12 def to_json(*) { 'enable' => enable, 'substitution_tag' => substitution_tag }.delete_if { |_, value| value.to_s.strip == '' } end |