Skip to content

Commit 09c3347

Browse files
committed
Adds asm group ID
1 parent d376f0b commit 09c3347

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

README.rst

+18-2
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ add_substitution
243243
message.add_substitution('key', 'value')
244244
245245
set_substitutions
246-
^^^^^^^^^^^^^^^^
246+
^^^^^^^^^^^^^^^^^
247247

248248
.. code:: python
249249
@@ -337,9 +337,25 @@ add_filter
337337
338338
message = sendgrid.Mail()
339339
message.add_filter('filter', 'setting', 'value')
340+
341+
`ASM Group`_
342+
~~~~~~~~~~~~
343+
344+
.. code:: python
345+
346+
message = sendgrid.Mail()
347+
message.smtpapi.set_asm_group_id(value)
348+
349+
set_asm_group_id
350+
^^^^^^^^^^^^^^^^
351+
352+
.. code:: python
353+
354+
message = sendgrid.Mail()
355+
message.set_asm_group_id(value)
340356
341357
Using Templates from the Template Engine
342-
~~~~~~~~~~~~~~~~~
358+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
343359

344360
.. code:: python
345361

sendgrid/message.py

+3
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,8 @@ def set_sections(self, sections):
183183
def add_filter(self, filterKey, setting, value):
184184
self.smtpapi.add_filter(filterKey, setting, value)
185185

186+
def set_asm_group_id(self, value):
187+
self.smtpapi.set_asm_group_id(value)
188+
186189
def json_string(self):
187190
return self.smtpapi.json_string()

test/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def test_send(self):
4242
m.set_html('WIN')
4343
m.set_text('WIN')
4444
m.set_from('[email protected]')
45+
m.set_asm_group_id(42)
4546
m.add_cc('[email protected]')
4647
m.add_bcc('[email protected]')
4748
m.add_substitution('subKey', 'subValue')
@@ -85,7 +86,8 @@ def test_send(self):
8586
"filter": "filterValue"
8687
}
8788
}
88-
}
89+
},
90+
"asm_group_id": 42
8991
}
9092
'''))
9193
self.assertEqual(url, test_url)

0 commit comments

Comments
 (0)