Skip to content

Commit 8402029

Browse files
committed
## Python SDK Changes Detected:
* `polar.customer_portal.subscriptions.list()`: `response.items.[].product.organization` **Changed** **Breaking** ⚠️ * `polar.customer_portal.benefit-grants.update()`: `response.[customer_benefit_grant_discord].benefit.organization` **Changed** **Breaking** ⚠️ * `polar.organizations.create()`: * `request.subscription_settings.prevent_trial_abuse` **Added** **Breaking** ⚠️ * `response` **Changed** * `polar.customer_portal.subscriptions.update()`: `response.product.organization` **Changed** **Breaking** ⚠️ * `polar.organizations.update()`: * `request.organization_update.subscription_settings.prevent_trial_abuse` **Added** **Breaking** ⚠️ * `response` **Changed** * `polar.customer_portal.subscriptions.cancel()`: `response.product.organization` **Changed** **Breaking** ⚠️ * `polar.customer_portal.benefit-grants.get()`: `response.[customer_benefit_grant_custom].benefit.organization` **Changed** **Breaking** ⚠️ * `polar.checkouts.client_get()`: `response.organization` **Changed** **Breaking** ⚠️ * `polar.checkouts.client_update()`: * `response.organization` **Changed** **Breaking** ⚠️ * `error.[trial_already_redeemed]` **Added** * `polar.checkouts.client_confirm()`: * `response.organization` **Changed** **Breaking** ⚠️ * `error.[trial_already_redeemed]` **Added** * `polar.customer_portal.subscriptions.get()`: `response.product.organization` **Changed** **Breaking** ⚠️ * `polar._endpointorganization_updated_post()`: * `request.data` **Changed** **Breaking** ⚠️ * `polar.customer_portal.orders.update()`: `response.product.organization` **Changed** **Breaking** ⚠️ * `polar.customer_portal.seats.list_claimed_subscriptions()`: `response.[].product.organization` **Changed** **Breaking** ⚠️ * `polar.customer_portal.orders.list()`: `response.items.[].product.organization` **Changed** **Breaking** ⚠️ * `polar.customer_portal.orders.get()`: `response.product.organization` **Changed** **Breaking** ⚠️ * `polar.customer_portal.benefit-grants.list()`: `response.items.[].[customer_benefit_grant_meter_credit].benefit.organization` **Changed** **Breaking** ⚠️ * `polar.customer_portal.organizations.get()`: `response.organization` **Changed** **Breaking** ⚠️ * `polar.checkouts.update()`: `error.[trial_already_redeemed]` **Added** * `polar.organizations.list()`: `response.items.[]` **Changed** * `polar.subscriptions.list()`: `request.cancel_at_period_end` **Added** * `polar.organizations.get()`: `response` **Changed** * `polar.events.list()`: * `request.hierarchical` **Added** * `response.items.[]` **Changed** * `polar.events.get()`: `response` **Changed**
1 parent 211e1ae commit 8402029

File tree

87 files changed

+819
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+819
-179
lines changed

.speakeasy/gen.lock

