Skip to content

Commit

Permalink
(fix): None idempotency headers are excluded
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] authored Apr 22, 2024
1 parent 93c8c46 commit 7f4aeab
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 101 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 = "trycourier"
version = "v6.0.1"
version = "v6.0.2"
description = ""
readme = "README.md"
authors = []
Expand Down
16 changes: 8 additions & 8 deletions src/courier/auth_tokens/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def issue_token(
scope: str,
expires_in: str,
idempotency_key: typing.Optional[str] = None,
idempotency_expiry: typing.Optional[int] = None,
idempotency_expiry: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> IssueTokenResponse:
"""
Expand All @@ -39,7 +39,7 @@ def issue_token(
- idempotency_key: typing.Optional[str].
- idempotency_expiry: typing.Optional[int].
- idempotency_expiry: typing.Optional[str]. The expiry can either be an ISO8601 datetime or a duration like "1 Day".
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down Expand Up @@ -69,8 +69,8 @@ def issue_token(
remove_none_from_dict(
{
**self._client_wrapper.get_headers(),
"Idempotency-Key": str(idempotency_key),
"X-Idempotency-Expiration": str(idempotency_expiry),
"Idempotency-Key": str(idempotency_key) if idempotency_key is not None else None,
"X-Idempotency-Expiration": str(idempotency_expiry) if idempotency_expiry is not None else None,
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
}
)
Expand Down Expand Up @@ -100,7 +100,7 @@ async def issue_token(
scope: str,
expires_in: str,
idempotency_key: typing.Optional[str] = None,
idempotency_expiry: typing.Optional[int] = None,
idempotency_expiry: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> IssueTokenResponse:
"""
Expand All @@ -113,7 +113,7 @@ async def issue_token(
- idempotency_key: typing.Optional[str].
- idempotency_expiry: typing.Optional[int].
- idempotency_expiry: typing.Optional[str]. The expiry can either be an ISO8601 datetime or a duration like "1 Day".
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down Expand Up @@ -143,8 +143,8 @@ async def issue_token(
remove_none_from_dict(
{
**self._client_wrapper.get_headers(),
"Idempotency-Key": str(idempotency_key),
"X-Idempotency-Expiration": str(idempotency_expiry),
"Idempotency-Key": str(idempotency_key) if idempotency_key is not None else None,
"X-Idempotency-Expiration": str(idempotency_expiry) if idempotency_expiry is not None else None,
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
}
)
Expand Down
32 changes: 16 additions & 16 deletions src/courier/automations/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def invoke_automation_template(
*,
request: AutomationInvokeParams,
idempotency_key: typing.Optional[str] = None,
idempotency_expiry: typing.Optional[int] = None,
idempotency_expiry: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AutomationInvokeResponse:
"""
Expand All @@ -41,7 +41,7 @@ def invoke_automation_template(
- idempotency_key: typing.Optional[str].
- idempotency_expiry: typing.Optional[int].
- idempotency_expiry: typing.Optional[str]. The expiry can either be an ISO8601 datetime or a duration like "1 Day".
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down Expand Up @@ -80,8 +80,8 @@ def invoke_automation_template(
remove_none_from_dict(
{
**self._client_wrapper.get_headers(),
"Idempotency-Key": str(idempotency_key),
"X-Idempotency-Expiration": str(idempotency_expiry),
"Idempotency-Key": str(idempotency_key) if idempotency_key is not None else None,
"X-Idempotency-Expiration": str(idempotency_expiry) if idempotency_expiry is not None else None,
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
}
)
Expand All @@ -105,7 +105,7 @@ def invoke_ad_hoc_automation(
*,
request: AutomationAdHocInvokeParams,
idempotency_key: typing.Optional[str] = None,
idempotency_expiry: typing.Optional[int] = None,
idempotency_expiry: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AutomationInvokeResponse:
"""
Expand All @@ -116,7 +116,7 @@ def invoke_ad_hoc_automation(
- idempotency_key: typing.Optional[str].
- idempotency_expiry: typing.Optional[int].
- idempotency_expiry: typing.Optional[str]. The expiry can either be an ISO8601 datetime or a duration like "1 Day".
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down Expand Up @@ -168,8 +168,8 @@ def invoke_ad_hoc_automation(
remove_none_from_dict(
{
**self._client_wrapper.get_headers(),
"Idempotency-Key": str(idempotency_key),
"X-Idempotency-Expiration": str(idempotency_expiry),
"Idempotency-Key": str(idempotency_key) if idempotency_key is not None else None,
"X-Idempotency-Expiration": str(idempotency_expiry) if idempotency_expiry is not None else None,
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
}
)
Expand Down Expand Up @@ -199,7 +199,7 @@ async def invoke_automation_template(
*,
request: AutomationInvokeParams,
idempotency_key: typing.Optional[str] = None,
idempotency_expiry: typing.Optional[int] = None,
idempotency_expiry: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AutomationInvokeResponse:
"""
Expand All @@ -212,7 +212,7 @@ async def invoke_automation_template(
- idempotency_key: typing.Optional[str].
- idempotency_expiry: typing.Optional[int].
- idempotency_expiry: typing.Optional[str]. The expiry can either be an ISO8601 datetime or a duration like "1 Day".
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down Expand Up @@ -251,8 +251,8 @@ async def invoke_automation_template(
remove_none_from_dict(
{
**self._client_wrapper.get_headers(),
"Idempotency-Key": str(idempotency_key),
"X-Idempotency-Expiration": str(idempotency_expiry),
"Idempotency-Key": str(idempotency_key) if idempotency_key is not None else None,
"X-Idempotency-Expiration": str(idempotency_expiry) if idempotency_expiry is not None else None,
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
}
)
Expand All @@ -276,7 +276,7 @@ async def invoke_ad_hoc_automation(
*,
request: AutomationAdHocInvokeParams,
idempotency_key: typing.Optional[str] = None,
idempotency_expiry: typing.Optional[int] = None,
idempotency_expiry: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AutomationInvokeResponse:
"""
Expand All @@ -287,7 +287,7 @@ async def invoke_ad_hoc_automation(
- idempotency_key: typing.Optional[str].
- idempotency_expiry: typing.Optional[int].
- idempotency_expiry: typing.Optional[str]. The expiry can either be an ISO8601 datetime or a duration like "1 Day".
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down Expand Up @@ -339,8 +339,8 @@ async def invoke_ad_hoc_automation(
remove_none_from_dict(
{
**self._client_wrapper.get_headers(),
"Idempotency-Key": str(idempotency_key),
"X-Idempotency-Expiration": str(idempotency_expiry),
"Idempotency-Key": str(idempotency_key) if idempotency_key is not None else None,
"X-Idempotency-Expiration": str(idempotency_expiry) if idempotency_expiry is not None else None,
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
}
)
Expand Down
16 changes: 8 additions & 8 deletions src/courier/brands/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create(
*,
request: BrandParameters,
idempotency_key: typing.Optional[str] = None,
idempotency_expiry: typing.Optional[int] = None,
idempotency_expiry: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> Brand:
"""
Expand All @@ -46,7 +46,7 @@ def create(
- idempotency_key: typing.Optional[str].
- idempotency_expiry: typing.Optional[int].
- idempotency_expiry: typing.Optional[str]. The expiry can either be an ISO8601 datetime or a duration like "1 Day".
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down Expand Up @@ -81,8 +81,8 @@ def create(
remove_none_from_dict(
{
**self._client_wrapper.get_headers(),
"Idempotency-Key": str(idempotency_key),
"X-Idempotency-Expiration": str(idempotency_expiry),
"Idempotency-Key": str(idempotency_key) if idempotency_key is not None else None,
"X-Idempotency-Expiration": str(idempotency_expiry) if idempotency_expiry is not None else None,
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
}
)
Expand Down Expand Up @@ -361,7 +361,7 @@ async def create(
*,
request: BrandParameters,
idempotency_key: typing.Optional[str] = None,
idempotency_expiry: typing.Optional[int] = None,
idempotency_expiry: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> Brand:
"""
Expand All @@ -370,7 +370,7 @@ async def create(
- idempotency_key: typing.Optional[str].
- idempotency_expiry: typing.Optional[int].
- idempotency_expiry: typing.Optional[str]. The expiry can either be an ISO8601 datetime or a duration like "1 Day".
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
---
Expand Down Expand Up @@ -405,8 +405,8 @@ async def create(
remove_none_from_dict(
{
**self._client_wrapper.get_headers(),
"Idempotency-Key": str(idempotency_key),
"X-Idempotency-Expiration": str(idempotency_expiry),
"Idempotency-Key": str(idempotency_key) if idempotency_key is not None else None,
"X-Idempotency-Expiration": str(idempotency_expiry) if idempotency_expiry is not None else None,
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
}
)
Expand Down
Loading

0 comments on commit 7f4aeab

Please sign in to comment.