Sha256: 25cf32921aa506618140fa8024a02dab45b777c75a243c776c9bfe7c29f437af

Contents?: true

Size: 617 Bytes

Versions: 11

Compression:

Stored size: 617 Bytes

Contents

require 'json'

module SendGrid
  class OpenTracking
    def initialize(enable: nil, substitution_tag: nil)
      @enable = enable
      @substitution_tag = substitution_tag
    end

    def enable=(enable)
      @enable = enable
    end

    def enable
      @enable
    end

    def substitution_tag=(substitution_tag)
      @substitution_tag = substitution_tag
    end

    def substitution_tag
      @substitution_tag
    end

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sendgrid-ruby-6.1.1 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-6.1.0 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-6.0.4 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-6.0.3 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-6.0.2 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-6.0.1 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-6.0.0 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-5.3.0 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-5.2.0 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-5.1.0 lib/sendgrid/helpers/mail/open_tracking.rb
sendgrid-ruby-5.0.0 lib/sendgrid/helpers/mail/open_tracking.rb