Class: SendGrid::ClickTracking

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ClickTracking.


158
159
160
161
# File 'lib/sendgrid/helpers/mail/mail.rb', line 158

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

Instance Method Details

#enableObject


167
168
169
# File 'lib/sendgrid/helpers/mail/mail.rb', line 167

def enable
  @enable
end

#enable=(enable) ⇒ Object


163
164
165
# File 'lib/sendgrid/helpers/mail/mail.rb', line 163

def enable=(enable)
  @enable = enable
end

#enable_textObject


175
176
177
# File 'lib/sendgrid/helpers/mail/mail.rb', line 175

def enable_text
  @enable_text
end

#enable_text=(enable_text) ⇒ Object


171
172
173
# File 'lib/sendgrid/helpers/mail/mail.rb', line 171

def enable_text=(enable_text)
  @enable_text = enable_text
end

#to_jsonObject


179
180
181
182
183
184
# File 'lib/sendgrid/helpers/mail/mail.rb', line 179

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