Skip to content

Commit 0c0ce5d

Browse files
speakeasybotfrankie567
authored andcommitted
## Python SDK Changes Detected:
* `polar.events.list()`: `response.[list_resource_event_].items.[].[system_event]` **Changed** **Breaking** ⚠️ * `polar.events.get()`: `response.[system_event]` **Changed** **Breaking** ⚠️ * `polar.metrics.list_dashboards()`: **Added** * `polar.metrics.create_dashboard()`: **Added** * `polar.metrics.get_dashboard()`: **Added** * `polar.metrics.update_dashboard()`: **Added** * `polar.metrics.delete_dashboard()`: **Added** * `polar.subscriptions.list()`: `request` **Changed** * `polar.payments.list()`: `response.items.[]` **Changed**
1 parent 3edf963 commit 0c0ce5d

52 files changed

Lines changed: 2287 additions & 128 deletions

Some content is hidden

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

.speakeasy/gen.lock

Lines changed: 194 additions & 69 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ generation:
3131
persistentEdits: {}
3232
versioningStrategy: automatic
3333
python:
34-
version: 0.31.0
34+
version: 0.31.1
3535
additionalDependencies:
3636
dev:
3737
pydantic-ai-slim: ^0.1.0

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ speakeasyVersion: 1.648.0
22
sources:
33
Polar-OAS:
44
sourceNamespace: polar-oas
5-
sourceRevisionDigest: sha256:f8709a4eb128eae2205cf1850fcb774e6636048b4118f83edf6e319c86e3a552
6-
sourceBlobDigest: sha256:ee09c80bc23acb7e1dbe17d2e87b0b118445325f0a5138541f39a45f7638fb04
5+
sourceRevisionDigest: sha256:cb1dd23a3e799d0f6bf3cd438b6852cc9ef2efff04bdab18e2ee9e537704730a
6+
sourceBlobDigest: sha256:253455b40f6f46010a798891608324cbb2be43bbe9398b5b709ef569b8ffa24c
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1774543542
9+
- speakeasy-sdk-regen-1774657294
1010
- 0.1.0
1111
targets:
1212
polar:
1313
source: Polar-OAS
1414
sourceNamespace: polar-oas
15-
sourceRevisionDigest: sha256:f8709a4eb128eae2205cf1850fcb774e6636048b4118f83edf6e319c86e3a552
16-
sourceBlobDigest: sha256:ee09c80bc23acb7e1dbe17d2e87b0b118445325f0a5138541f39a45f7638fb04
15+
sourceRevisionDigest: sha256:cb1dd23a3e799d0f6bf3cd438b6852cc9ef2efff04bdab18e2ee9e537704730a
16+
sourceBlobDigest: sha256:253455b40f6f46010a798891608324cbb2be43bbe9398b5b709ef569b8ffa24c
1717
codeSamplesNamespace: polar-oas-py-code-samples
18-
codeSamplesRevisionDigest: sha256:14eeea3aef164d3b51fee6ab9ac4850c1a9a4ec82778fb87aacea7e77ab78c7f
18+
codeSamplesRevisionDigest: sha256:7e59522c8aa334069e79bc56cbf9ff298473ea28826a87200c1f206d825c4f8c
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

README.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@ def webhook():
398398

