class SendGrid::SubscriptionTracking

Attributes

enable[RW]
html[RW]
substitution_tag[RW]
text[RW]

Public Class Methods

new(enable: nil, text: nil, html: nil, substitution_tag: nil) click to toggle source
# File lib/sendgrid/helpers/mail/subscription_tracking.rb, line 7
def initialize(enable: nil, text: nil, html: nil, substitution_tag: nil)
  @enable = enable
  @text = text
  @html = html
  @substitution_tag = substitution_tag
end

Public Instance Methods

to_json(*) click to toggle source
# File lib/sendgrid/helpers/mail/subscription_tracking.rb, line 14
def to_json(*)
  {
    'enable' => enable,
    'text' => text,
    'html' => html,
    'substitution_tag' => substitution_tag
  }.delete_if { |_, value| value.to_s.strip == '' }
end