Skip to content

Commit e33a333

Browse files
authored
Merge pull request #240 from dodopayments/stlc-generated-27403294297
feat(spec): update OpenAPI to 1.104.0 — product localized prices
2 parents da64f54 + 7b146a8 commit e33a333

37 files changed

Lines changed: 170 additions & 71 deletions

CHANGELOG.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
# Changelog
22

3-
## [1.102.1](https://github.com/dodopayments/dodopayments-python/compare/v1.102.0...v1.102.1) (2026-06-06)
4-
5-
6-
### Features
7-
8-
* **api:** regenerate SDK from latest OpenAPI spec ([ae2932c](https://github.com/dodopayments/dodopayments-python/commit/ae2932c4ab0a4783ea281fc1e8b03c703077b744))
9-
* **api:** regenerate SDK from latest OpenAPI spec ([ce9e7bf](https://github.com/dodopayments/dodopayments-python/commit/ce9e7bf16452b7c1509e4e581a080e02336bcb5f))
10-
11-
12-
### Chores
13-
14-
* pin release to spec version ([7add6aa](https://github.com/dodopayments/dodopayments-python/commit/7add6aa935aa9a2250be8215b146159fa2ec9bae))
15-
* **reseal:** ancestry repair for python custom-code seal ([a56e557](https://github.com/dodopayments/dodopayments-python/commit/a56e5570203e81e65bbec8a276507cef0dd3ac47))
16-
* **reseal:** ancestry repair for python custom-code seal ([d930e80](https://github.com/dodopayments/dodopayments-python/commit/d930e806c0110f70b65f0f7b0ffd788e8372e904))
17-
183
## [1.101.0](https://github.com/dodopayments/dodopayments-python/compare/v1.99.1...v1.101.0) (2026-06-01)
194

205

scripts/mock

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/dodopayments/resources/entitlements/grants.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ def list(
4949
id: str,
5050
*,
5151
customer_id: str | Omit = omit,
52-
integration_type: Literal[
53-
"discord", "telegram", "github", "figma", "framer", "notion", "digital_files", "license_key"
54-
]
55-
| Omit = omit,
5652
page_number: int | Omit = omit,
5753
page_size: int | Omit = omit,
5854
status: Literal["Pending", "Delivered", "Failed", "Revoked"] | Omit = omit,
@@ -69,8 +65,6 @@ def list(
6965
Args:
7066
customer_id: Filter by customer ID
7167
72-
integration_type: Filter by integration type
73-
7468
page_number: Page number (default 0)
7569
7670
page_size: Page size (default 10, max 100)
@@ -98,7 +92,6 @@ def list(
9892
query=maybe_transform(
9993
{
10094
"customer_id": customer_id,
101-
"integration_type": integration_type,
10295
"page_number": page_number,
10396
"page_size": page_size,
10497
"status": status,
@@ -173,10 +166,6 @@ def list(
173166
id: str,
174167
*,
175168
customer_id: str | Omit = omit,
176-
integration_type: Literal[
177-
"discord", "telegram", "github", "figma", "framer", "notion", "digital_files", "license_key"
178-
]
179-
| Omit = omit,
180169
page_number: int | Omit = omit,
181170
page_size: int | Omit = omit,
182171
status: Literal["Pending", "Delivered", "Failed", "Revoked"] | Omit = omit,
@@ -193,8 +182,6 @@ def list(
193182
Args:
194183
customer_id: Filter by customer ID
195184
196-
integration_type: Filter by integration type
197-
198185
page_number: Page number (default 0)
199186
200187
page_size: Page size (default 10, max 100)
@@ -222,7 +209,6 @@ def list(
222209
query=maybe_transform(
223210
{
224211
"customer_id": customer_id,
225-
"integration_type": integration_type,
226212
"page_number": page_number,
227213
"page_size": page_size,
228214
"status": status,

src/dodopayments/resources/products/products.py

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Dict, Iterable, Optional
6+
from typing_extensions import Literal
67

78
import httpx
89

@@ -98,6 +99,7 @@ def create(
9899
license_key_duration: Optional[LicenseKeyDurationParam] | Omit = omit,
99100
license_key_enabled: Optional[bool] | Omit = omit,
100101
metadata: Dict[str, str] | Omit = omit,
102+
pricing_mode: Optional[Literal["by_currency", "by_country"]] | Omit = omit,
101103
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
102104
# The extra values given here take precedence over values defined on the client or passed to this method.
103105
extra_headers: Headers | None = None,
@@ -117,15 +119,15 @@ def create(
117119
118120
brand_id: Brand id for the product, if not provided will default to primary brand
119121
120-
credit_entitlements: Optional credit entitlements to attach (max 3)
122+
credit_entitlements: Optional credit entitlements to attach (max 5)
121123
122124
description: Optional description of the product
123125
124126
digital_product_delivery: Choose how you would like you digital product delivered
125127
126128
deprecated: use entitlements instead
127129
128-
entitlements: Optional entitlements to attach to this product (max 20)
130+
entitlements: Optional entitlements to attach to this product (max 50)
129131
130132
license_key_activation_message: Optional message displayed during license key activation
131133
@@ -152,6 +154,10 @@ def create(
152154
153155
metadata: Additional metadata for the product
154156
157+
pricing_mode: Pricing mode for localized pricing. When set, rules from
158+
/products/{id}/localized-prices apply at checkout. NULL means base-only
159+
(existing behavior).
160+
155161
extra_headers: Send extra headers
156162
157163
extra_query: Add additional query parameters to the request
@@ -178,6 +184,7 @@ def create(
178184
"license_key_duration": license_key_duration,
179185
"license_key_enabled": license_key_enabled,
180186
"metadata": metadata,
187+
"pricing_mode": pricing_mode,
181188
},
182189
product_create_params.ProductCreateParams,
183190
),
@@ -236,6 +243,7 @@ def update(
236243
metadata: Optional[Dict[str, str]] | Omit = omit,
237244
name: Optional[str] | Omit = omit,
238245
price: Optional[PriceParam] | Omit = omit,
246+
pricing_mode: Optional[Literal["by_currency", "by_country"]] | Omit = omit,
239247
tax_category: Optional[TaxCategory] | Omit = omit,
240248
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
241249
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -296,6 +304,10 @@ def update(
296304
297305
price: Price details of the product.
298306
307+
pricing_mode: Update the pricing mode. Omit to leave unchanged; set to null to clear (which
308+
archives all active localized rules for this product). Changing to a different
309+
non-null mode also archives any rules whose mode doesn't match the new mode.
310+
299311
tax_category: Tax category of the product.
300312
301313
extra_headers: Send extra headers
@@ -327,6 +339,7 @@ def update(
327339
"metadata": metadata,
328340
"name": name,
329341
"price": price,
342+
"pricing_mode": pricing_mode,
330343
"tax_category": tax_category,
331344
},
332345
product_update_params.ProductUpdateParams,
@@ -542,6 +555,7 @@ async def create(
542555
license_key_duration: Optional[LicenseKeyDurationParam] | Omit = omit,
543556
license_key_enabled: Optional[bool] | Omit = omit,
544557
metadata: Dict[str, str] | Omit = omit,
558+
pricing_mode: Optional[Literal["by_currency", "by_country"]] | Omit = omit,
545559
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
546560
# The extra values given here take precedence over values defined on the client or passed to this method.
547561
extra_headers: Headers | None = None,
@@ -561,15 +575,15 @@ async def create(
561575
562576
brand_id: Brand id for the product, if not provided will default to primary brand
563577
564-
credit_entitlements: Optional credit entitlements to attach (max 3)
578+
credit_entitlements: Optional credit entitlements to attach (max 5)
565579
566580
description: Optional description of the product
567581
568582
digital_product_delivery: Choose how you would like you digital product delivered
569583
570584
deprecated: use entitlements instead
571585
572-
entitlements: Optional entitlements to attach to this product (max 20)
586+
entitlements: Optional entitlements to attach to this product (max 50)
573587
574588
license_key_activation_message: Optional message displayed during license key activation
575589
@@ -596,6 +610,10 @@ async def create(
596610
597611
metadata: Additional metadata for the product
598612
613+
pricing_mode: Pricing mode for localized pricing. When set, rules from
614+
/products/{id}/localized-prices apply at checkout. NULL means base-only
615+
(existing behavior).
616+
599617
extra_headers: Send extra headers
600618
601619
extra_query: Add additional query parameters to the request
@@ -622,6 +640,7 @@ async def create(
622640
"license_key_duration": license_key_duration,
623641
"license_key_enabled": license_key_enabled,
624642
"metadata": metadata,
643+
"pricing_mode": pricing_mode,
625644
},
626645
product_create_params.ProductCreateParams,
627646
),
@@ -680,6 +699,7 @@ async def update(
680699
metadata: Optional[Dict[str, str]] | Omit = omit,
681700
name: Optional[str] | Omit = omit,
682701
price: Optional[PriceParam] | Omit = omit,
702+
pricing_mode: Optional[Literal["by_currency", "by_country"]] | Omit = omit,
683703
tax_category: Optional[TaxCategory] | Omit = omit,
684704
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
685705
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -740,6 +760,10 @@ async def update(
740760
741761
price: Price details of the product.
742762
763+
pricing_mode: Update the pricing mode. Omit to leave unchanged; set to null to clear (which
764+
archives all active localized rules for this product). Changing to a different
765+
non-null mode also archives any rules whose mode doesn't match the new mode.
766+
743767
tax_category: Tax category of the product.
744768
745769
extra_headers: Send extra headers
@@ -771,6 +795,7 @@ async def update(
771795
"metadata": metadata,
772796
"name": name,
773797
"price": price,
798+
"pricing_mode": pricing_mode,
774799
"tax_category": tax_category,
775800
},
776801
product_update_params.ProductUpdateParams,

src/dodopayments/types/abandoned_checkout_detected_webhook_event.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class Data(BaseModel):
1818

1919
abandonment_reason: Literal["payment_failed", "checkout_incomplete"]
2020

21+
brand_id: str
22+
"""Brand id this abandoned checkout belongs to"""
23+
2124
customer_id: str
2225

2326
payment_id: str

src/dodopayments/types/abandoned_checkout_detected_webhook_event1.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class Data(BaseModel):
1818

1919
abandonment_reason: Literal["payment_failed", "checkout_incomplete"]
2020

21+
brand_id: str
22+
"""Brand id this abandoned checkout belongs to"""
23+
2124
customer_id: str
2225

2326
payment_id: str

src/dodopayments/types/abandoned_checkout_recovered_webhook_event.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class Data(BaseModel):
1818

1919
abandonment_reason: Literal["payment_failed", "checkout_incomplete"]
2020

21+
brand_id: str
22+
"""Brand id this abandoned checkout belongs to"""
23+
2124
customer_id: str
2225

2326
payment_id: str

src/dodopayments/types/abandoned_checkout_recovered_webhook_event1.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class Data(BaseModel):
1818

1919
abandonment_reason: Literal["payment_failed", "checkout_incomplete"]
2020

21+
brand_id: str
22+
"""Brand id this abandoned checkout belongs to"""
23+
2124
customer_id: str
2225

2326
payment_id: str

src/dodopayments/types/checkout_session_preview_response.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ class CheckoutSessionPreviewResponse(BaseModel):
179179
current_breakup: CurrentBreakup
180180
"""Breakup of the current payment"""
181181

182+
is_byop: bool
183+
"""Whether the payment will be routed through the merchant's own processor (BYOP).
184+
185+
True when the session's business has a BYOP route configured for the billing
186+
country; in that case the quoted amounts exclude Dodo-computed tax because the
187+
merchant is MoR and owns tax.
188+
"""
189+
182190
product_cart: List[ProductCart]
183191
"""The total product cart"""
184192

src/dodopayments/types/credit_balance_low_webhook_event.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ class Data(BaseModel):
1313

1414
available_balance: str
1515

16+
brand_id: str
17+
"""Brand id this credit entitlement belongs to"""
18+
1619
credit_entitlement_id: str
1720

1821
credit_entitlement_name: str

0 commit comments

Comments
 (0)