Class: SendGrid::ClickTracking

Inherits:
Object
  • Object
show all
Defined in:
lib/sendgrid/helpers/mail/click_tracking.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enable: nil, enable_text: nil) ⇒ ClickTracking

Returns a new instance of ClickTracking.



7
8
9
10
# File 'lib/sendgrid/helpers/mail/click_tracking.rb', line 7

def initialize(enable: nil, enable_text: nil)
  @enable = enable
  @enable_text = enable_text
end

Instance Attribute Details

#enableObject

Returns the value of attribute enable.



5
6
7
# File 'lib/sendgrid/helpers/mail/click_tracking.rb', line 5

def enable
  @enable
end

#enable_textObject

Returns the value of attribute enable_text.



5
6
7
# File 'lib/sendgrid/helpers/mail/click_tracking.rb', line 5

def enable_text
  @enable_text
end

Instance Method Details

#to_jsonObject



12
13
14
15
16
17
# File 'lib/sendgrid/helpers/mail/click_tracking.rb', line 12

def to_json(*)
  {
    'enable' => enable,
    'enable_text' => enable_text
  }.delete_if { |_, value| value.to_s.strip == '' }
end