From 16cda159404b93442f8035e3585f45bcdfd036e9 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 16 Oct 2024 00:13:28 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.418.4 --- .speakeasy/gen.lock | 66 ++++--- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README.md | 1 + RELEASES.md | 12 +- codeSamples.yaml | 6 + docs/models/articlecreate.md | 4 +- docs/models/articlecreatearticlebyline.md | 11 -- docs/models/articlecreatearticlevisibility.md | 10 -- docs/models/articlesexportrequest.md | 8 + docs/models/benefitbase.md | 2 +- docs/models/benefitgrantwebhook.md | 2 +- ...grantwebhookbenefit.md => benefitinput.md} | 2 +- .../benefitscreateresponsebenefitscreate.md | 49 ------ docs/models/benefitsgetresponsebenefitsget.md | 49 ------ .../benefitsupdateresponsebenefitsupdate.md | 49 ------ docs/models/checkoutpublic.md | 4 +- docs/models/interval.md | 2 - docs/models/issue.md | 4 +- docs/models/licensekeyread.md | 1 + docs/models/licensekeyuser.md | 11 ++ docs/models/licensekeywithactivations.md | 1 + docs/models/metric.md | 10 +- docs/models/metricsintervalslimits.md | 10 +- docs/models/metricslimits.md | 2 +- docs/models/metricsresponse.md | 2 +- docs/models/order.md | 1 + docs/models/orderbillingreason.md | 11 ++ docs/models/pledge.md | 6 +- docs/models/polarcheckoutschemascheckout.md | 4 +- .../polarcheckoutschemascheckoutinput.md | 4 +- docs/models/productpricerecurringcustom.md | 2 +- docs/models/productpricerecurringfixed.md | 2 +- .../productpricerecurringfixedcreate.md | 2 +- docs/models/productpricerecurringfree.md | 2 +- .../models/productpricerecurringfreecreate.md | 2 +- docs/models/validatedlicensekey.md | 1 + docs/models/webhookbenefitcreatedpayload.md | 8 +- .../webhookbenefitcreatedpayloadbenefit.md | 47 ----- docs/models/webhookbenefitupdatedpayload.md | 8 +- .../webhookbenefitupdatedpayloadbenefit.md | 47 ----- .../webhooksubscriptionactivepayload.md | 14 ++ .../webhooksubscriptionactivepayloadtype.md | 8 + .../webhooksubscriptioncanceledpayload.md | 14 ++ .../webhooksubscriptioncanceledpayloadtype.md | 8 + .../webhooksubscriptionrevokedpayload.md | 14 ++ .../webhooksubscriptionrevokedpayloadtype.md | 8 + .../webhooksubscriptionupdatedpayload.md | 8 +- docs/sdks/articles/README.md | 40 +++++ docs/sdks/benefits/README.md | 6 +- pyproject.toml | 2 +- src/polar_sdk/_version.py | 2 +- src/polar_sdk/articles.py | 164 ++++++++++++++++++ src/polar_sdk/benefits.py | 36 ++-- src/polar_sdk/models/__init__.py | 83 +++++---- src/polar_sdk/models/articlecreate.py | 30 +--- src/polar_sdk/models/articles_exportop.py | 16 ++ src/polar_sdk/models/benefit.py | 36 ++++ src/polar_sdk/models/benefit_input.py | 36 ++++ src/polar_sdk/models/benefitbase.py | 2 - src/polar_sdk/models/benefitgrantwebhook.py | 37 +--- src/polar_sdk/models/benefits_createop.py | 34 ---- src/polar_sdk/models/benefits_getop.py | 35 ---- src/polar_sdk/models/benefits_updateop.py | 34 ---- src/polar_sdk/models/checkoutpublic.py | 4 - src/polar_sdk/models/interval.py | 12 ++ src/polar_sdk/models/issue.py | 4 - src/polar_sdk/models/licensekeyread.py | 4 + src/polar_sdk/models/licensekeyuser.py | 53 ++++++ .../models/licensekeywithactivations.py | 4 + src/polar_sdk/models/listresource_benefit_.py | 35 +--- src/polar_sdk/models/metric.py | 2 - src/polar_sdk/models/metrics_getop.py | 12 +- .../models/metricsintervalslimits.py | 20 +-- src/polar_sdk/models/metricslimits.py | 4 +- src/polar_sdk/models/metricsresponse.py | 2 - src/polar_sdk/models/order.py | 4 + src/polar_sdk/models/orderbillingreason.py | 11 ++ src/polar_sdk/models/pledge.py | 6 - .../models/polar_checkout_schemas_checkout.py | 8 - .../models/productpricerecurringcustom.py | 2 - .../models/productpricerecurringfixed.py | 2 - .../productpricerecurringfixedcreate.py | 2 - .../models/productpricerecurringfree.py | 2 - .../models/productpricerecurringfreecreate.py | 2 - src/polar_sdk/models/validatedlicensekey.py | 4 + .../models/webhookbenefitcreatedpayload.py | 38 +--- .../models/webhookbenefitupdatedpayload.py | 38 +--- .../webhooksubscriptionactivepayload.py | 45 +++++ .../webhooksubscriptioncanceledpayload.py | 47 +++++ .../webhooksubscriptionrevokedpayload.py | 47 +++++ .../webhooksubscriptionupdatedpayload.py | 16 +- src/polar_sdk/sdkconfiguration.py | 6 +- 93 files changed, 839 insertions(+), 741 deletions(-) delete mode 100644 docs/models/articlecreatearticlebyline.md delete mode 100644 docs/models/articlecreatearticlevisibility.md create mode 100644 docs/models/articlesexportrequest.md rename docs/models/{benefitgrantwebhookbenefit.md => benefitinput.md} (96%) delete mode 100644 docs/models/benefitscreateresponsebenefitscreate.md delete mode 100644 docs/models/benefitsgetresponsebenefitsget.md delete mode 100644 docs/models/benefitsupdateresponsebenefitsupdate.md create mode 100644 docs/models/licensekeyuser.md create mode 100644 docs/models/orderbillingreason.md delete mode 100644 docs/models/webhookbenefitcreatedpayloadbenefit.md delete mode 100644 docs/models/webhookbenefitupdatedpayloadbenefit.md create mode 100644 docs/models/webhooksubscriptionactivepayload.md create mode 100644 docs/models/webhooksubscriptionactivepayloadtype.md create mode 100644 docs/models/webhooksubscriptioncanceledpayload.md create mode 100644 docs/models/webhooksubscriptioncanceledpayloadtype.md create mode 100644 docs/models/webhooksubscriptionrevokedpayload.md create mode 100644 docs/models/webhooksubscriptionrevokedpayloadtype.md create mode 100644 src/polar_sdk/models/articles_exportop.py create mode 100644 src/polar_sdk/models/benefit.py create mode 100644 src/polar_sdk/models/benefit_input.py create mode 100644 src/polar_sdk/models/interval.py create mode 100644 src/polar_sdk/models/licensekeyuser.py create mode 100644 src/polar_sdk/models/orderbillingreason.py create mode 100644 src/polar_sdk/models/webhooksubscriptionactivepayload.py create mode 100644 src/polar_sdk/models/webhooksubscriptioncanceledpayload.py create mode 100644 src/polar_sdk/models/webhooksubscriptionrevokedpayload.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index eebf7ea..7ed6016 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: 9f84f5107633874d45ee97fcd4c24b5f + docChecksum: 13369c01355ded9eb4ea3731b08266ed docVersion: 0.1.0 - speakeasyVersion: 1.414.1 - generationVersion: 2.437.1 - releaseVersion: 0.6.0 - configChecksum: 6a4dd2bf814de0be56e424abe3d39a74 + speakeasyVersion: 1.418.4 + generationVersion: 2.438.3 + releaseVersion: 0.6.1 + configChecksum: 15edf8d135256170dc4be09de3152847 repoURL: https://github.com/polarsource/polar-python.git installationURL: https://github.com/polarsource/polar-python.git published: true @@ -60,11 +60,10 @@ generatedFiles: - docs/models/article.md - docs/models/articlebyline.md - docs/models/articlecreate.md - - docs/models/articlecreatearticlebyline.md - - docs/models/articlecreatearticlevisibility.md - docs/models/articlepreview.md - docs/models/articlereceivers.md - docs/models/articlesdeleterequest.md + - docs/models/articlesexportrequest.md - docs/models/articlesgetrequest.md - docs/models/articleslistqueryparamorganizationidfilter.md - docs/models/articleslistrequest.md @@ -157,9 +156,9 @@ generatedFiles: - docs/models/benefitgrantlicensekeysproperties.md - docs/models/benefitgrantsubscriber.md - docs/models/benefitgrantwebhook.md - - docs/models/benefitgrantwebhookbenefit.md - docs/models/benefitgrantwebhookproperties.md - docs/models/benefitidfilter.md + - docs/models/benefitinput.md - docs/models/benefitlicensekeyactivationproperties.md - docs/models/benefitlicensekeyexpirationproperties.md - docs/models/benefitlicensekeys.md @@ -174,10 +173,8 @@ generatedFiles: - docs/models/benefitlicensekeysupdate.md - docs/models/benefitlicensekeysupdatetype.md - docs/models/benefitscreatebenefitcreate.md - - docs/models/benefitscreateresponsebenefitscreate.md - docs/models/benefitsdeleterequest.md - docs/models/benefitsgetrequest.md - - docs/models/benefitsgetresponsebenefitsget.md - docs/models/benefitsgrantsrequest.md - docs/models/benefitsgrantsresponse.md - docs/models/benefitslistqueryparamorganizationidfilter.md @@ -186,7 +183,6 @@ generatedFiles: - docs/models/benefitsmodel.md - docs/models/benefitsupdatebenefitupdate.md - docs/models/benefitsupdaterequest.md - - docs/models/benefitsupdateresponsebenefitsupdate.md - docs/models/benefittype.md - docs/models/benefittypefilter.md - docs/models/bylineprofile.md @@ -266,6 +262,7 @@ generatedFiles: - docs/models/licensekeystatus.md - docs/models/licensekeysupdaterequest.md - docs/models/licensekeyupdate.md + - docs/models/licensekeyuser.md - docs/models/licensekeyvalidate.md - docs/models/licensekeywithactivations.md - docs/models/listresourcearticle.md @@ -325,6 +322,7 @@ generatedFiles: - docs/models/onev11oauth21tokenpostxcomponentsrefreshtokenrequest.md - docs/models/onev11oauth21tokenpostxcomponentsrefreshtokenrequestgranttype.md - docs/models/order.md + - docs/models/orderbillingreason.md - docs/models/orderidfilter.md - docs/models/orderinvoice.md - docs/models/orderproduct.md @@ -538,7 +536,6 @@ generatedFiles: - docs/models/validatedlicensekey.md - docs/models/validationerror.md - docs/models/webhookbenefitcreatedpayload.md - - docs/models/webhookbenefitcreatedpayloadbenefit.md - docs/models/webhookbenefitcreatedpayloadtype.md - docs/models/webhookbenefitgrantcreatedpayload.md - docs/models/webhookbenefitgrantcreatedpayloadtype.md @@ -547,7 +544,6 @@ generatedFiles: - docs/models/webhookbenefitgrantupdatedpayload.md - docs/models/webhookbenefitgrantupdatedpayloadtype.md - docs/models/webhookbenefitupdatedpayload.md - - docs/models/webhookbenefitupdatedpayloadbenefit.md - docs/models/webhookbenefitupdatedpayloadtype.md - docs/models/webhookcheckoutcreatedpayload.md - docs/models/webhookcheckoutcreatedpayloadtype.md @@ -567,8 +563,14 @@ generatedFiles: - docs/models/webhookproductcreatedpayloadtype.md - docs/models/webhookproductupdatedpayload.md - docs/models/webhookproductupdatedpayloadtype.md + - docs/models/webhooksubscriptionactivepayload.md + - docs/models/webhooksubscriptionactivepayloadtype.md + - docs/models/webhooksubscriptioncanceledpayload.md + - docs/models/webhooksubscriptioncanceledpayloadtype.md - docs/models/webhooksubscriptioncreatedpayload.md - docs/models/webhooksubscriptioncreatedpayloadtype.md + - docs/models/webhooksubscriptionrevokedpayload.md + - docs/models/webhooksubscriptionrevokedpayloadtype.md - docs/models/webhooksubscriptionupdatedpayload.md - docs/models/webhooksubscriptionupdatedpayloadtype.md - docs/sdks/advertisements/README.md @@ -634,6 +636,7 @@ generatedFiles: - src/polar_sdk/models/articlepreview.py - src/polar_sdk/models/articlereceivers.py - src/polar_sdk/models/articles_deleteop.py + - src/polar_sdk/models/articles_exportop.py - src/polar_sdk/models/articles_getop.py - src/polar_sdk/models/articles_listop.py - src/polar_sdk/models/articles_previewop.py @@ -644,6 +647,8 @@ generatedFiles: - src/polar_sdk/models/articlevisibility.py - src/polar_sdk/models/assignee.py - src/polar_sdk/models/author.py + - src/polar_sdk/models/benefit.py + - src/polar_sdk/models/benefit_input.py - src/polar_sdk/models/benefitads.py - src/polar_sdk/models/benefitadscreate.py - src/polar_sdk/models/benefitadsproperties.py @@ -751,6 +756,7 @@ generatedFiles: - src/polar_sdk/models/fileuploadcompleted.py - src/polar_sdk/models/funding.py - src/polar_sdk/models/httpvalidationerror.py + - src/polar_sdk/models/interval.py - src/polar_sdk/models/introspecttokenresponse.py - src/polar_sdk/models/issue.py - src/polar_sdk/models/label.py @@ -765,6 +771,7 @@ generatedFiles: - src/polar_sdk/models/licensekeyread.py - src/polar_sdk/models/licensekeystatus.py - src/polar_sdk/models/licensekeyupdate.py + - src/polar_sdk/models/licensekeyuser.py - src/polar_sdk/models/licensekeyvalidate.py - src/polar_sdk/models/licensekeywithactivations.py - src/polar_sdk/models/listresource_article_.py @@ -809,6 +816,7 @@ generatedFiles: - src/polar_sdk/models/onev1_1oauth2_1token_post_x_components_authorizationcodetokenrequest.py - src/polar_sdk/models/onev1_1oauth2_1token_post_x_components_refreshtokenrequest.py - src/polar_sdk/models/order.py + - src/polar_sdk/models/orderbillingreason.py - src/polar_sdk/models/orderinvoice.py - src/polar_sdk/models/orderproduct.py - src/polar_sdk/models/orders_getop.py @@ -950,7 +958,10 @@ generatedFiles: - src/polar_sdk/models/webhookpledgeupdatedpayload.py - src/polar_sdk/models/webhookproductcreatedpayload.py - src/polar_sdk/models/webhookproductupdatedpayload.py + - src/polar_sdk/models/webhooksubscriptionactivepayload.py + - src/polar_sdk/models/webhooksubscriptioncanceledpayload.py - src/polar_sdk/models/webhooksubscriptioncreatedpayload.py + - src/polar_sdk/models/webhooksubscriptionrevokedpayload.py - src/polar_sdk/models/webhooksubscriptionupdatedpayload.py - src/polar_sdk/oauth2.py - src/polar_sdk/orders.py @@ -1177,7 +1188,7 @@ examples: id: "" responses: "200": - application/json: {"id": "", "organization_id": "", "user_id": "", "benefit_id": "", "key": "", "display_key": "", "status": "disabled", "limit_activations": 90065, "usage": 558834, "limit_usage": 844199, "validations": 544221, "last_validated_at": "2024-06-29T09:01:50.308Z", "expires_at": "2023-07-26T06:33:15.886Z", "activations": []} + application/json: {"id": "", "organization_id": "", "user_id": "", "user": {"id": "", "public_name": "", "email": "Keeley_Lebsack@hotmail.com", "avatar_url": "https://earnest-tuber.info/"}, "benefit_id": "", "key": "", "display_key": "", "status": "disabled", "limit_activations": 90065, "usage": 558834, "limit_usage": 844199, "validations": 544221, "last_validated_at": "2024-06-29T09:01:50.308Z", "expires_at": "2023-07-26T06:33:15.886Z", "activations": []} "401": application/json: {"detail": ""} "404": @@ -1189,7 +1200,7 @@ examples: application/json: {"key": "", "organization_id": ""} responses: "200": - application/json: {"id": "", "organization_id": "", "user_id": "", "benefit_id": "", "key": "", "display_key": "", "status": "disabled", "limit_activations": 139635, "usage": 198036, "limit_usage": 824288, "validations": 220910, "last_validated_at": "2022-11-13T06:07:19.362Z", "expires_at": "2022-09-25T18:32:26.136Z"} + application/json: {"id": "", "organization_id": "", "user_id": "", "user": {"id": "", "public_name": "", "email": "Clotilde.Frami@hotmail.com", "avatar_url": "https://aged-soliloquy.info/"}, "benefit_id": "", "key": "", "display_key": "", "status": "disabled", "limit_activations": 139635, "usage": 198036, "limit_usage": 824288, "validations": 220910, "last_validated_at": "2022-11-13T06:07:19.362Z", "expires_at": "2022-09-25T18:32:26.136Z"} "404": application/json: {"detail": ""} "422": {} @@ -1199,7 +1210,7 @@ examples: application/json: {"key": "", "organization_id": "", "label": ""} responses: "200": - application/json: {"id": "", "license_key_id": "", "label": "", "created_at": "2023-08-13T13:11:06.618Z", "modified_at": "2023-03-21T09:42:16.177Z", "license_key": {"id": "", "organization_id": "", "user_id": "", "benefit_id": "", "key": "", "display_key": "", "status": "granted", "limit_activations": 95145, "usage": 923318, "limit_usage": 246615, "validations": 548731, "last_validated_at": "2023-03-31T03:55:03.497Z", "expires_at": "2024-06-27T10:16:03.791Z"}} + application/json: {"id": "", "license_key_id": "", "label": "", "created_at": "2023-08-13T13:11:06.618Z", "modified_at": "2023-03-21T09:42:16.177Z", "license_key": {"id": "", "organization_id": "", "user_id": "", "user": {"id": "", "public_name": "", "email": "Clemens_Lowe80@yahoo.com", "avatar_url": "https://pushy-impostor.org/"}, "benefit_id": "", "key": "", "display_key": "", "status": "granted", "limit_activations": 95145, "usage": 923318, "limit_usage": 246615, "validations": 548731, "last_validated_at": "2023-03-31T03:55:03.497Z", "expires_at": "2024-06-27T10:16:03.791Z"}} "403": application/json: {"detail": ""} "404": @@ -1617,7 +1628,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "metadata": {"key": "", "key1": ""}, "amount": 558834, "tax_amount": 844199, "currency": "Ouguiya", "user_id": "", "product_id": "", "product_price_id": "", "subscription_id": "", "checkout_id": "", "user": {"id": "", "email": "Jovanny_Block45@hotmail.com", "public_name": "", "github_username": "", "avatar_url": ""}, "product": {"created_at": "2024-03-16T20:58:20.526Z", "modified_at": "2023-05-10T02:28:23.859Z", "id": "", "name": "", "description": "Inverse demand-driven superstructure", "is_recurring": true, "is_archived": true, "organization_id": ""}, "product_price": {"created_at": "2023-07-26T06:33:15.810Z", "modified_at": "2024-11-29T01:50:48.954Z", "id": "", "is_archived": true, "price_currency": "", "minimum_amount": 450824, "maximum_amount": 262795, "preset_amount": 213457}, "subscription": {"metadata": {"key": "", "key1": "", "key2": ""}, "created_at": "2024-12-06T14:08:11.458Z", "modified_at": "2022-08-30T01:43:46.083Z", "id": "", "amount": 521235, "currency": "Bulgarian Lev", "recurring_interval": "year", "status": "trialing", "current_period_start": "2022-12-10T13:21:21.114Z", "current_period_end": "2023-09-21T05:37:11.740Z", "cancel_at_period_end": true, "started_at": "2023-01-14T09:14:56.629Z", "ended_at": "2023-08-29T15:06:35.313Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": ""}} + application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "metadata": {"key": "", "key1": ""}, "amount": 558834, "tax_amount": 844199, "currency": "Ouguiya", "billing_reason": "subscription_cycle", "user_id": "", "product_id": "", "product_price_id": "", "subscription_id": "", "checkout_id": "", "user": {"id": "", "email": "Jovanny_Block45@hotmail.com", "public_name": "", "github_username": "", "avatar_url": ""}, "product": {"created_at": "2024-03-16T20:58:20.526Z", "modified_at": "2023-05-10T02:28:23.859Z", "id": "", "name": "", "description": "Inverse demand-driven superstructure", "is_recurring": true, "is_archived": true, "organization_id": ""}, "product_price": {"created_at": "2023-07-26T06:33:15.810Z", "modified_at": "2024-11-29T01:50:48.954Z", "id": "", "is_archived": true, "price_currency": "", "minimum_amount": 450824, "maximum_amount": 262795, "preset_amount": 213457}, "subscription": {"metadata": {"key": "", "key1": "", "key2": ""}, "created_at": "2024-12-06T14:08:11.458Z", "modified_at": "2022-08-30T01:43:46.083Z", "id": "", "amount": 521235, "currency": "Bulgarian Lev", "recurring_interval": "year", "status": "trialing", "current_period_start": "2022-12-10T13:21:21.114Z", "current_period_end": "2023-09-21T05:37:11.740Z", "cancel_at_period_end": true, "started_at": "2023-01-14T09:14:56.629Z", "ended_at": "2023-08-29T15:06:35.313Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": ""}} "404": application/json: {"detail": ""} "422": {} @@ -1727,7 +1738,7 @@ examples: id: "" responses: "200": - application/json: {"id": "", "organization_id": "", "user_id": "", "benefit_id": "", "key": "", "display_key": "", "status": "disabled", "limit_activations": 90065, "usage": 558834, "limit_usage": 844199, "validations": 544221, "last_validated_at": "2024-06-29T09:01:50.308Z", "expires_at": "2023-07-26T06:33:15.886Z", "activations": []} + application/json: {"id": "", "organization_id": "", "user_id": "", "user": {"id": "", "public_name": "", "email": "Keeley_Lebsack@hotmail.com", "avatar_url": "https://earnest-tuber.info/"}, "benefit_id": "", "key": "", "display_key": "", "status": "disabled", "limit_activations": 90065, "usage": 558834, "limit_usage": 844199, "validations": 544221, "last_validated_at": "2024-06-29T09:01:50.308Z", "expires_at": "2023-07-26T06:33:15.886Z", "activations": []} "401": application/json: {"detail": ""} "404": @@ -1740,7 +1751,7 @@ examples: id: "" responses: "200": - application/json: {"id": "", "organization_id": "", "user_id": "", "benefit_id": "", "key": "", "display_key": "", "status": "disabled", "limit_activations": 24555, "usage": 597129, "limit_usage": 15652, "validations": 344620, "last_validated_at": "2024-02-16T11:11:26.963Z", "expires_at": "2024-12-22T15:27:45.933Z"} + application/json: {"id": "", "organization_id": "", "user_id": "", "user": {"id": "", "public_name": "", "email": "Lavern48@hotmail.com", "avatar_url": "https://unlucky-hydrolyze.biz/"}, "benefit_id": "", "key": "", "display_key": "", "status": "disabled", "limit_activations": 24555, "usage": 597129, "limit_usage": 15652, "validations": 344620, "last_validated_at": "2024-02-16T11:11:26.963Z", "expires_at": "2024-12-22T15:27:45.933Z"} "401": application/json: {"detail": ""} "404": @@ -1754,7 +1765,7 @@ examples: activation_id: "" responses: "200": - application/json: {"id": "", "license_key_id": "", "label": "", "created_at": "2023-12-01T08:59:23.884Z", "modified_at": "2024-08-24T19:22:44.851Z", "license_key": {"id": "", "organization_id": "", "user_id": "", "benefit_id": "", "key": "", "display_key": "", "status": "revoked", "limit_activations": 291118, "usage": 806587, "limit_usage": 221587, "validations": 620000, "last_validated_at": "2022-10-02T13:06:32.609Z", "expires_at": "2022-08-12T06:04:08.773Z"}} + application/json: {"id": "", "license_key_id": "", "label": "", "created_at": "2023-12-01T08:59:23.884Z", "modified_at": "2024-08-24T19:22:44.851Z", "license_key": {"id": "", "organization_id": "", "user_id": "", "user": {"id": "", "public_name": "", "email": "Jammie.Mraz@yahoo.com", "avatar_url": "https://crowded-annual.info"}, "benefit_id": "", "key": "", "display_key": "", "status": "revoked", "limit_activations": 291118, "usage": 806587, "limit_usage": 221587, "validations": 620000, "last_validated_at": "2022-10-02T13:06:32.609Z", "expires_at": "2022-08-12T06:04:08.773Z"}} "401": application/json: {"detail": ""} "404": @@ -1803,7 +1814,7 @@ examples: client_secret: "" responses: "200": - application/json: {"created_at": "2022-06-23T19:45:02.115Z", "modified_at": "2022-11-26T05:04:17.930Z", "id": "", "status": "succeeded", "client_secret": "", "expires_at": "2023-08-07T16:01:01.665Z", "success_url": "https://obedient-operating.org/", "amount": 553902, "tax_amount": 201138, "currency": "Seychelles Rupee", "total_amount": 493334, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Coleman_Rutherford@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Maldives"}, "customer_tax_id": "", "product": {"created_at": "2022-09-10T21:17:06.373Z", "modified_at": "2024-10-11T12:01:20.600Z", "id": "", "name": "", "description": "of grave parade whereas wherever", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"created_at": "2024-08-05T16:21:06.140Z", "modified_at": "2022-02-17T11:15:43.137Z", "id": "", "description": "dramatic old-fashioned catalog indeed save orchestrate yippee", "selectable": true, "deletable": true, "organization_id": "", "properties": {"paid_articles": true}}, {"created_at": "2024-07-23T16:17:04.686Z", "modified_at": "2024-10-15T01:25:33.429Z", "id": "", "type": "ads", "description": "definitive as fluffy", "selectable": false, "deletable": true, "organization_id": ""}, {"created_at": "2023-05-06T11:19:10.077Z", "modified_at": "2023-11-17T04:52:10.824Z", "id": "", "type": "downloadables", "description": "yum lecture against alienated meanwhile unabashedly", "selectable": true, "deletable": true, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2022-12-03T08:08:37.108Z", "modified_at": "2023-06-18T22:45:32.983Z", "id": "", "is_archived": true, "price_currency": "", "price_amount": 916344}, "url": "https://lumpy-jellyfish.com"} + application/json: {"created_at": "2022-06-23T19:45:02.115Z", "modified_at": "2022-11-26T05:04:17.930Z", "id": "", "status": "succeeded", "client_secret": "", "expires_at": "2023-08-07T16:01:01.665Z", "success_url": "https://obedient-operating.org/", "amount": 553902, "tax_amount": 201138, "currency": "Seychelles Rupee", "total_amount": 493334, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Coleman_Rutherford@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Maldives"}, "customer_tax_id": "", "product": {"created_at": "2022-09-10T21:17:06.373Z", "modified_at": "2024-10-11T12:01:20.600Z", "id": "", "name": "", "description": "of grave parade whereas wherever", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"created_at": "2022-11-26T05:04:17.930Z", "modified_at": "2024-04-14T21:02:40.457Z", "id": "", "type": "discord", "description": "given impolite how astride cap", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2024-07-23T16:17:04.686Z", "modified_at": "2024-10-15T01:25:33.429Z", "id": "", "type": "ads", "description": "definitive as fluffy", "selectable": false, "deletable": true, "organization_id": ""}, {"created_at": "2023-05-06T11:19:10.077Z", "modified_at": "2023-11-17T04:52:10.824Z", "id": "", "type": "downloadables", "description": "yum lecture against alienated meanwhile unabashedly", "selectable": true, "deletable": true, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2023-12-08T10:02:16.170Z", "modified_at": "2022-05-07T00:40:28.451Z", "id": "", "is_archived": true, "price_currency": "", "minimum_amount": 158060, "maximum_amount": 193250, "preset_amount": 588843, "recurring_interval": "month"}, "url": "https://lumpy-jellyfish.com"} "404": application/json: {"detail": ""} "422": {} @@ -1814,7 +1825,7 @@ examples: client_secret: "" responses: "200": - application/json: {"created_at": "2024-10-22T20:45:21.815Z", "modified_at": "2023-07-17T23:31:05.499Z", "id": "", "status": "expired", "client_secret": "", "expires_at": "2023-07-14T01:44:24.320Z", "success_url": "https://passionate-understanding.com/", "amount": 573767, "tax_amount": 903274, "currency": "Sudanese Pound", "total_amount": 813143, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Leonie50@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Bulgaria"}, "customer_tax_id": "", "product": {"created_at": "2023-09-04T23:39:15.429Z", "modified_at": "2022-06-30T18:11:17.062Z", "id": "", "name": "", "description": "ack notwithstanding lively into trusty", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-05-18T03:23:17.454Z", "modified_at": "2023-05-12T02:46:47.249Z", "id": "", "is_archived": false, "price_currency": "", "price_amount": 397244}, {"created_at": "2024-07-17T17:12:46.256Z", "modified_at": "2022-05-05T14:10:40.215Z", "id": "", "is_archived": true, "price_currency": "", "price_amount": 332353, "recurring_interval": "year"}, {"created_at": "2023-07-26T03:19:06.461Z", "modified_at": "2024-12-17T05:21:34.525Z", "id": "", "is_archived": false, "price_currency": "", "minimum_amount": 176169, "maximum_amount": 827753, "preset_amount": 768625}], "benefits": [{"created_at": "2024-04-13T01:40:05.694Z", "modified_at": "2024-07-12T13:33:11.703Z", "id": "", "type": "discord", "description": "prohibition where although negative where psst", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2022-11-01T16:37:11.315Z", "modified_at": "2024-11-11T09:22:51.554Z", "id": "", "type": "ads", "description": "anenst meanwhile little", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2023-12-08T07:51:27.800Z", "modified_at": "2022-03-18T21:13:49.993Z", "id": "", "type": "discord", "description": "long-term relative singe urgently questionably", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt/share", "mime_type": "", "size": 389948, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-01-06T16:44:49.420Z", "version": "", "is_uploaded": false, "created_at": "2024-04-09T09:13:22.245Z", "size_readable": "", "public_url": "https://smoggy-graffiti.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/obj", "mime_type": "", "size": 503125, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-06-27T13:22:35.587Z", "version": "", "is_uploaded": false, "created_at": "2022-06-08T06:40:16.558Z", "size_readable": "", "public_url": "https://lumbering-charlatan.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/mail", "mime_type": "", "size": 126531, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-10-20T22:04:15.588Z", "version": "", "is_uploaded": false, "created_at": "2023-02-02T22:10:58.341Z", "size_readable": "", "public_url": "https://which-entry.biz/"}]}, "product_price": {"created_at": "2024-11-26T08:39:18.244Z", "modified_at": "2022-08-06T22:52:15.498Z", "id": "", "is_archived": true, "price_currency": "", "minimum_amount": 859643, "maximum_amount": 413943, "preset_amount": 162847}, "url": "https://simple-flint.org/"} + application/json: {"created_at": "2024-10-22T20:45:21.815Z", "modified_at": "2023-07-17T23:31:05.499Z", "id": "", "status": "expired", "client_secret": "", "expires_at": "2023-07-14T01:44:24.320Z", "success_url": "https://passionate-understanding.com/", "amount": 573767, "tax_amount": 903274, "currency": "Sudanese Pound", "total_amount": 813143, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Leonie50@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Bulgaria"}, "customer_tax_id": "", "product": {"created_at": "2023-09-04T23:39:15.429Z", "modified_at": "2022-06-30T18:11:17.062Z", "id": "", "name": "", "description": "ack notwithstanding lively into trusty", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2022-11-16T20:51:18.745Z", "modified_at": "2023-07-14T01:44:24.320Z", "id": "", "is_archived": true, "price_currency": "", "minimum_amount": 597177, "maximum_amount": 947630, "preset_amount": 166401}, {"created_at": "2024-04-03T02:37:24.726Z", "modified_at": "2024-06-10T04:54:08.615Z", "id": "", "is_archived": true}, {"created_at": "2024-07-08T15:45:04.860Z", "modified_at": "2023-09-22T09:06:50.882Z", "id": "", "is_archived": true, "price_currency": "", "minimum_amount": 508864, "maximum_amount": 744619, "preset_amount": 137234}], "benefits": [{"created_at": "2024-04-13T01:40:05.694Z", "modified_at": "2024-07-12T13:33:11.703Z", "id": "", "type": "discord", "description": "prohibition where although negative where psst", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2022-11-01T16:37:11.315Z", "modified_at": "2024-11-11T09:22:51.554Z", "id": "", "type": "ads", "description": "anenst meanwhile little", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2023-12-08T07:51:27.800Z", "modified_at": "2022-03-18T21:13:49.993Z", "id": "", "type": "discord", "description": "long-term relative singe urgently questionably", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt/share", "mime_type": "", "size": 389948, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-01-06T16:44:49.420Z", "version": "", "is_uploaded": false, "created_at": "2024-04-09T09:13:22.245Z", "size_readable": "", "public_url": "https://smoggy-graffiti.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/obj", "mime_type": "", "size": 503125, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-06-27T13:22:35.587Z", "version": "", "is_uploaded": false, "created_at": "2022-06-08T06:40:16.558Z", "size_readable": "", "public_url": "https://lumbering-charlatan.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/mail", "mime_type": "", "size": 126531, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-10-20T22:04:15.588Z", "version": "", "is_uploaded": false, "created_at": "2023-02-02T22:10:58.341Z", "size_readable": "", "public_url": "https://which-entry.biz/"}]}, "product_price": {"created_at": "2022-10-09T22:41:34.766Z", "modified_at": "2024-06-14T00:54:00.547Z", "id": "", "is_archived": true, "price_currency": "", "price_amount": 172495}, "url": "https://simple-flint.org/"} "404": application/json: {"detail": ""} "422": {} @@ -1825,7 +1836,16 @@ examples: client_secret: "" responses: "200": - application/json: {"created_at": "2024-09-27T22:33:04.250Z", "modified_at": "2024-07-24T02:45:26.067Z", "id": "", "status": "succeeded", "client_secret": "", "expires_at": "2022-07-30T06:29:51.767Z", "success_url": "https://secondary-gallery.net", "amount": 662896, "tax_amount": 131007, "currency": "Nepalese Rupee", "total_amount": 714568, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Maggie18@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Nigeria"}, "customer_tax_id": "", "product": {"created_at": "2023-01-28T03:25:59.665Z", "modified_at": "2022-01-24T16:41:51.515Z", "id": "", "name": "", "description": "potentially thread toady subsidy probable motionless obedience clear-cut", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-02-24T15:04:47.497Z", "modified_at": "2023-05-29T07:44:57.350Z", "id": "", "is_archived": true, "price_currency": "", "minimum_amount": 374415, "maximum_amount": 368960, "preset_amount": 837753, "recurring_interval": "year"}], "benefits": [{"created_at": "2022-10-20T16:59:20.255Z", "modified_at": "2023-01-30T20:43:56.426Z", "id": "", "type": "articles", "description": "editor until ah daintily oof aw tarry impanel", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2024-07-26T21:52:00.436Z", "modified_at": "2024-03-11T23:49:19.061Z", "id": "", "type": "license_keys", "description": "forenenst aw or distorted legal cycle posh off", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2023-10-03T19:17:53.981Z", "modified_at": "2023-08-02T07:58:58.651Z", "id": "", "description": "ha restfully filter", "selectable": false, "deletable": true, "organization_id": "", "properties": {"paid_articles": true}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/mnt", "mime_type": "", "size": 249646, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-10T13:10:48.480Z", "version": "", "is_uploaded": true, "created_at": "2022-02-28T04:49:04.106Z", "size_readable": "", "public_url": "https://glittering-confusion.biz/"}]}, "product_price": {"created_at": "2022-11-22T10:10:52.850Z", "modified_at": "2024-03-28T19:26:19.018Z", "id": "", "is_archived": true, "recurring_interval": "month"}, "url": "https://apt-devastation.biz/"} + application/json: {"created_at": "2024-09-27T22:33:04.250Z", "modified_at": "2024-07-24T02:45:26.067Z", "id": "", "status": "succeeded", "client_secret": "", "expires_at": "2022-07-30T06:29:51.767Z", "success_url": "https://secondary-gallery.net", "amount": 662896, "tax_amount": 131007, "currency": "Nepalese Rupee", "total_amount": 714568, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Maggie18@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Nigeria"}, "customer_tax_id": "", "product": {"created_at": "2023-01-28T03:25:59.665Z", "modified_at": "2022-01-24T16:41:51.515Z", "id": "", "name": "", "description": "potentially thread toady subsidy probable motionless obedience clear-cut", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-11-15T07:38:37.445Z", "modified_at": "2022-07-30T06:29:51.767Z", "id": "", "is_archived": false}], "benefits": [{"created_at": "2022-10-20T16:59:20.255Z", "modified_at": "2023-01-30T20:43:56.426Z", "id": "", "type": "articles", "description": "editor until ah daintily oof aw tarry impanel", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2024-07-26T21:52:00.436Z", "modified_at": "2024-03-11T23:49:19.061Z", "id": "", "type": "license_keys", "description": "forenenst aw or distorted legal cycle posh off", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2023-02-11T02:25:13.433Z", "modified_at": "2024-01-07T19:25:42.663Z", "id": "", "description": "hovel yuck absentmindedly oh anti joyous psst tender", "selectable": false, "deletable": true, "organization_id": "", "properties": {"paid_articles": true}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/mnt", "mime_type": "", "size": 249646, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-10T13:10:48.480Z", "version": "", "is_uploaded": true, "created_at": "2022-02-28T04:49:04.106Z", "size_readable": "", "public_url": "https://glittering-confusion.biz/"}]}, "product_price": {"created_at": "2023-01-06T21:00:26.752Z", "modified_at": "2022-10-07T14:51:36.263Z", "id": "", "is_archived": false, "price_currency": "", "minimum_amount": 638939, "maximum_amount": 942266, "preset_amount": 508098}, "url": "https://apt-devastation.biz/"} "404": application/json: {"detail": ""} "422": {} + articles:export: + speakeasy-default-articles:export: + parameters: + query: + organization_id: "cf4e3d5e-2b50-4470-a85b-8d021391fabb" + responses: + "200": + application/json: "" + "422": {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index de5ab29..6472f04 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -15,7 +15,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true python: - version: 0.6.0 + version: 0.6.1 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index daea131..e9b2984 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.414.1 +speakeasyVersion: 1.418.4 sources: Polar-OAS: sourceNamespace: polar-oas - sourceRevisionDigest: sha256:2f0fab250bdd2a15f4b8b225063ce16b4c2dcd0da7a7634bbd7889568e660f2c - sourceBlobDigest: sha256:e17ea29a2bc4fc5f01ead9a66ea39f07913e6ea3732e5ecf47675de704af2041 + sourceRevisionDigest: sha256:b083b473d9fd6021a6126b423b2a5516d609a816b8bcce935b1a585d1298290a + sourceBlobDigest: sha256:8aa5bbab824b689955e2c1763c1751ce61965e9bddb63c207b0cbdaefac8d5ed tags: - latest - main @@ -11,8 +11,8 @@ targets: polar: source: Polar-OAS sourceNamespace: polar-oas - sourceRevisionDigest: sha256:2f0fab250bdd2a15f4b8b225063ce16b4c2dcd0da7a7634bbd7889568e660f2c - sourceBlobDigest: sha256:e17ea29a2bc4fc5f01ead9a66ea39f07913e6ea3732e5ecf47675de704af2041 + sourceRevisionDigest: sha256:b083b473d9fd6021a6126b423b2a5516d609a816b8bcce935b1a585d1298290a + sourceBlobDigest: sha256:8aa5bbab824b689955e2c1763c1751ce61965e9bddb63c207b0cbdaefac8d5ed workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index aded9fa..d635bd2 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ asyncio.run(main()) * [list](docs/sdks/articles/README.md#list) - List Articles * [create](docs/sdks/articles/README.md#create) - Create Article +* [export](docs/sdks/articles/README.md#export) - Export Articles * [get](docs/sdks/articles/README.md#get) - Get Article * [update](docs/sdks/articles/README.md#update) - Update Article * [delete](docs/sdks/articles/README.md#delete) - Delete Article diff --git a/RELEASES.md b/RELEASES.md index 97224b5..3e479f7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -213,4 +213,14 @@ Based on: ### Generated - [python v0.6.0] . ### Releases -- [PyPI v0.6.0] https://pypi.org/project/polar-sdk/0.6.0 - . \ No newline at end of file +- [PyPI v0.6.0] https://pypi.org/project/polar-sdk/0.6.0 - . + +## 2024-10-16 00:12:01 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.418.4 (2.438.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.6.1] . +### Releases +- [PyPI v0.6.1] https://pypi.org/project/polar-sdk/0.6.1 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 30e59f1..c84fc1e 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -27,6 +27,12 @@ actions: - "lang": "python" "label": "create" "source": "from polar_sdk import Polar\n\ns = Polar(\n access_token=\"\",\n)\n\nres = s.articles.create(request={\n \"title\": \"\",\n})\n\nif res is not None:\n # handle response\n pass" + - target: $["paths"]["/v1/articles/export"]["get"] + update: + "x-codeSamples": + - "lang": "python" + "label": "export" + "source": "from polar_sdk import Polar\n\ns = Polar(\n access_token=\"\",\n)\n\nres = s.articles.export(organization_id=\"cf4e3d5e-2b50-4470-a85b-8d021391fabb\")\n\nif res is not None:\n # handle response\n pass" - target: $["paths"]["/v1/articles/{id}"]["delete"] update: "x-codeSamples": diff --git a/docs/models/articlecreate.md b/docs/models/articlecreate.md index b62c85c..3e6a9f1 100644 --- a/docs/models/articlecreate.md +++ b/docs/models/articlecreate.md @@ -10,8 +10,8 @@ | `body` | *OptionalNullable[str]* | :heavy_minus_sign: | Body in string format. Either one of body or body_base64 is required. | | `body_base64` | *OptionalNullable[str]* | :heavy_minus_sign: | Body in base64-encoded format. Can be helpful to bypass Web Application Firewalls (WAF). Either one of body or body_base64 is required. | | `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the organization owning the article. **Required unless you use an organization token.** | -| `byline` | [Optional[models.ArticleCreateArticleByline]](../models/articlecreatearticlebyline.md) | :heavy_minus_sign: | If the user or organization should be credited in the byline. | -| `visibility` | [Optional[models.ArticleCreateArticleVisibility]](../models/articlecreatearticlevisibility.md) | :heavy_minus_sign: | N/A | +| `byline` | [Optional[models.ArticleByline]](../models/articlebyline.md) | :heavy_minus_sign: | N/A | +| `visibility` | [Optional[models.ArticleVisibility]](../models/articlevisibility.md) | :heavy_minus_sign: | N/A | | `paid_subscribers_only` | *Optional[bool]* | :heavy_minus_sign: | Set to true to only make this article available for subscribers to a paid subscription tier in the organization. | | `paid_subscribers_only_ends_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If specified, time at which the article should no longer be restricted to paid subscribers. Only relevant if `paid_subscribers_only` is true. | | `published_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time of publishing. If this date is in the future, the post will be scheduled to publish at this time. If visibility is 'public', published_at will default to the current time. | diff --git a/docs/models/articlecreatearticlebyline.md b/docs/models/articlecreatearticlebyline.md deleted file mode 100644 index ac3b7f8..0000000 --- a/docs/models/articlecreatearticlebyline.md +++ /dev/null @@ -1,11 +0,0 @@ -# ArticleCreateArticleByline - -If the user or organization should be credited in the byline. - - -## Values - -| Name | Value | -| -------------- | -------------- | -| `USER` | user | -| `ORGANIZATION` | organization | \ No newline at end of file diff --git a/docs/models/articlecreatearticlevisibility.md b/docs/models/articlecreatearticlevisibility.md deleted file mode 100644 index d08bffc..0000000 --- a/docs/models/articlecreatearticlevisibility.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArticleCreateArticleVisibility - - -## Values - -| Name | Value | -| --------- | --------- | -| `PUBLIC` | public | -| `HIDDEN` | hidden | -| `PRIVATE` | private | \ No newline at end of file diff --git a/docs/models/articlesexportrequest.md b/docs/models/articlesexportrequest.md new file mode 100644 index 0000000..84b4aaa --- /dev/null +++ b/docs/models/articlesexportrequest.md @@ -0,0 +1,8 @@ +# ArticlesExportRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `organization_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/benefitbase.md b/docs/models/benefitbase.md index fa868ec..c1dc08c 100644 --- a/docs/models/benefitbase.md +++ b/docs/models/benefitbase.md @@ -8,7 +8,7 @@ | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Creation timestamp of the object. | | `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Last modification timestamp of the object. | | `id` | *str* | :heavy_check_mark: | The ID of the benefit. | -| `type` | [models.BenefitType](../models/benefittype.md) | :heavy_check_mark: | The type of the benefit. | +| `type` | [models.BenefitType](../models/benefittype.md) | :heavy_check_mark: | N/A | | `description` | *str* | :heavy_check_mark: | The description of the benefit. | | `selectable` | *bool* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. | diff --git a/docs/models/benefitgrantwebhook.md b/docs/models/benefitgrantwebhook.md index 6e80a70..6389edf 100644 --- a/docs/models/benefitgrantwebhook.md +++ b/docs/models/benefitgrantwebhook.md @@ -15,7 +15,7 @@ | `user_id` | *str* | :heavy_check_mark: | The ID of the user concerned by this grant. | | `benefit_id` | *str* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | | `properties` | [models.BenefitGrantWebhookProperties](../models/benefitgrantwebhookproperties.md) | :heavy_check_mark: | N/A | -| `benefit` | [models.BenefitGrantWebhookBenefit](../models/benefitgrantwebhookbenefit.md) | :heavy_check_mark: | N/A | +| `benefit` | [models.BenefitInput](../models/benefitinput.md) | :heavy_check_mark: | N/A | | `granted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | | `revoked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | | `previous_properties` | [OptionalNullable[models.PreviousProperties]](../models/previousproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/benefitgrantwebhookbenefit.md b/docs/models/benefitinput.md similarity index 96% rename from docs/models/benefitgrantwebhookbenefit.md rename to docs/models/benefitinput.md index d5aa8af..ef6e697 100644 --- a/docs/models/benefitgrantwebhookbenefit.md +++ b/docs/models/benefitinput.md @@ -1,4 +1,4 @@ -# BenefitGrantWebhookBenefit +# BenefitInput ## Supported Types diff --git a/docs/models/benefitscreateresponsebenefitscreate.md b/docs/models/benefitscreateresponsebenefitscreate.md deleted file mode 100644 index 5f31eb5..0000000 --- a/docs/models/benefitscreateresponsebenefitscreate.md +++ /dev/null @@ -1,49 +0,0 @@ -# BenefitsCreateResponseBenefitsCreate - -Benefit created. - - -## Supported Types - -### `models.BenefitArticles` - -```python -value: models.BenefitArticles = /* values here */ -``` - -### `models.BenefitAds` - -```python -value: models.BenefitAds = /* values here */ -``` - -### `models.BenefitCustom` - -```python -value: models.BenefitCustom = /* values here */ -``` - -### `models.BenefitDiscord` - -```python -value: models.BenefitDiscord = /* values here */ -``` - -### `models.BenefitGitHubRepository` - -```python -value: models.BenefitGitHubRepository = /* values here */ -``` - -### `models.BenefitDownloadables` - -```python -value: models.BenefitDownloadables = /* values here */ -``` - -### `models.BenefitLicenseKeys` - -```python -value: models.BenefitLicenseKeys = /* values here */ -``` - diff --git a/docs/models/benefitsgetresponsebenefitsget.md b/docs/models/benefitsgetresponsebenefitsget.md deleted file mode 100644 index 2e7374d..0000000 --- a/docs/models/benefitsgetresponsebenefitsget.md +++ /dev/null @@ -1,49 +0,0 @@ -# BenefitsGetResponseBenefitsGet - -Successful Response - - -## Supported Types - -### `models.BenefitArticles` - -```python -value: models.BenefitArticles = /* values here */ -``` - -### `models.BenefitAds` - -```python -value: models.BenefitAds = /* values here */ -``` - -### `models.BenefitCustom` - -```python -value: models.BenefitCustom = /* values here */ -``` - -### `models.BenefitDiscord` - -```python -value: models.BenefitDiscord = /* values here */ -``` - -### `models.BenefitGitHubRepository` - -```python -value: models.BenefitGitHubRepository = /* values here */ -``` - -### `models.BenefitDownloadables` - -```python -value: models.BenefitDownloadables = /* values here */ -``` - -### `models.BenefitLicenseKeys` - -```python -value: models.BenefitLicenseKeys = /* values here */ -``` - diff --git a/docs/models/benefitsupdateresponsebenefitsupdate.md b/docs/models/benefitsupdateresponsebenefitsupdate.md deleted file mode 100644 index 514fc8a..0000000 --- a/docs/models/benefitsupdateresponsebenefitsupdate.md +++ /dev/null @@ -1,49 +0,0 @@ -# BenefitsUpdateResponseBenefitsUpdate - -Benefit updated. - - -## Supported Types - -### `models.BenefitArticles` - -```python -value: models.BenefitArticles = /* values here */ -``` - -### `models.BenefitAds` - -```python -value: models.BenefitAds = /* values here */ -``` - -### `models.BenefitCustom` - -```python -value: models.BenefitCustom = /* values here */ -``` - -### `models.BenefitDiscord` - -```python -value: models.BenefitDiscord = /* values here */ -``` - -### `models.BenefitGitHubRepository` - -```python -value: models.BenefitGitHubRepository = /* values here */ -``` - -### `models.BenefitDownloadables` - -```python -value: models.BenefitDownloadables = /* values here */ -``` - -### `models.BenefitLicenseKeys` - -```python -value: models.BenefitLicenseKeys = /* values here */ -``` - diff --git a/docs/models/checkoutpublic.md b/docs/models/checkoutpublic.md index 29a1789..6ffd1e7 100644 --- a/docs/models/checkoutpublic.md +++ b/docs/models/checkoutpublic.md @@ -10,7 +10,7 @@ Checkout session data retrieved using the client secret. | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Creation timestamp of the object. | | `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Last modification timestamp of the object. | | `id` | *str* | :heavy_check_mark: | The ID of the object. | -| `status` | [models.CheckoutStatus](../models/checkoutstatus.md) | :heavy_check_mark: | Status of the checkout session. | +| `status` | [models.CheckoutStatus](../models/checkoutstatus.md) | :heavy_check_mark: | N/A | | `client_secret` | *str* | :heavy_check_mark: | Client secret used to update and complete the checkout session from the client. | | `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Expiration date and time of the checkout session. | | `success_url` | *str* | :heavy_check_mark: | URL where the customer will be redirected after a successful payment. | @@ -31,4 +31,4 @@ Checkout session data retrieved using the client secret. | `product` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | | `product_price` | [models.ProductPrice](../models/productprice.md) | :heavy_check_mark: | N/A | | `url` | *str* | :heavy_check_mark: | N/A | -| `payment_processor` | [models.PolarEnumsPaymentProcessor](../models/polarenumspaymentprocessor.md) | :heavy_check_mark: | Payment processor used. | \ No newline at end of file +| `payment_processor` | [models.PolarEnumsPaymentProcessor](../models/polarenumspaymentprocessor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/interval.md b/docs/models/interval.md index 9b3f808..b4369b9 100644 --- a/docs/models/interval.md +++ b/docs/models/interval.md @@ -1,7 +1,5 @@ # Interval -Interval between two timestamps. - ## Values diff --git a/docs/models/issue.md b/docs/models/issue.md index 33b2504..801d51e 100644 --- a/docs/models/issue.md +++ b/docs/models/issue.md @@ -12,9 +12,9 @@ | `issue_created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `needs_confirmation_solved` | *bool* | :heavy_check_mark: | If a maintainer needs to mark this issue as solved | | `funding` | [models.Funding](../models/funding.md) | :heavy_check_mark: | N/A | -| `repository` | [models.RepositoryInput](../models/repositoryinput.md) | :heavy_check_mark: | The repository that the issue is in | +| `repository` | [models.RepositoryInput](../models/repositoryinput.md) | :heavy_check_mark: | N/A | | `pledge_badge_currently_embedded` | *bool* | :heavy_check_mark: | If this issue currently has the Polar badge SVG embedded | -| `platform` | [models.Platforms](../models/platforms.md) | :heavy_check_mark: | Issue platform (currently always GitHub) | +| `platform` | [models.Platforms](../models/platforms.md) | :heavy_check_mark: | N/A | | `body` | *OptionalNullable[str]* | :heavy_minus_sign: | GitHub issue body | | `comments` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of GitHub comments made on the issue | | `labels` | List[[models.Label](../models/label.md)] | :heavy_minus_sign: | N/A | diff --git a/docs/models/licensekeyread.md b/docs/models/licensekeyread.md index 291beec..0a09b3e 100644 --- a/docs/models/licensekeyread.md +++ b/docs/models/licensekeyread.md @@ -8,6 +8,7 @@ | `id` | *str* | :heavy_check_mark: | N/A | | `organization_id` | *str* | :heavy_check_mark: | N/A | | `user_id` | *str* | :heavy_check_mark: | N/A | +| `user` | [models.LicenseKeyUser](../models/licensekeyuser.md) | :heavy_check_mark: | N/A | | `benefit_id` | *str* | :heavy_check_mark: | The benefit ID. | | `key` | *str* | :heavy_check_mark: | N/A | | `display_key` | *str* | :heavy_check_mark: | N/A | diff --git a/docs/models/licensekeyuser.md b/docs/models/licensekeyuser.md new file mode 100644 index 0000000..3483879 --- /dev/null +++ b/docs/models/licensekeyuser.md @@ -0,0 +1,11 @@ +# LicenseKeyUser + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *str* | :heavy_check_mark: | N/A | +| `public_name` | *str* | :heavy_check_mark: | N/A | +| `email` | *str* | :heavy_check_mark: | N/A | +| `avatar_url` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/licensekeywithactivations.md b/docs/models/licensekeywithactivations.md index a71739f..ecb66f6 100644 --- a/docs/models/licensekeywithactivations.md +++ b/docs/models/licensekeywithactivations.md @@ -8,6 +8,7 @@ | `id` | *str* | :heavy_check_mark: | N/A | | `organization_id` | *str* | :heavy_check_mark: | N/A | | `user_id` | *str* | :heavy_check_mark: | N/A | +| `user` | [models.LicenseKeyUser](../models/licensekeyuser.md) | :heavy_check_mark: | N/A | | `benefit_id` | *str* | :heavy_check_mark: | The benefit ID. | | `key` | *str* | :heavy_check_mark: | N/A | | `display_key` | *str* | :heavy_check_mark: | N/A | diff --git a/docs/models/metric.md b/docs/models/metric.md index a24cd70..8e2e631 100644 --- a/docs/models/metric.md +++ b/docs/models/metric.md @@ -5,8 +5,8 @@ Information about a metric. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `slug` | *str* | :heavy_check_mark: | Unique identifier for the metric. | -| `display_name` | *str* | :heavy_check_mark: | Human-readable name for the metric. | -| `type` | [models.MetricType](../models/metrictype.md) | :heavy_check_mark: | Type of the metric, useful to know the unit or format of the value. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `slug` | *str* | :heavy_check_mark: | Unique identifier for the metric. | +| `display_name` | *str* | :heavy_check_mark: | Human-readable name for the metric. | +| `type` | [models.MetricType](../models/metrictype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/metricsintervalslimits.md b/docs/models/metricsintervalslimits.md index 939207a..b9795c7 100644 --- a/docs/models/metricsintervalslimits.md +++ b/docs/models/metricsintervalslimits.md @@ -7,8 +7,8 @@ Date interval limits to get metrics for each interval. | Field | Type | Required | Description | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `hour` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Limits for the hour interval. | -| `day` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Limits for the day interval. | -| `week` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Limits for the week interval. | -| `month` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Limits for the month interval. | -| `year` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Limits for the year interval. | \ No newline at end of file +| `hour` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | +| `day` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | +| `week` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | +| `month` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | +| `year` | [models.MetricsIntervalLimit](../models/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | \ No newline at end of file diff --git a/docs/models/metricslimits.md b/docs/models/metricslimits.md index a5d6269..b8df0b1 100644 --- a/docs/models/metricslimits.md +++ b/docs/models/metricslimits.md @@ -8,4 +8,4 @@ Date limits to get metrics. | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `min_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | Minimum date to get metrics. | -| `intervals` | [models.MetricsIntervalsLimits](../models/metricsintervalslimits.md) | :heavy_check_mark: | Limits for each interval. | \ No newline at end of file +| `intervals` | [models.MetricsIntervalsLimits](../models/metricsintervalslimits.md) | :heavy_check_mark: | Date interval limits to get metrics for each interval. | \ No newline at end of file diff --git a/docs/models/metricsresponse.md b/docs/models/metricsresponse.md index 403fb56..1092f40 100644 --- a/docs/models/metricsresponse.md +++ b/docs/models/metricsresponse.md @@ -8,4 +8,4 @@ Metrics response schema. | Field | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | | `periods` | List[[models.MetricPeriod](../models/metricperiod.md)] | :heavy_check_mark: | List of data for each timestamp. | -| `metrics` | [models.Metrics](../models/metrics.md) | :heavy_check_mark: | Information about the returned metrics. | \ No newline at end of file +| `metrics` | [models.Metrics](../models/metrics.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/order.md b/docs/models/order.md index 4d4fa32..c17a357 100644 --- a/docs/models/order.md +++ b/docs/models/order.md @@ -12,6 +12,7 @@ | `amount` | *int* | :heavy_check_mark: | N/A | | `tax_amount` | *int* | :heavy_check_mark: | N/A | | `currency` | *str* | :heavy_check_mark: | N/A | +| `billing_reason` | [models.OrderBillingReason](../models/orderbillingreason.md) | :heavy_check_mark: | N/A | | `user_id` | *str* | :heavy_check_mark: | N/A | | `product_id` | *str* | :heavy_check_mark: | N/A | | `product_price_id` | *str* | :heavy_check_mark: | N/A | diff --git a/docs/models/orderbillingreason.md b/docs/models/orderbillingreason.md new file mode 100644 index 0000000..c499076 --- /dev/null +++ b/docs/models/orderbillingreason.md @@ -0,0 +1,11 @@ +# OrderBillingReason + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `PURCHASE` | purchase | +| `SUBSCRIPTION_CREATE` | subscription_create | +| `SUBSCRIPTION_CYCLE` | subscription_cycle | +| `SUBSCRIPTION_UPDATE` | subscription_update | \ No newline at end of file diff --git a/docs/models/pledge.md b/docs/models/pledge.md index 53d6503..bef082d 100644 --- a/docs/models/pledge.md +++ b/docs/models/pledge.md @@ -10,9 +10,9 @@ | `id` | *str* | :heavy_check_mark: | The ID of the object. | | `amount` | *int* | :heavy_check_mark: | Amount pledged towards the issue | | `currency` | *str* | :heavy_check_mark: | N/A | -| `state` | [models.PledgeState](../models/pledgestate.md) | :heavy_check_mark: | Current state of the pledge | -| `type` | [models.PledgeType](../models/pledgetype.md) | :heavy_check_mark: | Type of pledge | -| `issue` | [models.Issue](../models/issue.md) | :heavy_check_mark: | The issue that the pledge was made towards | +| `state` | [models.PledgeState](../models/pledgestate.md) | :heavy_check_mark: | N/A | +| `type` | [models.PledgeType](../models/pledgetype.md) | :heavy_check_mark: | N/A | +| `issue` | [models.Issue](../models/issue.md) | :heavy_check_mark: | N/A | | `refunded_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If and when the pledge was refunded to the pledger | | `scheduled_payout_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | When the payout is scheduled to be made to the maintainers behind the issue. Disputes must be made before this date. | | `pledger` | [OptionalNullable[models.Pledger]](../models/pledger.md) | :heavy_minus_sign: | The user or organization that made this pledge | diff --git a/docs/models/polarcheckoutschemascheckout.md b/docs/models/polarcheckoutschemascheckout.md index 2fe848f..549b11f 100644 --- a/docs/models/polarcheckoutschemascheckout.md +++ b/docs/models/polarcheckoutschemascheckout.md @@ -10,7 +10,7 @@ Checkout session data retrieved using an access token. | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Creation timestamp of the object. | | `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Last modification timestamp of the object. | | `id` | *str* | :heavy_check_mark: | The ID of the object. | -| `status` | [models.CheckoutStatus](../models/checkoutstatus.md) | :heavy_check_mark: | Status of the checkout session. | +| `status` | [models.CheckoutStatus](../models/checkoutstatus.md) | :heavy_check_mark: | N/A | | `client_secret` | *str* | :heavy_check_mark: | Client secret used to update and complete the checkout session from the client. | | `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Expiration date and time of the checkout session. | | `success_url` | *str* | :heavy_check_mark: | URL where the customer will be redirected after a successful payment. | @@ -30,4 +30,4 @@ Checkout session data retrieved using an access token. | `payment_processor_metadata` | [models.PaymentProcessorMetadata](../models/paymentprocessormetadata.md) | :heavy_check_mark: | N/A | | `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | | `url` | *str* | :heavy_check_mark: | N/A | -| `payment_processor` | [models.PolarEnumsPaymentProcessor](../models/polarenumspaymentprocessor.md) | :heavy_check_mark: | Payment processor used. | \ No newline at end of file +| `payment_processor` | [models.PolarEnumsPaymentProcessor](../models/polarenumspaymentprocessor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/polarcheckoutschemascheckoutinput.md b/docs/models/polarcheckoutschemascheckoutinput.md index af3684d..d495a29 100644 --- a/docs/models/polarcheckoutschemascheckoutinput.md +++ b/docs/models/polarcheckoutschemascheckoutinput.md @@ -10,7 +10,7 @@ Checkout session data retrieved using an access token. | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Creation timestamp of the object. | | `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Last modification timestamp of the object. | | `id` | *str* | :heavy_check_mark: | The ID of the object. | -| `status` | [models.CheckoutStatus](../models/checkoutstatus.md) | :heavy_check_mark: | Status of the checkout session. | +| `status` | [models.CheckoutStatus](../models/checkoutstatus.md) | :heavy_check_mark: | N/A | | `client_secret` | *str* | :heavy_check_mark: | Client secret used to update and complete the checkout session from the client. | | `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Expiration date and time of the checkout session. | | `success_url` | *str* | :heavy_check_mark: | URL where the customer will be redirected after a successful payment. | @@ -29,4 +29,4 @@ Checkout session data retrieved using an access token. | `customer_tax_id` | *Nullable[str]* | :heavy_check_mark: | N/A | | `payment_processor_metadata` | [models.PaymentProcessorMetadata](../models/paymentprocessormetadata.md) | :heavy_check_mark: | N/A | | `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | -| `payment_processor` | [models.PolarEnumsPaymentProcessor](../models/polarenumspaymentprocessor.md) | :heavy_check_mark: | Payment processor used. | \ No newline at end of file +| `payment_processor` | [models.PolarEnumsPaymentProcessor](../models/polarenumspaymentprocessor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/productpricerecurringcustom.md b/docs/models/productpricerecurringcustom.md index cc7ffc3..a1a841b 100644 --- a/docs/models/productpricerecurringcustom.md +++ b/docs/models/productpricerecurringcustom.md @@ -15,6 +15,6 @@ A pay-what-you-want recurring price for a product, i.e. a subscription. | `minimum_amount` | *Nullable[int]* | :heavy_check_mark: | The minimum amount the customer can pay. | | `maximum_amount` | *Nullable[int]* | :heavy_check_mark: | The maximum amount the customer can pay. | | `preset_amount` | *Nullable[int]* | :heavy_check_mark: | The initial amount shown to the customer. | -| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the price. | +| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | | `amount_type` | [models.ProductPriceRecurringCustomAmountType](../models/productpricerecurringcustomamounttype.md) | :heavy_check_mark: | N/A | | `type` | [models.ProductPriceRecurringCustomType](../models/productpricerecurringcustomtype.md) | :heavy_check_mark: | The type of the price. | \ No newline at end of file diff --git a/docs/models/productpricerecurringfixed.md b/docs/models/productpricerecurringfixed.md index 8829245..95e5f1b 100644 --- a/docs/models/productpricerecurringfixed.md +++ b/docs/models/productpricerecurringfixed.md @@ -13,6 +13,6 @@ A recurring price for a product, i.e. a subscription. | `is_archived` | *bool* | :heavy_check_mark: | Whether the price is archived and no longer available. | | `price_currency` | *str* | :heavy_check_mark: | The currency. | | `price_amount` | *int* | :heavy_check_mark: | The price in cents. | -| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the price. | +| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | | `amount_type` | [models.AmountType](../models/amounttype.md) | :heavy_check_mark: | N/A | | `type` | [models.ProductPriceRecurringFixedType](../models/productpricerecurringfixedtype.md) | :heavy_check_mark: | The type of the price. | \ No newline at end of file diff --git a/docs/models/productpricerecurringfixedcreate.md b/docs/models/productpricerecurringfixedcreate.md index 3827ea4..9a17f87 100644 --- a/docs/models/productpricerecurringfixedcreate.md +++ b/docs/models/productpricerecurringfixedcreate.md @@ -8,7 +8,7 @@ Schema to create a recurring product price, i.e. a subscription. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `price_amount` | *int* | :heavy_check_mark: | The price in cents. | -| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the price. | +| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | | `type` | [models.ProductPriceRecurringFixedCreateType](../models/productpricerecurringfixedcreatetype.md) | :heavy_check_mark: | N/A | | `amount_type` | [models.ProductPriceRecurringFixedCreateAmountType](../models/productpricerecurringfixedcreateamounttype.md) | :heavy_check_mark: | N/A | | `price_currency` | *Optional[str]* | :heavy_minus_sign: | The currency. Currently, only `usd` is supported. | \ No newline at end of file diff --git a/docs/models/productpricerecurringfree.md b/docs/models/productpricerecurringfree.md index 3e730d0..704516b 100644 --- a/docs/models/productpricerecurringfree.md +++ b/docs/models/productpricerecurringfree.md @@ -11,6 +11,6 @@ A free recurring price for a product, i.e. a subscription. | `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Last modification timestamp of the object. | | `id` | *str* | :heavy_check_mark: | The ID of the price. | | `is_archived` | *bool* | :heavy_check_mark: | Whether the price is archived and no longer available. | -| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the price. | +| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | | `amount_type` | [models.ProductPriceRecurringFreeAmountType](../models/productpricerecurringfreeamounttype.md) | :heavy_check_mark: | N/A | | `type` | [models.ProductPriceRecurringFreeType](../models/productpricerecurringfreetype.md) | :heavy_check_mark: | The type of the price. | \ No newline at end of file diff --git a/docs/models/productpricerecurringfreecreate.md b/docs/models/productpricerecurringfreecreate.md index 6657222..8181f29 100644 --- a/docs/models/productpricerecurringfreecreate.md +++ b/docs/models/productpricerecurringfreecreate.md @@ -7,6 +7,6 @@ Schema to create a free recurring product price, i.e. a subscription. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the price. | +| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | | `type` | [models.ProductPriceRecurringFreeCreateType](../models/productpricerecurringfreecreatetype.md) | :heavy_check_mark: | N/A | | `amount_type` | [models.ProductPriceRecurringFreeCreateAmountType](../models/productpricerecurringfreecreateamounttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/validatedlicensekey.md b/docs/models/validatedlicensekey.md index 55edade..437e1c4 100644 --- a/docs/models/validatedlicensekey.md +++ b/docs/models/validatedlicensekey.md @@ -8,6 +8,7 @@ | `id` | *str* | :heavy_check_mark: | N/A | | `organization_id` | *str* | :heavy_check_mark: | N/A | | `user_id` | *str* | :heavy_check_mark: | N/A | +| `user` | [models.LicenseKeyUser](../models/licensekeyuser.md) | :heavy_check_mark: | N/A | | `benefit_id` | *str* | :heavy_check_mark: | The benefit ID. | | `key` | *str* | :heavy_check_mark: | N/A | | `display_key` | *str* | :heavy_check_mark: | N/A | diff --git a/docs/models/webhookbenefitcreatedpayload.md b/docs/models/webhookbenefitcreatedpayload.md index 68a8933..d104939 100644 --- a/docs/models/webhookbenefitcreatedpayload.md +++ b/docs/models/webhookbenefitcreatedpayload.md @@ -7,7 +7,7 @@ Sent when a new benefit is created. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `data` | [models.WebhookBenefitCreatedPayloadBenefit](../models/webhookbenefitcreatedpayloadbenefit.md) | :heavy_check_mark: | N/A | -| `type` | [models.WebhookBenefitCreatedPayloadType](../models/webhookbenefitcreatedpayloadtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `data` | [models.BenefitInput](../models/benefitinput.md) | :heavy_check_mark: | N/A | +| `type` | [models.WebhookBenefitCreatedPayloadType](../models/webhookbenefitcreatedpayloadtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/webhookbenefitcreatedpayloadbenefit.md b/docs/models/webhookbenefitcreatedpayloadbenefit.md deleted file mode 100644 index 2b24f71..0000000 --- a/docs/models/webhookbenefitcreatedpayloadbenefit.md +++ /dev/null @@ -1,47 +0,0 @@ -# WebhookBenefitCreatedPayloadBenefit - - -## Supported Types - -### `models.BenefitArticles` - -```python -value: models.BenefitArticles = /* values here */ -``` - -### `models.BenefitAds` - -```python -value: models.BenefitAds = /* values here */ -``` - -### `models.BenefitCustom` - -```python -value: models.BenefitCustom = /* values here */ -``` - -### `models.BenefitDiscordInput` - -```python -value: models.BenefitDiscordInput = /* values here */ -``` - -### `models.BenefitGitHubRepository` - -```python -value: models.BenefitGitHubRepository = /* values here */ -``` - -### `models.BenefitDownloadables` - -```python -value: models.BenefitDownloadables = /* values here */ -``` - -### `models.BenefitLicenseKeys` - -```python -value: models.BenefitLicenseKeys = /* values here */ -``` - diff --git a/docs/models/webhookbenefitupdatedpayload.md b/docs/models/webhookbenefitupdatedpayload.md index 69378bd..4352c81 100644 --- a/docs/models/webhookbenefitupdatedpayload.md +++ b/docs/models/webhookbenefitupdatedpayload.md @@ -7,7 +7,7 @@ Sent when a benefit is updated. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `data` | [models.WebhookBenefitUpdatedPayloadBenefit](../models/webhookbenefitupdatedpayloadbenefit.md) | :heavy_check_mark: | N/A | -| `type` | [models.WebhookBenefitUpdatedPayloadType](../models/webhookbenefitupdatedpayloadtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `data` | [models.BenefitInput](../models/benefitinput.md) | :heavy_check_mark: | N/A | +| `type` | [models.WebhookBenefitUpdatedPayloadType](../models/webhookbenefitupdatedpayloadtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/webhookbenefitupdatedpayloadbenefit.md b/docs/models/webhookbenefitupdatedpayloadbenefit.md deleted file mode 100644 index 8642cf9..0000000 --- a/docs/models/webhookbenefitupdatedpayloadbenefit.md +++ /dev/null @@ -1,47 +0,0 @@ -# WebhookBenefitUpdatedPayloadBenefit - - -## Supported Types - -### `models.BenefitArticles` - -```python -value: models.BenefitArticles = /* values here */ -``` - -### `models.BenefitAds` - -```python -value: models.BenefitAds = /* values here */ -``` - -### `models.BenefitCustom` - -```python -value: models.BenefitCustom = /* values here */ -``` - -### `models.BenefitDiscordInput` - -```python -value: models.BenefitDiscordInput = /* values here */ -``` - -### `models.BenefitGitHubRepository` - -```python -value: models.BenefitGitHubRepository = /* values here */ -``` - -### `models.BenefitDownloadables` - -```python -value: models.BenefitDownloadables = /* values here */ -``` - -### `models.BenefitLicenseKeys` - -```python -value: models.BenefitLicenseKeys = /* values here */ -``` - diff --git a/docs/models/webhooksubscriptionactivepayload.md b/docs/models/webhooksubscriptionactivepayload.md new file mode 100644 index 0000000..b425682 --- /dev/null +++ b/docs/models/webhooksubscriptionactivepayload.md @@ -0,0 +1,14 @@ +# WebhookSubscriptionActivePayload + +Sent when a subscription becomes active, +whether because it's a new paid subscription or because payment was recovered. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `data` | [models.SubscriptionInput](../models/subscriptioninput.md) | :heavy_check_mark: | N/A | +| `type` | [models.WebhookSubscriptionActivePayloadType](../models/webhooksubscriptionactivepayloadtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/webhooksubscriptionactivepayloadtype.md b/docs/models/webhooksubscriptionactivepayloadtype.md new file mode 100644 index 0000000..88301ca --- /dev/null +++ b/docs/models/webhooksubscriptionactivepayloadtype.md @@ -0,0 +1,8 @@ +# WebhookSubscriptionActivePayloadType + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `SUBSCRIPTION_ACTIVE` | subscription.active | \ No newline at end of file diff --git a/docs/models/webhooksubscriptioncanceledpayload.md b/docs/models/webhooksubscriptioncanceledpayload.md new file mode 100644 index 0000000..9134895 --- /dev/null +++ b/docs/models/webhooksubscriptioncanceledpayload.md @@ -0,0 +1,14 @@ +# WebhookSubscriptionCanceledPayload + +Sent when a subscription is canceled by the user. +They might still have access until the end of the current period. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `data` | [models.SubscriptionInput](../models/subscriptioninput.md) | :heavy_check_mark: | N/A | +| `type` | [models.WebhookSubscriptionCanceledPayloadType](../models/webhooksubscriptioncanceledpayloadtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/webhooksubscriptioncanceledpayloadtype.md b/docs/models/webhooksubscriptioncanceledpayloadtype.md new file mode 100644 index 0000000..c93673a --- /dev/null +++ b/docs/models/webhooksubscriptioncanceledpayloadtype.md @@ -0,0 +1,8 @@ +# WebhookSubscriptionCanceledPayloadType + + +## Values + +| Name | Value | +| ----------------------- | ----------------------- | +| `SUBSCRIPTION_CANCELED` | subscription.canceled | \ No newline at end of file diff --git a/docs/models/webhooksubscriptionrevokedpayload.md b/docs/models/webhooksubscriptionrevokedpayload.md new file mode 100644 index 0000000..6364804 --- /dev/null +++ b/docs/models/webhooksubscriptionrevokedpayload.md @@ -0,0 +1,14 @@ +# WebhookSubscriptionRevokedPayload + +Sent when a subscription is revoked, the user looses access immediately. +Happens when the subscription is canceled, or payment is past due. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `data` | [models.SubscriptionInput](../models/subscriptioninput.md) | :heavy_check_mark: | N/A | +| `type` | [models.WebhookSubscriptionRevokedPayloadType](../models/webhooksubscriptionrevokedpayloadtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/webhooksubscriptionrevokedpayloadtype.md b/docs/models/webhooksubscriptionrevokedpayloadtype.md new file mode 100644 index 0000000..3da05ea --- /dev/null +++ b/docs/models/webhooksubscriptionrevokedpayloadtype.md @@ -0,0 +1,8 @@ +# WebhookSubscriptionRevokedPayloadType + + +## Values + +| Name | Value | +| ---------------------- | ---------------------- | +| `SUBSCRIPTION_REVOKED` | subscription.revoked | \ No newline at end of file diff --git a/docs/models/webhooksubscriptionupdatedpayload.md b/docs/models/webhooksubscriptionupdatedpayload.md index 0075aa1..dd054bb 100644 --- a/docs/models/webhooksubscriptionupdatedpayload.md +++ b/docs/models/webhooksubscriptionupdatedpayload.md @@ -1,8 +1,12 @@ # WebhookSubscriptionUpdatedPayload -Sent when a new subscription is updated. This event fires if the subscription is cancelled, both immediately and if the subscription is cancelled at the end of the current period. +Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals. -**Discord & Slack support:** On cancellation +If you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`. + +To listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field. + +**Discord & Slack support:** On cancellation and revocation. Renewals are skipped. ## Fields diff --git a/docs/sdks/articles/README.md b/docs/sdks/articles/README.md index f251f10..2c42a7d 100644 --- a/docs/sdks/articles/README.md +++ b/docs/sdks/articles/README.md @@ -7,6 +7,7 @@ * [list](#list) - List Articles * [create](#create) - Create Article +* [export](#export) - Export Articles * [get](#get) - Get Article * [update](#update) - Update Article * [delete](#delete) - Delete Article @@ -105,6 +106,45 @@ if res is not None: | models.HTTPValidationError | 422 | application/json | | models.SDKError | 4XX, 5XX | \*/\* | +## export + +Export organization articles. + +### Example Usage + +```python +from polar_sdk import Polar + +s = Polar( + access_token="", +) + +res = s.articles.export(organization_id="cf4e3d5e-2b50-4470-a85b-8d021391fabb") + +if res is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Any](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.HTTPValidationError | 422 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + ## get Get an article by ID. diff --git a/docs/sdks/benefits/README.md b/docs/sdks/benefits/README.md index f6c2f8e..19c57cc 100644 --- a/docs/sdks/benefits/README.md +++ b/docs/sdks/benefits/README.md @@ -96,7 +96,7 @@ if res is not None: ### Response -**[models.BenefitsCreateResponseBenefitsCreate](../../models/benefitscreateresponsebenefitscreate.md)** +**[models.Benefit](../../models/benefit.md)** ### Errors @@ -135,7 +135,7 @@ if res is not None: ### Response -**[models.BenefitsGetResponseBenefitsGet](../../models/benefitsgetresponsebenefitsget.md)** +**[models.Benefit](../../models/benefit.md)** ### Errors @@ -179,7 +179,7 @@ if res is not None: ### Response -**[models.BenefitsUpdateResponseBenefitsUpdate](../../models/benefitsupdateresponsebenefitsupdate.md)** +**[models.Benefit](../../models/benefit.md)** ### Errors diff --git a/pyproject.toml b/pyproject.toml index 95d8eb1..49fe21c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "polar-sdk" -version = "0.6.0" +version = "0.6.1" description = "Polar SDK for Python" authors = ["Polar",] readme = "README-PYPI.md" diff --git a/src/polar_sdk/_version.py b/src/polar_sdk/_version.py index 72e17a3..5d808bf 100644 --- a/src/polar_sdk/_version.py +++ b/src/polar_sdk/_version.py @@ -3,7 +3,7 @@ import importlib.metadata __title__: str = "polar-sdk" -__version__: str = "0.6.0" +__version__: str = "0.6.1" try: if __package__ is not None: diff --git a/src/polar_sdk/articles.py b/src/polar_sdk/articles.py index 0a0a82d..446c5af 100644 --- a/src/polar_sdk/articles.py +++ b/src/polar_sdk/articles.py @@ -473,6 +473,170 @@ async def create_async( http_res, ) + def export( + self, + *, + organization_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[Any]: + r"""Export Articles + + Export organization articles. + + :param organization_id: + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = models.ArticlesExportRequest( + organization_id=organization_id, + ) + + req = self.build_request( + method="GET", + path="/v1/articles/export", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="articles:export", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return utils.unmarshal_json(http_res.text, Optional[Any]) + if utils.match_response(http_res, "422", "application/json"): + data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData) + raise models.HTTPValidationError(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise models.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise models.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + + async def export_async( + self, + *, + organization_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[Any]: + r"""Export Articles + + Export organization articles. + + :param organization_id: + :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 + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + request = models.ArticlesExportRequest( + organization_id=organization_id, + ) + + req = self.build_request_async( + method="GET", + path="/v1/articles/export", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="articles:export", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return utils.unmarshal_json(http_res.text, Optional[Any]) + if utils.match_response(http_res, "422", "application/json"): + data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData) + raise models.HTTPValidationError(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + raise models.SDKError( + "API error occurred", http_res.status_code, http_res.text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + raise models.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res.text, + http_res, + ) + def get( self, *, diff --git a/src/polar_sdk/benefits.py b/src/polar_sdk/benefits.py index d55c331..1fd8906 100644 --- a/src/polar_sdk/benefits.py +++ b/src/polar_sdk/benefits.py @@ -283,7 +283,7 @@ def create( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> Optional[models.BenefitsCreateResponseBenefitsCreate]: + ) -> Optional[models.Benefit]: r"""Create Benefit Create a benefit. @@ -344,9 +344,7 @@ def create( data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[models.BenefitsCreateResponseBenefitsCreate] - ) + return utils.unmarshal_json(http_res.text, Optional[models.Benefit]) if utils.match_response(http_res, "422", "application/json"): data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData) raise models.HTTPValidationError(data=data) @@ -373,7 +371,7 @@ async def create_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> Optional[models.BenefitsCreateResponseBenefitsCreate]: + ) -> Optional[models.Benefit]: r"""Create Benefit Create a benefit. @@ -434,9 +432,7 @@ async def create_async( data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[models.BenefitsCreateResponseBenefitsCreate] - ) + return utils.unmarshal_json(http_res.text, Optional[models.Benefit]) if utils.match_response(http_res, "422", "application/json"): data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData) raise models.HTTPValidationError(data=data) @@ -460,7 +456,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> Optional[models.BenefitsGetResponseBenefitsGet]: + ) -> Optional[models.Benefit]: r"""Get Benefit Get a benefit by ID. @@ -518,9 +514,7 @@ def get( data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[models.BenefitsGetResponseBenefitsGet] - ) + return utils.unmarshal_json(http_res.text, Optional[models.Benefit]) if utils.match_response(http_res, "404", "application/json"): data = utils.unmarshal_json(http_res.text, models.ResourceNotFoundData) raise models.ResourceNotFound(data=data) @@ -547,7 +541,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> Optional[models.BenefitsGetResponseBenefitsGet]: + ) -> Optional[models.Benefit]: r"""Get Benefit Get a benefit by ID. @@ -605,9 +599,7 @@ async def get_async( data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[models.BenefitsGetResponseBenefitsGet] - ) + return utils.unmarshal_json(http_res.text, Optional[models.Benefit]) if utils.match_response(http_res, "404", "application/json"): data = utils.unmarshal_json(http_res.text, models.ResourceNotFoundData) raise models.ResourceNotFound(data=data) @@ -638,7 +630,7 @@ def update( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> Optional[models.BenefitsUpdateResponseBenefitsUpdate]: + ) -> Optional[models.Benefit]: r"""Update Benefit Update a benefit. @@ -707,9 +699,7 @@ def update( data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[models.BenefitsUpdateResponseBenefitsUpdate] - ) + return utils.unmarshal_json(http_res.text, Optional[models.Benefit]) if utils.match_response(http_res, "403", "application/json"): data = utils.unmarshal_json(http_res.text, models.NotPermittedData) raise models.NotPermitted(data=data) @@ -743,7 +733,7 @@ async def update_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> Optional[models.BenefitsUpdateResponseBenefitsUpdate]: + ) -> Optional[models.Benefit]: r"""Update Benefit Update a benefit. @@ -812,9 +802,7 @@ async def update_async( data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[models.BenefitsUpdateResponseBenefitsUpdate] - ) + return utils.unmarshal_json(http_res.text, Optional[models.Benefit]) if utils.match_response(http_res, "403", "application/json"): data = utils.unmarshal_json(http_res.text, models.NotPermittedData) raise models.NotPermitted(data=data) diff --git a/src/polar_sdk/models/__init__.py b/src/polar_sdk/models/__init__.py index 6b758e8..50e65c1 100644 --- a/src/polar_sdk/models/__init__.py +++ b/src/polar_sdk/models/__init__.py @@ -24,15 +24,11 @@ ) from .article import Article, ArticleTypedDict from .articlebyline import ArticleByline -from .articlecreate import ( - ArticleCreate, - ArticleCreateArticleByline, - ArticleCreateArticleVisibility, - ArticleCreateTypedDict, -) +from .articlecreate import ArticleCreate, ArticleCreateTypedDict from .articlepreview import ArticlePreview, ArticlePreviewTypedDict from .articlereceivers import ArticleReceivers, ArticleReceiversTypedDict from .articles_deleteop import ArticlesDeleteRequest, ArticlesDeleteRequestTypedDict +from .articles_exportop import ArticlesExportRequest, ArticlesExportRequestTypedDict from .articles_getop import ArticlesGetRequest, ArticlesGetRequestTypedDict from .articles_listop import ( ArticleVisibilityFilter, @@ -55,6 +51,8 @@ from .articlevisibility import ArticleVisibility from .assignee import Assignee, AssigneeTypedDict from .author import Author, AuthorTypedDict +from .benefit import Benefit, BenefitTypedDict +from .benefit_input import BenefitInput, BenefitInputTypedDict from .benefitads import BenefitAds, BenefitAdsType, BenefitAdsTypedDict from .benefitadscreate import ( BenefitAdsCreate, @@ -278,8 +276,6 @@ ) from .benefitgrantwebhook import ( BenefitGrantWebhook, - BenefitGrantWebhookBenefit, - BenefitGrantWebhookBenefitTypedDict, BenefitGrantWebhookProperties, BenefitGrantWebhookPropertiesTypedDict, BenefitGrantWebhookTypedDict, @@ -330,16 +326,9 @@ from .benefits_createop import ( BenefitsCreateBenefitCreate, BenefitsCreateBenefitCreateTypedDict, - BenefitsCreateResponseBenefitsCreate, - BenefitsCreateResponseBenefitsCreateTypedDict, ) from .benefits_deleteop import BenefitsDeleteRequest, BenefitsDeleteRequestTypedDict -from .benefits_getop import ( - BenefitsGetRequest, - BenefitsGetRequestTypedDict, - BenefitsGetResponseBenefitsGet, - BenefitsGetResponseBenefitsGetTypedDict, -) +from .benefits_getop import BenefitsGetRequest, BenefitsGetRequestTypedDict from .benefits_grantsop import ( BenefitsGrantsRequest, BenefitsGrantsRequestTypedDict, @@ -361,8 +350,6 @@ BenefitsUpdateBenefitUpdateTypedDict, BenefitsUpdateRequest, BenefitsUpdateRequestTypedDict, - BenefitsUpdateResponseBenefitsUpdate, - BenefitsUpdateResponseBenefitsUpdateTypedDict, ) from .benefittype import BenefitType from .bylineprofile import BylineProfile, BylineProfileTypedDict @@ -466,6 +453,7 @@ from .fileuploadcompleted import FileUploadCompleted, FileUploadCompletedTypedDict from .funding import Funding, FundingTypedDict from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData +from .interval import Interval from .introspecttokenresponse import ( IntrospectTokenResponse, IntrospectTokenResponseTokenType, @@ -514,6 +502,7 @@ from .licensekeyread import LicenseKeyRead, LicenseKeyReadTypedDict from .licensekeystatus import LicenseKeyStatus from .licensekeyupdate import LicenseKeyUpdate, LicenseKeyUpdateTypedDict +from .licensekeyuser import LicenseKeyUser, LicenseKeyUserTypedDict from .licensekeyvalidate import ( Conditions, ConditionsTypedDict, @@ -525,12 +514,7 @@ LicenseKeyWithActivationsTypedDict, ) from .listresource_article_ import ListResourceArticle, ListResourceArticleTypedDict -from .listresource_benefit_ import ( - Benefit, - BenefitTypedDict, - ListResourceBenefit, - ListResourceBenefitTypedDict, -) +from .listresource_benefit_ import ListResourceBenefit, ListResourceBenefitTypedDict from .listresource_benefitgrant_ import ( ListResourceBenefitGrant, ListResourceBenefitGrantTypedDict, @@ -594,7 +578,6 @@ from .metricperiod import MetricPeriod, MetricPeriodTypedDict from .metrics import Metrics, MetricsTypedDict from .metrics_getop import ( - Interval, MetricsGetQueryParamOrganizationIDFilter, MetricsGetQueryParamOrganizationIDFilterTypedDict, MetricsGetQueryParamProductIDFilter, @@ -681,6 +664,7 @@ Onev11oauth21tokenPostXComponentsRefreshTokenRequestTypedDict, ) from .order import Order, OrderTypedDict +from .orderbillingreason import OrderBillingReason from .orderinvoice import OrderInvoice, OrderInvoiceTypedDict from .orderproduct import OrderProduct, OrderProductTypedDict from .orders_getop import OrdersGetRequest, OrdersGetRequestTypedDict @@ -1134,8 +1118,6 @@ ) from .webhookbenefitcreatedpayload import ( WebhookBenefitCreatedPayload, - WebhookBenefitCreatedPayloadBenefit, - WebhookBenefitCreatedPayloadBenefitTypedDict, WebhookBenefitCreatedPayloadType, WebhookBenefitCreatedPayloadTypedDict, ) @@ -1156,8 +1138,6 @@ ) from .webhookbenefitupdatedpayload import ( WebhookBenefitUpdatedPayload, - WebhookBenefitUpdatedPayloadBenefit, - WebhookBenefitUpdatedPayloadBenefitTypedDict, WebhookBenefitUpdatedPayloadType, WebhookBenefitUpdatedPayloadTypedDict, ) @@ -1206,11 +1186,26 @@ WebhookProductUpdatedPayloadType, WebhookProductUpdatedPayloadTypedDict, ) +from .webhooksubscriptionactivepayload import ( + WebhookSubscriptionActivePayload, + WebhookSubscriptionActivePayloadType, + WebhookSubscriptionActivePayloadTypedDict, +) +from .webhooksubscriptioncanceledpayload import ( + WebhookSubscriptionCanceledPayload, + WebhookSubscriptionCanceledPayloadType, + WebhookSubscriptionCanceledPayloadTypedDict, +) from .webhooksubscriptioncreatedpayload import ( WebhookSubscriptionCreatedPayload, WebhookSubscriptionCreatedPayloadType, WebhookSubscriptionCreatedPayloadTypedDict, ) +from .webhooksubscriptionrevokedpayload import ( + WebhookSubscriptionRevokedPayload, + WebhookSubscriptionRevokedPayloadType, + WebhookSubscriptionRevokedPayloadTypedDict, +) from .webhooksubscriptionupdatedpayload import ( WebhookSubscriptionUpdatedPayload, WebhookSubscriptionUpdatedPayloadType, @@ -1238,8 +1233,6 @@ "Article", "ArticleByline", "ArticleCreate", - "ArticleCreateArticleByline", - "ArticleCreateArticleVisibility", "ArticleCreateTypedDict", "ArticlePreview", "ArticlePreviewTypedDict", @@ -1253,6 +1246,8 @@ "ArticleVisibilityFilterTypedDict", "ArticlesDeleteRequest", "ArticlesDeleteRequestTypedDict", + "ArticlesExportRequest", + "ArticlesExportRequestTypedDict", "ArticlesGetRequest", "ArticlesGetRequestTypedDict", "ArticlesListQueryParamOrganizationIDFilter", @@ -1405,13 +1400,13 @@ "BenefitGrantSubscriberTypedDict", "BenefitGrantTypedDict", "BenefitGrantWebhook", - "BenefitGrantWebhookBenefit", - "BenefitGrantWebhookBenefitTypedDict", "BenefitGrantWebhookProperties", "BenefitGrantWebhookPropertiesTypedDict", "BenefitGrantWebhookTypedDict", "BenefitIDFilter", "BenefitIDFilterTypedDict", + "BenefitInput", + "BenefitInputTypedDict", "BenefitLicenseKeyActivationProperties", "BenefitLicenseKeyActivationPropertiesTypedDict", "BenefitLicenseKeyExpirationProperties", @@ -1440,14 +1435,10 @@ "BenefitTypedDict", "BenefitsCreateBenefitCreate", "BenefitsCreateBenefitCreateTypedDict", - "BenefitsCreateResponseBenefitsCreate", - "BenefitsCreateResponseBenefitsCreateTypedDict", "BenefitsDeleteRequest", "BenefitsDeleteRequestTypedDict", "BenefitsGetRequest", "BenefitsGetRequestTypedDict", - "BenefitsGetResponseBenefitsGet", - "BenefitsGetResponseBenefitsGetTypedDict", "BenefitsGrantsRequest", "BenefitsGrantsRequestTypedDict", "BenefitsGrantsResponse", @@ -1464,8 +1455,6 @@ "BenefitsUpdateBenefitUpdateTypedDict", "BenefitsUpdateRequest", "BenefitsUpdateRequestTypedDict", - "BenefitsUpdateResponseBenefitsUpdate", - "BenefitsUpdateResponseBenefitsUpdateTypedDict", "BylineProfile", "BylineProfileTypedDict", "CheckoutConfirmStripe", @@ -1596,6 +1585,8 @@ "LicenseKeyStatus", "LicenseKeyUpdate", "LicenseKeyUpdateTypedDict", + "LicenseKeyUser", + "LicenseKeyUserTypedDict", "LicenseKeyValidate", "LicenseKeyValidateTypedDict", "LicenseKeyWithActivations", @@ -1715,6 +1706,7 @@ "Onev11oauth21tokenPostXComponentsRefreshTokenRequestGrantType", "Onev11oauth21tokenPostXComponentsRefreshTokenRequestTypedDict", "Order", + "OrderBillingReason", "OrderIDFilter", "OrderIDFilterTypedDict", "OrderInvoice", @@ -2088,8 +2080,6 @@ "ValidationError", "ValidationErrorTypedDict", "WebhookBenefitCreatedPayload", - "WebhookBenefitCreatedPayloadBenefit", - "WebhookBenefitCreatedPayloadBenefitTypedDict", "WebhookBenefitCreatedPayloadType", "WebhookBenefitCreatedPayloadTypedDict", "WebhookBenefitGrantCreatedPayload", @@ -2102,8 +2092,6 @@ "WebhookBenefitGrantUpdatedPayloadType", "WebhookBenefitGrantUpdatedPayloadTypedDict", "WebhookBenefitUpdatedPayload", - "WebhookBenefitUpdatedPayloadBenefit", - "WebhookBenefitUpdatedPayloadBenefitTypedDict", "WebhookBenefitUpdatedPayloadType", "WebhookBenefitUpdatedPayloadTypedDict", "WebhookCheckoutCreatedPayload", @@ -2133,9 +2121,18 @@ "WebhookProductUpdatedPayload", "WebhookProductUpdatedPayloadType", "WebhookProductUpdatedPayloadTypedDict", + "WebhookSubscriptionActivePayload", + "WebhookSubscriptionActivePayloadType", + "WebhookSubscriptionActivePayloadTypedDict", + "WebhookSubscriptionCanceledPayload", + "WebhookSubscriptionCanceledPayloadType", + "WebhookSubscriptionCanceledPayloadTypedDict", "WebhookSubscriptionCreatedPayload", "WebhookSubscriptionCreatedPayloadType", "WebhookSubscriptionCreatedPayloadTypedDict", + "WebhookSubscriptionRevokedPayload", + "WebhookSubscriptionRevokedPayloadType", + "WebhookSubscriptionRevokedPayloadTypedDict", "WebhookSubscriptionUpdatedPayload", "WebhookSubscriptionUpdatedPayloadType", "WebhookSubscriptionUpdatedPayloadTypedDict", diff --git a/src/polar_sdk/models/articlecreate.py b/src/polar_sdk/models/articlecreate.py index 8d86f6c..152feef 100644 --- a/src/polar_sdk/models/articlecreate.py +++ b/src/polar_sdk/models/articlecreate.py @@ -1,27 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .articlebyline import ArticleByline +from .articlevisibility import ArticleVisibility from datetime import datetime -from enum import Enum from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict -class ArticleCreateArticleByline(str, Enum): - r"""If the user or organization should be credited in the byline.""" - - USER = "user" - ORGANIZATION = "organization" - - -class ArticleCreateArticleVisibility(str, Enum): - PUBLIC = "public" - HIDDEN = "hidden" - PRIVATE = "private" - - class ArticleCreateTypedDict(TypedDict): title: str r"""Title of the article.""" @@ -33,9 +21,8 @@ class ArticleCreateTypedDict(TypedDict): r"""Body in base64-encoded format. Can be helpful to bypass Web Application Firewalls (WAF). Either one of body or body_base64 is required.""" organization_id: NotRequired[Nullable[str]] r"""The ID of the organization owning the article. **Required unless you use an organization token.**""" - byline: NotRequired[ArticleCreateArticleByline] - r"""If the user or organization should be credited in the byline.""" - visibility: NotRequired[ArticleCreateArticleVisibility] + byline: NotRequired[ArticleByline] + visibility: NotRequired[ArticleVisibility] paid_subscribers_only: NotRequired[bool] r"""Set to true to only make this article available for subscribers to a paid subscription tier in the organization.""" paid_subscribers_only_ends_at: NotRequired[Nullable[datetime]] @@ -68,14 +55,9 @@ class ArticleCreate(BaseModel): organization_id: OptionalNullable[str] = UNSET r"""The ID of the organization owning the article. **Required unless you use an organization token.**""" - byline: Optional[ArticleCreateArticleByline] = ( - ArticleCreateArticleByline.ORGANIZATION - ) - r"""If the user or organization should be credited in the byline.""" + byline: Optional[ArticleByline] = None - visibility: Optional[ArticleCreateArticleVisibility] = ( - ArticleCreateArticleVisibility.PRIVATE - ) + visibility: Optional[ArticleVisibility] = None paid_subscribers_only: Optional[bool] = False r"""Set to true to only make this article available for subscribers to a paid subscription tier in the organization.""" diff --git a/src/polar_sdk/models/articles_exportop.py b/src/polar_sdk/models/articles_exportop.py new file mode 100644 index 0000000..f0f5285 --- /dev/null +++ b/src/polar_sdk/models/articles_exportop.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from polar_sdk.types import BaseModel +from polar_sdk.utils import FieldMetadata, QueryParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ArticlesExportRequestTypedDict(TypedDict): + organization_id: str + + +class ArticlesExportRequest(BaseModel): + organization_id: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] diff --git a/src/polar_sdk/models/benefit.py b/src/polar_sdk/models/benefit.py new file mode 100644 index 0000000..008704a --- /dev/null +++ b/src/polar_sdk/models/benefit.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .benefitads import BenefitAds, BenefitAdsTypedDict +from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict +from .benefitcustom import BenefitCustom, BenefitCustomTypedDict +from .benefitdiscord import BenefitDiscord, BenefitDiscordTypedDict +from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict +from .benefitgithubrepository import ( + BenefitGitHubRepository, + BenefitGitHubRepositoryTypedDict, +) +from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict +from typing import Union + + +BenefitTypedDict = Union[ + BenefitArticlesTypedDict, + BenefitAdsTypedDict, + BenefitDiscordTypedDict, + BenefitGitHubRepositoryTypedDict, + BenefitDownloadablesTypedDict, + BenefitLicenseKeysTypedDict, + BenefitCustomTypedDict, +] + + +Benefit = Union[ + BenefitArticles, + BenefitAds, + BenefitDiscord, + BenefitGitHubRepository, + BenefitDownloadables, + BenefitLicenseKeys, + BenefitCustom, +] diff --git a/src/polar_sdk/models/benefit_input.py b/src/polar_sdk/models/benefit_input.py new file mode 100644 index 0000000..2068beb --- /dev/null +++ b/src/polar_sdk/models/benefit_input.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .benefitads import BenefitAds, BenefitAdsTypedDict +from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict +from .benefitcustom import BenefitCustom, BenefitCustomTypedDict +from .benefitdiscord import BenefitDiscordInput, BenefitDiscordInputTypedDict +from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict +from .benefitgithubrepository import ( + BenefitGitHubRepository, + BenefitGitHubRepositoryTypedDict, +) +from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict +from typing import Union + + +BenefitInputTypedDict = Union[ + BenefitArticlesTypedDict, + BenefitAdsTypedDict, + BenefitDiscordInputTypedDict, + BenefitGitHubRepositoryTypedDict, + BenefitDownloadablesTypedDict, + BenefitLicenseKeysTypedDict, + BenefitCustomTypedDict, +] + + +BenefitInput = Union[ + BenefitArticles, + BenefitAds, + BenefitDiscordInput, + BenefitGitHubRepository, + BenefitDownloadables, + BenefitLicenseKeys, + BenefitCustom, +] diff --git a/src/polar_sdk/models/benefitbase.py b/src/polar_sdk/models/benefitbase.py index 0e407c7..df567eb 100644 --- a/src/polar_sdk/models/benefitbase.py +++ b/src/polar_sdk/models/benefitbase.py @@ -16,7 +16,6 @@ class BenefitBaseTypedDict(TypedDict): id: str r"""The ID of the benefit.""" type: BenefitType - r"""The type of the benefit.""" description: str r"""The description of the benefit.""" selectable: bool @@ -38,7 +37,6 @@ class BenefitBase(BaseModel): r"""The ID of the benefit.""" type: BenefitType - r"""The type of the benefit.""" description: str r"""The description of the benefit.""" diff --git a/src/polar_sdk/models/benefitgrantwebhook.py b/src/polar_sdk/models/benefitgrantwebhook.py index 70ce545..d96c51d 100644 --- a/src/polar_sdk/models/benefitgrantwebhook.py +++ b/src/polar_sdk/models/benefitgrantwebhook.py @@ -1,15 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .benefitads import BenefitAds, BenefitAdsTypedDict -from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict -from .benefitcustom import BenefitCustom, BenefitCustomTypedDict -from .benefitdiscord import BenefitDiscordInput, BenefitDiscordInputTypedDict -from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict -from .benefitgithubrepository import ( - BenefitGitHubRepository, - BenefitGitHubRepositoryTypedDict, -) +from .benefit_input import BenefitInput, BenefitInputTypedDict from .benefitgrantadsproperties import ( BenefitGrantAdsProperties, BenefitGrantAdsPropertiesTypedDict, @@ -38,7 +30,6 @@ BenefitGrantLicenseKeysProperties, BenefitGrantLicenseKeysPropertiesTypedDict, ) -from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict from datetime import datetime from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from pydantic import model_serializer @@ -68,28 +59,6 @@ ] -BenefitGrantWebhookBenefitTypedDict = Union[ - BenefitArticlesTypedDict, - BenefitAdsTypedDict, - BenefitDiscordInputTypedDict, - BenefitGitHubRepositoryTypedDict, - BenefitDownloadablesTypedDict, - BenefitLicenseKeysTypedDict, - BenefitCustomTypedDict, -] - - -BenefitGrantWebhookBenefit = Union[ - BenefitArticles, - BenefitAds, - BenefitDiscordInput, - BenefitGitHubRepository, - BenefitDownloadables, - BenefitLicenseKeys, - BenefitCustom, -] - - PreviousPropertiesTypedDict = Union[ BenefitGrantCustomPropertiesTypedDict, BenefitGrantArticlesPropertiesTypedDict, @@ -132,7 +101,7 @@ class BenefitGrantWebhookTypedDict(TypedDict): benefit_id: str r"""The ID of the benefit concerned by this grant.""" properties: BenefitGrantWebhookPropertiesTypedDict - benefit: BenefitGrantWebhookBenefitTypedDict + benefit: BenefitInputTypedDict granted_at: NotRequired[Nullable[datetime]] r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" revoked_at: NotRequired[Nullable[datetime]] @@ -170,7 +139,7 @@ class BenefitGrantWebhook(BaseModel): properties: BenefitGrantWebhookProperties - benefit: BenefitGrantWebhookBenefit + benefit: BenefitInput granted_at: OptionalNullable[datetime] = UNSET r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" diff --git a/src/polar_sdk/models/benefits_createop.py b/src/polar_sdk/models/benefits_createop.py index 7ef2ce5..fb9bb61 100644 --- a/src/polar_sdk/models/benefits_createop.py +++ b/src/polar_sdk/models/benefits_createop.py @@ -1,27 +1,17 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .benefitads import BenefitAds, BenefitAdsTypedDict from .benefitadscreate import BenefitAdsCreate, BenefitAdsCreateTypedDict -from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict -from .benefitcustom import BenefitCustom, BenefitCustomTypedDict from .benefitcustomcreate import BenefitCustomCreate, BenefitCustomCreateTypedDict -from .benefitdiscord import BenefitDiscord, BenefitDiscordTypedDict from .benefitdiscordcreate import BenefitDiscordCreate, BenefitDiscordCreateTypedDict -from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict from .benefitdownloadablescreate import ( BenefitDownloadablesCreate, BenefitDownloadablesCreateTypedDict, ) -from .benefitgithubrepository import ( - BenefitGitHubRepository, - BenefitGitHubRepositoryTypedDict, -) from .benefitgithubrepositorycreate import ( BenefitGitHubRepositoryCreate, BenefitGitHubRepositoryCreateTypedDict, ) -from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict from .benefitlicensekeyscreate import ( BenefitLicenseKeysCreate, BenefitLicenseKeysCreateTypedDict, @@ -53,27 +43,3 @@ ], Discriminator(lambda m: get_discriminator(m, "type", "type")), ] - - -BenefitsCreateResponseBenefitsCreateTypedDict = Union[ - BenefitArticlesTypedDict, - BenefitAdsTypedDict, - BenefitDiscordTypedDict, - BenefitGitHubRepositoryTypedDict, - BenefitDownloadablesTypedDict, - BenefitLicenseKeysTypedDict, - BenefitCustomTypedDict, -] -r"""Benefit created.""" - - -BenefitsCreateResponseBenefitsCreate = Union[ - BenefitArticles, - BenefitAds, - BenefitDiscord, - BenefitGitHubRepository, - BenefitDownloadables, - BenefitLicenseKeys, - BenefitCustom, -] -r"""Benefit created.""" diff --git a/src/polar_sdk/models/benefits_getop.py b/src/polar_sdk/models/benefits_getop.py index a96fecf..aae6217 100644 --- a/src/polar_sdk/models/benefits_getop.py +++ b/src/polar_sdk/models/benefits_getop.py @@ -1,19 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .benefitads import BenefitAds, BenefitAdsTypedDict -from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict -from .benefitcustom import BenefitCustom, BenefitCustomTypedDict -from .benefitdiscord import BenefitDiscord, BenefitDiscordTypedDict -from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict -from .benefitgithubrepository import ( - BenefitGitHubRepository, - BenefitGitHubRepositoryTypedDict, -) -from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict from polar_sdk.types import BaseModel from polar_sdk.utils import FieldMetadata, PathParamMetadata -from typing import Union from typing_extensions import Annotated, TypedDict @@ -25,27 +14,3 @@ class BenefitsGetRequest(BaseModel): id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - - -BenefitsGetResponseBenefitsGetTypedDict = Union[ - BenefitArticlesTypedDict, - BenefitAdsTypedDict, - BenefitDiscordTypedDict, - BenefitGitHubRepositoryTypedDict, - BenefitDownloadablesTypedDict, - BenefitLicenseKeysTypedDict, - BenefitCustomTypedDict, -] -r"""Successful Response""" - - -BenefitsGetResponseBenefitsGet = Union[ - BenefitArticles, - BenefitAds, - BenefitDiscord, - BenefitGitHubRepository, - BenefitDownloadables, - BenefitLicenseKeys, - BenefitCustom, -] -r"""Successful Response""" diff --git a/src/polar_sdk/models/benefits_updateop.py b/src/polar_sdk/models/benefits_updateop.py index a7427fa..b1fe5c2 100644 --- a/src/polar_sdk/models/benefits_updateop.py +++ b/src/polar_sdk/models/benefits_updateop.py @@ -1,28 +1,18 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .benefitads import BenefitAds, BenefitAdsTypedDict from .benefitadsupdate import BenefitAdsUpdate, BenefitAdsUpdateTypedDict -from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict from .benefitarticlesupdate import BenefitArticlesUpdate, BenefitArticlesUpdateTypedDict -from .benefitcustom import BenefitCustom, BenefitCustomTypedDict from .benefitcustomupdate import BenefitCustomUpdate, BenefitCustomUpdateTypedDict -from .benefitdiscord import BenefitDiscord, BenefitDiscordTypedDict from .benefitdiscordupdate import BenefitDiscordUpdate, BenefitDiscordUpdateTypedDict -from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict from .benefitdownloadablesupdate import ( BenefitDownloadablesUpdate, BenefitDownloadablesUpdateTypedDict, ) -from .benefitgithubrepository import ( - BenefitGitHubRepository, - BenefitGitHubRepositoryTypedDict, -) from .benefitgithubrepositoryupdate import ( BenefitGitHubRepositoryUpdate, BenefitGitHubRepositoryUpdateTypedDict, ) -from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict from .benefitlicensekeysupdate import ( BenefitLicenseKeysUpdate, BenefitLicenseKeysUpdateTypedDict, @@ -69,27 +59,3 @@ class BenefitsUpdateRequest(BaseModel): BenefitsUpdateBenefitUpdate, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] - - -BenefitsUpdateResponseBenefitsUpdateTypedDict = Union[ - BenefitArticlesTypedDict, - BenefitAdsTypedDict, - BenefitDiscordTypedDict, - BenefitGitHubRepositoryTypedDict, - BenefitDownloadablesTypedDict, - BenefitLicenseKeysTypedDict, - BenefitCustomTypedDict, -] -r"""Benefit updated.""" - - -BenefitsUpdateResponseBenefitsUpdate = Union[ - BenefitArticles, - BenefitAds, - BenefitDiscord, - BenefitGitHubRepository, - BenefitDownloadables, - BenefitLicenseKeys, - BenefitCustom, -] -r"""Benefit updated.""" diff --git a/src/polar_sdk/models/checkoutpublic.py b/src/polar_sdk/models/checkoutpublic.py index 2d7876d..e587a2e 100644 --- a/src/polar_sdk/models/checkoutpublic.py +++ b/src/polar_sdk/models/checkoutpublic.py @@ -33,7 +33,6 @@ class CheckoutPublicTypedDict(TypedDict): id: str r"""The ID of the object.""" status: CheckoutStatus - r"""Status of the checkout session.""" client_secret: str r"""Client secret used to update and complete the checkout session from the client.""" expires_at: datetime @@ -65,7 +64,6 @@ class CheckoutPublicTypedDict(TypedDict): product_price: ProductPriceTypedDict url: str payment_processor: PolarEnumsPaymentProcessor - r"""Payment processor used.""" class CheckoutPublic(BaseModel): @@ -81,7 +79,6 @@ class CheckoutPublic(BaseModel): r"""The ID of the object.""" status: CheckoutStatus - r"""Status of the checkout session.""" client_secret: str r"""Client secret used to update and complete the checkout session from the client.""" @@ -140,7 +137,6 @@ class CheckoutPublic(BaseModel): ], pydantic.Field(alias="payment_processor"), ] = PolarEnumsPaymentProcessor.STRIPE - r"""Payment processor used.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/polar_sdk/models/interval.py b/src/polar_sdk/models/interval.py new file mode 100644 index 0000000..d06c739 --- /dev/null +++ b/src/polar_sdk/models/interval.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class Interval(str, Enum): + YEAR = "year" + MONTH = "month" + WEEK = "week" + DAY = "day" + HOUR = "hour" diff --git a/src/polar_sdk/models/issue.py b/src/polar_sdk/models/issue.py index a532b3f..291b8c3 100644 --- a/src/polar_sdk/models/issue.py +++ b/src/polar_sdk/models/issue.py @@ -31,11 +31,9 @@ class IssueTypedDict(TypedDict): r"""If a maintainer needs to mark this issue as solved""" funding: FundingTypedDict repository: RepositoryInputTypedDict - r"""The repository that the issue is in""" pledge_badge_currently_embedded: bool r"""If this issue currently has the Polar badge SVG embedded""" platform: Platforms - r"""Issue platform (currently always GitHub)""" body: NotRequired[Nullable[str]] r"""GitHub issue body""" comments: NotRequired[Nullable[int]] @@ -76,7 +74,6 @@ class Issue(BaseModel): funding: Funding repository: RepositoryInput - r"""The repository that the issue is in""" pledge_badge_currently_embedded: bool r"""If this issue currently has the Polar badge SVG embedded""" @@ -85,7 +82,6 @@ class Issue(BaseModel): Annotated[Platforms, AfterValidator(validate_const(Platforms.GITHUB))], pydantic.Field(alias="platform"), ] = Platforms.GITHUB - r"""Issue platform (currently always GitHub)""" body: OptionalNullable[str] = UNSET r"""GitHub issue body""" diff --git a/src/polar_sdk/models/licensekeyread.py b/src/polar_sdk/models/licensekeyread.py index 2ea30f9..76c6987 100644 --- a/src/polar_sdk/models/licensekeyread.py +++ b/src/polar_sdk/models/licensekeyread.py @@ -2,6 +2,7 @@ from __future__ import annotations from .licensekeystatus import LicenseKeyStatus +from .licensekeyuser import LicenseKeyUser, LicenseKeyUserTypedDict from datetime import datetime from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL from pydantic import model_serializer @@ -12,6 +13,7 @@ class LicenseKeyReadTypedDict(TypedDict): id: str organization_id: str user_id: str + user: LicenseKeyUserTypedDict benefit_id: str r"""The benefit ID.""" key: str @@ -32,6 +34,8 @@ class LicenseKeyRead(BaseModel): user_id: str + user: LicenseKeyUser + benefit_id: str r"""The benefit ID.""" diff --git a/src/polar_sdk/models/licensekeyuser.py b/src/polar_sdk/models/licensekeyuser.py new file mode 100644 index 0000000..a4ff1a0 --- /dev/null +++ b/src/polar_sdk/models/licensekeyuser.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class LicenseKeyUserTypedDict(TypedDict): + id: str + public_name: str + email: str + avatar_url: Nullable[str] + + +class LicenseKeyUser(BaseModel): + id: str + + public_name: str + + email: str + + avatar_url: Nullable[str] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["avatar_url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in self.model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/polar_sdk/models/licensekeywithactivations.py b/src/polar_sdk/models/licensekeywithactivations.py index d619571..29eea1b 100644 --- a/src/polar_sdk/models/licensekeywithactivations.py +++ b/src/polar_sdk/models/licensekeywithactivations.py @@ -6,6 +6,7 @@ LicenseKeyActivationBaseTypedDict, ) from .licensekeystatus import LicenseKeyStatus +from .licensekeyuser import LicenseKeyUser, LicenseKeyUserTypedDict from datetime import datetime from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL from pydantic import model_serializer @@ -17,6 +18,7 @@ class LicenseKeyWithActivationsTypedDict(TypedDict): id: str organization_id: str user_id: str + user: LicenseKeyUserTypedDict benefit_id: str r"""The benefit ID.""" key: str @@ -38,6 +40,8 @@ class LicenseKeyWithActivations(BaseModel): user_id: str + user: LicenseKeyUser + benefit_id: str r"""The benefit ID.""" diff --git a/src/polar_sdk/models/listresource_benefit_.py b/src/polar_sdk/models/listresource_benefit_.py index 2f81828..579eb55 100644 --- a/src/polar_sdk/models/listresource_benefit_.py +++ b/src/polar_sdk/models/listresource_benefit_.py @@ -1,44 +1,13 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .benefitads import BenefitAds, BenefitAdsTypedDict -from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict -from .benefitcustom import BenefitCustom, BenefitCustomTypedDict -from .benefitdiscord import BenefitDiscord, BenefitDiscordTypedDict -from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict -from .benefitgithubrepository import ( - BenefitGitHubRepository, - BenefitGitHubRepositoryTypedDict, -) -from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict +from .benefit import Benefit, BenefitTypedDict from .pagination import Pagination, PaginationTypedDict from polar_sdk.types import BaseModel -from typing import List, Union +from typing import List from typing_extensions import TypedDict -BenefitTypedDict = Union[ - BenefitArticlesTypedDict, - BenefitAdsTypedDict, - BenefitDiscordTypedDict, - BenefitGitHubRepositoryTypedDict, - BenefitDownloadablesTypedDict, - BenefitLicenseKeysTypedDict, - BenefitCustomTypedDict, -] - - -Benefit = Union[ - BenefitArticles, - BenefitAds, - BenefitDiscord, - BenefitGitHubRepository, - BenefitDownloadables, - BenefitLicenseKeys, - BenefitCustom, -] - - class ListResourceBenefitTypedDict(TypedDict): items: List[BenefitTypedDict] pagination: PaginationTypedDict diff --git a/src/polar_sdk/models/metric.py b/src/polar_sdk/models/metric.py index 67b59fd..03c53ae 100644 --- a/src/polar_sdk/models/metric.py +++ b/src/polar_sdk/models/metric.py @@ -14,7 +14,6 @@ class MetricTypedDict(TypedDict): display_name: str r"""Human-readable name for the metric.""" type: MetricType - r"""Type of the metric, useful to know the unit or format of the value.""" class Metric(BaseModel): @@ -27,4 +26,3 @@ class Metric(BaseModel): r"""Human-readable name for the metric.""" type: MetricType - r"""Type of the metric, useful to know the unit or format of the value.""" diff --git a/src/polar_sdk/models/metrics_getop.py b/src/polar_sdk/models/metrics_getop.py index 6c48bce..f775734 100644 --- a/src/polar_sdk/models/metrics_getop.py +++ b/src/polar_sdk/models/metrics_getop.py @@ -1,9 +1,9 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .interval import Interval from .productpricetype import ProductPriceType from datetime import date -from enum import Enum from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from polar_sdk.utils import FieldMetadata, QueryParamMetadata from pydantic import model_serializer @@ -11,16 +11,6 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class Interval(str, Enum): - r"""Interval between two timestamps.""" - - YEAR = "year" - MONTH = "month" - WEEK = "week" - DAY = "day" - HOUR = "hour" - - MetricsGetQueryParamOrganizationIDFilterTypedDict = Union[str, List[str]] r"""Filter by organization ID.""" diff --git a/src/polar_sdk/models/metricsintervalslimits.py b/src/polar_sdk/models/metricsintervalslimits.py index b038dc6..def2675 100644 --- a/src/polar_sdk/models/metricsintervalslimits.py +++ b/src/polar_sdk/models/metricsintervalslimits.py @@ -10,31 +10,31 @@ class MetricsIntervalsLimitsTypedDict(TypedDict): r"""Date interval limits to get metrics for each interval.""" hour: MetricsIntervalLimitTypedDict - r"""Limits for the hour interval.""" + r"""Date interval limit to get metrics for a given interval.""" day: MetricsIntervalLimitTypedDict - r"""Limits for the day interval.""" + r"""Date interval limit to get metrics for a given interval.""" week: MetricsIntervalLimitTypedDict - r"""Limits for the week interval.""" + r"""Date interval limit to get metrics for a given interval.""" month: MetricsIntervalLimitTypedDict - r"""Limits for the month interval.""" + r"""Date interval limit to get metrics for a given interval.""" year: MetricsIntervalLimitTypedDict - r"""Limits for the year interval.""" + r"""Date interval limit to get metrics for a given interval.""" class MetricsIntervalsLimits(BaseModel): r"""Date interval limits to get metrics for each interval.""" hour: MetricsIntervalLimit - r"""Limits for the hour interval.""" + r"""Date interval limit to get metrics for a given interval.""" day: MetricsIntervalLimit - r"""Limits for the day interval.""" + r"""Date interval limit to get metrics for a given interval.""" week: MetricsIntervalLimit - r"""Limits for the week interval.""" + r"""Date interval limit to get metrics for a given interval.""" month: MetricsIntervalLimit - r"""Limits for the month interval.""" + r"""Date interval limit to get metrics for a given interval.""" year: MetricsIntervalLimit - r"""Limits for the year interval.""" + r"""Date interval limit to get metrics for a given interval.""" diff --git a/src/polar_sdk/models/metricslimits.py b/src/polar_sdk/models/metricslimits.py index 9614999..cdc32fa 100644 --- a/src/polar_sdk/models/metricslimits.py +++ b/src/polar_sdk/models/metricslimits.py @@ -16,7 +16,7 @@ class MetricsLimitsTypedDict(TypedDict): min_date: date r"""Minimum date to get metrics.""" intervals: MetricsIntervalsLimitsTypedDict - r"""Limits for each interval.""" + r"""Date interval limits to get metrics for each interval.""" class MetricsLimits(BaseModel): @@ -26,4 +26,4 @@ class MetricsLimits(BaseModel): r"""Minimum date to get metrics.""" intervals: MetricsIntervalsLimits - r"""Limits for each interval.""" + r"""Date interval limits to get metrics for each interval.""" diff --git a/src/polar_sdk/models/metricsresponse.py b/src/polar_sdk/models/metricsresponse.py index 708d348..4cf4b17 100644 --- a/src/polar_sdk/models/metricsresponse.py +++ b/src/polar_sdk/models/metricsresponse.py @@ -14,7 +14,6 @@ class MetricsResponseTypedDict(TypedDict): periods: List[MetricPeriodTypedDict] r"""List of data for each timestamp.""" metrics: MetricsTypedDict - r"""Information about the returned metrics.""" class MetricsResponse(BaseModel): @@ -24,4 +23,3 @@ class MetricsResponse(BaseModel): r"""List of data for each timestamp.""" metrics: Metrics - r"""Information about the returned metrics.""" diff --git a/src/polar_sdk/models/order.py b/src/polar_sdk/models/order.py index e417ddf..2a670d0 100644 --- a/src/polar_sdk/models/order.py +++ b/src/polar_sdk/models/order.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .orderbillingreason import OrderBillingReason from .orderproduct import OrderProduct, OrderProductTypedDict from .ordersubscription import OrderSubscription, OrderSubscriptionTypedDict from .orderuser import OrderUser, OrderUserTypedDict @@ -23,6 +24,7 @@ class OrderTypedDict(TypedDict): amount: int tax_amount: int currency: str + billing_reason: OrderBillingReason user_id: str product_id: str product_price_id: str @@ -52,6 +54,8 @@ class Order(BaseModel): currency: str + billing_reason: OrderBillingReason + user_id: str product_id: str diff --git a/src/polar_sdk/models/orderbillingreason.py b/src/polar_sdk/models/orderbillingreason.py new file mode 100644 index 0000000..121d684 --- /dev/null +++ b/src/polar_sdk/models/orderbillingreason.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class OrderBillingReason(str, Enum): + PURCHASE = "purchase" + SUBSCRIPTION_CREATE = "subscription_create" + SUBSCRIPTION_CYCLE = "subscription_cycle" + SUBSCRIPTION_UPDATE = "subscription_update" diff --git a/src/polar_sdk/models/pledge.py b/src/polar_sdk/models/pledge.py index 87c176b..9179d01 100644 --- a/src/polar_sdk/models/pledge.py +++ b/src/polar_sdk/models/pledge.py @@ -23,11 +23,8 @@ class PledgeTypedDict(TypedDict): r"""Amount pledged towards the issue""" currency: str state: PledgeState - r"""Current state of the pledge""" type: PledgeType - r"""Type of pledge""" issue: IssueTypedDict - r"""The issue that the pledge was made towards""" refunded_at: NotRequired[Nullable[datetime]] r"""If and when the pledge was refunded to the pledger""" scheduled_payout_at: NotRequired[Nullable[datetime]] @@ -60,13 +57,10 @@ class Pledge(BaseModel): currency: str state: PledgeState - r"""Current state of the pledge""" type: PledgeType - r"""Type of pledge""" issue: Issue - r"""The issue that the pledge was made towards""" refunded_at: OptionalNullable[datetime] = UNSET r"""If and when the pledge was refunded to the pledger""" diff --git a/src/polar_sdk/models/polar_checkout_schemas_checkout.py b/src/polar_sdk/models/polar_checkout_schemas_checkout.py index 510e50a..742a109 100644 --- a/src/polar_sdk/models/polar_checkout_schemas_checkout.py +++ b/src/polar_sdk/models/polar_checkout_schemas_checkout.py @@ -32,7 +32,6 @@ class PolarCheckoutSchemasCheckoutTypedDict(TypedDict): id: str r"""The ID of the object.""" status: CheckoutStatus - r"""Status of the checkout session.""" client_secret: str r"""Client secret used to update and complete the checkout session from the client.""" expires_at: datetime @@ -62,7 +61,6 @@ class PolarCheckoutSchemasCheckoutTypedDict(TypedDict): metadata: Dict[str, str] url: str payment_processor: PolarEnumsPaymentProcessor - r"""Payment processor used.""" class PolarCheckoutSchemasCheckout(BaseModel): @@ -78,7 +76,6 @@ class PolarCheckoutSchemasCheckout(BaseModel): r"""The ID of the object.""" status: CheckoutStatus - r"""Status of the checkout session.""" client_secret: str r"""Client secret used to update and complete the checkout session from the client.""" @@ -134,7 +131,6 @@ class PolarCheckoutSchemasCheckout(BaseModel): ], pydantic.Field(alias="payment_processor"), ] = PolarEnumsPaymentProcessor.STRIPE - r"""Payment processor used.""" @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -189,7 +185,6 @@ class PolarCheckoutSchemasCheckoutInputTypedDict(TypedDict): id: str r"""The ID of the object.""" status: CheckoutStatus - r"""Status of the checkout session.""" client_secret: str r"""Client secret used to update and complete the checkout session from the client.""" expires_at: datetime @@ -218,7 +213,6 @@ class PolarCheckoutSchemasCheckoutInputTypedDict(TypedDict): payment_processor_metadata: PaymentProcessorMetadataTypedDict metadata: Dict[str, str] payment_processor: PolarEnumsPaymentProcessor - r"""Payment processor used.""" class PolarCheckoutSchemasCheckoutInput(BaseModel): @@ -234,7 +228,6 @@ class PolarCheckoutSchemasCheckoutInput(BaseModel): r"""The ID of the object.""" status: CheckoutStatus - r"""Status of the checkout session.""" client_secret: str r"""Client secret used to update and complete the checkout session from the client.""" @@ -288,7 +281,6 @@ class PolarCheckoutSchemasCheckoutInput(BaseModel): ], pydantic.Field(alias="payment_processor"), ] = PolarEnumsPaymentProcessor.STRIPE - r"""Payment processor used.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/polar_sdk/models/productpricerecurringcustom.py b/src/polar_sdk/models/productpricerecurringcustom.py index 83f937c..3c77bf3 100644 --- a/src/polar_sdk/models/productpricerecurringcustom.py +++ b/src/polar_sdk/models/productpricerecurringcustom.py @@ -42,7 +42,6 @@ class ProductPriceRecurringCustomTypedDict(TypedDict): preset_amount: Nullable[int] r"""The initial amount shown to the customer.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" amount_type: ProductPriceRecurringCustomAmountType type: ProductPriceRecurringCustomType r"""The type of the price.""" @@ -76,7 +75,6 @@ class ProductPriceRecurringCustom(BaseModel): r"""The initial amount shown to the customer.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" AMOUNT_TYPE: Annotated[ Annotated[ diff --git a/src/polar_sdk/models/productpricerecurringfixed.py b/src/polar_sdk/models/productpricerecurringfixed.py index 769a7a1..17c8580 100644 --- a/src/polar_sdk/models/productpricerecurringfixed.py +++ b/src/polar_sdk/models/productpricerecurringfixed.py @@ -38,7 +38,6 @@ class ProductPriceRecurringFixedTypedDict(TypedDict): price_amount: int r"""The price in cents.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" amount_type: AmountType type: ProductPriceRecurringFixedType r"""The type of the price.""" @@ -66,7 +65,6 @@ class ProductPriceRecurringFixed(BaseModel): r"""The price in cents.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" AMOUNT_TYPE: Annotated[ Annotated[AmountType, AfterValidator(validate_const(AmountType.FIXED))], diff --git a/src/polar_sdk/models/productpricerecurringfixedcreate.py b/src/polar_sdk/models/productpricerecurringfixedcreate.py index 8e14d40..6a87f36 100644 --- a/src/polar_sdk/models/productpricerecurringfixedcreate.py +++ b/src/polar_sdk/models/productpricerecurringfixedcreate.py @@ -25,7 +25,6 @@ class ProductPriceRecurringFixedCreateTypedDict(TypedDict): price_amount: int r"""The price in cents.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" type: ProductPriceRecurringFixedCreateType amount_type: ProductPriceRecurringFixedCreateAmountType price_currency: NotRequired[str] @@ -39,7 +38,6 @@ class ProductPriceRecurringFixedCreate(BaseModel): r"""The price in cents.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" TYPE: Annotated[ Annotated[ diff --git a/src/polar_sdk/models/productpricerecurringfree.py b/src/polar_sdk/models/productpricerecurringfree.py index 9564017..818bed9 100644 --- a/src/polar_sdk/models/productpricerecurringfree.py +++ b/src/polar_sdk/models/productpricerecurringfree.py @@ -34,7 +34,6 @@ class ProductPriceRecurringFreeTypedDict(TypedDict): is_archived: bool r"""Whether the price is archived and no longer available.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" amount_type: ProductPriceRecurringFreeAmountType type: ProductPriceRecurringFreeType r"""The type of the price.""" @@ -56,7 +55,6 @@ class ProductPriceRecurringFree(BaseModel): r"""Whether the price is archived and no longer available.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" AMOUNT_TYPE: Annotated[ Annotated[ diff --git a/src/polar_sdk/models/productpricerecurringfreecreate.py b/src/polar_sdk/models/productpricerecurringfreecreate.py index 48403db..852f46e 100644 --- a/src/polar_sdk/models/productpricerecurringfreecreate.py +++ b/src/polar_sdk/models/productpricerecurringfreecreate.py @@ -22,7 +22,6 @@ class ProductPriceRecurringFreeCreateTypedDict(TypedDict): r"""Schema to create a free recurring product price, i.e. a subscription.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" type: ProductPriceRecurringFreeCreateType amount_type: ProductPriceRecurringFreeCreateAmountType @@ -31,7 +30,6 @@ class ProductPriceRecurringFreeCreate(BaseModel): r"""Schema to create a free recurring product price, i.e. a subscription.""" recurring_interval: SubscriptionRecurringInterval - r"""The recurring interval of the price.""" TYPE: Annotated[ Annotated[ diff --git a/src/polar_sdk/models/validatedlicensekey.py b/src/polar_sdk/models/validatedlicensekey.py index 527fc4d..484fc63 100644 --- a/src/polar_sdk/models/validatedlicensekey.py +++ b/src/polar_sdk/models/validatedlicensekey.py @@ -6,6 +6,7 @@ LicenseKeyActivationBaseTypedDict, ) from .licensekeystatus import LicenseKeyStatus +from .licensekeyuser import LicenseKeyUser, LicenseKeyUserTypedDict from datetime import datetime from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from pydantic import model_serializer @@ -16,6 +17,7 @@ class ValidatedLicenseKeyTypedDict(TypedDict): id: str organization_id: str user_id: str + user: LicenseKeyUserTypedDict benefit_id: str r"""The benefit ID.""" key: str @@ -37,6 +39,8 @@ class ValidatedLicenseKey(BaseModel): user_id: str + user: LicenseKeyUser + benefit_id: str r"""The benefit ID.""" diff --git a/src/polar_sdk/models/webhookbenefitcreatedpayload.py b/src/polar_sdk/models/webhookbenefitcreatedpayload.py index 21938ad..7109fe2 100644 --- a/src/polar_sdk/models/webhookbenefitcreatedpayload.py +++ b/src/polar_sdk/models/webhookbenefitcreatedpayload.py @@ -1,22 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .benefitads import BenefitAds, BenefitAdsTypedDict -from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict -from .benefitcustom import BenefitCustom, BenefitCustomTypedDict -from .benefitdiscord import BenefitDiscordInput, BenefitDiscordInputTypedDict -from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict -from .benefitgithubrepository import ( - BenefitGitHubRepository, - BenefitGitHubRepositoryTypedDict, -) -from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict +from .benefit_input import BenefitInput, BenefitInputTypedDict from enum import Enum from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic from pydantic.functional_validators import AfterValidator -from typing import Union from typing_extensions import Annotated, TypedDict @@ -24,35 +14,13 @@ class WebhookBenefitCreatedPayloadType(str, Enum): BENEFIT_CREATED = "benefit.created" -WebhookBenefitCreatedPayloadBenefitTypedDict = Union[ - BenefitArticlesTypedDict, - BenefitAdsTypedDict, - BenefitDiscordInputTypedDict, - BenefitGitHubRepositoryTypedDict, - BenefitDownloadablesTypedDict, - BenefitLicenseKeysTypedDict, - BenefitCustomTypedDict, -] - - -WebhookBenefitCreatedPayloadBenefit = Union[ - BenefitArticles, - BenefitAds, - BenefitDiscordInput, - BenefitGitHubRepository, - BenefitDownloadables, - BenefitLicenseKeys, - BenefitCustom, -] - - class WebhookBenefitCreatedPayloadTypedDict(TypedDict): r"""Sent when a new benefit is created. **Discord & Slack support:** Basic """ - data: WebhookBenefitCreatedPayloadBenefitTypedDict + data: BenefitInputTypedDict type: WebhookBenefitCreatedPayloadType @@ -62,7 +30,7 @@ class WebhookBenefitCreatedPayload(BaseModel): **Discord & Slack support:** Basic """ - data: WebhookBenefitCreatedPayloadBenefit + data: BenefitInput TYPE: Annotated[ Annotated[ diff --git a/src/polar_sdk/models/webhookbenefitupdatedpayload.py b/src/polar_sdk/models/webhookbenefitupdatedpayload.py index 7fe57e7..0f9fe27 100644 --- a/src/polar_sdk/models/webhookbenefitupdatedpayload.py +++ b/src/polar_sdk/models/webhookbenefitupdatedpayload.py @@ -1,22 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .benefitads import BenefitAds, BenefitAdsTypedDict -from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict -from .benefitcustom import BenefitCustom, BenefitCustomTypedDict -from .benefitdiscord import BenefitDiscordInput, BenefitDiscordInputTypedDict -from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict -from .benefitgithubrepository import ( - BenefitGitHubRepository, - BenefitGitHubRepositoryTypedDict, -) -from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict +from .benefit_input import BenefitInput, BenefitInputTypedDict from enum import Enum from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic from pydantic.functional_validators import AfterValidator -from typing import Union from typing_extensions import Annotated, TypedDict @@ -24,35 +14,13 @@ class WebhookBenefitUpdatedPayloadType(str, Enum): BENEFIT_UPDATED = "benefit.updated" -WebhookBenefitUpdatedPayloadBenefitTypedDict = Union[ - BenefitArticlesTypedDict, - BenefitAdsTypedDict, - BenefitDiscordInputTypedDict, - BenefitGitHubRepositoryTypedDict, - BenefitDownloadablesTypedDict, - BenefitLicenseKeysTypedDict, - BenefitCustomTypedDict, -] - - -WebhookBenefitUpdatedPayloadBenefit = Union[ - BenefitArticles, - BenefitAds, - BenefitDiscordInput, - BenefitGitHubRepository, - BenefitDownloadables, - BenefitLicenseKeys, - BenefitCustom, -] - - class WebhookBenefitUpdatedPayloadTypedDict(TypedDict): r"""Sent when a benefit is updated. **Discord & Slack support:** Basic """ - data: WebhookBenefitUpdatedPayloadBenefitTypedDict + data: BenefitInputTypedDict type: WebhookBenefitUpdatedPayloadType @@ -62,7 +30,7 @@ class WebhookBenefitUpdatedPayload(BaseModel): **Discord & Slack support:** Basic """ - data: WebhookBenefitUpdatedPayloadBenefit + data: BenefitInput TYPE: Annotated[ Annotated[ diff --git a/src/polar_sdk/models/webhooksubscriptionactivepayload.py b/src/polar_sdk/models/webhooksubscriptionactivepayload.py new file mode 100644 index 0000000..86f9427 --- /dev/null +++ b/src/polar_sdk/models/webhooksubscriptionactivepayload.py @@ -0,0 +1,45 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict +from enum import Enum +from polar_sdk.types import BaseModel +from polar_sdk.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing_extensions import Annotated, TypedDict + + +class WebhookSubscriptionActivePayloadType(str, Enum): + SUBSCRIPTION_ACTIVE = "subscription.active" + + +class WebhookSubscriptionActivePayloadTypedDict(TypedDict): + r"""Sent when a subscription becomes active, + whether because it's a new paid subscription or because payment was recovered. + + **Discord & Slack support:** Full + """ + + data: SubscriptionInputTypedDict + type: WebhookSubscriptionActivePayloadType + + +class WebhookSubscriptionActivePayload(BaseModel): + r"""Sent when a subscription becomes active, + whether because it's a new paid subscription or because payment was recovered. + + **Discord & Slack support:** Full + """ + + data: SubscriptionInput + + TYPE: Annotated[ + Annotated[ + WebhookSubscriptionActivePayloadType, + AfterValidator( + validate_const(WebhookSubscriptionActivePayloadType.SUBSCRIPTION_ACTIVE) + ), + ], + pydantic.Field(alias="type"), + ] = WebhookSubscriptionActivePayloadType.SUBSCRIPTION_ACTIVE diff --git a/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py b/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py new file mode 100644 index 0000000..7190e25 --- /dev/null +++ b/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict +from enum import Enum +from polar_sdk.types import BaseModel +from polar_sdk.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing_extensions import Annotated, TypedDict + + +class WebhookSubscriptionCanceledPayloadType(str, Enum): + SUBSCRIPTION_CANCELED = "subscription.canceled" + + +class WebhookSubscriptionCanceledPayloadTypedDict(TypedDict): + r"""Sent when a subscription is canceled by the user. + They might still have access until the end of the current period. + + **Discord & Slack support:** Full + """ + + data: SubscriptionInputTypedDict + type: WebhookSubscriptionCanceledPayloadType + + +class WebhookSubscriptionCanceledPayload(BaseModel): + r"""Sent when a subscription is canceled by the user. + They might still have access until the end of the current period. + + **Discord & Slack support:** Full + """ + + data: SubscriptionInput + + TYPE: Annotated[ + Annotated[ + WebhookSubscriptionCanceledPayloadType, + AfterValidator( + validate_const( + WebhookSubscriptionCanceledPayloadType.SUBSCRIPTION_CANCELED + ) + ), + ], + pydantic.Field(alias="type"), + ] = WebhookSubscriptionCanceledPayloadType.SUBSCRIPTION_CANCELED diff --git a/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py b/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py new file mode 100644 index 0000000..15c09a5 --- /dev/null +++ b/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict +from enum import Enum +from polar_sdk.types import BaseModel +from polar_sdk.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing_extensions import Annotated, TypedDict + + +class WebhookSubscriptionRevokedPayloadType(str, Enum): + SUBSCRIPTION_REVOKED = "subscription.revoked" + + +class WebhookSubscriptionRevokedPayloadTypedDict(TypedDict): + r"""Sent when a subscription is revoked, the user looses access immediately. + Happens when the subscription is canceled, or payment is past due. + + **Discord & Slack support:** Full + """ + + data: SubscriptionInputTypedDict + type: WebhookSubscriptionRevokedPayloadType + + +class WebhookSubscriptionRevokedPayload(BaseModel): + r"""Sent when a subscription is revoked, the user looses access immediately. + Happens when the subscription is canceled, or payment is past due. + + **Discord & Slack support:** Full + """ + + data: SubscriptionInput + + TYPE: Annotated[ + Annotated[ + WebhookSubscriptionRevokedPayloadType, + AfterValidator( + validate_const( + WebhookSubscriptionRevokedPayloadType.SUBSCRIPTION_REVOKED + ) + ), + ], + pydantic.Field(alias="type"), + ] = WebhookSubscriptionRevokedPayloadType.SUBSCRIPTION_REVOKED diff --git a/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py b/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py index 0c5478e..185e98b 100644 --- a/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py +++ b/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py @@ -15,9 +15,13 @@ class WebhookSubscriptionUpdatedPayloadType(str, Enum): class WebhookSubscriptionUpdatedPayloadTypedDict(TypedDict): - r"""Sent when a new subscription is updated. This event fires if the subscription is cancelled, both immediately and if the subscription is cancelled at the end of the current period. + r"""Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals. - **Discord & Slack support:** On cancellation + If you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`. + + To listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field. + + **Discord & Slack support:** On cancellation and revocation. Renewals are skipped. """ data: SubscriptionInputTypedDict @@ -25,9 +29,13 @@ class WebhookSubscriptionUpdatedPayloadTypedDict(TypedDict): class WebhookSubscriptionUpdatedPayload(BaseModel): - r"""Sent when a new subscription is updated. This event fires if the subscription is cancelled, both immediately and if the subscription is cancelled at the end of the current period. + r"""Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals. + + If you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`. + + To listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field. - **Discord & Slack support:** On cancellation + **Discord & Slack support:** On cancellation and revocation. Renewals are skipped. """ data: SubscriptionInput diff --git a/src/polar_sdk/sdkconfiguration.py b/src/polar_sdk/sdkconfiguration.py index 0229308..4144bb4 100644 --- a/src/polar_sdk/sdkconfiguration.py +++ b/src/polar_sdk/sdkconfiguration.py @@ -31,9 +31,9 @@ class SDKConfiguration: server: Optional[str] = "" language: str = "python" openapi_doc_version: str = "0.1.0" - sdk_version: str = "0.6.0" - gen_version: str = "2.437.1" - user_agent: str = "speakeasy-sdk/python 0.6.0 2.437.1 0.1.0 polar-sdk" + sdk_version: str = "0.6.1" + gen_version: str = "2.438.3" + user_agent: str = "speakeasy-sdk/python 0.6.1 2.438.3 0.1.0 polar-sdk" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None