Skip to content

Commit

Permalink
feat: Transactional API to follow contract (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
akalex authored Apr 3, 2023
1 parent df611b1 commit 3d4f623
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
22 changes: 11 additions & 11 deletions async_customerio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
Expand All @@ -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
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down

0 comments on commit 3d4f623

Please sign in to comment.