Skip to content
Open
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
112 changes: 86 additions & 26 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ generation:
persistentEdits: {}
versioningStrategy: automatic
python:
version: 0.31.3
version: 0.31.4
additionalDependencies:
dev:
pydantic-ai-slim: ^0.1.0
Expand Down
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ speakeasyVersion: 1.648.0
sources:
Polar-OAS:
sourceNamespace: polar-oas
sourceRevisionDigest: sha256:c88bf8b61c5f3402aaaeeaddd5a6af29008ebf87c4ba877dbea9d2d92789aeb8
sourceBlobDigest: sha256:41cfb03d9b8af58f7956111f7303b50c1e98878164fe4b90a63775af9a19ad7f
sourceRevisionDigest: sha256:e5821b05cf36ea5786ab549a1428ed187c3a84873a363ffe8e9a506f6cb6450b
sourceBlobDigest: sha256:e72c068ac320590942e987b57075798879d277dcf0b61f7932f3ffcd63951c71
tags:
- latest
- speakeasy-sdk-regen-1775811956
- speakeasy-sdk-regen-1776212983
- 0.1.0
targets:
polar:
source: Polar-OAS
sourceNamespace: polar-oas
sourceRevisionDigest: sha256:c88bf8b61c5f3402aaaeeaddd5a6af29008ebf87c4ba877dbea9d2d92789aeb8
sourceBlobDigest: sha256:41cfb03d9b8af58f7956111f7303b50c1e98878164fe4b90a63775af9a19ad7f
sourceRevisionDigest: sha256:e5821b05cf36ea5786ab549a1428ed187c3a84873a363ffe8e9a506f6cb6450b
sourceBlobDigest: sha256:e72c068ac320590942e987b57075798879d277dcf0b61f7932f3ffcd63951c71
codeSamplesNamespace: polar-oas-py-code-samples
codeSamplesRevisionDigest: sha256:892853abaf8b28ad0852c8514c70882b9321b0a7420773896fff01991d1e4eaa
codeSamplesRevisionDigest: sha256:873751f955e573b508d89e5fb00431536ac123b9fbef4ad9f226452bf46bdb23
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
43 changes: 23 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ def webhook():
* [add_payment_method](docs/sdks/polarcustomers/README.md#add_payment_method) - Add Customer Payment Method
* [confirm_payment_method](docs/sdks/polarcustomers/README.md#confirm_payment_method) - Confirm Customer Payment Method
* [delete_payment_method](docs/sdks/polarcustomers/README.md#delete_payment_method) - Delete Customer Payment Method
* [request_email_update](docs/sdks/polarcustomers/README.md#request_email_update) - Request Email Change
* [check_email_update](docs/sdks/polarcustomers/README.md#check_email_update) - Check Email Change Token
* [verify_email_update](docs/sdks/polarcustomers/README.md#verify_email_update) - Verify Email Change

#### [customer_portal.downloadables](docs/sdks/downloadables/README.md)

Expand Down Expand Up @@ -596,26 +599,26 @@ with Polar(


**Inherit from [`PolarError`](./src/polar_sdk/models/polarerror.py)**:
* [`ResourceNotFound`](./src/polar_sdk/models/resourcenotfound.py): Status code `404`. Applicable to 85 of 178 methods.*
* [`NotPermitted`](./src/polar_sdk/models/notpermitted.py): Status code `403`. Applicable to 10 of 178 methods.*
* [`Unauthorized`](./src/polar_sdk/models/unauthorized.py): Not authorized to manage license key. Status code `401`. Applicable to 5 of 178 methods.*
* [`AlreadyCanceledSubscription`](./src/polar_sdk/models/alreadycanceledsubscription.py): Status code `403`. Applicable to 4 of 178 methods.*
* [`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 178 methods.*
* [`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 178 methods.*
* [`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 178 methods.*
* [`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 178 methods.*
* [`ExpiredCheckoutError`](./src/polar_sdk/models/expiredcheckouterror.py): The checkout session is expired. Status code `410`. Applicable to 3 of 178 methods.*
* [`PaymentFailed`](./src/polar_sdk/models/paymentfailed.py): Payment required to apply the subscription update. Status code `402`. Applicable to 2 of 178 methods.*
* [`SubscriptionLocked`](./src/polar_sdk/models/subscriptionlocked.py): Subscription is pending an update. Status code `409`. Applicable to 2 of 178 methods.*
* [`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 178 methods.*
* [`NotPaidOrder`](./src/polar_sdk/models/notpaidorder.py): Order is not paid or is missing billing name or address. Status code `422`. Applicable to 2 of 178 methods.*
* [`PaymentError`](./src/polar_sdk/models/paymenterror.py): The payment failed. Status code `400`. Applicable to 1 of 178 methods.*
* [`CustomerNotReady`](./src/polar_sdk/models/customernotready.py): Customer is not ready to confirm a payment method. Status code `400`. Applicable to 1 of 178 methods.*
* [`PaymentMethodInUseByActiveSubscription`](./src/polar_sdk/models/paymentmethodinusebyactivesubscription.py): Payment method is used by active subscription(s). Status code `400`. Applicable to 1 of 178 methods.*
* [`RefundedAlready`](./src/polar_sdk/models/refundedalready.py): Order is already fully refunded. Status code `403`. Applicable to 1 of 178 methods.*
* [`PaymentAlreadyInProgress`](./src/polar_sdk/models/paymentalreadyinprogress.py): Payment already in progress. Status code `409`. Applicable to 1 of 178 methods.*
* [`OrderNotEligibleForRetry`](./src/polar_sdk/models/ordernoteligibleforretry.py): Order not eligible for retry or payment confirmation failed. Status code `422`. Applicable to 1 of 178 methods.*
* [`ManualRetryLimitExceeded`](./src/polar_sdk/models/manualretrylimitexceeded.py): Manual retry limit exceeded. Status code `429`. Applicable to 1 of 178 methods.*
* [`ResourceNotFound`](./src/polar_sdk/models/resourcenotfound.py): Status code `404`. Applicable to 85 of 181 methods.*
* [`NotPermitted`](./src/polar_sdk/models/notpermitted.py): Status code `403`. Applicable to 10 of 181 methods.*
* [`Unauthorized`](./src/polar_sdk/models/unauthorized.py): Not authorized to manage license key. Status code `401`. Applicable to 5 of 181 methods.*
* [`AlreadyCanceledSubscription`](./src/polar_sdk/models/alreadycanceledsubscription.py): Status code `403`. Applicable to 4 of 181 methods.*
* [`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 181 methods.*
* [`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 181 methods.*
* [`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 181 methods.*
* [`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 181 methods.*
* [`ExpiredCheckoutError`](./src/polar_sdk/models/expiredcheckouterror.py): The checkout session is expired. Status code `410`. Applicable to 3 of 181 methods.*
* [`PaymentFailed`](./src/polar_sdk/models/paymentfailed.py): Payment required to apply the subscription update. Status code `402`. Applicable to 2 of 181 methods.*
* [`SubscriptionLocked`](./src/polar_sdk/models/subscriptionlocked.py): Subscription is pending an update. Status code `409`. Applicable to 2 of 181 methods.*
* [`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 181 methods.*
* [`NotPaidOrder`](./src/polar_sdk/models/notpaidorder.py): Order is not paid or is missing billing name or address. Status code `422`. Applicable to 2 of 181 methods.*
* [`PaymentError`](./src/polar_sdk/models/paymenterror.py): The payment failed. Status code `400`. Applicable to 1 of 181 methods.*
* [`CustomerNotReady`](./src/polar_sdk/models/customernotready.py): Customer is not ready to confirm a payment method. Status code `400`. Applicable to 1 of 181 methods.*
* [`PaymentMethodInUseByActiveSubscription`](./src/polar_sdk/models/paymentmethodinusebyactivesubscription.py): Payment method is used by active subscription(s). Status code `400`. Applicable to 1 of 181 methods.*
* [`RefundedAlready`](./src/polar_sdk/models/refundedalready.py): Order is already fully refunded. Status code `403`. Applicable to 1 of 181 methods.*
* [`PaymentAlreadyInProgress`](./src/polar_sdk/models/paymentalreadyinprogress.py): Payment already in progress. Status code `409`. Applicable to 1 of 181 methods.*
* [`OrderNotEligibleForRetry`](./src/polar_sdk/models/ordernoteligibleforretry.py): Order not eligible for retry or payment confirmation failed. Status code `422`. Applicable to 1 of 181 methods.*
* [`ManualRetryLimitExceeded`](./src/polar_sdk/models/manualretrylimitexceeded.py): Manual retry limit exceeded. Status code `429`. Applicable to 1 of 181 methods.*
* [`ResponseValidationError`](./src/polar_sdk/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.

</details>
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1103,4 +1103,14 @@ Based on:
### Generated
- [python v0.31.3] .
### Releases
- [PyPI v0.31.3] https://pypi.org/project/polar-sdk/0.31.3 - .
- [PyPI v0.31.3] https://pypi.org/project/polar-sdk/0.31.3 - .

## 2026-04-15 00:29:21
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.648.0 (2.737.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.31.4] .
### Releases
- [PyPI v0.31.4] https://pypi.org/project/polar-sdk/0.31.4 - .
20 changes: 19 additions & 1 deletion codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,24 @@ actions:
- "lang": "python"
"label": "Python (SDK)"
"source": "import polar_sdk\nfrom polar_sdk import Polar\n\n\nwith Polar() as polar:\n\n res = polar.customer_portal.customers.update(security=polar_sdk.CustomerPortalCustomersUpdateSecurity(\n customer_session=\"<YOUR_BEARER_TOKEN_HERE>\",\n ), request={\n \"billing_address\": {\n \"country\": polar_sdk.AddressInputCountryAlpha2Input.US,\n },\n })\n\n # Handle response\n print(res)"
- target: $["paths"]["/v1/customer-portal/customers/me/email-update/check"]["get"]
update:
"x-codeSamples":
- "lang": "python"
"label": "Python (SDK)"
"source": "from polar_sdk import Polar\n\n\nwith Polar() as polar:\n\n polar.customer_portal.customers.check_email_update(token=\"<value>\")\n\n # Use the SDK ..."
- target: $["paths"]["/v1/customer-portal/customers/me/email-update/request"]["post"]
update:
"x-codeSamples":
- "lang": "python"
"label": "Python (SDK)"
"source": "import polar_sdk\nfrom polar_sdk import Polar\n\n\nwith Polar() as polar:\n\n res = polar.customer_portal.customers.request_email_update(security=polar_sdk.CustomerPortalCustomersRequestEmailUpdateSecurity(\n customer_session=\"<YOUR_BEARER_TOKEN_HERE>\",\n ), request={\n \"email\": \"Tommie_Larkin78@gmail.com\",\n })\n\n # Handle response\n print(res)"
- target: $["paths"]["/v1/customer-portal/customers/me/email-update/verify"]["post"]
update:
"x-codeSamples":
- "lang": "python"
"label": "Python (SDK)"
"source": "from polar_sdk import Polar\n\n\nwith Polar() as polar:\n\n res = polar.customer_portal.customers.verify_email_update(request={\n \"token\": \"<value>\",\n })\n\n # Handle response\n print(res)"
- target: $["paths"]["/v1/customer-portal/customers/me/payment-methods"]["get"]
update:
"x-codeSamples":
Expand Down Expand Up @@ -1214,7 +1232,7 @@ actions:
"x-codeSamples":
- "lang": "python"
"label": "Python (SDK)"
"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(\"2026-08-19T15:02:44.139Z\"),\n \"data\": {\n \"created_at\": parse_datetime(\"2026-05-07T21:24:48.059Z\"),\n \"modified_at\": parse_datetime(\"2024-04-15T23: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.NEXT_PERIOD,\n \"allow_customer_updates\": True,\n \"email\": \"Marianne.Haag@yahoo.com\",\n \"website\": None,\n \"socials\": [],\n \"status\": polar_sdk.OrganizationStatus.ONGOING_REVIEW,\n \"details_submitted_at\": parse_datetime(\"2025-06-29T16:05:16.127Z\"),\n \"default_presentment_currency\": \"<value>\",\n \"default_tax_behavior\": polar_sdk.TaxBehaviorOption.EXCLUSIVE,\n \"feature_settings\": {},\n \"subscription_settings\": {\n \"allow_multiple_subscriptions\": True,\n \"proration_behavior\": polar_sdk.ProrationBehavior.PRORATE,\n \"benefit_revocation_grace_period\": 778168,\n \"prevent_trial_abuse\": False,\n \"allow_customer_updates\": True,\n },\n \"notification_settings\": {\n \"new_order\": False,\n \"new_subscription\": True,\n },\n \"customer_email_settings\": {\n \"order_confirmation\": True,\n \"subscription_cancellation\": True,\n \"subscription_confirmation\": False,\n \"subscription_cycled\": True,\n \"subscription_cycled_after_trial\": False,\n \"subscription_past_due\": False,\n \"subscription_renewal_reminder\": True,\n \"subscription_revoked\": True,\n \"subscription_trial_conversion_reminder\": True,\n \"subscription_uncanceled\": False,\n \"subscription_updated\": True,\n },\n \"customer_portal_settings\": {\n \"usage\": {\n \"show\": False,\n },\n \"subscription\": {\n \"update_seats\": False,\n \"update_plan\": False,\n },\n },\n \"account_id\": \"<value>\",\n \"payout_account_id\": \"<value>\",\n },\n })\n\n # Handle response\n print(res)"
"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(\"2026-08-19T15:02:44.139Z\"),\n \"data\": {\n \"created_at\": parse_datetime(\"2026-05-07T21:24:48.059Z\"),\n \"modified_at\": parse_datetime(\"2024-04-15T23: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.NEXT_PERIOD,\n \"allow_customer_updates\": True,\n \"email\": \"Marianne.Haag@yahoo.com\",\n \"website\": None,\n \"socials\": [],\n \"status\": polar_sdk.OrganizationStatus.REVIEW,\n \"details_submitted_at\": parse_datetime(\"2025-06-29T16:05:16.127Z\"),\n \"default_presentment_currency\": \"<value>\",\n \"default_tax_behavior\": polar_sdk.TaxBehaviorOption.EXCLUSIVE,\n \"feature_settings\": {},\n \"subscription_settings\": {\n \"allow_multiple_subscriptions\": True,\n \"proration_behavior\": polar_sdk.ProrationBehavior.PRORATE,\n \"benefit_revocation_grace_period\": 778168,\n \"prevent_trial_abuse\": False,\n \"allow_customer_updates\": True,\n },\n \"notification_settings\": {\n \"new_order\": False,\n \"new_subscription\": True,\n },\n \"customer_email_settings\": {\n \"order_confirmation\": True,\n \"subscription_cancellation\": True,\n \"subscription_confirmation\": False,\n \"subscription_cycled\": True,\n \"subscription_cycled_after_trial\": False,\n \"subscription_past_due\": False,\n \"subscription_renewal_reminder\": True,\n \"subscription_revoked\": True,\n \"subscription_trial_conversion_reminder\": True,\n \"subscription_uncanceled\": False,\n \"subscription_updated\": True,\n },\n \"customer_portal_settings\": {\n \"usage\": {\n \"show\": False,\n },\n \"subscription\": {\n \"update_seats\": False,\n \"update_plan\": False,\n },\n },\n \"account_id\": \"<value>\",\n \"payout_account_id\": \"<value>\",\n },\n })\n\n # Handle response\n print(res)"
- target: $["paths"]["product.created"]["post"]
update:
"x-codeSamples":
Expand Down
8 changes: 8 additions & 0 deletions docs/models/customeremailupdaterequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CustomerEmailUpdateRequest


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `email` | *str* | :heavy_check_mark: | N/A |
8 changes: 8 additions & 0 deletions docs/models/customeremailupdateverifyrequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CustomerEmailUpdateVerifyRequest


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `token` | *str* | :heavy_check_mark: | N/A |
8 changes: 8 additions & 0 deletions docs/models/customeremailupdateverifyresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CustomerEmailUpdateVerifyResponse


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `token` | *str* | :heavy_check_mark: | N/A |
8 changes: 8 additions & 0 deletions docs/models/customerportalcustomerscheckemailupdaterequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CustomerPortalCustomersCheckEmailUpdateRequest


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `token` | *str* | :heavy_check_mark: | N/A |
8 changes: 8 additions & 0 deletions docs/models/customerportalcustomersettings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CustomerPortalCustomerSettings


## Fields

| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `allow_email_change` | *bool* | :heavy_check_mark: | N/A |
Loading