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

13 statements  

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

1class SubscriptionSubstitutionTag(object): 

2 """The subscription substitution tag of an SubscriptionTracking.""" 

3 

4 def __init__(self, subscription_substitution_tag=None): 

5 """Create a SubscriptionSubstitutionTag object 

6 

7 :param subscription_substitution_tag: A tag that will be replaced with 

8 the unsubscribe URL. for example: 

9 [unsubscribe_url]. If this 

10 parameter is used, it will 

11 override both the text and html 

12 parameters. The URL of the link 

13 will be placed at the 

14 substitution tag's location, 

15 with no additional formatting. 

16 :type subscription_substitution_tag: string, optional 

17 """ 

18 self._subscription_substitution_tag = None 

19 

20 if subscription_substitution_tag is not None: 

21 self.subscription_substitution_tag = subscription_substitution_tag 

22 

23 @property 

24 def subscription_substitution_tag(self): 

25 """A tag that will be replaced with the unsubscribe URL. for example: 

26 [unsubscribe_url]. If this parameter is used, it will override both 

27 the text and html parameters. The URL of the link will be placed at 

28 the substitution tag's location, with no additional formatting. 

29 

30 :rtype: string 

31 """ 

32 return self._subscription_substitution_tag 

33 

34 @subscription_substitution_tag.setter 

35 def subscription_substitution_tag(self, value): 

36 """A tag that will be replaced with the unsubscribe URL. for example: 

37 [unsubscribe_url]. If this parameter is used, it will override both 

38 the text and html parameters. The URL of the link will be placed at 

39 the substitution tag's location, with no additional formatting. 

40 

41 :param value: A tag that will be replaced with the unsubscribe URL. 

42 for example: [unsubscribe_url]. If this parameter is 

43 used, it will override both the text and html parameters. 

44 The URL of the link will be placed at the substitution 

45 tag's location, with no additional formatting. 

46 :type value: string 

47 """ 

48 self._subscription_substitution_tag = value 

49 

50 def get(self): 

51 """ 

52 Get a JSON-ready representation of this SubscriptionSubstitutionTag. 

53 

54 :returns: This SubscriptionSubstitutionTag, ready for use in a request 

55 body. 

56 :rtype: string 

57 """ 

58 return self.subscription_substitution_tag