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

13 statements  

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

1class GroupId(object): 

2 """The unsubscribe group ID to associate with this email.""" 

3 

4 def __init__(self, group_id=None): 

5 """Create a GroupId object 

6 

7 :param group_id: The unsubscribe group to associate with this email. 

8 :type group_id: integer, optional 

9 """ 

10 self._group_id = None 

11 

12 if group_id is not None: 

13 self.group_id = group_id 

14 

15 @property 

16 def group_id(self): 

17 """The unsubscribe group to associate with this email. 

18 

19 :rtype: integer 

20 """ 

21 return self._group_id 

22 

23 @group_id.setter 

24 def group_id(self, value): 

25 """The unsubscribe group to associate with this email. 

26 

27 :param value: The unsubscribe group to associate with this email. 

28 :type value: integer 

29 """ 

30 self._group_id = value 

31 

32 def get(self): 

33 """ 

34 Get a JSON-ready representation of this GroupId. 

35 

36 :returns: This GroupId, ready for use in a request body. 

37 :rtype: integer 

38 """ 

39 return self.group_id