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
184 changes: 140 additions & 44 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ generation:
persistentEdits: {}
versioningStrategy: automatic
python:
version: 0.31.5
version: 0.31.6
additionalDependencies:
dev:
pydantic-ai-slim: ^0.1.0
Expand All @@ -47,6 +47,7 @@ python:
authors:
- Polar
baseErrorName: PolarError
bodyVariantOverloads: false
clientServerStatusCodesAsErrors: true
constFieldCasing: upper
defaultErrorName: SDKError
Expand Down Expand Up @@ -74,14 +75,18 @@ python:
license: ""
maxMethodParams: 100
methodArguments: infer-optional-args
methodTimeoutArgument: timeout-ms
methodTimeoutUnits: milliseconds
moduleName: ""
multipartArrayFormat: legacy
optionalDependencies: {}
outputModelSuffix: output
packageManager: poetry
packageName: polar-sdk
preApplyUnionDiscriminators: false
pytestFilterWarnings: []
pytestTimeout: 0
rawResponseHelpers: false
responseFormat: flat
sseFlatResponse: false
templateVersion: v2
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:71002fcc451a5c21286dce02a4500670f3d77017019bf7fd20a4fd669d20c34c
sourceBlobDigest: sha256:0effc8c2537f9cb96cc364f1b6d6e0eb3997dab0bf4b6803d46cca8099f4aa11
sourceRevisionDigest: sha256:9bf82638b4a1bd46168b32d7c28fa6c95142e1a428dae3caa932f388ec799630
sourceBlobDigest: sha256:d8e44a9267b3bb3f7f7dcc18374219d9b3775f836c290f0081beb1deddc5965e
tags:
- latest
- speakeasy-sdk-regen-1779064662
- speakeasy-sdk-regen-1779324054
- 0.1.0
targets:
polar:
source: Polar-OAS
sourceNamespace: polar-oas
sourceRevisionDigest: sha256:71002fcc451a5c21286dce02a4500670f3d77017019bf7fd20a4fd669d20c34c
sourceBlobDigest: sha256:0effc8c2537f9cb96cc364f1b6d6e0eb3997dab0bf4b6803d46cca8099f4aa11
sourceRevisionDigest: sha256:9bf82638b4a1bd46168b32d7c28fa6c95142e1a428dae3caa932f388ec799630
sourceBlobDigest: sha256:d8e44a9267b3bb3f7f7dcc18374219d9b3775f836c290f0081beb1deddc5965e
codeSamplesNamespace: polar-oas-py-code-samples
codeSamplesRevisionDigest: sha256:32cd60a9a754af414d62c8516a90943306093cf779f184d73635f472848df454
codeSamplesRevisionDigest: sha256:9d8a6f7c0114b24b4558d3fc1b5e7a432ce24ec9c318a0d7f9856445a44d5592
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
69 changes: 38 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = polar.organizations.list(page=1, limit=10)
res = polar.organizations.list_organizations(page=1, limit=10)

while res is not None:
# Handle items
Expand All @@ -143,7 +143,7 @@ async def main():
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = await polar.organizations.list_async(page=1, limit=10)
res = await polar.organizations.list_organizations_async(page=1, limit=10)

while res is not None:
# Handle items
Expand Down Expand Up @@ -444,9 +444,11 @@ of crashing on a `pydantic.ValidationError`.
### [orders](docs/sdks/orders/README.md)