Lines changed: 35 additions & 26 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ generation:
2222
hoistGlobalSecurity: true
2323
schemas:
2424
allOfMergeStrategy: shallowMerge
25+
requestBodyFieldName: ""
2526
tests:
2627
generateTests: true
2728
generateNewTests: false
2829
skipResponseBodyAssertions: false
2930
python:
30-
version: 0.28.0
31+
version: 0.28.1
3132
additionalDependencies:
3233
dev:
3334
pydantic-ai-slim: ^0.1.0

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.648.0
1+
speakeasyVersion: 1.653.0
22
sources:
33
Polar-OAS:
44
sourceNamespace: polar-oas
5-
sourceRevisionDigest: sha256:c0187c3b97b30297429930c9b97513e82a6fb748fa42bb6ef632b447899f4063
6-
sourceBlobDigest: sha256:64e17fc520f1c7b5bf6663aa5279d8655e70ee7240fa77085f5486aa632e0275
5+
sourceRevisionDigest: sha256:7a1c2534777abdc07f5d3dbd1e53599032547de122ffc92c472bad5277518de6
6+
sourceBlobDigest: sha256:228c5f6565a80cdd48f24c8219a22dade1989b2cfc404fd3c5a466371e9f7cae
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1761956132
9+
- speakeasy-sdk-regen-1762301662
1010
- 0.1.0
1111
targets:
1212
polar:
1313
source: Polar-OAS
1414
sourceNamespace: polar-oas
15-
sourceRevisionDigest: sha256:c0187c3b97b30297429930c9b97513e82a6fb748fa42bb6ef632b447899f4063
16-
sourceBlobDigest: sha256:64e17fc520f1c7b5bf6663aa5279d8655e70ee7240fa77085f5486aa632e0275
15+
sourceRevisionDigest: sha256:7a1c2534777abdc07f5d3dbd1e53599032547de122ffc92c472bad5277518de6
16+
sourceBlobDigest: sha256:228c5f6565a80cdd48f24c8219a22dade1989b2cfc404fd3c5a466371e9f7cae
1717
codeSamplesNamespace: polar-oas-py-code-samples
18-
codeSamplesRevisionDigest: sha256:b5f5b4797959ba0b423abb100d9e63089ed790c5741f080bb93f10d561b59823
18+
codeSamplesRevisionDigest: sha256:2c08f49ea60e88af17c600aed71827ac3c566fd3f1203ddc611c42574082ed54
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ with Polar(
550550
* [`PolarError`](./src/polar_sdk/models/polarerror.py): The base class for HTTP error responses.
551551
* [`HTTPValidationError`](./src/polar_sdk/models/httpvalidationerror.py): Validation Error. Status code `422`. *
552552

553-
<details><summary>Less common errors (25)</summary>
553+
<details><summary>Less common errors (26)</summary>
554554

555555
<br />
556556

@@ -568,6 +568,7 @@ with Polar(
568568
* [`AlreadyActiveSubscriptionError`](./src/polar_sdk/models/alreadyactivesubscriptionerror.py): The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments. Status code `403`. Applicable to 3 of 155 methods.*
569569
* [`NotOpenCheckout`](./src/polar_sdk/models/notopencheckout.py): The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments. Status code `403`. Applicable to 3 of 155 methods.*
570570
* [`PaymentNotReady`](./src/polar_sdk/models/paymentnotready.py): The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments. Status code `403`. Applicable to 3 of 155 methods.*
571+
* [`TrialAlreadyRedeemed`](./src/polar_sdk/models/trialalreadyredeemed.py): The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments. Status code `403`. Applicable to 3 of 155 methods.*
571572
* [`ExpiredCheckoutError`](./src/polar_sdk/models/expiredcheckouterror.py): The checkout session is expired. Status code `410`. Applicable to 3 of 155 methods.*
572573
* [`SubscriptionLocked`](./src/polar_sdk/models/subscriptionlocked.py): Subscription is pending an update. Status code `409`. Applicable to 2 of 155 methods.*
573574
* [`MissingInvoiceBillingDetails`](./src/polar_sdk/models/missinginvoicebillingdetails.py): Order is not paid or is missing billing name or address. Status code `422`. Applicable to 2 of 155 methods.*

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,4 +983,14 @@ Based on:
983983
### Generated
984984
- [python v0.28.0] .
985985
### Releases
986-
- [PyPI v0.28.0] https://pypi.org/project/polar-sdk/0.28.0 - .
986+
- [PyPI v0.28.0] https://pypi.org/project/polar-sdk/0.28.0 - .
987+
988+
## 2025-11-11 00:13:57
989+
### Changes
990+
Based on:
991+
- OpenAPI Doc
992+
- Speakeasy CLI 1.653.0 (2.748.0) https://github.com/speakeasy-api/speakeasy
993+
### Generated
994+
- [python v0.28.1] .
995+
### Releases
996+
- [PyPI v0.28.1] https://pypi.org/project/polar-sdk/0.28.1 - .

codeSamples.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ actions:
530530
"x-codeSamples":
531531
- "lang": "python"
532532
"label": "Python (SDK)"
533-
"source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n res = polar.events.list(organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\", page=1, limit=10)\n\n while res is not None:\n # Handle items\n\n res = res.next()"
533+
"source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n res = polar.events.list(organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\", hierarchical=False, page=1, limit=10)\n\n while res is not None:\n # Handle items\n\n res = res.next()"
534534
- target: $["paths"]["/v1/events/ingest"]["post"]
535535
update:
536536
"x-codeSamples":
@@ -1052,7 +1052,7 @@ actions:
10521052
"x-codeSamples":
10531053
- "lang": "python"
10541054
"label": "Python (SDK)"
1055-
"source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorganization_updated_post(request={\n \"type\": \"organization.updated\",\n \"timestamp\": parse_datetime(\"2025-08-19T15:02:44.139Z\"),\n \"data\": {\n \"created_at\": parse_datetime(\"2025-05-07T21:24:48.059Z\"),\n \"modified_at\": parse_datetime(\"2023-04-16T23:18:12.986Z\"),\n \"id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"name\": \"<value>\",\n \"slug\": \"<value>\",\n \"avatar_url\": \"https://pessimistic-going.name/\",\n \"email\": \"[email protected]\",\n \"website\": \"<value>\",\n \"socials\": [],\n \"status\": polar_sdk.OrganizationStatus.CREATED,\n \"details_submitted_at\": parse_datetime(\"2024-05-05T12:48:25.627Z\"),\n \"feature_settings\": {},\n \"subscription_settings\": {\n \"allow_multiple_subscriptions\": True,\n \"allow_customer_updates\": False,\n \"proration_behavior\": polar_sdk.SubscriptionProrationBehavior.PRORATE,\n \"benefit_revocation_grace_period\": 219094,\n },\n \"notification_settings\": {\n \"new_order\": True,\n \"new_subscription\": False,\n },\n \"customer_email_settings\": {\n \"order_confirmation\": False,\n \"subscription_cancellation\": True,\n \"subscription_confirmation\": False,\n \"subscription_cycled\": True,\n \"subscription_past_due\": True,\n \"subscription_revoked\": True,\n \"subscription_uncanceled\": False,\n \"subscription_updated\": True,\n },\n },\n })\n\n # Handle response\n print(res)"
1055+
"source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorganization_updated_post(request=polar_sdk.WebhookOrganizationUpdatedPayload(\n timestamp=parse_datetime(\"2025-08-19T15:02:44.139Z\"),\n data=polar_sdk.Organization(\n created_at=parse_datetime(\"2025-05-07T21:24:48.059Z\"),\n modified_at=parse_datetime(\"2023-04-16T23:18:12.986Z\"),\n id=\"<value>\",\n name=\"<value>\",\n slug=\"<value>\",\n avatar_url=\"https://pessimistic-going.name/\",\n proration_behavior=polar_sdk.SubscriptionProrationBehavior.PRORATE,\n allow_customer_updates=True,\n email=\"[email protected]\",\n website=None,\n socials=[],\n status=polar_sdk.OrganizationStatus.INITIAL_REVIEW,\n details_submitted_at=parse_datetime(\"2024-06-29T16:05:16.127Z\"),\n feature_settings=polar_sdk.OrganizationFeatureSettings(),\n subscription_settings=polar_sdk.OrganizationSubscriptionSettings(\n allow_multiple_subscriptions=False,\n allow_customer_updates=True,\n proration_behavior=polar_sdk.SubscriptionProrationBehavior.INVOICE,\n benefit_revocation_grace_period=778168,\n prevent_trial_abuse=False,\n ),\n notification_settings=polar_sdk.OrganizationNotificationSettings(\n new_order=True,\n new_subscription=False,\n ),\n customer_email_settings=polar_sdk.OrganizationCustomerEmailSettings(\n order_confirmation=True,\n subscription_cancellation=True,\n subscription_confirmation=True,\n subscription_cycled=False,\n subscription_past_due=True,\n subscription_revoked=False,\n subscription_uncanceled=False,\n subscription_updated=True,\n ),\n ),\n ))\n\n # Handle response\n print(res)"
10561056
- target: $["paths"]["product.created"]["post"]
10571057
update:
10581058
"x-codeSamples":

docs/models/benefitcustomsubscriber.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
| `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. |
1515
| `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the benefit. |
1616
| `metadata` | Dict[str, [models.BenefitCustomSubscriberMetadata](../models/benefitcustomsubscribermetadata.md)] | :heavy_check_mark: | N/A |
17-
| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A |
17+
| `organization` | [models.BenefitSubscriberOrganization](../models/benefitsubscriberorganization.md) | :heavy_check_mark: | N/A |
1818
| `properties` | [models.BenefitCustomSubscriberProperties](../models/benefitcustomsubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `custom`. |

docs/models/benefitcycledevent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ An event created by Polar when a benefit is cycled.
1414
| `customer` | [Nullable[models.Customer]](../models/customer.md) | :heavy_check_mark: | The customer associated with the event. | |
1515
| `external_customer_id` | *Nullable[str]* | :heavy_check_mark: | ID of the customer in your system associated with the event. | |
1616
| `child_count` | *Optional[int]* | :heavy_minus_sign: | Number of direct child events linked to this event. | |
17+
| `parent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the parent event. | |
1718
| `source` | *Literal["system"]* | :heavy_check_mark: | The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API. | |
1819
| `name` | *Literal["benefit.cycled"]* | :heavy_check_mark: | The name of the event. | |
1920
| `metadata` | [models.BenefitGrantMetadata](../models/benefitgrantmetadata.md) | :heavy_check_mark: | N/A | |

docs/models/benefitdiscordsubscriber.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
| `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. |
1515
| `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the benefit. |
1616
| `metadata` | Dict[str, [models.BenefitDiscordSubscriberMetadata](../models/benefitdiscordsubscribermetadata.md)] | :heavy_check_mark: | N/A |
17-
| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A |
17+
| `organization` | [models.BenefitSubscriberOrganization](../models/benefitsubscriberorganization.md) | :heavy_check_mark: | N/A |
1818
| `properties` | [models.BenefitDiscordSubscriberProperties](../models/benefitdiscordsubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `discord`. |

0 commit comments

Comments
 (0)