Class: SendGrid::SpamCheck
- Inherits:
-
Object
- Object
- SendGrid::SpamCheck
- Defined in:
- lib/sendgrid/helpers/mail/mail.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.
238 239 240 241 242 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 238 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
248 249 250 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 248 def enable @enable end |
#enable=(enable) ⇒ Object
244 245 246 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 244 def enable=(enable) @enable = enable end |
#post_to_url ⇒ Object
264 265 266 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 264 def post_to_url @post_to_url end |
#post_to_url=(post_to_url) ⇒ Object
260 261 262 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 260 def post_to_url=(post_to_url) @post_to_url = post_to_url end |
#threshold ⇒ Object
256 257 258 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 256 def threshold @threshold end |
#threshold=(threshold) ⇒ Object
252 253 254 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 252 def threshold=(threshold) @threshold = threshold end |
#to_json ⇒ Object
268 269 270 271 272 273 274 |
# File 'lib/sendgrid/helpers/mail/mail.rb', line 268 def to_json(*) { 'enable' => self.enable, 'threshold' => self.threshold, 'post_to_url' => self.post_to_url }.delete_if { |_, value| value.to_s.strip == '' } end |