Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/sendgrid/helpers/mail/bypass_unsubscribe_management.py: 41%

16 statements  

« prev     ^ index     » next       coverage.py v6.4.4, created at 2023-07-17 14:22 -0600

1class BypassUnsubscribeManagement(object): 

2 """Setting for Bypass Unsubscribe Management 

3 

4 

5 Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. 

6 Bounce and spam report lists will still be checked; addresses on these other lists will not receive 

7 the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. 

8 This filter cannot be combined with the bypass_list_management filter. 

9 """ 

10 

11 def __init__(self, enable=None): 

12 """Create a BypassUnsubscribeManagement. 

13 

14 :param enable: Whether emails should bypass unsubscribe management. 

15 :type enable: boolean, optional 

16 """ 

17 self._enable = None 

18 

19 if enable is not None: 

20 self.enable = enable 

21 

22 @property 

23 def enable(self): 

24 """Indicates if this setting is enabled. 

25 

26 :rtype: boolean 

27 """ 

28 return self._enable 

29 

30 @enable.setter 

31 def enable(self, value): 

32 """Indicates if this setting is enabled. 

33 

34 :param value: Indicates if this setting is enabled. 

35 :type value: boolean 

36 """ 

37 self._enable = value 

38 

39 def get(self): 

40 """ 

41 Get a JSON-ready representation of this BypassUnsubscribeManagement. 

42 

43 :returns: This BypassUnsubscribeManagement, ready for use in a request body. 

44 :rtype: dict 

45 """ 

46 bypass_unsubscribe_management = {} 

47 if self.enable is not None: 

48 bypass_unsubscribe_management["enable"] = self.enable 

49 return bypass_unsubscribe_management