Sha256: c0394e8cee0e1bbf96c35069070cd4407c50bcbe32eca44dcb2c436d9f1e791c

Contents?: true

Size: 891 Bytes

Versions: 9

Compression:

Stored size: 891 Bytes

Contents

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

9 entries across 9 versions & 1 rubygems

Version Path
sendgrid-ruby-6.3.4 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.3.3 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.3.2 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.3.1 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.2.1 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.2.0 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.1.4 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.1.3 lib/sendgrid/helpers/mail/subscription_tracking.rb
sendgrid-ruby-6.1.2 lib/sendgrid/helpers/mail/subscription_tracking.rb