Class: SendGrid::OpenTracking
- Inherits:
-
Object
- Object
- SendGrid::OpenTracking
- Defined in:
- lib/sendgrid/helpers/mail/open_tracking.rb
Instance Method Summary collapse
- #enable ⇒ Object
- #enable=(enable) ⇒ Object
-
#initialize(enable: nil, substitution_tag: nil) ⇒ OpenTracking
constructor
A new instance of OpenTracking.
- #substitution_tag ⇒ Object
- #substitution_tag=(substitution_tag) ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(enable: nil, substitution_tag: nil) ⇒ OpenTracking
Returns a new instance of OpenTracking.
5 6 7 8 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 5 def initialize(enable: nil, substitution_tag: nil) @enable = enable @substitution_tag = substitution_tag end |
Instance Method Details
#enable ⇒ Object
14 15 16 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 14 def enable @enable end |
#enable=(enable) ⇒ Object
10 11 12 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 10 def enable=(enable) @enable = enable end |
#substitution_tag ⇒ Object
22 23 24 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 22 def substitution_tag @substitution_tag end |
#substitution_tag=(substitution_tag) ⇒ Object
18 19 20 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 18 def substitution_tag=(substitution_tag) @substitution_tag = substitution_tag end |
#to_json ⇒ Object
26 27 28 29 30 31 |
# File 'lib/sendgrid/helpers/mail/open_tracking.rb', line 26 def to_json(*) { 'enable' => self.enable, 'substitution_tag' => self.substitution_tag }.delete_if { |_, value| value.to_s.strip == '' } end |