File tree Expand file tree Collapse file tree 5 files changed +81
-0
lines changed Expand file tree Collapse file tree 5 files changed +81
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ def generate_base_message(message: MessageBase):
142
142
message_json .subject = message .subject
143
143
message_json .plain_text_body = message .plain_text_body
144
144
message_json .html_body = message .html_body
145
+ message_json .amp_body = message .amp_body
145
146
message_json .mailing_id = message .mailing_id
146
147
message_json .message_id = message .message_id
147
148
message_json .charset = message .charset
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ def __init__(self):
14
14
self ._subject = None
15
15
self ._plain_text_body = None
16
16
self ._html_body = None
17
+ self ._amp_body = None
17
18
self ._api_template = None
18
19
self ._mailing_id = None
19
20
self ._message_id = None
@@ -147,6 +148,24 @@ def html_body(self, val: str):
147
148
"""
148
149
self ._html_body = val
149
150
151
+ @property
152
+ def amp_body (self ):
153
+ """
154
+ Get the AMP portion of the message body.
155
+ :return the AMP body
156
+ :rtype str
157
+ """
158
+ return self ._amp_body
159
+
160
+ @amp_body .setter
161
+ def amp_body (self , val : str ):
162
+ """
163
+ Set the AMP portion of the message body.
164
+ :param val: the AMP body
165
+ :type val: str
166
+ """
167
+ self ._amp_body = val
168
+
150
169
@property
151
170
def api_template (self ):
152
171
"""
@@ -353,6 +372,9 @@ def to_json(self):
353
372
if self .html_body is not None and self .html_body .strip () != '' :
354
373
json ["htmlBody" ] = self .html_body
355
374
375
+ if self .amp_body is not None and self ._amp_body .strip () != '' :
376
+ json ["ampBody" ] = self .amp_body
377
+
356
378
if self .plain_text_body is not None and self .plain_text_body .strip () != '' :
357
379
json ["textBody" ] = self .plain_text_body
358
380
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ def __init__(self):
35
35
self ._subject = None
36
36
self ._plain_text_body = None
37
37
self ._html_body = None
38
+ self ._amp_body = None
38
39
self ._api_template = None
39
40
self ._mailing_id = None
40
41
self ._message_id = None
@@ -213,6 +214,24 @@ def html_body(self, val: str):
213
214
"""
214
215
self ._html_body = val
215
216
217
+ @property
218
+ def amp_body (self ):
219
+ """
220
+ Get the AMP portion of the message body.
221
+ :return the AMP body
222
+ :rtype str
223
+ """
224
+ return self ._amp_body
225
+
226
+ @amp_body .setter
227
+ def amp_body (self , val : str ):
228
+ """
229
+ Set the AMP portion of the message body.
230
+ :param val: the AMP body
231
+ :type val: str
232
+ """
233
+ self ._amp_body = val
234
+
216
235
@property
217
236
def api_template (self ):
218
237
"""
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ def __init__(self):
39
39
self ._subject = None
40
40
self ._plain_text_body = None
41
41
self ._html_body = None
42
+ self ._amp_body = None
42
43
self ._api_template = None
43
44
self ._mailing_id = None
44
45
self ._message_id = None
@@ -174,6 +175,24 @@ def html_body(self, val: str):
174
175
"""
175
176
self ._html_body = val
176
177
178
+ @property
179
+ def amp_body (self ):
180
+ """
181
+ Get the AMP portion of the message body.
182
+ :return the AMP body
183
+ :rtype str
184
+ """
185
+ return self ._amp_body
186
+
187
+ @amp_body .setter
188
+ def amp_body (self , val : str ):
189
+ """
190
+ Set the AMP portion of the message body.
191
+ :param val: the AMP body
192
+ :type val: str
193
+ """
194
+ self ._amp_body = val
195
+
177
196
@property
178
197
def api_template (self ):
179
198
"""
Original file line number Diff line number Diff line change @@ -70,6 +70,26 @@ def html_body(self, val: str):
70
70
"""
71
71
pass
72
72
73
+ @property
74
+ @abstractmethod
75
+ def amp_body (self ):
76
+ """
77
+ Get the AMP portion of the message body.
78
+ :return the AMP body
79
+ :rtype str
80
+ """
81
+ pass
82
+
83
+ @amp_body .setter
84
+ @abstractmethod
85
+ def amp_body (self , val : str ):
86
+ """
87
+ Set the AMP portion of the message body.
88
+ :param val: the AMP body
89
+ :type val: str
90
+ """
91
+ pass
92
+
73
93
@property
74
94
@abstractmethod
75
95
def api_template (self ):
You can’t perform that action at this time.
0 commit comments