Sha256: f4de301958cb49b73be6ef61dd959331ff508383b41abe8519398da13c343216

Contents?: true

Size: 376 Bytes

Versions: 13

Compression:

Stored size: 376 Bytes

Contents

require 'json'

module SendGrid
  class ClickTracking
    attr_accessor :enable, :enable_text

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

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sendgrid-ruby-6.7.0 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.6.2 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.6.1 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.6.0 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.5.2 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.5.1 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.5.0 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.4.0 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.3.9 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.3.8 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.3.7 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.3.6 lib/sendgrid/helpers/mail/click_tracking.rb
sendgrid-ruby-6.3.5 lib/sendgrid/helpers/mail/click_tracking.rb