diff options
author | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
---|---|---|
committer | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
commit | 4a52a71956a8d46fcb7294ac71734504bb09bcc2 (patch) | |
tree | ee3dc5af3b6313e921cd920906356f5d4febc4ed /.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/batch_id.py | |
parent | cc961e04ba734dd72309fb548a2f97d67d578813 (diff) | |
download | gn-ai-master.tar.gz |
Diffstat (limited to '.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/batch_id.py')
-rw-r--r-- | .venv/lib/python3.12/site-packages/sendgrid/helpers/mail/batch_id.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/batch_id.py b/.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/batch_id.py new file mode 100644 index 00000000..a4c0f8e9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/sendgrid/helpers/mail/batch_id.py @@ -0,0 +1,50 @@ +class BatchId(object): + """This ID represents a batch of emails to be sent at the same time. + Including a batch_id in your request allows you include this email + in that batch, and also enables you to cancel or pause the delivery + of that batch. For more information, see + https://sendgrid.com/docs/API_Reference/Web_API_v3/cancel_schedule_send. + """ + def __init__(self, batch_id=None): + """Create a batch ID. + + :param batch_id: Batch Id + :type batch_id: string + """ + self._batch_id = None + + if batch_id is not None: + self.batch_id = batch_id + + @property + def batch_id(self): + """The batch ID. + + :rtype: string + """ + return self._batch_id + + @batch_id.setter + def batch_id(self, value): + """The batch ID. + + :param value: Batch Id + :type value: string + """ + self._batch_id = value + + def __str__(self): + """Get a JSON representation of this object. + + :rtype: string + """ + return str(self.get()) + + def get(self): + """ + Get a JSON-ready representation of this BatchId object. + + :returns: The BatchId, ready for use in a request body. + :rtype: string + """ + return self.batch_id |