Sha256: ee9fae6969fb077d9dd03a747b99a19dc4559ee1ae39d25a53bbedf59b2e90f9

Contents?: true

Size: 739 Bytes

Versions: 9

Compression:

Stored size: 739 Bytes

Contents

module SendGrid
  class SpamCheck
    def initialize(enable: nil, threshold: nil, post_to_url: nil)
      @enable = enable
      @threshold = threshold
      @post_to_url = post_to_url
    end

    def enable=(enable)
      @enable = enable
    end

    def enable
      @enable
    end

    def threshold=(threshold)
      @threshold = threshold
    end

    def threshold
      @threshold
    end

    def post_to_url=(post_to_url)
      @post_to_url = post_to_url
    end

    def post_to_url
      @post_to_url
    end

    def to_json(*)
      {
        'enable' => self.enable,
        'threshold' => self.threshold,
        'post_to_url' => self.post_to_url
      }.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/spam_check.rb
sendgrid-ruby-6.3.3 lib/sendgrid/helpers/mail/spam_check.rb
sendgrid-ruby-6.3.2 lib/sendgrid/helpers/mail/spam_check.rb
sendgrid-ruby-6.3.1 lib/sendgrid/helpers/mail/spam_check.rb
sendgrid-ruby-6.2.1 lib/sendgrid/helpers/mail/spam_check.rb
sendgrid-ruby-6.2.0 lib/sendgrid/helpers/mail/spam_check.rb
sendgrid-ruby-6.1.4 lib/sendgrid/helpers/mail/spam_check.rb
sendgrid-ruby-6.1.3 lib/sendgrid/helpers/mail/spam_check.rb
sendgrid-ruby-6.1.2 lib/sendgrid/helpers/mail/spam_check.rb