forked from sendgrid/sendgrid-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspam_threshold.py
53 lines (44 loc) · 1.83 KB
/
spam_threshold.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
class SpamThreshold(object):
"""The threshold used to determine if your content qualifies as spam
on a scale from 1 to 10, with 10 being most strict, or most likely
to be considered as spam."""
def __init__(self, spam_threshold=None):
"""Create a SpamThreshold object
:param spam_threshold: The threshold used to determine if your content
qualifies as spam on a scale from 1 to 10, with
10 being most strict, or most likely to be
considered as spam.
:type spam_threshold: integer, optional
"""
self._spam_threshold = None
if spam_threshold is not None:
self.spam_threshold = spam_threshold
@property
def spam_threshold(self):
"""The threshold used to determine if your content
qualifies as spam on a scale from 1 to 10, with
10 being most strict, or most likely to be
considered as spam.
:rtype: integer
"""
return self._spam_threshold
@spam_threshold.setter
def spam_threshold(self, value):
"""The threshold used to determine if your content
qualifies as spam on a scale from 1 to 10, with
10 being most strict, or most likely to be
considered as spam.
:param value: The threshold used to determine if your content
qualifies as spam on a scale from 1 to 10, with
10 being most strict, or most likely to be
considered as spam.
:type value: integer
"""
self._spam_threshold = value
def get(self):
"""
Get a JSON-ready representation of this SpamThreshold.
:returns: This SpamThreshold, ready for use in a request body.
:rtype: integer
"""
return self.spam_threshold