diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b1a252d1..8c459641 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: e7042734-e669-4c36-85da-bbb4a7500ac8 management: - docChecksum: 9dd1216e61c45d7d3fbc2c6f1acc192b + docChecksum: 551dbb6df578516bd25860734d4c9b86 docVersion: 0.1.0 speakeasyVersion: 1.648.0 generationVersion: 2.737.0 - releaseVersion: 0.28.1 - configChecksum: 7f8a12c411ad0ef3683cd2f932236539 + releaseVersion: 0.28.2 + configChecksum: adb2c7c8b1b113a8ca5cf628fa8e7007 repoURL: https://github.com/polarsource/polar-python.git installationURL: https://github.com/polarsource/polar-python.git published: true @@ -414,7 +414,6 @@ generatedFiles: - docs/models/customerportalwalletslistsecurity.md - docs/models/customerproduct.md - docs/models/customerproductprices.md - - docs/models/customerscreaterequest.md - docs/models/customersdeleteexternalrequest.md - docs/models/customersdeleterequest.md - docs/models/customerseat.md @@ -1399,7 +1398,6 @@ generatedFiles: - src/polar_sdk/models/customerportalsubscriptionsettings.py - src/polar_sdk/models/customerportalusagesettings.py - src/polar_sdk/models/customerproduct.py - - src/polar_sdk/models/customers_createop.py - src/polar_sdk/models/customers_delete_externalop.py - src/polar_sdk/models/customers_deleteop.py - src/polar_sdk/models/customers_exportop.py @@ -4107,7 +4105,14 @@ examples: application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes Detected:\n* `polar._endpointcheckout_created_post()`: \n * `request.data` **Changed** **Breaking** :warning:\n* `polar._endpointcheckout_updated_post()`: \n * `request.data` **Changed** **Breaking** :warning:\n* `polar._endpointorder_created_post()`: \n * `request.data.platform_fee_currency` **Added** **Breaking** :warning:\n* `polar._endpointorder_updated_post()`: \n * `request.data.platform_fee_currency` **Added** **Breaking** :warning:\n* `polar._endpointorder_paid_post()`: \n * `request.data.platform_fee_currency` **Added** **Breaking** :warning:\n* `polar.events.get()`: `response` **Changed** **Breaking** :warning:\n* `polar.events.list()`: \n * `request.depth` **Added**\n * `response` **Changed** **Breaking** :warning:\n* `polar.customer_portal.subscriptions.update()`: `response` **Changed** **Breaking** :warning:\n* `polar.customer_portal.subscriptions.cancel()`: `response` **Changed** **Breaking** :warning:\n* `polar.customer_portal.subscriptions.get()`: `response` **Changed** **Breaking** :warning:\n* `polar.customer_portal.subscriptions.list()`: `response.items.[]` **Changed** **Breaking** :warning:\n* `polar.customer_portal.organizations.get()`: `response` **Changed** **Breaking** :warning:\n* `polar._endpointorder_refunded_post()`: \n * `request.data.platform_fee_currency` **Added** **Breaking** :warning:\n* `polar._endpointsubscription_created_post()`: \n * `request.data.product.prices.[]` **Changed** **Breaking** :warning:\n* `polar._endpointsubscription_updated_post()`: \n * `request.data.product.prices.[]` **Changed** **Breaking** :warning:\n* `polar._endpointsubscription_active_post()`: \n * `request.data.product.prices.[]` **Changed** **Breaking** :warning:\n* `polar._endpointsubscription_canceled_post()`: \n * `request.data.product.prices.[]` **Changed** **Breaking** :warning:\n* `polar._endpointsubscription_uncanceled_post()`: \n * `request.data.product.prices.[]` **Changed** **Breaking** :warning:\n* `polar._endpointsubscription_revoked_post()`: \n * `request.data.product.prices.[]` **Changed** **Breaking** :warning:\n* `polar._endpointrefund_created_post()`: \n * `request.data.dispute` **Added** **Breaking** :warning:\n* `polar._endpointrefund_updated_post()`: \n * `request.data.dispute` **Added** **Breaking** :warning:\n* `polar._endpointproduct_created_post()`: \n * `request.data.prices.[]` **Changed** **Breaking** :warning:\n* `polar._endpointproduct_updated_post()`: \n * `request.data.prices.[]` **Changed** **Breaking** :warning:\n* `polar._endpointorganization_updated_post()`: \n * `request.data` **Changed** **Breaking** :warning:\n* `polar.customer_portal.orders.update()`: `response.product` **Changed** **Breaking** :warning:\n* `polar.customer_portal.orders.get()`: `response.product` **Changed** **Breaking** :warning:\n* `polar.customer_portal.orders.list()`: `response.items.[].product` **Changed** **Breaking** :warning:\n* `polar.customer_portal.seats.list_claimed_subscriptions()`: `response.[]` **Changed** **Breaking** :warning:\n* `polar.customer_portal.benefit-grants.update()`: `response` **Changed** **Breaking** :warning:\n* `polar.customer_portal.benefit-grants.get()`: `response` **Changed** **Breaking** :warning:\n* `polar.customer_portal.benefit-grants.list()`: \n * `request` **Changed**\n * `response.items.[]` **Changed** **Breaking** :warning:\n* `polar.customers.create()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.members` **Added**\n* `polar.metrics.get()`: \n * `request.metrics` **Added**\n * `response` **Changed** **Breaking** :warning:\n* `polar.checkouts.client_confirm()`: \n * `request.checkout_confirm_stripe.allow_trial` **Added**\n * `response` **Changed** **Breaking** :warning:\n * `error.[trial_already_redeemed]` **Added**\n* `polar.organizations.create()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed**\n* `polar.checkouts.client_update()`: \n * `request.checkout_update_public.allow_trial` **Added**\n * `response` **Changed** **Breaking** :warning:\n * `error.[trial_already_redeemed]` **Added**\n* `polar.organizations.update()`: \n * `request.organization_update` **Changed** **Breaking** :warning:\n * `response` **Changed**\n* `polar.checkouts.client_get()`: `response` **Changed** **Breaking** :warning:\n* `polar.refunds.create()`: \n * `response.dispute` **Added**\n * `error.status[400]` **Removed** **Breaking** :warning:\n* `polar.benefit-grants.list()`: `response.items.[].member_id` **Added**\n* `polar.metrics.limits()`: `response.intervals.hour.min_days` **Added**\n* `polar.subscriptions.update()`: \n * `request.subscription_update.[subscription_update_billing_period]` **Added**\n * `response.product.prices.[]` **Changed**\n* `polar.benefits.list()`: `request` **Changed**\n* `polar.benefits.grants()`: \n * `request.member_id` **Added**\n * `response.items.[].member_id` **Added**\n* `polar.subscriptions.get()`: `response.product.prices.[]` **Changed**\n* `polar.webhooks.list_webhook_deliveries()`: `response.items.[].webhook_event.skipped` **Added**\n* `polar.products.list()`: `response.items.[].prices.[]` **Changed**\n* `polar.products.create()`: `response.prices.[]` **Changed**\n* `polar.products.get()`: `response.prices.[]` **Changed**\n* `polar.products.update()`: `response.prices.[]` **Changed**\n* `polar.products.update_benefits()`: `response.prices.[]` **Changed**\n* `polar.orders.list()`: `response.items.[].platform_fee_currency` **Added**\n* `polar.orders.get()`: `response.platform_fee_currency` **Added**\n* `polar.orders.update()`: `response.platform_fee_currency` **Added**\n* `polar.refunds.list()`: `response.items.[].dispute` **Added**\n* `polar.subscriptions.create()`: `response.product.prices.[]` **Changed**\n* `polar.checkouts.list()`: `response.items.[]` **Changed**\n* `polar.checkouts.create()`: \n * `request` **Changed**\n * `response` **Changed**\n* `polar.checkouts.get()`: `response` **Changed**\n* `polar.checkouts.update()`: \n * `request.checkout_update.allow_trial` **Added**\n * `response` **Changed**\n * `error.[trial_already_redeemed]` **Added**\n* `polar.subscriptions.list()`: \n * `request` **Changed**\n * `response.items.[].product.prices.[]` **Changed**\n* `polar.organizations.get()`: `response` **Changed**\n* `polar.organizations.list()`: `response.items.[]` **Changed**\n* `polar._endpointbenefit_grant_revoked_post()`: \n * `request.data` **Changed**\n* `polar.subscriptions.revoke()`: `response.product.prices.[]` **Changed**\n* `polar.checkout-links.list()`: `response.items.[].products.[].prices.[]` **Changed**\n* `polar.checkout-links.create()`: `response.products.[].prices.[]` **Changed**\n* `polar.checkout-links.get()`: `response.products.[].prices.[]` **Changed**\n* `polar.checkout-links.update()`: `response.products.[].prices.[]` **Changed**\n* `polar.customers.list()`: \n * `request.include_members` **Added**\n * `response.items.[].members` **Added**\n* `polar._endpointbenefit_grant_cycled_post()`: \n * `request.data` **Changed**\n* `polar.customers.get()`: \n * `request.include_members` **Added**\n * `response.members` **Added**\n* `polar.customers.update()`: \n * `request.include_members` **Added**\n * `response.members` **Added**\n* `polar.customers.get_external()`: \n * `request.include_members` **Added**\n * `response.members` **Added**\n* `polar.customers.update_external()`: \n * `request.include_members` **Added**\n * `response.members` **Added**\n* `polar._endpointbenefit_grant_updated_post()`: \n * `request.data` **Changed**\n* `polar._endpointbenefit_grant_created_post()`: \n * `request.data` **Changed**\n* `polar.wallets.top_up()`: **Deleted** **Breaking** :warning:\n* `polar.wallets.get()`: **Deleted** **Breaking** :warning:\n* `polar.wallets.list()`: **Deleted** **Breaking** :warning:\n* `polar.customers.get_balance()`: **Deleted** **Breaking** :warning:\n* `polar.event-types.update()`: **Added**\n* `polar.event-types.list()`: **Added**\n* `polar.members.delete_member()`: **Added**\n* `polar.members.create_member()`: **Added**\n* `polar.members.list_members()`: **Added**\n* `polar.disputes.get()`: **Added**\n* `polar.disputes.list()`: **Added**\n* `polar._endpointsubscription_past_due_post()`: **Added**\n" +releaseNotes: | + ## Python SDK Changes Detected: + * `polar.customers.list()`: `request.include_members` **Removed** **Breaking** :warning: + * `polar.customers.create()`: `request` **Changed** **Breaking** :warning: + * `polar.customers.get()`: `request.include_members` **Removed** **Breaking** :warning: + * `polar.customers.update()`: `request.include_members` **Removed** **Breaking** :warning: + * `polar.customers.get_external()`: `request.include_members` **Removed** **Breaking** :warning: + * `polar.customers.update_external()`: `request.include_members` **Removed** **Breaking** :warning: trackedFiles: .devcontainer/README.md: last_write_checksum: sha1:e2a191a1fa8ceb27387eb32eabf36f7ad16a532c @@ -4855,8 +4860,6 @@ trackedFiles: last_write_checksum: sha1:df0fc2783f26719d0a9aaac552f546c2ddecc9a2 docs/models/customerproductprices.md: last_write_checksum: sha1:a6c8e9f2e2cad0d954e92f791d67bf0722e811c9 - docs/models/customerscreaterequest.md: - last_write_checksum: sha1:33dd07f824f4d99f283db86e95a01294f615fe60 docs/models/customersdeleteexternalrequest.md: last_write_checksum: sha1:2adbb835e220bd7363a847a45c8e20dbd2192163 docs/models/customersdeleterequest.md: @@ -4886,9 +4889,9 @@ trackedFiles: docs/models/customersexportrequest.md: last_write_checksum: sha1:90162c8bb41cad7f971cf918e9ac44b93bfa39a0 docs/models/customersgetexternalrequest.md: - last_write_checksum: sha1:1649c705a96922aee3ce971986ddcd8a2657169d + last_write_checksum: sha1:ee037f03acf251243bb2e5e6b5a2ce11499ebc14 docs/models/customersgetrequest.md: - last_write_checksum: sha1:9b07763f3ca58aa29432078fdf421410855b4185 + last_write_checksum: sha1:584d2e70d07439124a9cad503422b6b85209362c docs/models/customersgetstateexternalrequest.md: last_write_checksum: sha1:e46765ae6b6140cf2b14195a334dcc6c03aada4e docs/models/customersgetstaterequest.md: @@ -4896,7 +4899,7 @@ trackedFiles: docs/models/customerslistqueryparamorganizationidfilter.md: last_write_checksum: sha1:943b8d02cc1e5ae96b73fc1cdb8f7987e2689603 docs/models/customerslistrequest.md: - last_write_checksum: sha1:d0d6973dcf09952e364f70159188a207e20fb93d + last_write_checksum: sha1:170c64fefb80210d20d0baf03184294288f7113e docs/models/customerslistresponse.md: last_write_checksum: sha1:1bd4a389881dabd686b57523ff05032e8f0e8dc6 docs/models/customersortproperty.md: @@ -4940,9 +4943,9 @@ trackedFiles: docs/models/customersubscriptionupdateseats.md: last_write_checksum: sha1:0de805d2e88a1f6ea76ced4d263a768fbdf22b60 docs/models/customersupdateexternalrequest.md: - last_write_checksum: sha1:e2534ae28007211e241ca5392668156a99afe266 + last_write_checksum: sha1:f29681dfb1610d442afb902502eb7daf1b0dd4ef docs/models/customersupdaterequest.md: - last_write_checksum: sha1:e731cd8a0b264fefb522a9a3d723a7acb509e665 + last_write_checksum: sha1:1e071c37ea30d848c52e6d64c6a372d0ca658d6c docs/models/customertaxid.md: last_write_checksum: sha1:cb7c9a256fb019375aabd65ec44a15b7dd239a70 docs/models/customerupdate.md: @@ -6202,7 +6205,7 @@ trackedFiles: docs/models/webhooksubscriptionrevokedpayload.md: last_write_checksum: sha1:cc89a9a7f6da512b0d57e9fea3c98e20dd28e33d docs/models/webhooksubscriptionuncanceledpayload.md: - last_write_checksum: sha1:4c162299feb7ef21a886c16d075dffaf1351a598 + last_write_checksum: sha1:0fb3f671ef29a23a85676de66d73a5a001ee735d docs/models/webhooksubscriptionupdatedpayload.md: last_write_checksum: sha1:d411e9a212190e06378253b215c90285ea91a62c docs/models/webhooksupdatewebhookendpointrequest.md: @@ -6224,7 +6227,7 @@ trackedFiles: docs/sdks/customermeters/README.md: last_write_checksum: sha1:b90c86939a9133539681534059241026b501c783 docs/sdks/customers/README.md: - last_write_checksum: sha1:a96e5221d4b9821a3c642d07cd069000335a5905 + last_write_checksum: sha1:3a2f5a9072c3092d663f3204e8e538d004cf230e docs/sdks/customerseats/README.md: last_write_checksum: sha1:9511d6a050ff7b4b46b039240ad997ed8b290d5f docs/sdks/customersessions/README.md: @@ -6308,7 +6311,7 @@ trackedFiles: src/polar_sdk/_hooks/types.py: last_write_checksum: sha1:a218c66f3e2d1f1b9af54f270472b970b0cc1913 src/polar_sdk/_version.py: - last_write_checksum: sha1:935da146eb1011efb6680088a12973fe4de47514 + last_write_checksum: sha1:329bdf9cbcb61d9866883309af21b518dd3572f9 src/polar_sdk/basesdk.py: last_write_checksum: sha1:b7c864467a5d9cc82d32d648705c6badb19a7706 src/polar_sdk/benefit_grants.py: @@ -6334,7 +6337,7 @@ trackedFiles: src/polar_sdk/customer_sessions.py: last_write_checksum: sha1:407a79bf8b9c09f7a8038cce8c1537b121f9dcb4 src/polar_sdk/customers.py: - last_write_checksum: sha1:5791b874ea05f5285209d208c59d6ebd8cbca0d1 + last_write_checksum: sha1:17a6cd80240d75725a6b276f60af29997d604d2c src/polar_sdk/discounts.py: last_write_checksum: sha1:df3696d6b393495ac58e9fb7c7eb3145b2666dca src/polar_sdk/disputes.py: @@ -6358,7 +6361,7 @@ trackedFiles: src/polar_sdk/metrics_sdk.py: last_write_checksum: sha1:d35cb2e65dcc84d88d36a8f68ccf5a46868aff0f src/polar_sdk/models/__init__.py: - last_write_checksum: sha1:fa5e9a4407069c8e84810bd6743e5dec7930374d + last_write_checksum: sha1:858942b9c50170117eaf43fc821d6833b7ad8139 src/polar_sdk/models/address.py: last_write_checksum: sha1:d0db9f9f7077e8cca27895bdd29e7627fb4c4b53 src/polar_sdk/models/addressdict.py: @@ -6825,8 +6828,6 @@ trackedFiles: last_write_checksum: sha1:f3f7e775c73cffc71eb3ba71b3894693cd106471 src/polar_sdk/models/customerproduct.py: last_write_checksum: sha1:782552ecfcca7bff806ca44106c5cd07310cc6ca - src/polar_sdk/models/customers_createop.py: - last_write_checksum: sha1:27f11dc18c0cb270bc2cdadbc79aa54c4dad0768 src/polar_sdk/models/customers_delete_externalop.py: last_write_checksum: sha1:04f739fbf945e2ec3798e39ca83614debea55a17 src/polar_sdk/models/customers_deleteop.py: @@ -6834,17 +6835,17 @@ trackedFiles: src/polar_sdk/models/customers_exportop.py: last_write_checksum: sha1:e670ae3146bdc5739f8f9d6f7e642e384d02d21f src/polar_sdk/models/customers_get_externalop.py: - last_write_checksum: sha1:00ef2cfb4116ce7ac6e97cba5588598a4370154d + last_write_checksum: sha1:e3d21e1110d8f9d89640789df68383fb59d9c0f3 src/polar_sdk/models/customers_get_state_externalop.py: last_write_checksum: sha1:473a7bf236441048d5585917c562eaa1e9cea516 src/polar_sdk/models/customers_get_stateop.py: last_write_checksum: sha1:7a23d4e641a69d7986f75436633b733d696df829 src/polar_sdk/models/customers_getop.py: - last_write_checksum: sha1:396b96dfda9a242aded6ec90fa35eb2b364bb435 + last_write_checksum: sha1:0722e7b84c12d5bb44ab344f2c48ac30a954eecf src/polar_sdk/models/customers_update_externalop.py: - last_write_checksum: sha1:2eaed32ffc742079a59a627e8facfca303d04a98 + last_write_checksum: sha1:84daeab8661879eb52c85644c7de16c1659b7c11 src/polar_sdk/models/customers_updateop.py: - last_write_checksum: sha1:44b24bf05c58e2d5aea80237bb03eaa367ee17ad + last_write_checksum: sha1:70434f0e5a642b2bb8d66d8557d0e241fd6e03a1 src/polar_sdk/models/customerseat.py: last_write_checksum: sha1:8d4b1c42642883c319866f680589790c0f142119 src/polar_sdk/models/customerseatclaimresponse.py: @@ -7554,7 +7555,7 @@ trackedFiles: src/polar_sdk/models/subscriptions_getop.py: last_write_checksum: sha1:74872cc7de547940f4189bbabea5d8d4803837e1 src/polar_sdk/models/subscriptions_listop.py: - last_write_checksum: sha1:1d904c8cb498190da171707a0aaf1b7c5eb95207 + last_write_checksum: sha1:e26f9d3394489efe93b12b7490b23ffb62ba9705 src/polar_sdk/models/subscriptions_revokeop.py: last_write_checksum: sha1:e1ca41a0bf57c37d748d641ca62cea7b71509537 src/polar_sdk/models/subscriptions_updateop.py: @@ -7698,7 +7699,7 @@ trackedFiles: src/polar_sdk/models/webhooksubscriptionrevokedpayload.py: last_write_checksum: sha1:ed9abf37f53c7d72181d837e667582af62cf5e8a src/polar_sdk/models/webhooksubscriptionuncanceledpayload.py: - last_write_checksum: sha1:1358a06c9f2b2d25ebab9ec5c107574215ee20f8 + last_write_checksum: sha1:ff03d8e8dcdcb054fb44fbf28457803b27ee6470 src/polar_sdk/models/webhooksubscriptionupdatedpayload.py: last_write_checksum: sha1:da9be2657163468252c84bec9edce685bef9d124 src/polar_sdk/models/webtokenrequest.py: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2e5965c3..f58e914b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -28,7 +28,7 @@ generation: skipResponseBodyAssertions: false persistentEdits: {} python: - version: 0.28.1 + version: 0.28.2 additionalDependencies: dev: pydantic-ai-slim: ^0.1.0 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 320377dc..96d80aaf 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,20 +2,20 @@ speakeasyVersion: 1.648.0 sources: Polar-OAS: sourceNamespace: polar-oas - sourceRevisionDigest: sha256:a2296677356336366c4a76503e7e7ba132842f9a48a84c6ed0dbd330f6960c74 - sourceBlobDigest: sha256:16616e0b00982de0e23eafdc326269a13c6a4de07ba55aaf350f4ee2399e6838 + sourceRevisionDigest: sha256:bf819babffe2a37b682a20d0d82a540d39b5f30877626d4a7af6dedbadc7a8f8 + sourceBlobDigest: sha256:40eb54c6f2e7571d4ccad40e2dcfcaa64e4c084abc9b4b01cca7ea0101812361 tags: - latest - - speakeasy-sdk-regen-1762301662 + - speakeasy-sdk-regen-1766276214 - 0.1.0 targets: polar: source: Polar-OAS sourceNamespace: polar-oas - sourceRevisionDigest: sha256:a2296677356336366c4a76503e7e7ba132842f9a48a84c6ed0dbd330f6960c74 - sourceBlobDigest: sha256:16616e0b00982de0e23eafdc326269a13c6a4de07ba55aaf350f4ee2399e6838 + sourceRevisionDigest: sha256:bf819babffe2a37b682a20d0d82a540d39b5f30877626d4a7af6dedbadc7a8f8 + sourceBlobDigest: sha256:40eb54c6f2e7571d4ccad40e2dcfcaa64e4c084abc9b4b01cca7ea0101812361 codeSamplesNamespace: polar-oas-py-code-samples - codeSamplesRevisionDigest: sha256:1d25f2976eec11421b26ed079aebe38d6567c88c58f902fe28444c512fc090f6 + codeSamplesRevisionDigest: sha256:9a85389c4250c2a02c5baf4104bef368482c0ddc8342db51ed4cc4a738c9e060 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index ed40d25b..2f41c4c1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -993,4 +993,14 @@ Based on: ### Generated - [python v0.28.1] . ### Releases -- [PyPI v0.28.1] https://pypi.org/project/polar-sdk/0.28.1 - . \ No newline at end of file +- [PyPI v0.28.1] https://pypi.org/project/polar-sdk/0.28.1 - . + +## 2025-12-26 00:15:34 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.648.0 (2.737.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.28.2] . +### Releases +- [PyPI v0.28.2] https://pypi.org/project/polar-sdk/0.28.2 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index ee3a2520..062c9d26 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -428,13 +428,13 @@ actions: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.list(organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\", include_members=False, page=1, limit=10)\n\n while res is not None:\n # Handle items\n\n res = res.next()" + "source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.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()" - target: $["paths"]["/v1/customers/"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.create(customer_create={\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": polar_sdk.CountryAlpha2Input.US,\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"owner\": {\n \"email\": \"member@example.com\",\n \"name\": \"Jane Doe\",\n \"external_id\": \"usr_1337\",\n },\n }, include_members=False)\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.create(request={\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": polar_sdk.CountryAlpha2Input.US,\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"owner\": {\n \"email\": \"member@example.com\",\n \"name\": \"Jane Doe\",\n \"external_id\": \"usr_1337\",\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["/v1/customers/export"]["get"] update: "x-codeSamples": @@ -452,13 +452,13 @@ actions: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.get_external(external_id=\"\", include_members=False)\n\n # Handle response\n print(res)" + "source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.get_external(external_id=\"\")\n\n # Handle response\n print(res)" - target: $["paths"]["/v1/customers/external/{external_id}"]["patch"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.update_external(external_id=\"\", customer_update_external_id={\n \"email\": \"customer@example.com\",\n \"name\": \"John Doe\",\n \"billing_address\": None,\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n }, include_members=False)\n\n # Handle response\n print(res)" + "source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.update_external(external_id=\"\", customer_update_external_id={\n \"email\": \"customer@example.com\",\n \"name\": \"John Doe\",\n \"billing_address\": None,\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n })\n\n # Handle response\n print(res)" - target: $["paths"]["/v1/customers/external/{external_id}/state"]["get"] update: "x-codeSamples": @@ -476,13 +476,13 @@ actions: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.get(id=\"\", include_members=False)\n\n # Handle response\n print(res)" + "source": "from polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.get(id=\"\")\n\n # Handle response\n print(res)" - target: $["paths"]["/v1/customers/{id}"]["patch"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.update(id=\"\", customer_update={\n \"email\": \"customer@example.com\",\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": polar_sdk.CountryAlpha2Input.US,\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"external_id\": \"usr_1337\",\n }, include_members=False)\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\n\n\nwith Polar(\n access_token=\"\",\n) as polar:\n\n res = polar.customers.update(id=\"\", customer_update={\n \"email\": \"customer@example.com\",\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": polar_sdk.CountryAlpha2Input.US,\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"external_id\": \"usr_1337\",\n })\n\n # Handle response\n print(res)" - target: $["paths"]["/v1/customers/{id}/state"]["get"] update: "x-codeSamples": diff --git a/docs/models/customerscreaterequest.md b/docs/models/customerscreaterequest.md deleted file mode 100644 index bbcd7184..00000000 --- a/docs/models/customerscreaterequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# CustomersCreateRequest - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | -| `customer_create` | [models.CustomerCreate](../models/customercreate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customersgetexternalrequest.md b/docs/models/customersgetexternalrequest.md index f1293772..74d69ba5 100644 --- a/docs/models/customersgetexternalrequest.md +++ b/docs/models/customersgetexternalrequest.md @@ -3,7 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `external_id` | *str* | :heavy_check_mark: | The customer external ID. | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `external_id` | *str* | :heavy_check_mark: | The customer external ID. | \ No newline at end of file diff --git a/docs/models/customersgetrequest.md b/docs/models/customersgetrequest.md index 66926d35..86b26b4f 100644 --- a/docs/models/customersgetrequest.md +++ b/docs/models/customersgetrequest.md @@ -3,7 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The customer ID. | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *str* | :heavy_check_mark: | The customer ID. | \ No newline at end of file diff --git a/docs/models/customerslistrequest.md b/docs/models/customerslistrequest.md index 11495b21..56d986a7 100644 --- a/docs/models/customerslistrequest.md +++ b/docs/models/customerslistrequest.md @@ -8,7 +8,6 @@ | `organization_id` | [OptionalNullable[models.CustomersListQueryParamOrganizationIDFilter]](../models/customerslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | | `email` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by exact email. | | `query` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by name, email, or external ID. | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | | `page` | *Optional[int]* | :heavy_minus_sign: | Page number, defaults to 1. | | `limit` | *Optional[int]* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | | `sorting` | List[[models.CustomerSortProperty](../models/customersortproperty.md)] | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | diff --git a/docs/models/customersupdateexternalrequest.md b/docs/models/customersupdateexternalrequest.md index b5539759..3b75e1e8 100644 --- a/docs/models/customersupdateexternalrequest.md +++ b/docs/models/customersupdateexternalrequest.md @@ -6,5 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `external_id` | *str* | :heavy_check_mark: | The customer external ID. | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | | `customer_update_external_id` | [models.CustomerUpdateExternalID](../models/customerupdateexternalid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customersupdaterequest.md b/docs/models/customersupdaterequest.md index 9c3abefe..ae0e98db 100644 --- a/docs/models/customersupdaterequest.md +++ b/docs/models/customersupdaterequest.md @@ -3,8 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The customer ID. | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | -| `customer_update` | [models.CustomerUpdate](../models/customerupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The customer ID. | +| `customer_update` | [models.CustomerUpdate](../models/customerupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/webhooksubscriptionuncanceledpayload.md b/docs/models/webhooksubscriptionuncanceledpayload.md index f8b86444..00a5f18c 100644 --- a/docs/models/webhooksubscriptionuncanceledpayload.md +++ b/docs/models/webhooksubscriptionuncanceledpayload.md @@ -1,6 +1,10 @@ # WebhookSubscriptionUncanceledPayload -Sent when a subscription is uncanceled. +Sent when a customer revokes a pending cancellation. + +When a customer cancels with "at period end", they retain access until the +subscription would renew. During this time, they can change their mind and +undo the cancellation. This event is triggered when they do so. **Discord & Slack support:** Full diff --git a/docs/sdks/customers/README.md b/docs/sdks/customers/README.md index 31aa4d1a..66a2ef43 100644 --- a/docs/sdks/customers/README.md +++ b/docs/sdks/customers/README.md @@ -34,7 +34,7 @@ with Polar( access_token="", ) as polar: - res = polar.customers.list(organization_id="1dbfc517-0bbf-4301-9ba8-555ca42b9737", include_members=False, page=1, limit=10) + res = polar.customers.list(organization_id="1dbfc517-0bbf-4301-9ba8-555ca42b9737", page=1, limit=10) while res is not None: # Handle items @@ -50,7 +50,6 @@ with Polar( | `organization_id` | [OptionalNullable[models.CustomersListQueryParamOrganizationIDFilter]](../../models/customerslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | | `email` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by exact email. | | `query` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by name, email, or external ID. | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | | `page` | *Optional[int]* | :heavy_minus_sign: | Page number, defaults to 1. | | `limit` | *Optional[int]* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | | `sorting` | List[[models.CustomerSortProperty](../../models/customersortproperty.md)] | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | @@ -86,7 +85,7 @@ with Polar( access_token="", ) as polar: - res = polar.customers.create(customer_create={ + res = polar.customers.create(request={ "external_id": "usr_1337", "email": "customer@example.com", "name": "John Doe", @@ -103,7 +102,7 @@ with Polar( "name": "Jane Doe", "external_id": "usr_1337", }, - }, include_members=False) + }) # Handle response print(res) @@ -114,8 +113,7 @@ with Polar( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `customer_create` | [models.CustomerCreate](../../models/customercreate.md) | :heavy_check_mark: | N/A | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | +| `request` | [models.CustomerCreate](../../models/customercreate.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -188,7 +186,7 @@ with Polar( access_token="", ) as polar: - res = polar.customers.get(id="", include_members=False) + res = polar.customers.get(id="") # Handle response print(res) @@ -200,7 +198,6 @@ with Polar( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | The customer ID. | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -244,7 +241,7 @@ with Polar( "us_ein", ], "external_id": "usr_1337", - }, include_members=False) + }) # Handle response print(res) @@ -257,7 +254,6 @@ with Polar( | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | The customer ID. | | `customer_update` | [models.CustomerUpdate](../../models/customerupdate.md) | :heavy_check_mark: | N/A | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -339,7 +335,7 @@ with Polar( access_token="", ) as polar: - res = polar.customers.get_external(external_id="", include_members=False) + res = polar.customers.get_external(external_id="") # Handle response print(res) @@ -351,7 +347,6 @@ with Polar( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `external_id` | *str* | :heavy_check_mark: | The customer external ID. | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -391,7 +386,7 @@ with Polar( "911144442", "us_ein", ], - }, include_members=False) + }) # Handle response print(res) @@ -404,7 +399,6 @@ with Polar( | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `external_id` | *str* | :heavy_check_mark: | The customer external ID. | | `customer_update_external_id` | [models.CustomerUpdateExternalID](../../models/customerupdateexternalid.md) | :heavy_check_mark: | N/A | -| `include_members` | *Optional[bool]* | :heavy_minus_sign: | Include members in the response. Only populated when set to true. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/pyproject.toml b/pyproject.toml index b88f227b..7cefb1c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "polar-sdk" -version = "0.28.1" +version = "0.28.2" description = "Polar SDK for Python" authors = [{ name = "Polar" },] readme = "README-PYPI.md" diff --git a/src/polar_sdk/_version.py b/src/polar_sdk/_version.py index 37640a70..d1849290 100644 --- a/src/polar_sdk/_version.py +++ b/src/polar_sdk/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "polar-sdk" -__version__: str = "0.28.1" +__version__: str = "0.28.2" __openapi_doc_version__: str = "0.1.0" __gen_version__: str = "2.737.0" -__user_agent__: str = "speakeasy-sdk/python 0.28.1 2.737.0 0.1.0 polar-sdk" +__user_agent__: str = "speakeasy-sdk/python 0.28.2 2.737.0 0.1.0 polar-sdk" try: if __package__ is not None: diff --git a/src/polar_sdk/customers.py b/src/polar_sdk/customers.py index 48a92185..1de2aee2 100644 --- a/src/polar_sdk/customers.py +++ b/src/polar_sdk/customers.py @@ -4,9 +4,9 @@ from jsonpath import JSONPath from polar_sdk import models, utils from polar_sdk._hooks import HookContext -from polar_sdk.types import OptionalNullable, UNSET +from polar_sdk.types import BaseModel, OptionalNullable, UNSET from polar_sdk.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Dict, List, Mapping, Optional, Union +from typing import Any, Dict, List, Mapping, Optional, Union, cast class Customers(BaseSDK): @@ -21,7 +21,6 @@ def list( ] = UNSET, email: OptionalNullable[str] = UNSET, query: OptionalNullable[str] = UNSET, - include_members: Optional[bool] = False, page: Optional[int] = 1, limit: Optional[int] = 10, sorting: OptionalNullable[List[models.CustomerSortProperty]] = UNSET, @@ -45,7 +44,6 @@ def list( :param organization_id: Filter by organization ID. :param email: Filter by exact email. :param query: Filter by name, email, or external ID. - :param include_members: Include members in the response. Only populated when set to true. :param page: Page number, defaults to 1. :param limit: Size of a page, defaults to 10. Maximum is 100. :param sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. @@ -69,7 +67,6 @@ def list( organization_id=organization_id, email=email, query=query, - include_members=include_members, page=page, limit=limit, sorting=sorting, @@ -135,7 +132,6 @@ def next_func() -> Optional[models.CustomersListResponse]: organization_id=organization_id, email=email, query=query, - include_members=include_members, page=next_page, limit=limit, sorting=sorting, @@ -176,7 +172,6 @@ async def list_async( ] = UNSET, email: OptionalNullable[str] = UNSET, query: OptionalNullable[str] = UNSET, - include_members: Optional[bool] = False, page: Optional[int] = 1, limit: Optional[int] = 10, sorting: OptionalNullable[List[models.CustomerSortProperty]] = UNSET, @@ -200,7 +195,6 @@ async def list_async( :param organization_id: Filter by organization ID. :param email: Filter by exact email. :param query: Filter by name, email, or external ID. - :param include_members: Include members in the response. Only populated when set to true. :param page: Page number, defaults to 1. :param limit: Size of a page, defaults to 10. Maximum is 100. :param sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. @@ -224,7 +218,6 @@ async def list_async( organization_id=organization_id, email=email, query=query, - include_members=include_members, page=page, limit=limit, sorting=sorting, @@ -290,7 +283,6 @@ def next_func() -> Optional[models.CustomersListResponse]: organization_id=organization_id, email=email, query=query, - include_members=include_members, page=next_page, limit=limit, sorting=sorting, @@ -323,8 +315,7 @@ def next_func() -> Optional[models.CustomersListResponse]: def create( self, *, - customer_create: Union[models.CustomerCreate, models.CustomerCreateTypedDict], - include_members: Optional[bool] = False, + request: Union[models.CustomerCreate, models.CustomerCreateTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -336,8 +327,7 @@ def create( **Scopes**: `customers:write` - :param customer_create: - :param include_members: Include members in the response. Only populated when set to true. + :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -353,12 +343,9 @@ def create( else: base_url = self._get_url(base_url, url_variables) - request = models.CustomersCreateRequest( - include_members=include_members, - customer_create=utils.get_pydantic_model( - customer_create, models.CustomerCreate - ), - ) + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.CustomerCreate) + request = cast(models.CustomerCreate, request) req = self._build_request( method="POST", @@ -374,7 +361,7 @@ def create( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.customer_create, False, False, "json", models.CustomerCreate + request, False, False, "json", models.CustomerCreate ), timeout_ms=timeout_ms, ) @@ -420,8 +407,7 @@ def create( async def create_async( self, *, - customer_create: Union[models.CustomerCreate, models.CustomerCreateTypedDict], - include_members: Optional[bool] = False, + request: Union[models.CustomerCreate, models.CustomerCreateTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -433,8 +419,7 @@ async def create_async( **Scopes**: `customers:write` - :param customer_create: - :param include_members: Include members in the response. Only populated when set to true. + :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -450,12 +435,9 @@ async def create_async( else: base_url = self._get_url(base_url, url_variables) - request = models.CustomersCreateRequest( - include_members=include_members, - customer_create=utils.get_pydantic_model( - customer_create, models.CustomerCreate - ), - ) + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.CustomerCreate) + request = cast(models.CustomerCreate, request) req = self._build_request_async( method="POST", @@ -471,7 +453,7 @@ async def create_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.customer_create, False, False, "json", models.CustomerCreate + request, False, False, "json", models.CustomerCreate ), timeout_ms=timeout_ms, ) @@ -706,7 +688,6 @@ def get( self, *, id: str, - include_members: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -719,7 +700,6 @@ def get( **Scopes**: `customers:read` `customers:write` :param id: The customer ID. - :param include_members: Include members in the response. Only populated when set to true. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -737,7 +717,6 @@ def get( request = models.CustomersGetRequest( id=id, - include_members=include_members, ) req = self._build_request( @@ -803,7 +782,6 @@ async def get_async( self, *, id: str, - include_members: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -816,7 +794,6 @@ async def get_async( **Scopes**: `customers:read` `customers:write` :param id: The customer ID. - :param include_members: Include members in the response. Only populated when set to true. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -834,7 +811,6 @@ async def get_async( request = models.CustomersGetRequest( id=id, - include_members=include_members, ) req = self._build_request_async( @@ -901,7 +877,6 @@ def update( *, id: str, customer_update: Union[models.CustomerUpdate, models.CustomerUpdateTypedDict], - include_members: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -915,7 +890,6 @@ def update( :param id: The customer ID. :param customer_update: - :param include_members: Include members in the response. Only populated when set to true. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -933,7 +907,6 @@ def update( request = models.CustomersUpdateRequest( id=id, - include_members=include_members, customer_update=utils.get_pydantic_model( customer_update, models.CustomerUpdate ), @@ -1006,7 +979,6 @@ async def update_async( *, id: str, customer_update: Union[models.CustomerUpdate, models.CustomerUpdateTypedDict], - include_members: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1020,7 +992,6 @@ async def update_async( :param id: The customer ID. :param customer_update: - :param include_members: Include members in the response. Only populated when set to true. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1038,7 +1009,6 @@ async def update_async( request = models.CustomersUpdateRequest( id=id, - include_members=include_members, customer_update=utils.get_pydantic_model( customer_update, models.CustomerUpdate ), @@ -1322,7 +1292,6 @@ def get_external( self, *, external_id: str, - include_members: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1335,7 +1304,6 @@ def get_external( **Scopes**: `customers:read` `customers:write` :param external_id: The customer external ID. - :param include_members: Include members in the response. Only populated when set to true. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1353,7 +1321,6 @@ def get_external( request = models.CustomersGetExternalRequest( external_id=external_id, - include_members=include_members, ) req = self._build_request( @@ -1419,7 +1386,6 @@ async def get_external_async( self, *, external_id: str, - include_members: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1432,7 +1398,6 @@ async def get_external_async( **Scopes**: `customers:read` `customers:write` :param external_id: The customer external ID. - :param include_members: Include members in the response. Only populated when set to true. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1450,7 +1415,6 @@ async def get_external_async( request = models.CustomersGetExternalRequest( external_id=external_id, - include_members=include_members, ) req = self._build_request_async( @@ -1519,7 +1483,6 @@ def update_external( customer_update_external_id: Union[ models.CustomerUpdateExternalID, models.CustomerUpdateExternalIDTypedDict ], - include_members: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1533,7 +1496,6 @@ def update_external( :param external_id: The customer external ID. :param customer_update_external_id: - :param include_members: Include members in the response. Only populated when set to true. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1551,7 +1513,6 @@ def update_external( request = models.CustomersUpdateExternalRequest( external_id=external_id, - include_members=include_members, customer_update_external_id=utils.get_pydantic_model( customer_update_external_id, models.CustomerUpdateExternalID ), @@ -1630,7 +1591,6 @@ async def update_external_async( customer_update_external_id: Union[ models.CustomerUpdateExternalID, models.CustomerUpdateExternalIDTypedDict ], - include_members: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1644,7 +1604,6 @@ async def update_external_async( :param external_id: The customer external ID. :param customer_update_external_id: - :param include_members: Include members in the response. Only populated when set to true. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1662,7 +1621,6 @@ async def update_external_async( request = models.CustomersUpdateExternalRequest( external_id=external_id, - include_members=include_members, customer_update_external_id=utils.get_pydantic_model( customer_update_external_id, models.CustomerUpdateExternalID ), diff --git a/src/polar_sdk/models/__init__.py b/src/polar_sdk/models/__init__.py index 2408277c..6f03b68b 100644 --- a/src/polar_sdk/models/__init__.py +++ b/src/polar_sdk/models/__init__.py @@ -1050,10 +1050,6 @@ CustomerProductPricesTypedDict, CustomerProductTypedDict, ) - from .customers_createop import ( - CustomersCreateRequest, - CustomersCreateRequestTypedDict, - ) from .customers_delete_externalop import ( CustomersDeleteExternalRequest, CustomersDeleteExternalRequestTypedDict, @@ -3631,8 +3627,6 @@ "CustomerWithMembersTaxID", "CustomerWithMembersTaxIDTypedDict", "CustomerWithMembersTypedDict", - "CustomersCreateRequest", - "CustomersCreateRequestTypedDict", "CustomersDeleteExternalRequest", "CustomersDeleteExternalRequestTypedDict", "CustomersDeleteRequest", @@ -5453,8 +5447,6 @@ "CustomerProductPrices": ".customerproduct", "CustomerProductPricesTypedDict": ".customerproduct", "CustomerProductTypedDict": ".customerproduct", - "CustomersCreateRequest": ".customers_createop", - "CustomersCreateRequestTypedDict": ".customers_createop", "CustomersDeleteExternalRequest": ".customers_delete_externalop", "CustomersDeleteExternalRequestTypedDict": ".customers_delete_externalop", "CustomersDeleteRequest": ".customers_deleteop", diff --git a/src/polar_sdk/models/customers_createop.py b/src/polar_sdk/models/customers_createop.py deleted file mode 100644 index dbb833e6..00000000 --- a/src/polar_sdk/models/customers_createop.py +++ /dev/null @@ -1,27 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .customercreate import CustomerCreate, CustomerCreateTypedDict -from polar_sdk.types import BaseModel -from polar_sdk.utils import FieldMetadata, QueryParamMetadata, RequestMetadata -from typing import Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class CustomersCreateRequestTypedDict(TypedDict): - customer_create: CustomerCreateTypedDict - include_members: NotRequired[bool] - r"""Include members in the response. Only populated when set to true.""" - - -class CustomersCreateRequest(BaseModel): - customer_create: Annotated[ - CustomerCreate, - FieldMetadata(request=RequestMetadata(media_type="application/json")), - ] - - include_members: Annotated[ - Optional[bool], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False - r"""Include members in the response. Only populated when set to true.""" diff --git a/src/polar_sdk/models/customers_get_externalop.py b/src/polar_sdk/models/customers_get_externalop.py index 0385281f..4581808f 100644 --- a/src/polar_sdk/models/customers_get_externalop.py +++ b/src/polar_sdk/models/customers_get_externalop.py @@ -2,16 +2,13 @@ from __future__ import annotations from polar_sdk.types import BaseModel -from polar_sdk.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata -from typing import Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from polar_sdk.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict class CustomersGetExternalRequestTypedDict(TypedDict): external_id: str r"""The customer external ID.""" - include_members: NotRequired[bool] - r"""Include members in the response. Only populated when set to true.""" class CustomersGetExternalRequest(BaseModel): @@ -19,9 +16,3 @@ class CustomersGetExternalRequest(BaseModel): str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] r"""The customer external ID.""" - - include_members: Annotated[ - Optional[bool], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False - r"""Include members in the response. Only populated when set to true.""" diff --git a/src/polar_sdk/models/customers_getop.py b/src/polar_sdk/models/customers_getop.py index 1c5173ef..85cc68d2 100644 --- a/src/polar_sdk/models/customers_getop.py +++ b/src/polar_sdk/models/customers_getop.py @@ -2,16 +2,13 @@ from __future__ import annotations from polar_sdk.types import BaseModel -from polar_sdk.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata -from typing import Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from polar_sdk.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict class CustomersGetRequestTypedDict(TypedDict): id: str r"""The customer ID.""" - include_members: NotRequired[bool] - r"""Include members in the response. Only populated when set to true.""" class CustomersGetRequest(BaseModel): @@ -19,9 +16,3 @@ class CustomersGetRequest(BaseModel): str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] r"""The customer ID.""" - - include_members: Annotated[ - Optional[bool], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False - r"""Include members in the response. Only populated when set to true.""" diff --git a/src/polar_sdk/models/customers_update_externalop.py b/src/polar_sdk/models/customers_update_externalop.py index b80db210..4ad51505 100644 --- a/src/polar_sdk/models/customers_update_externalop.py +++ b/src/polar_sdk/models/customers_update_externalop.py @@ -6,22 +6,14 @@ CustomerUpdateExternalIDTypedDict, ) from polar_sdk.types import BaseModel -from polar_sdk.utils import ( - FieldMetadata, - PathParamMetadata, - QueryParamMetadata, - RequestMetadata, -) -from typing import Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from polar_sdk.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict class CustomersUpdateExternalRequestTypedDict(TypedDict): external_id: str r"""The customer external ID.""" customer_update_external_id: CustomerUpdateExternalIDTypedDict - include_members: NotRequired[bool] - r"""Include members in the response. Only populated when set to true.""" class CustomersUpdateExternalRequest(BaseModel): @@ -34,9 +26,3 @@ class CustomersUpdateExternalRequest(BaseModel): CustomerUpdateExternalID, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] - - include_members: Annotated[ - Optional[bool], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False - r"""Include members in the response. Only populated when set to true.""" diff --git a/src/polar_sdk/models/customers_updateop.py b/src/polar_sdk/models/customers_updateop.py index 6632a3fe..4e572d22 100644 --- a/src/polar_sdk/models/customers_updateop.py +++ b/src/polar_sdk/models/customers_updateop.py @@ -3,22 +3,14 @@ from __future__ import annotations from .customerupdate import CustomerUpdate, CustomerUpdateTypedDict from polar_sdk.types import BaseModel -from polar_sdk.utils import ( - FieldMetadata, - PathParamMetadata, - QueryParamMetadata, - RequestMetadata, -) -from typing import Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from polar_sdk.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict class CustomersUpdateRequestTypedDict(TypedDict): id: str r"""The customer ID.""" customer_update: CustomerUpdateTypedDict - include_members: NotRequired[bool] - r"""Include members in the response. Only populated when set to true.""" class CustomersUpdateRequest(BaseModel): @@ -31,9 +23,3 @@ class CustomersUpdateRequest(BaseModel): CustomerUpdate, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] - - include_members: Annotated[ - Optional[bool], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False - r"""Include members in the response. Only populated when set to true.""" diff --git a/src/polar_sdk/models/subscriptions_listop.py b/src/polar_sdk/models/subscriptions_listop.py index 3a90a5bd..d58993b6 100644 --- a/src/polar_sdk/models/subscriptions_listop.py +++ b/src/polar_sdk/models/subscriptions_listop.py @@ -852,8 +852,6 @@ class CustomersListRequestTypedDict(TypedDict): r"""Filter by exact email.""" query: NotRequired[Nullable[str]] r"""Filter by name, email, or external ID.""" - include_members: NotRequired[bool] - r"""Include members in the response. Only populated when set to true.""" page: NotRequired[int] r"""Page number, defaults to 1.""" limit: NotRequired[int] @@ -883,12 +881,6 @@ class CustomersListRequest(BaseModel): ] = UNSET r"""Filter by name, email, or external ID.""" - include_members: Annotated[ - Optional[bool], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False - r"""Include members in the response. Only populated when set to true.""" - page: Annotated[ Optional[int], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -919,7 +911,6 @@ def serialize_model(self, handler): "organization_id", "email", "query", - "include_members", "page", "limit", "sorting", diff --git a/src/polar_sdk/models/webhooksubscriptionuncanceledpayload.py b/src/polar_sdk/models/webhooksubscriptionuncanceledpayload.py index 5cd763d5..d6c2d3fc 100644 --- a/src/polar_sdk/models/webhooksubscriptionuncanceledpayload.py +++ b/src/polar_sdk/models/webhooksubscriptionuncanceledpayload.py @@ -12,7 +12,11 @@ class WebhookSubscriptionUncanceledPayloadTypedDict(TypedDict): - r"""Sent when a subscription is uncanceled. + r"""Sent when a customer revokes a pending cancellation. + + When a customer cancels with \"at period end\", they retain access until the + subscription would renew. During this time, they can change their mind and + undo the cancellation. This event is triggered when they do so. **Discord & Slack support:** Full """ @@ -23,7 +27,11 @@ class WebhookSubscriptionUncanceledPayloadTypedDict(TypedDict): class WebhookSubscriptionUncanceledPayload(BaseModel): - r"""Sent when a subscription is uncanceled. + r"""Sent when a customer revokes a pending cancellation. + + When a customer cancels with \"at period end\", they retain access until the + subscription would renew. During this time, they can change their mind and + undo the cancellation. This event is triggered when they do so. **Discord & Slack support:** Full """