diff --git a/CHANGES.md b/CHANGES.md index fc533b2..f18e1ae 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Changelog +## 1.0.0 + +- [BREAKING] For consistency across APIs following actions have been taken: + - Renamed transactional email request optional arguments ``amp_body`` to ``body_amp`` and ``plaintext_body`` to ``body_plain`` + - Changed transactional email request default values for optional boolean arguments ``disable_css_preproceessing``, ``queue_draft``, ``disable_message_retention``, ``tracked``, ``send_to_unsubscribed`` + ## 0.5.1 - [FIX] Change parameter name from ``id_`` to ``identifier`` of the method ``identify`` to avoid naming collision. diff --git a/async_customerio/api.py b/async_customerio/api.py index ab76f30..d7229a8 100644 --- a/async_customerio/api.py +++ b/async_customerio/api.py @@ -32,16 +32,16 @@ def __init__( subject: str = None, preheader: str = None, body: str = None, - plaintext_body: str = None, - amp_body: str = None, + body_amp: str = None, + body_plain: str = None, fake_bcc: str = None, - disable_message_retention: bool = None, - send_to_unsubscribed: bool = None, - tracked: bool = None, - queue_draft: bool = None, + disable_message_retention: bool = False, + send_to_unsubscribed: bool = True, + tracked: bool = True, + queue_draft: bool = False, message_data: dict = None, attachments: t.Dict[str, str] = None, - disable_css_preproceessing: bool = None, + disable_css_preproceessing: bool = False, send_at: int = None, language: str = None, ): @@ -56,8 +56,8 @@ def __init__( self.subject = subject self.preheader = preheader self.body = body - self.plaintext_body = plaintext_body - self.amp_body = amp_body + self.body_plain = body_plain + self.body_amp = body_amp self.fake_bcc = fake_bcc self.disable_message_retention = disable_message_retention self.send_to_unsubscribed = send_to_unsubscribed @@ -101,8 +101,8 @@ def to_dict(self): subject="subject", preheader="preheader", body="body", - plaintext_body="plaintext_body", - amp_body="amp_body", + body_amp="body_amp", + body_plain="body_plain", fake_bcc="fake_bcc", disable_message_retention="disable_message_retention", send_to_unsubscribed="send_to_unsubscribed", diff --git a/pyproject.toml b/pyproject.toml index e24ad52..260e989 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "async-customerio" -version = "0.5.1" +version = "1.0.0" description = "Async CustomerIO Client - a Python client to interact with CustomerIO in an async fashion." license = "MIT" authors = [