Sha256: e90a6339aed6ddf7a0415fcf20d5ab23ed8f60b9c784deb68bea119bdd0836e1

Contents?: true

Size: 907 Bytes

Versions: 11

Compression:

Stored size: 907 Bytes

Contents

require 'json'

module SendGrid
  class SubscriptionTracking
    def initialize(enable: nil, text: nil, html: nil, substitution_tag: nil)
      @enable = enable
      @text = text
      @html = html
      @substitution_tag = substitution_tag
    end

    def enable=(enable)
      @enable = enable
    end

    def enable
      @enable
    end

    def text=(text)
      @text = text
    end

    def text
      @text
    end

    def html=(html)
      @html = html
    end

    def html
      @html
    end

    def substitution_tag=(substitution_tag)
      @substitution_tag = substitution_tag
    end

    def substitution_tag
      @substitution_tag
    end

    def to_json(*)
      {
        'enable' => self.enable,
        'text' => self.text,
        'html' => self.html,
        '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/subscription_tracking.rb
sendgrid-ruby-6.1.0 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.0.4 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.0.3 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.0.2 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.0.1 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.0.0 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-5.3.0 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-5.2.0 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-5.1.0 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-5.0.0 lib/sendgrid/helpers/mail/subscription_tracking.rb