Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 145
configured_endpoints: 147
8 changes: 0 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Changelog

## [1.115.0](https://github.com/dodopayments/dodopayments-python/compare/v1.114.0...v1.115.0) (2026-09-01)


### Features

* **api:** add customer blocklist and manual payment retry ([7558374](https://github.com/dodopayments/dodopayments-python/commit/7558374d08b34906be09fdd20c11fb25981d3ab8))
* **api:** add customer blocklist and manual payment retry ([5f4f947](https://github.com/dodopayments/dodopayments-python/commit/5f4f94727d4ef49573fac0c7e6ce173da9c54a37))

## [1.114.0](https://github.com/dodopayments/dodopayments-python/compare/v1.113.0...v1.114.0) (2026-08-24)


Expand Down
19 changes: 19 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,25 @@ Methods:
- <code title="post /customers/{customer_id}/wallets/ledger-entries">client.customers.wallets.ledger_entries.<a href="./src/dodopayments/resources/customers/wallets/ledger_entries.py">create</a>(customer_id, \*\*<a href="src/dodopayments/types/customers/wallets/ledger_entry_create_params.py">params</a>) -> <a href="./src/dodopayments/types/customers/customer_wallet.py">CustomerWallet</a></code>
- <code title="get /customers/{customer_id}/wallets/ledger-entries">client.customers.wallets.ledger_entries.<a href="./src/dodopayments/resources/customers/wallets/ledger_entries.py">list</a>(customer_id, \*\*<a href="src/dodopayments/types/customers/wallets/ledger_entry_list_params.py">params</a>) -> <a href="./src/dodopayments/types/customers/wallets/customer_wallet_transaction.py">SyncDefaultPageNumberPagination[CustomerWalletTransaction]</a></code>

## Emails

Types:

```python
from dodopayments.types.customers import (
EmailBody,
EmailFailureCode,
EmailLogItem,
EmailLogStatus,
EmailPolicies,
)
```

Methods:

- <code title="get /customers/{customer_id}/emails">client.customers.emails.<a href="./src/dodopayments/resources/customers/emails.py">list</a>(customer_id, \*\*<a href="src/dodopayments/types/customers/email_list_params.py">params</a>) -> <a href="./src/dodopayments/types/customers/email_log_item.py">SyncDefaultPageNumberPagination[EmailLogItem]</a></code>
- <code title="get /customers/{customer_id}/emails/{email_log_id}/body">client.customers.emails.<a href="./src/dodopayments/resources/customers/emails.py">retrieve_body</a>(email_log_id, \*, customer_id) -> <a href="./src/dodopayments/types/customers/email_body.py">EmailBody</a></code>

# Blocklist

## Customers
Expand Down
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/dodopayments/resources/balances.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ def retrieve_ledger(
"dunning_fees",
"payment_retry_fee",
"byop_fee",
"ethoca_fees",
"ethoca_fees_reversal",
]
| Omit = omit,
limit: int | Omit = omit,
Expand Down Expand Up @@ -483,6 +485,8 @@ def retrieve_ledger(
"dunning_fees",
"payment_retry_fee",
"byop_fee",
"ethoca_fees",
"ethoca_fees_reversal",
]
| Omit = omit,
limit: int | Omit = omit,
Expand Down
6 changes: 4 additions & 2 deletions src/dodopayments/resources/credit_entitlements/balances.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def create_ledger_entry(
- `reason` - Optional human-readable reason
- `expires_at` - Optional expiration for credited amount (only for credit type)
- `idempotency_key` - Optional key to prevent duplicate entries
- `metadata` - Optional key-value pairs

# Responses

Expand All @@ -254,7 +255,7 @@ def create_ledger_entry(
idempotency_key: Idempotency key to prevent duplicate entries

metadata: Optional metadata (max 50 key-value pairs, key max 40 chars, value max 500
chars)
chars).

reason: Human-readable reason for the entry

Expand Down Expand Up @@ -671,6 +672,7 @@ async def create_ledger_entry(
- `reason` - Optional human-readable reason
- `expires_at` - Optional expiration for credited amount (only for credit type)
- `idempotency_key` - Optional key to prevent duplicate entries
- `metadata` - Optional key-value pairs

# Responses

Expand All @@ -692,7 +694,7 @@ async def create_ledger_entry(
idempotency_key: Idempotency key to prevent duplicate entries

metadata: Optional metadata (max 50 key-value pairs, key max 40 chars, value max 500
chars)
chars).

reason: Human-readable reason for the entry

Expand Down
14 changes: 14 additions & 0 deletions src/dodopayments/resources/customers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .emails import (
EmailsResource,
AsyncEmailsResource,
EmailsResourceWithRawResponse,
AsyncEmailsResourceWithRawResponse,
EmailsResourceWithStreamingResponse,
AsyncEmailsResourceWithStreamingResponse,
)
from .wallets import (
WalletsResource,
AsyncWalletsResource,
Expand Down Expand Up @@ -38,6 +46,12 @@
"AsyncWalletsResourceWithRawResponse",
"WalletsResourceWithStreamingResponse",
"AsyncWalletsResourceWithStreamingResponse",
"EmailsResource",
"AsyncEmailsResource",
"EmailsResourceWithRawResponse",
"AsyncEmailsResourceWithRawResponse",
"EmailsResourceWithStreamingResponse",
"AsyncEmailsResourceWithStreamingResponse",
"CustomersResource",
"AsyncCustomersResource",
"CustomersResourceWithRawResponse",
Expand Down
32 changes: 32 additions & 0 deletions src/dodopayments/resources/customers/customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@

import httpx

from .emails import (
EmailsResource,
AsyncEmailsResource,
EmailsResourceWithRawResponse,
AsyncEmailsResourceWithRawResponse,
EmailsResourceWithStreamingResponse,
AsyncEmailsResourceWithStreamingResponse,
)
from ...types import (
customer_list_params,
customer_create_params,
Expand Down Expand Up @@ -61,6 +69,10 @@ def customer_portal(self) -> CustomerPortalResource:
def wallets(self) -> WalletsResource:
return WalletsResource(self._client)

@cached_property
def emails(self) -> EmailsResource:
return EmailsResource(self._client)

@cached_property
def with_raw_response(self) -> CustomersResourceWithRawResponse:
"""
Expand Down Expand Up @@ -470,6 +482,10 @@ def customer_portal(self) -> AsyncCustomerPortalResource:
def wallets(self) -> AsyncWalletsResource:
return AsyncWalletsResource(self._client)

@cached_property
def emails(self) -> AsyncEmailsResource:
return AsyncEmailsResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncCustomersResourceWithRawResponse:
"""
Expand Down Expand Up @@ -910,6 +926,10 @@ def customer_portal(self) -> CustomerPortalResourceWithRawResponse:
def wallets(self) -> WalletsResourceWithRawResponse:
return WalletsResourceWithRawResponse(self._customers.wallets)

@cached_property
def emails(self) -> EmailsResourceWithRawResponse:
return EmailsResourceWithRawResponse(self._customers.emails)


class AsyncCustomersResourceWithRawResponse:
def __init__(self, customers: AsyncCustomersResource) -> None:
Expand Down Expand Up @@ -951,6 +971,10 @@ def customer_portal(self) -> AsyncCustomerPortalResourceWithRawResponse:
def wallets(self) -> AsyncWalletsResourceWithRawResponse:
return AsyncWalletsResourceWithRawResponse(self._customers.wallets)

@cached_property
def emails(self) -> AsyncEmailsResourceWithRawResponse:
return AsyncEmailsResourceWithRawResponse(self._customers.emails)


class CustomersResourceWithStreamingResponse:
def __init__(self, customers: CustomersResource) -> None:
Expand Down Expand Up @@ -992,6 +1016,10 @@ def customer_portal(self) -> CustomerPortalResourceWithStreamingResponse:
def wallets(self) -> WalletsResourceWithStreamingResponse:
return WalletsResourceWithStreamingResponse(self._customers.wallets)

@cached_property
def emails(self) -> EmailsResourceWithStreamingResponse:
return EmailsResourceWithStreamingResponse(self._customers.emails)


class AsyncCustomersResourceWithStreamingResponse:
def __init__(self, customers: AsyncCustomersResource) -> None:
Expand Down Expand Up @@ -1032,3 +1060,7 @@ def customer_portal(self) -> AsyncCustomerPortalResourceWithStreamingResponse:
@cached_property
def wallets(self) -> AsyncWalletsResourceWithStreamingResponse:
return AsyncWalletsResourceWithStreamingResponse(self._customers.wallets)

@cached_property
def emails(self) -> AsyncEmailsResourceWithStreamingResponse:
return AsyncEmailsResourceWithStreamingResponse(self._customers.emails)
Loading