Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/sendgrid/helpers/mail/disposition.py: 53%
13 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
1class Disposition(object):
2 """The content-disposition of the Attachment specifying how you would like
3 the attachment to be displayed."""
5 def __init__(self, disposition=None):
6 """Create a Disposition object
8 :param disposition: The content-disposition of the attachment,
9 specifying display style.
10 Specifies how you would like the attachment to be
11 displayed.
12 - "inline" results in the attached file being
13 displayed automatically within the message.
14 - "attachment" results in the attached file
15 requiring some action to display (e.g. opening
16 or downloading the file).
17 If unspecified, "attachment" is used. Must be one
18 of the two choices.
19 :type disposition: string, optional
20 """
21 self._disposition = None
23 if disposition is not None:
24 self.disposition = disposition
26 @property
27 def disposition(self):
28 """The content-disposition of the attachment, specifying display style.
29 Specifies how you would like the attachment to be displayed.
30 - "inline" results in the attached file being displayed
31 automatically within the message.
32 - "attachment" results in the attached file requiring some action to
33 display (e.g. opening or downloading the file).
34 If unspecified, "attachment" is used. Must be one of the two
35 choices.
37 :rtype: string
38 """
39 return self._disposition
41 @disposition.setter
42 def disposition(self, value):
43 """The content-disposition of the attachment, specifying display style.
44 Specifies how you would like the attachment to be displayed.
45 - "inline" results in the attached file being displayed
46 automatically within the message.
47 - "attachment" results in the attached file requiring some action to
48 display (e.g. opening or downloading the file).
49 If unspecified, "attachment" is used. Must be one of the two
50 choices.
52 :param value: The content-disposition of the attachment, specifying
53 display style.
54 Specifies how you would like the attachment to be displayed.
55 - "inline" results in the attached file being displayed
56 automatically within the message.
57 - "attachment" results in the attached file requiring some action to
58 display (e.g. opening or downloading the file).
59 If unspecified, "attachment" is used. Must be one of the two
60 choices.
61 :type value: string
62 """
63 self._disposition = value
65 def get(self):
66 """
67 Get a JSON-ready representation of this Disposition.
69 :returns: This Disposition, ready for use in a request body.
70 :rtype: string
71 """
72 return self.disposition