* [list](docs/sdks/orders/README.md#list) - List Orders
* [create](docs/sdks/orders/README.md#create) - Create Order
* [export](docs/sdks/orders/README.md#export) - Export Orders
* [get](docs/sdks/orders/README.md#get) - Get Order
* [update](docs/sdks/orders/README.md#update) - Update Order
* [finalize](docs/sdks/orders/README.md#finalize) - Finalize Order
* [generate_invoice](docs/sdks/orders/README.md#generate_invoice) - Generate Order Invoice
* [invoice](docs/sdks/orders/README.md#invoice) - Get Order Invoice
* [receipt](docs/sdks/orders/README.md#receipt) - Get Order Receipt
Expand All @@ -460,7 +462,7 @@ of crashing on a `pydantic.ValidationError`.

### [organizations](docs/sdks/organizations/README.md)

* [list](docs/sdks/organizations/README.md#list) - List Organizations
* [list_organizations](docs/sdks/organizations/README.md#list_organizations) - List Organizations
* [create](docs/sdks/organizations/README.md#create) - Create Organization
* [get](docs/sdks/organizations/README.md#get) - Get Organization
* [update](docs/sdks/organizations/README.md#update) - Update Organization
Expand Down Expand Up @@ -521,7 +523,7 @@ with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = polar.organizations.list(page=1, limit=10,
res = polar.organizations.list_organizations(page=1, limit=10,
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

while res is not None:
Expand All @@ -542,7 +544,7 @@ with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = polar.organizations.list(page=1, limit=10)
res = polar.organizations.list_organizations(page=1, limit=10)

while res is not None:
# Handle items
Expand Down Expand Up @@ -578,7 +580,7 @@ with Polar(
res = None
try:

res = polar.organizations.list(page=1, limit=10)
res = polar.organizations.list_organizations(page=1, limit=10)

while res is not None:
# Handle items
Expand All @@ -604,7 +606,7 @@ with Polar(
* [`PolarError`](./src/polar_sdk/models/polarerror.py): The base class for HTTP error responses.
* [`HTTPValidationError`](./src/polar_sdk/models/httpvalidationerror.py): Validation Error. Status code `422`. *

<details><summary>Less common errors (25)</summary>
<details><summary>Less common errors (30)</summary>

<br />

Expand All @@ -615,26 +617,31 @@ with Polar(


**Inherit from [`PolarError`](./src/polar_sdk/models/polarerror.py)**:
* [`ResourceNotFound`](./src/polar_sdk/models/resourcenotfound.py): Status code `404`. Applicable to 87 of 183 methods.*
* [`NotPermitted`](./src/polar_sdk/models/notpermitted.py): Status code `403`. Applicable to 10 of 183 methods.*
* [`Unauthorized`](./src/polar_sdk/models/unauthorized.py): Not authorized to manage license key. Status code `401`. Applicable to 5 of 183 methods.*
* [`AlreadyCanceledSubscription`](./src/polar_sdk/models/alreadycanceledsubscription.py): Status code `403`. Applicable to 4 of 183 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 183 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 183 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 183 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 183 methods.*
* [`ExpiredCheckoutError`](./src/polar_sdk/models/expiredcheckouterror.py): The checkout session is expired. Status code `410`. Applicable to 3 of 183 methods.*
* [`PaymentFailed`](./src/polar_sdk/models/paymentfailed.py): Payment required to apply the subscription update. Status code `402`. Applicable to 2 of 183 methods.*
* [`SubscriptionLocked`](./src/polar_sdk/models/subscriptionlocked.py): Subscription is pending an update. Status code `409`. Applicable to 2 of 183 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 183 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 183 methods.*
* [`PaymentError`](./src/polar_sdk/models/paymenterror.py): The payment failed. Status code `400`. Applicable to 1 of 183 methods.*
* [`CustomerNotReady`](./src/polar_sdk/models/customernotready.py): Customer is not ready to confirm a payment method. Status code `400`. Applicable to 1 of 183 methods.*
* [`PaymentMethodInUseByActiveSubscription`](./src/polar_sdk/models/paymentmethodinusebyactivesubscription.py): Payment method is used by active subscription(s). Status code `400`. Applicable to 1 of 183 methods.*
* [`RefundedAlready`](./src/polar_sdk/models/refundedalready.py): Order is already fully refunded. Status code `403`. Applicable to 1 of 183 methods.*
* [`PaymentAlreadyInProgress`](./src/polar_sdk/models/paymentalreadyinprogress.py): Payment already in progress. Status code `409`. Applicable to 1 of 183 methods.*
* [`OrderNotEligibleForRetry`](./src/polar_sdk/models/ordernoteligibleforretry.py): Order not eligible for retry or payment confirmation failed. Status code `422`. Applicable to 1 of 183 methods.*
* [`ManualRetryLimitExceeded`](./src/polar_sdk/models/manualretrylimitexceeded.py): Manual retry limit exceeded. Status code `429`. Applicable to 1 of 183 methods.*
* [`ResourceNotFound`](./src/polar_sdk/models/resourcenotfound.py): Status code `404`. Applicable to 88 of 185 methods.*
* [`NotPermitted`](./src/polar_sdk/models/notpermitted.py): Status code `403`. Applicable to 10 of 185 methods.*
* [`Unauthorized`](./src/polar_sdk/models/unauthorized.py): Not authorized to manage license key. Status code `401`. Applicable to 5 of 185 methods.*
* [`AlreadyCanceledSubscription`](./src/polar_sdk/models/alreadycanceledsubscription.py): Status code `403`. Applicable to 4 of 185 methods.*
* [`PaymentFailed`](./src/polar_sdk/models/paymentfailed.py): Status code `402`. Applicable to 3 of 185 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 185 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 185 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 185 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 185 methods.*
* [`ExpiredCheckoutError`](./src/polar_sdk/models/expiredcheckouterror.py): The checkout session is expired. Status code `410`. Applicable to 3 of 185 methods.*
* [`SubscriptionLocked`](./src/polar_sdk/models/subscriptionlocked.py): Subscription is pending an update. Status code `409`. Applicable to 2 of 185 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 185 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 185 methods.*
* [`PaymentError`](./src/polar_sdk/models/paymenterror.py): The payment failed. Status code `400`. Applicable to 1 of 185 methods.*
* [`PaymentMethodSetupFailed`](./src/polar_sdk/models/paymentmethodsetupfailed.py): The card was declined while setting up the payment method. Status code `400`. Applicable to 1 of 185 methods.*
* [`CustomerNotReady`](./src/polar_sdk/models/customernotready.py): Customer is not ready to confirm a payment method. Status code `400`. Applicable to 1 of 185 methods.*
* [`PaymentMethodInUseByActiveSubscription`](./src/polar_sdk/models/paymentmethodinusebyactivesubscription.py): Payment method is used by active subscription(s). Status code `400`. Applicable to 1 of 185 methods.*
* [`PaymentActionRequired`](./src/polar_sdk/models/paymentactionrequired.py): The charge failed, or requires customer authentication (e.g. a 3DS challenge) that can't be completed off-session. Status code `402`. Applicable to 1 of 185 methods.*
* [`OffSessionChargesNotEnabled`](./src/polar_sdk/models/offsessionchargesnotenabled.py): Off-session charges are not enabled for this organization, or its account can't currently accept payments. Status code `403`. Applicable to 1 of 185 methods.*
* [`OrganizationNotReadyForPayments`](./src/polar_sdk/models/organizationnotreadyforpayments.py): Off-session charges are not enabled for this organization, or its account can't currently accept payments. Status code `403`. Applicable to 1 of 185 methods.*
* [`RefundedAlready`](./src/polar_sdk/models/refundedalready.py): Order is already fully refunded. Status code `403`. Applicable to 1 of 185 methods.*
* [`PaymentAlreadyInProgress`](./src/polar_sdk/models/paymentalreadyinprogress.py): Payment already in progress. Status code `409`. Applicable to 1 of 185 methods.*
* [`OrderNotDraft`](./src/polar_sdk/models/ordernotdraft.py): The order is not in `draft` status. Status code `412`. Applicable to 1 of 185 methods.*
* [`OrderNotEligibleForRetry`](./src/polar_sdk/models/ordernoteligibleforretry.py): Order not eligible for retry or payment confirmation failed. Status code `422`. Applicable to 1 of 185 methods.*
* [`ManualRetryLimitExceeded`](./src/polar_sdk/models/manualretrylimitexceeded.py): Manual retry limit exceeded. Status code `429`. Applicable to 1 of 185 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 Expand Up @@ -665,7 +672,7 @@ with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = polar.organizations.list(page=1, limit=10)
res = polar.organizations.list_organizations(page=1, limit=10)

while res is not None:
# Handle items
Expand All @@ -686,7 +693,7 @@ with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = polar.organizations.list(page=1, limit=10)
res = polar.organizations.list_organizations(page=1, limit=10)

while res is not None:
# Handle items
Expand Down Expand Up @@ -797,7 +804,7 @@ with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = polar.organizations.list(page=1, limit=10)
res = polar.organizations.list_organizations(page=1, limit=10)

while res is not None:
# Handle items
Expand Down Expand Up @@ -886,7 +893,7 @@ with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = polar.organizations.list(page=1, limit=10)
res = polar.organizations.list_organizations(page=1, limit=10)

while res is not None:
# Handle items
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1123,4 +1123,14 @@ Based on:
### Generated
- [python v0.31.5] .
### Releases
- [PyPI v0.31.5] https://pypi.org/project/polar-sdk/0.31.5 - .
- [PyPI v0.31.5] https://pypi.org/project/polar-sdk/0.31.5 - .

## 2026-06-03 00:50:10
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.648.0 (2.737.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.31.6] .
### Releases
- [PyPI v0.31.6] https://pypi.org/project/polar-sdk/0.31.6 - .
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = polar.organizations.list(page=1, limit=10)
res = polar.organizations.list_organizations(page=1, limit=10)

while res is not None:
# Handle items
Expand All @@ -31,7 +31,7 @@ async def main():
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:

res = await polar.organizations.list_async(page=1, limit=10)
res = await polar.organizations.list_organizations_async(page=1, limit=10)

while res is not None:
# Handle items
Expand Down
Loading