399399
* [get](docs/sdks/metricssdk/README.md#get) - Get Metrics
400400
* [limits](docs/sdks/metricssdk/README.md#limits) - Get Metrics Limits
401+
* [list_dashboards](docs/sdks/metricssdk/README.md#list_dashboards) - List Metric Dashboards
402+
* [create_dashboard](docs/sdks/metricssdk/README.md#create_dashboard) - Create Metric Dashboard
403+
* [get_dashboard](docs/sdks/metricssdk/README.md#get_dashboard) - Get Metric Dashboard
404+
* [update_dashboard](docs/sdks/metricssdk/README.md#update_dashboard) - Update Metric Dashboard
405+
* [delete_dashboard](docs/sdks/metricssdk/README.md#delete_dashboard) - Delete Metric Dashboard
401406

402407
### [oauth2](docs/sdks/oauth2/README.md)
403408

@@ -587,25 +592,25 @@ with Polar(
587592

588593

589594
**Inherit from [`PolarError`](./src/polar_sdk/models/polarerror.py)**:
590-
* [`ResourceNotFound`](./src/polar_sdk/models/resourcenotfound.py): Status code `404`. Applicable to 82 of 169 methods.*
591-
* [`NotPermitted`](./src/polar_sdk/models/notpermitted.py): Status code `403`. Applicable to 10 of 169 methods.*
592-
* [`Unauthorized`](./src/polar_sdk/models/unauthorized.py): Not authorized to manage license key. Status code `401`. Applicable to 5 of 169 methods.*
593-
* [`AlreadyCanceledSubscription`](./src/polar_sdk/models/alreadycanceledsubscription.py): Status code `403`. Applicable to 4 of 169 methods.*
594-
* [`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 169 methods.*
595-
* [`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 169 methods.*
596-
* [`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 169 methods.*
597-
* [`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 169 methods.*
598-
* [`ExpiredCheckoutError`](./src/polar_sdk/models/expiredcheckouterror.py): The checkout session is expired. Status code `410`. Applicable to 3 of 169 methods.*
599-
* [`PaymentFailed`](./src/polar_sdk/models/paymentfailed.py): Payment required to apply the subscription update. Status code `402`. Applicable to 2 of 169 methods.*
600-
* [`SubscriptionLocked`](./src/polar_sdk/models/subscriptionlocked.py): Subscription is pending an update. Status code `409`. Applicable to 2 of 169 methods.*
601-
* [`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 169 methods.*
602-
* [`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 169 methods.*
603-
* [`PaymentError`](./src/polar_sdk/models/paymenterror.py): The payment failed. Status code `400`. Applicable to 1 of 169 methods.*
604-
* [`CustomerNotReady`](./src/polar_sdk/models/customernotready.py): Customer is not ready to confirm a payment method. Status code `400`. Applicable to 1 of 169 methods.*
605-
* [`PaymentMethodInUseByActiveSubscription`](./src/polar_sdk/models/paymentmethodinusebyactivesubscription.py): Payment method is used by active subscription(s). Status code `400`. Applicable to 1 of 169 methods.*
606-
* [`RefundedAlready`](./src/polar_sdk/models/refundedalready.py): Order is already fully refunded. Status code `403`. Applicable to 1 of 169 methods.*
607-
* [`PaymentAlreadyInProgress`](./src/polar_sdk/models/paymentalreadyinprogress.py): Payment already in progress. Status code `409`. Applicable to 1 of 169 methods.*
608-
* [`OrderNotEligibleForRetry`](./src/polar_sdk/models/ordernoteligibleforretry.py): Order not eligible for retry or payment confirmation failed. Status code `422`. Applicable to 1 of 169 methods.*
595+
* [`ResourceNotFound`](./src/polar_sdk/models/resourcenotfound.py): Status code `404`. Applicable to 82 of 174 methods.*
596+
* [`NotPermitted`](./src/polar_sdk/models/notpermitted.py): Status code `403`. Applicable to 10 of 174 methods.*
597+
* [`Unauthorized`](./src/polar_sdk/models/unauthorized.py): Not authorized to manage license key. Status code `401`. Applicable to 5 of 174 methods.*
598+
* [`AlreadyCanceledSubscription`](./src/polar_sdk/models/alreadycanceledsubscription.py): Status code `403`. Applicable to 4 of 174 methods.*
599+
* [`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 174 methods.*
600+
* [`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 174 methods.*
601+
* [`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 174 methods.*
602+
* [`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 174 methods.*
603+
* [`ExpiredCheckoutError`](./src/polar_sdk/models/expiredcheckouterror.py): The checkout session is expired. Status code `410`. Applicable to 3 of 174 methods.*
604+
* [`PaymentFailed`](./src/polar_sdk/models/paymentfailed.py): Payment required to apply the subscription update. Status code `402`. Applicable to 2 of 174 methods.*
605+
* [`SubscriptionLocked`](./src/polar_sdk/models/subscriptionlocked.py): Subscription is pending an update. Status code `409`. Applicable to 2 of 174 methods.*
606+
* [`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 174 methods.*
607+
* [`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 174 methods.*
608+
* [`PaymentError`](./src/polar_sdk/models/paymenterror.py): The payment failed. Status code `400`. Applicable to 1 of 174 methods.*
609+
* [`CustomerNotReady`](./src/polar_sdk/models/customernotready.py): Customer is not ready to confirm a payment method. Status code `400`. Applicable to 1 of 174 methods.*
610+
* [`PaymentMethodInUseByActiveSubscription`](./src/polar_sdk/models/paymentmethodinusebyactivesubscription.py): Payment method is used by active subscription(s). Status code `400`. Applicable to 1 of 174 methods.*
611+
* [`RefundedAlready`](./src/polar_sdk/models/refundedalready.py): Order is already fully refunded. Status code `403`. Applicable to 1 of 174 methods.*
612+
* [`PaymentAlreadyInProgress`](./src/polar_sdk/models/paymentalreadyinprogress.py): Payment already in progress. Status code `409`. Applicable to 1 of 174 methods.*
613+
* [`OrderNotEligibleForRetry`](./src/polar_sdk/models/ordernoteligibleforretry.py): Order not eligible for retry or payment confirmation failed. Status code `422`. Applicable to 1 of 174 methods.*
609614
* [`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.
610615

611616
</details>

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,4 +1073,14 @@ Based on:
10731073
### Generated
10741074
- [python v0.31.0] .
10751075
### Releases
1076-
- [PyPI v0.31.0] https://pypi.org/project/polar-sdk/0.31.0 - .
1076+
- [PyPI v0.31.0] https://pypi.org/project/polar-sdk/0.31.0 - .
1077+
1078+
## 2026-04-03 00:23:09
1079+
### Changes
1080+
Based on:
1081+
- OpenAPI Doc
1082+
- Speakeasy CLI 1.648.0 (2.737.0) https://github.com/speakeasy-api/speakeasy
1083+
### Generated
1084+
- [python v0.31.1] .
1085+
### Releases
1086+
- [PyPI v0.31.1] https://pypi.org/project/polar-sdk/0.31.1 - .

codeSamples.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,36 @@ actions:
735735
- "lang": "python"
736736
"label": "Python (SDK)"
737737
"source": "from datetime import date\nimport polar_sdk\nfrom polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n res = polar.metrics.get(start_date=date.fromisoformat(\"2026-03-14\"), end_date=date.fromisoformat(\"2026-03-18\"), interval=polar_sdk.TimeInterval.HOUR, timezone=\"UTC\", organization_id=None)\n\n # Handle response\n print(res)"
738+
- target: $["paths"]["/v1/metrics/dashboards"]["get"]
739+
update:
740+
"x-codeSamples":
741+
- "lang": "python"
742+
"label": "Python (SDK)"
743+
"source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n res = polar.metrics.list_dashboards(organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\")\n\n # Handle response\n print(res)"
744+
- target: $["paths"]["/v1/metrics/dashboards"]["post"]
745+
update:
746+
"x-codeSamples":
747+
- "lang": "python"
748+
"label": "Python (SDK)"
749+
"source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n res = polar.metrics.create_dashboard(request={\n \"name\": \"<value>\",\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n })\n\n # Handle response\n print(res)"
750+
- target: $["paths"]["/v1/metrics/dashboards/{id}"]["delete"]
751+
update:
752+
"x-codeSamples":
753+
- "lang": "python"
754+
"label": "Python (SDK)"
755+
"source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n polar.metrics.delete_dashboard(id=\"<value>\")\n\n # Use the SDK ..."
756+
- target: $["paths"]["/v1/metrics/dashboards/{id}"]["get"]
757+
update:
758+
"x-codeSamples":
759+
- "lang": "python"
760+
"label": "Python (SDK)"
761+
"source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n res = polar.metrics.get_dashboard(id=\"<value>\")\n\n # Handle response\n print(res)"
762+
- target: $["paths"]["/v1/metrics/dashboards/{id}"]["patch"]
763+
update:
764+
"x-codeSamples":
765+
- "lang": "python"
766+
"label": "Python (SDK)"
767+
"source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n) as polar:\n\n res = polar.metrics.update_dashboard(id=\"<value>\", metric_dashboard_update={})\n\n # Handle response\n print(res)"
738768
- target: $["paths"]["/v1/metrics/limits"]["get"]
739769
update:
740770
"x-codeSamples":

docs/models/availablescope.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
| `REFUNDS_WRITE` | refunds:write |
5555
| `PAYMENTS_READ` | payments:read |
5656
| `METRICS_READ` | metrics:read |
57+
| `METRICS_WRITE` | metrics:write |
5758
| `WEBHOOKS_READ` | webhooks:read |
5859
| `WEBHOOKS_WRITE` | webhooks:write |
5960
| `LICENSE_KEYS_READ` | license_keys:read |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# CustomerCancellationReasonFilter
2+
3+
Filter by customer cancellation reason.
4+
5+
6+
## Supported Types
7+
8+
### `models.CustomerCancellationReason`
9+
10+
```python
11+
value: models.CustomerCancellationReason = /* values here */
12+
```
13+
14+
### `List[models.CustomerCancellationReason]`
15+
16+
```python
17+
value: List[models.CustomerCancellationReason] = /* values here */
18+
```
19+

docs/models/customerslistresponse.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description |
7-
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
8-
| `result` | [models.ListResource](../models/listresource.md) | :heavy_check_mark: | N/A |
6+
| Field | Type | Required | Description |
7+
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
8+
| `result` | [models.ListResourceCustomer](../models/listresourcecustomer.md) | :heavy_check_mark: | N/A |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ListResource
1+
# ListResourceCustomer
22

33

44
## Fields

0 commit comments

Comments
 (0)