aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/bypass_spam_management.py
blob: 9b2552eb9aa55d3478622a28e97c050de7b6ab7f (about) (plain)
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
class BypassSpamManagement(object):
    """Setting for Bypass Spam Management

    Allows you to bypass the spam report list to ensure that the email is delivered to recipients.
    Bounce and unsubscribe lists will still be checked; addresses on these other lists will not
    receive the message. This filter cannot be combined with the bypass_list_management filter.
    """

    def __init__(self, enable=None):
        """Create a BypassSpamManagement.

        :param enable: Whether emails should bypass spam management.
        :type enable: boolean, optional
        """
        self._enable = None

        if enable is not None:
            self.enable = enable

    @property
    def enable(self):
        """Indicates if this setting is enabled.

        :rtype: boolean
        """
        return self._enable

    @enable.setter
    def enable(self, value):
        """Indicates if this setting is enabled.

        :param value: Indicates if this setting is enabled.
        :type value: boolean
        """
        self._enable = value

    def get(self):
        """
        Get a JSON-ready representation of this BypassSpamManagement.

        :returns: This BypassSpamManagement, ready for use in a request body.
        :rtype: dict
        """
        bypass_spam_management = {}
        if self.enable is not None:
            bypass_spam_management["enable"] = self.enable
        return bypass_spam_management