Skip to content

Commit f41cdb5

Browse files
committed
Updating documentation
1 parent b23f605 commit f41cdb5

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

socketlabs/injectionapi/core/sendvalidator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def has_subject(message: MessageBase):
5555

5656
def has_message_body(message: MessageBase):
5757
"""
58-
Check if the message has a valid From Email Address
58+
Check if the message has a Message Body.
59+
If an Api Template is specified it will override the HtmlBody, AmpBody, and/or the textBody.
60+
If no Api Template is specified the HtmlBody, AmpBody, and/or the textBody must be set
5961
:param message: message to validate
6062
:type message: MessageBase
6163
:return the result

socketlabs/injectionapi/message/basicmessage.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ def subject(self, val: str):
182182
def plain_text_body(self):
183183
"""
184184
Get the plain text portion of the message body.
185+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
185186
:return the plain text body
186187
:rtype str
187188
"""
@@ -191,6 +192,7 @@ def plain_text_body(self):
191192
def plain_text_body(self, val: str):
192193
"""
193194
Set the plain text portion of the message body.
195+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
194196
:param val: the plain text body
195197
:type val: str
196198
"""
@@ -200,6 +202,7 @@ def plain_text_body(self, val: str):
200202
def html_body(self):
201203
"""
202204
Get the HTML portion of the message body.
205+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
203206
:return the HTML body
204207
:rtype str
205208
"""
@@ -209,6 +212,7 @@ def html_body(self):
209212
def html_body(self, val: str):
210213
"""
211214
Set the HTML portion of the message body.
215+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
212216
:param val: the HTML body
213217
:type val: str
214218
"""
@@ -218,6 +222,7 @@ def html_body(self, val: str):
218222
def amp_body(self):
219223
"""
220224
Get the AMP portion of the message body.
225+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
221226
:return the AMP body
222227
:rtype str
223228
"""
@@ -227,6 +232,7 @@ def amp_body(self):
227232
def amp_body(self, val: str):
228233
"""
229234
Set the AMP portion of the message body.
235+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
230236
:param val: the AMP body
231237
:type val: str
232238
"""
@@ -236,6 +242,7 @@ def amp_body(self, val: str):
236242
def api_template(self):
237243
"""
238244
Get the api template.
245+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
239246
:return the api template
240247
:rtype str
241248
"""
@@ -245,6 +252,7 @@ def api_template(self):
245252
def api_template(self, val: str):
246253
"""
247254
Set the api template.
255+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
248256
:param val: the api template
249257
:rtype str
250258
"""

socketlabs/injectionapi/message/bulkmessage.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def subject(self, val: str):
143143
def plain_text_body(self):
144144
"""
145145
Get the plain text portion of the message body.
146+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
146147
:return the plain text body
147148
:rtype str
148149
"""
@@ -152,6 +153,7 @@ def plain_text_body(self):
152153
def plain_text_body(self, val: str):
153154
"""
154155
Set the plain text portion of the message body.
156+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
155157
:param val: the plain text body
156158
:type val: str
157159
"""
@@ -161,6 +163,7 @@ def plain_text_body(self, val: str):
161163
def html_body(self):
162164
"""
163165
Get the HTML portion of the message body.
166+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
164167
:return the HTML body
165168
:rtype str
166169
"""
@@ -170,6 +173,7 @@ def html_body(self):
170173
def html_body(self, val: str):
171174
"""
172175
Set the HTML portion of the message body.
176+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
173177
:param val: the HTML body
174178
:type val: str
175179
"""
@@ -179,6 +183,7 @@ def html_body(self, val: str):
179183
def amp_body(self):
180184
"""
181185
Get the AMP portion of the message body.
186+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
182187
:return the AMP body
183188
:rtype str
184189
"""
@@ -188,6 +193,7 @@ def amp_body(self):
188193
def amp_body(self, val: str):
189194
"""
190195
Set the AMP portion of the message body.
196+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
191197
:param val: the AMP body
192198
:type val: str
193199
"""
@@ -197,6 +203,7 @@ def amp_body(self, val: str):
197203
def api_template(self):
198204
"""
199205
Get the api template.
206+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
200207
:return the api template
201208
:rtype str
202209
"""
@@ -206,6 +213,7 @@ def api_template(self):
206213
def api_template(self, val: str):
207214
"""
208215
Set the api template.
216+
(Optional) Either TextBody or HtmlBody must be used with the AmpBody or use a ApiTemplate
209217
:param val: the api template
210218
:rtype str
211219
"""

socketlabs/injectionapi/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version_info = (1, 0, 1)
1+
version_info = (1, 1, 0)
22
__version__ = '.'.join(str(v) for v in version_info)

0 commit comments

Comments
 (0)