From 825fb2276e7b21e9c1b9f2dd655a06995ce01084 Mon Sep 17 00:00:00 2001 From: Aleksandr Omyshev Date: Thu, 12 Jan 2023 19:17:09 +0200 Subject: [PATCH] feat: Add new optional attributes to object ``SendEmailRequest`` (#8) --- CHANGES.md | 4 ++++ async_customerio/api.py | 9 +++++++++ pyproject.toml | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 536daa1..8a4b038 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## 0.5.0 + +- Add a couple of new attributes to object ``SendEmailRequest`` + ## 0.4.1 - The ``Content-Type`` we use has been updated so that Customer.io is happy when we try to send emails. diff --git a/async_customerio/api.py b/async_customerio/api.py index c2eab29..ab76f30 100644 --- a/async_customerio/api.py +++ b/async_customerio/api.py @@ -41,6 +41,9 @@ def __init__( queue_draft: bool = None, message_data: dict = None, attachments: t.Dict[str, str] = None, + disable_css_preproceessing: bool = None, + send_at: int = None, + language: str = None, ): self.transactional_message_id = transactional_message_id @@ -62,6 +65,9 @@ def __init__( self.queue_draft = queue_draft self.message_data = message_data self.attachments = attachments + self.disable_css_preproceessing = disable_css_preproceessing + self.send_at = send_at + self.language = language def attach(self, name: str, content: str, encode: bool = True) -> None: """Helper method to add base64 encode the attachments""" @@ -104,6 +110,9 @@ def to_dict(self): queue_draft="queue_draft", message_data="message_data", attachments="attachments", + disable_css_preproceessing="disable_css_preproceessing", + send_at="send_at", + language="language", ) data = {} diff --git a/pyproject.toml b/pyproject.toml index 31273d3..d87b282 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "async-customerio" -version = "0.4.1" +version = "0.5.0" description = "Async CustomerIO Client - a Python client to interact with CustomerIO in an async fashion." license = "MIT" authors = [