Class: SendGrid::SpamCheck
- Inherits:
-
Object
- Object
- SendGrid::SpamCheck
- Defined in:
- lib/sendgrid/helpers/mail/spam_check.rb
Instance Method Summary collapse
- #enable ⇒ Object
- #enable=(enable) ⇒ Object
-
#initialize(enable: nil, threshold: nil, post_to_url: nil) ⇒ SpamCheck
constructor
A new instance of SpamCheck.
- #post_to_url ⇒ Object
- #post_to_url=(post_to_url) ⇒ Object
- #threshold ⇒ Object
- #threshold=(threshold) ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(enable: nil, threshold: nil, post_to_url: nil) ⇒ SpamCheck
Returns a new instance of SpamCheck.
5 6 7 8 9 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 5 def initialize(enable: nil, threshold: nil, post_to_url: nil) @enable = enable @threshold = threshold @post_to_url = post_to_url end |
Instance Method Details
#enable ⇒ Object
15 16 17 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 15 def enable @enable end |
#enable=(enable) ⇒ Object
11 12 13 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 11 def enable=(enable) @enable = enable end |
#post_to_url ⇒ Object
31 32 33 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 31 def post_to_url @post_to_url end |
#post_to_url=(post_to_url) ⇒ Object
27 28 29 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 27 def post_to_url=(post_to_url) @post_to_url = post_to_url end |
#threshold ⇒ Object
23 24 25 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 23 def threshold @threshold end |
#threshold=(threshold) ⇒ Object
19 20 21 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 19 def threshold=(threshold) @threshold = threshold end |
#to_json ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/sendgrid/helpers/mail/spam_check.rb', line 35 def to_json(*) { 'enable' => self.enable, 'threshold' => self.threshold, 'post_to_url' => self.post_to_url }.delete_if { |_, value| value.to_s.strip == '' } end |