Skip to content

Commit

Permalink
feat: Add new optional attributes to object SendEmailRequest (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
akalex authored Jan 12, 2023
1 parent b507082 commit 825fb22
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
9 changes: 9 additions & 0 deletions async_customerio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"""
Expand Down Expand Up @@ -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 = {}
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.4.1"
version = "0.5.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 825fb22

Please sign in to comment.