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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.98.2"
".": "1.99.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 115
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dodo-payments/dodo-payments-2ffbf67de53851e90df27e282f1728e26f502595ca18fc795bd85e52def12403.yml
openapi_spec_hash: df1cb95258514ae75058a767d8b8f1f4
config_hash: ef79873bb22333b064f390e64e9ddd49
configured_endpoints: 129
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dodo-payments/dodo-payments-1b34d3f97b8b78222aaa5ad0e32add5aa49307a8cc563a556bc3e5ea78585175.yml
openapi_spec_hash: 3ae2b45a65b68c25007835eafc758f3e
config_hash: b9fa2634135996e7865bc69f4d985177
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.99.0 (2026-05-21)

Full Changelog: [v1.98.2...v1.99.0](https://github.com/dodopayments/dodopayments-python/compare/v1.98.2...v1.99.0)

### Features

* **api:** fixed a breaking modal change ([f1234a0](https://github.com/dodopayments/dodopayments-python/commit/f1234a0b6d96cacf419634fefbc39e173d8d87b1))
* **api:** stainless fixes ([b009180](https://github.com/dodopayments/dodopayments-python/commit/b00918007e41c6cdb4923567cab949a628233aa7))
* **api:** updated openapi spec to v1.99.0 and added missing endpoints as well ([73101fa](https://github.com/dodopayments/dodopayments-python/commit/73101fab3a997da1203fd0936339eabf7e609d6b))

## 1.98.2 (2026-05-14)

Full Changelog: [v1.98.1...v1.98.2](https://github.com/dodopayments/dodopayments-python/compare/v1.98.1...v1.98.2)
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ client = DodoPayments(
checkout_session_response = client.checkout_sessions.create(
product_cart=[
{
"product_id": "product_id",
"quantity": 0,
"product_id": "pdt_example",
"quantity": 1,
}
],
)
Expand Down Expand Up @@ -79,8 +79,8 @@ async def main() -> None:
checkout_session_response = await client.checkout_sessions.create(
product_cart=[
{
"product_id": "product_id",
"quantity": 0,
"product_id": "pdt_example",
"quantity": 1,
}
],
)
Expand Down Expand Up @@ -122,8 +122,8 @@ async def main() -> None:
checkout_session_response = await client.checkout_sessions.create(
product_cart=[
{
"product_id": "product_id",
"quantity": 0,
"product_id": "pdt_example",
"quantity": 1,
}
],
)
Expand Down Expand Up @@ -243,8 +243,8 @@ try:
client.checkout_sessions.create(
product_cart=[
{
"product_id": "product_id",
"quantity": 0,
"product_id": "pdt_example",
"quantity": 1,
}
],
)
Expand Down Expand Up @@ -293,8 +293,8 @@ client = DodoPayments(
client.with_options(max_retries=5).checkout_sessions.create(
product_cart=[
{
"product_id": "product_id",
"quantity": 0,
"product_id": "pdt_example",
"quantity": 1,
}
],
)
Expand Down Expand Up @@ -323,8 +323,8 @@ client = DodoPayments(
client.with_options(timeout=5.0).checkout_sessions.create(
product_cart=[
{
"product_id": "product_id",
"quantity": 0,
"product_id": "pdt_example",
"quantity": 1,
}
],
)
Expand Down Expand Up @@ -370,8 +370,8 @@ from dodopayments import DodoPayments
client = DodoPayments()
response = client.checkout_sessions.with_raw_response.create(
product_cart=[{
"product_id": "product_id",
"quantity": 0,
"product_id": "pdt_example",
"quantity": 1,
}],
)
print(response.headers.get('X-My-Header'))
Expand All @@ -394,8 +394,8 @@ To stream the response body, use `.with_streaming_response` instead, which requi
with client.checkout_sessions.with_streaming_response.create(
product_cart=[
{
"product_id": "product_id",
"quantity": 0,
"product_id": "pdt_example",
"quantity": 1,
}
],
) as response:
Expand Down
71 changes: 69 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Methods:
Methods:

- <code title="get /invoices/payments/{payment_id}">client.invoices.payments.<a href="./src/dodopayments/resources/invoices/payments.py">retrieve</a>(payment_id) -> BinaryAPIResponse</code>
- <code title="get /invoices/payouts/{payout_id}">client.invoices.payments.<a href="./src/dodopayments/resources/invoices/payments.py">retrieve_payout</a>(payout_id) -> BinaryAPIResponse</code>
- <code title="get /invoices/refunds/{refund_id}">client.invoices.payments.<a href="./src/dodopayments/resources/invoices/payments.py">retrieve_refund</a>(refund_id) -> BinaryAPIResponse</code>

# Licenses
Expand Down Expand Up @@ -350,7 +351,7 @@ Methods:
Types:

```python
from dodopayments.types import Discount, DiscountType
from dodopayments.types import Discount, DiscountDetail, DiscountType
```

Methods:
Expand Down Expand Up @@ -534,7 +535,14 @@ Methods:
Types:

```python
from dodopayments.types import Conjunction, FilterOperator, Meter, MeterAggregation, MeterFilter
from dodopayments.types import (
Conjunction,
FilterOperator,
FilterType,
Meter,
MeterAggregation,
MeterFilter,
)
```

Methods:
Expand Down Expand Up @@ -604,6 +612,7 @@ Types:
from dodopayments.types import (
Entitlement,
EntitlementIntegrationType,
GitHubPermission,
IntegrationConfig,
IntegrationConfigResponse,
)
Expand Down Expand Up @@ -642,3 +651,61 @@ Methods:

- <code title="get /entitlements/{id}/grants">client.entitlements.grants.<a href="./src/dodopayments/resources/entitlements/grants.py">list</a>(id, \*\*<a href="src/dodopayments/types/entitlements/grant_list_params.py">params</a>) -> <a href="./src/dodopayments/types/entitlements/entitlement_grant.py">SyncDefaultPageNumberPagination[EntitlementGrant]</a></code>
- <code title="delete /entitlements/{id}/grants/{grant_id}">client.entitlements.grants.<a href="./src/dodopayments/resources/entitlements/grants.py">revoke</a>(grant_id, \*, id) -> <a href="./src/dodopayments/types/entitlements/entitlement_grant.py">EntitlementGrant</a></code>

# ProductCollections

Types:

```python
from dodopayments.types import (
ProductCollection,
ProductCollectionListResponse,
ProductCollectionUnarchiveResponse,
ProductCollectionUpdateImagesResponse,
)
```

Methods:

- <code title="post /product-collections">client.product_collections.<a href="./src/dodopayments/resources/product_collections/product_collections.py">create</a>(\*\*<a href="src/dodopayments/types/product_collection_create_params.py">params</a>) -> <a href="./src/dodopayments/types/product_collection.py">ProductCollection</a></code>
- <code title="get /product-collections/{id}">client.product_collections.<a href="./src/dodopayments/resources/product_collections/product_collections.py">retrieve</a>(id) -> <a href="./src/dodopayments/types/product_collection.py">ProductCollection</a></code>
- <code title="patch /product-collections/{id}">client.product_collections.<a href="./src/dodopayments/resources/product_collections/product_collections.py">update</a>(id, \*\*<a href="src/dodopayments/types/product_collection_update_params.py">params</a>) -> None</code>
- <code title="get /product-collections">client.product_collections.<a href="./src/dodopayments/resources/product_collections/product_collections.py">list</a>(\*\*<a href="src/dodopayments/types/product_collection_list_params.py">params</a>) -> <a href="./src/dodopayments/types/product_collection_list_response.py">SyncDefaultPageNumberPagination[ProductCollectionListResponse]</a></code>
- <code title="delete /product-collections/{id}">client.product_collections.<a href="./src/dodopayments/resources/product_collections/product_collections.py">delete</a>(id) -> None</code>
- <code title="post /product-collections/{id}/unarchive">client.product_collections.<a href="./src/dodopayments/resources/product_collections/product_collections.py">unarchive</a>(id) -> <a href="./src/dodopayments/types/product_collection_unarchive_response.py">ProductCollectionUnarchiveResponse</a></code>
- <code title="put /product-collections/{id}/images">client.product_collections.<a href="./src/dodopayments/resources/product_collections/product_collections.py">update_images</a>(id, \*\*<a href="src/dodopayments/types/product_collection_update_images_params.py">params</a>) -> <a href="./src/dodopayments/types/product_collection_update_images_response.py">ProductCollectionUpdateImagesResponse</a></code>

## Groups

Types:

```python
from dodopayments.types.product_collections import (
GroupProduct,
ProductCollectionGroupDetails,
ProductCollectionGroupResponse,
)
```

Methods:

- <code title="post /product-collections/{id}/groups">client.product_collections.groups.<a href="./src/dodopayments/resources/product_collections/groups/groups.py">create</a>(id, \*\*<a href="src/dodopayments/types/product_collections/group_create_params.py">params</a>) -> <a href="./src/dodopayments/types/product_collections/product_collection_group_response.py">ProductCollectionGroupResponse</a></code>
- <code title="patch /product-collections/{id}/groups/{group_id}">client.product_collections.groups.<a href="./src/dodopayments/resources/product_collections/groups/groups.py">update</a>(group_id, \*, id, \*\*<a href="src/dodopayments/types/product_collections/group_update_params.py">params</a>) -> None</code>
- <code title="delete /product-collections/{id}/groups/{group_id}">client.product_collections.groups.<a href="./src/dodopayments/resources/product_collections/groups/groups.py">delete</a>(group_id, \*, id) -> None</code>

### Items

Types:

```python
from dodopayments.types.product_collections.groups import (
ProductCollectionProduct,
ItemCreateResponse,
)
```

Methods:

- <code title="post /product-collections/{id}/groups/{group_id}/items">client.product_collections.groups.items.<a href="./src/dodopayments/resources/product_collections/groups/items.py">create</a>(group_id, \*, id, \*\*<a href="src/dodopayments/types/product_collections/groups/item_create_params.py">params</a>) -> <a href="./src/dodopayments/types/product_collections/groups/item_create_response.py">ItemCreateResponse</a></code>
- <code title="patch /product-collections/{id}/groups/{group_id}/items/{item_id}">client.product_collections.groups.items.<a href="./src/dodopayments/resources/product_collections/groups/items.py">update</a>(item_id, \*, id, group_id, \*\*<a href="src/dodopayments/types/product_collections/groups/item_update_params.py">params</a>) -> None</code>
- <code title="delete /product-collections/{id}/groups/{group_id}/items/{item_id}">client.product_collections.groups.items.<a href="./src/dodopayments/resources/product_collections/groups/items.py">delete</a>(item_id, \*, id, group_id) -> None</code>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "dodopayments"
version = "1.98.2"
version = "1.99.0"
description = "The official Python library for the Dodo Payments API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
41 changes: 41 additions & 0 deletions src/dodopayments/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
subscriptions,
checkout_sessions,
credit_entitlements,
product_collections,
license_key_instances,
)
from .resources.misc import MiscResource, AsyncMiscResource
Expand Down Expand Up @@ -84,6 +85,10 @@
CreditEntitlementsResource,
AsyncCreditEntitlementsResource,
)
from .resources.product_collections.product_collections import (
ProductCollectionsResource,
AsyncProductCollectionsResource,
)

__all__ = [
"ENVIRONMENTS",
Expand Down Expand Up @@ -331,6 +336,12 @@ def entitlements(self) -> EntitlementsResource:

return EntitlementsResource(self)

@cached_property
def product_collections(self) -> ProductCollectionsResource:
from .resources.product_collections import ProductCollectionsResource

return ProductCollectionsResource(self)

@cached_property
def with_raw_response(self) -> DodoPaymentsWithRawResponse:
return DodoPaymentsWithRawResponse(self)
Expand Down Expand Up @@ -676,6 +687,12 @@ def entitlements(self) -> AsyncEntitlementsResource:

return AsyncEntitlementsResource(self)

@cached_property
def product_collections(self) -> AsyncProductCollectionsResource:
from .resources.product_collections import AsyncProductCollectionsResource

return AsyncProductCollectionsResource(self)

@cached_property
def with_raw_response(self) -> AsyncDodoPaymentsWithRawResponse:
return AsyncDodoPaymentsWithRawResponse(self)
Expand Down Expand Up @@ -931,6 +948,12 @@ def entitlements(self) -> entitlements.EntitlementsResourceWithRawResponse:

return EntitlementsResourceWithRawResponse(self._client.entitlements)

@cached_property
def product_collections(self) -> product_collections.ProductCollectionsResourceWithRawResponse:
from .resources.product_collections import ProductCollectionsResourceWithRawResponse

return ProductCollectionsResourceWithRawResponse(self._client.product_collections)


class AsyncDodoPaymentsWithRawResponse:
_client: AsyncDodoPayments
Expand Down Expand Up @@ -1070,6 +1093,12 @@ def entitlements(self) -> entitlements.AsyncEntitlementsResourceWithRawResponse:

return AsyncEntitlementsResourceWithRawResponse(self._client.entitlements)

@cached_property
def product_collections(self) -> product_collections.AsyncProductCollectionsResourceWithRawResponse:
from .resources.product_collections import AsyncProductCollectionsResourceWithRawResponse

return AsyncProductCollectionsResourceWithRawResponse(self._client.product_collections)


class DodoPaymentsWithStreamedResponse:
_client: DodoPayments
Expand Down Expand Up @@ -1209,6 +1238,12 @@ def entitlements(self) -> entitlements.EntitlementsResourceWithStreamingResponse

return EntitlementsResourceWithStreamingResponse(self._client.entitlements)

@cached_property
def product_collections(self) -> product_collections.ProductCollectionsResourceWithStreamingResponse:
from .resources.product_collections import ProductCollectionsResourceWithStreamingResponse

return ProductCollectionsResourceWithStreamingResponse(self._client.product_collections)


class AsyncDodoPaymentsWithStreamedResponse:
_client: AsyncDodoPayments
Expand Down Expand Up @@ -1348,6 +1383,12 @@ def entitlements(self) -> entitlements.AsyncEntitlementsResourceWithStreamingRes

return AsyncEntitlementsResourceWithStreamingResponse(self._client.entitlements)

@cached_property
def product_collections(self) -> product_collections.AsyncProductCollectionsResourceWithStreamingResponse:
from .resources.product_collections import AsyncProductCollectionsResourceWithStreamingResponse

return AsyncProductCollectionsResourceWithStreamingResponse(self._client.product_collections)


Client = DodoPayments

Expand Down
2 changes: 1 addition & 1 deletion src/dodopayments/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "dodopayments"
__version__ = "1.98.2" # x-release-please-version
__version__ = "1.99.0" # x-release-please-version
14 changes: 14 additions & 0 deletions src/dodopayments/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@
CreditEntitlementsResourceWithStreamingResponse,
AsyncCreditEntitlementsResourceWithStreamingResponse,
)
from .product_collections import (
ProductCollectionsResource,
AsyncProductCollectionsResource,
ProductCollectionsResourceWithRawResponse,
AsyncProductCollectionsResourceWithRawResponse,
ProductCollectionsResourceWithStreamingResponse,
AsyncProductCollectionsResourceWithStreamingResponse,
)
from .license_key_instances import (
LicenseKeyInstancesResource,
AsyncLicenseKeyInstancesResource,
Expand Down Expand Up @@ -310,4 +318,10 @@
"AsyncEntitlementsResourceWithRawResponse",
"EntitlementsResourceWithStreamingResponse",
"AsyncEntitlementsResourceWithStreamingResponse",
"ProductCollectionsResource",
"AsyncProductCollectionsResource",
"ProductCollectionsResourceWithRawResponse",
"AsyncProductCollectionsResourceWithRawResponse",
"ProductCollectionsResourceWithStreamingResponse",
"AsyncProductCollectionsResourceWithStreamingResponse",
]
Loading