diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b5108b4..0fcfc70 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: 5f68bc61047e6d440a18800b4a8cc1c0 + docChecksum: 97175aedeb27944ebbd1d6d21457df2e docVersion: 0.1.0 - speakeasyVersion: 1.424.0 - generationVersion: 2.445.1 - releaseVersion: 0.7.0 - configChecksum: 0eb97df1f36089e338581b2542563ec6 + speakeasyVersion: 1.431.0 + generationVersion: 2.451.0 + releaseVersion: 0.7.1 + configChecksum: 8b4eea1afe15f7d6b08251d8b3b52a2c repoURL: https://github.com/polarsource/polar-python.git installationURL: https://github.com/polarsource/polar-python.git published: true @@ -14,12 +14,12 @@ features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.4 - core: 5.6.1 + core: 5.6.4 defaultEnabledRetries: 0.2.0 deprecations: 3.0.0 devContainers: 3.0.0 enumUnions: 0.1.0 - envVarSecurityUsage: 0.3.1 + envVarSecurityUsage: 0.3.2 flattening: 3.1.0 globalSecurity: 3.0.2 globalSecurityCallbacks: 1.0.0 @@ -37,7 +37,7 @@ features: sdkHooks: 1.0.0 serverIDs: 3.0.0 tests: 1.6.0 - unions: 3.0.2 + unions: 3.0.3 webhooks: 2.0.0 generatedFiles: - .devcontainer/README.md @@ -77,6 +77,8 @@ generatedFiles: - docs/models/articlevisibility.md - docs/models/articlevisibilityfilter.md - docs/models/assignee.md + - docs/models/attachedcustomfield.md + - docs/models/attachedcustomfieldcreate.md - docs/models/author.md - docs/models/benefit.md - docs/models/benefitads.md @@ -188,6 +190,7 @@ generatedFiles: - docs/models/benefittypefilter.md - docs/models/bylineprofile.md - docs/models/checkoutconfirmstripe.md + - docs/models/checkoutconfirmstripecustomfielddata.md - docs/models/checkoutlink.md - docs/models/checkoutlinkcreate.md - docs/models/checkoutlinkcreatepaymentprocessor.md @@ -200,7 +203,11 @@ generatedFiles: - docs/models/checkoutlinksortproperty.md - docs/models/checkoutlinksupdaterequest.md - docs/models/checkoutlinkupdate.md + - docs/models/checkoutproduct.md + - docs/models/checkoutproductbenefits.md + - docs/models/checkoutproductinput.md - docs/models/checkoutpublic.md + - docs/models/checkoutpubliccustomfielddata.md - docs/models/checkoutpublicpaymentprocessormetadata.md - docs/models/checkoutscustomclientconfirmrequest.md - docs/models/checkoutscustomclientgetrequest.md @@ -216,8 +223,58 @@ generatedFiles: - docs/models/checkoutstatus.md - docs/models/checkoutupdate.md - docs/models/checkoutupdatepublic.md + - docs/models/checkoutupdatepubliccustomfielddata.md - docs/models/conditions.md - docs/models/currencyamount.md + - docs/models/customfield.md + - docs/models/customfieldcheckbox.md + - docs/models/customfieldcheckboxproperties.md + - docs/models/customfieldcheckboxtype.md + - docs/models/customfieldcreate.md + - docs/models/customfieldcreatecheckbox.md + - docs/models/customfieldcreatecheckboxtype.md + - docs/models/customfieldcreatedate.md + - docs/models/customfieldcreatedatetype.md + - docs/models/customfieldcreatenumber.md + - docs/models/customfieldcreatenumbertype.md + - docs/models/customfieldcreateselect.md + - docs/models/customfieldcreateselecttype.md + - docs/models/customfieldcreatetext.md + - docs/models/customfieldcreatetexttype.md + - docs/models/customfielddata.md + - docs/models/customfielddate.md + - docs/models/customfielddateproperties.md + - docs/models/customfielddatetype.md + - docs/models/customfieldnumber.md + - docs/models/customfieldnumberproperties.md + - docs/models/customfieldnumbertype.md + - docs/models/customfieldsdeleterequest.md + - docs/models/customfieldselect.md + - docs/models/customfieldselectoption.md + - docs/models/customfieldselectproperties.md + - docs/models/customfieldselecttype.md + - docs/models/customfieldsgetrequest.md + - docs/models/customfieldslistqueryparamorganizationidfilter.md + - docs/models/customfieldslistrequest.md + - docs/models/customfieldslistresponse.md + - docs/models/customfieldsortproperty.md + - docs/models/customfieldsupdaterequest.md + - docs/models/customfieldtext.md + - docs/models/customfieldtextproperties.md + - docs/models/customfieldtexttype.md + - docs/models/customfieldtype.md + - docs/models/customfieldtypefilter.md + - docs/models/customfieldupdate.md + - docs/models/customfieldupdatecheckbox.md + - docs/models/customfieldupdatecheckboxtype.md + - docs/models/customfieldupdatedate.md + - docs/models/customfieldupdatedatetype.md + - docs/models/customfieldupdatenumber.md + - docs/models/customfieldupdatenumbertype.md + - docs/models/customfieldupdateselect.md + - docs/models/customfieldupdateselecttype.md + - docs/models/customfieldupdatetext.md + - docs/models/customfieldupdatetexttype.md - docs/models/donation.md - docs/models/donationorganization.md - docs/models/donationuser.md @@ -278,6 +335,7 @@ generatedFiles: - docs/models/licensekeyuser.md - docs/models/licensekeyvalidate.md - docs/models/licensekeywithactivations.md + - docs/models/listresource.md - docs/models/listresourcearticle.md - docs/models/listresourcebenefit.md - docs/models/listresourcebenefitgrant.md @@ -337,6 +395,7 @@ generatedFiles: - docs/models/onev11oauth21tokenpostxcomponentsrefreshtokenrequestgranttype.md - docs/models/order.md - docs/models/orderbillingreason.md + - docs/models/ordercustomfielddata.md - docs/models/orderidfilter.md - docs/models/orderinvoice.md - docs/models/orderproduct.md @@ -380,12 +439,13 @@ generatedFiles: - docs/models/polarcheckoutlegacyschemascheckoutcreate.md - docs/models/polarcheckoutschemascheckout.md - docs/models/polarcheckoutschemascheckoutcreate.md + - docs/models/polarcheckoutschemascheckoutcreatecustomfielddata.md + - docs/models/polarcheckoutschemascheckoutcustomfielddata.md - docs/models/polarcheckoutschemascheckoutinput.md - docs/models/polarenumspaymentprocessor.md - docs/models/previousproperties.md - docs/models/prices.md - docs/models/product.md - - docs/models/productbenefits.md - docs/models/productbenefitsupdate.md - docs/models/productidfilter.md - docs/models/productinput.md @@ -478,6 +538,7 @@ generatedFiles: - docs/models/service.md - docs/models/state.md - docs/models/subscription.md + - docs/models/subscriptioncustomfielddata.md - docs/models/subscriptionidfilter.md - docs/models/subscriptioninput.md - docs/models/subscriptionrecurringinterval.md @@ -594,6 +655,7 @@ generatedFiles: - docs/sdks/checkouts/README.md - docs/sdks/clients/README.md - docs/sdks/custom/README.md + - docs/sdks/customfields/README.md - docs/sdks/downloadables/README.md - docs/sdks/externalorganizations/README.md - docs/sdks/files/README.md @@ -616,7 +678,6 @@ generatedFiles: - py.typed - pylintrc - pyproject.toml - - scripts/compile.sh - scripts/prepare-readme.py - scripts/publish.sh - src/polar_sdk/__init__.py @@ -632,6 +693,7 @@ generatedFiles: - src/polar_sdk/checkouts.py - src/polar_sdk/clients.py - src/polar_sdk/custom.py + - src/polar_sdk/custom_fields.py - src/polar_sdk/downloadables.py - src/polar_sdk/external_organizations.py - src/polar_sdk/files.py @@ -662,6 +724,8 @@ generatedFiles: - src/polar_sdk/models/articleupdate.py - src/polar_sdk/models/articlevisibility.py - src/polar_sdk/models/assignee.py + - src/polar_sdk/models/attachedcustomfield.py + - src/polar_sdk/models/attachedcustomfieldcreate.py - src/polar_sdk/models/author.py - src/polar_sdk/models/benefit.py - src/polar_sdk/models/benefit_input.py @@ -744,6 +808,7 @@ generatedFiles: - src/polar_sdk/models/checkoutlinkcreate.py - src/polar_sdk/models/checkoutlinksortproperty.py - src/polar_sdk/models/checkoutlinkupdate.py + - src/polar_sdk/models/checkoutproduct.py - src/polar_sdk/models/checkoutpublic.py - src/polar_sdk/models/checkouts_custom_client_confirmop.py - src/polar_sdk/models/checkouts_custom_client_getop.py @@ -757,6 +822,36 @@ generatedFiles: - src/polar_sdk/models/checkoutupdate.py - src/polar_sdk/models/checkoutupdatepublic.py - src/polar_sdk/models/currencyamount.py + - src/polar_sdk/models/custom_fields_deleteop.py + - src/polar_sdk/models/custom_fields_getop.py + - src/polar_sdk/models/custom_fields_listop.py + - src/polar_sdk/models/custom_fields_updateop.py + - src/polar_sdk/models/customfield.py + - src/polar_sdk/models/customfieldcheckbox.py + - src/polar_sdk/models/customfieldcheckboxproperties.py + - src/polar_sdk/models/customfieldcreate.py + - src/polar_sdk/models/customfieldcreatecheckbox.py + - src/polar_sdk/models/customfieldcreatedate.py + - src/polar_sdk/models/customfieldcreatenumber.py + - src/polar_sdk/models/customfieldcreateselect.py + - src/polar_sdk/models/customfieldcreatetext.py + - src/polar_sdk/models/customfielddate.py + - src/polar_sdk/models/customfielddateproperties.py + - src/polar_sdk/models/customfieldnumber.py + - src/polar_sdk/models/customfieldnumberproperties.py + - src/polar_sdk/models/customfieldselect.py + - src/polar_sdk/models/customfieldselectoption.py + - src/polar_sdk/models/customfieldselectproperties.py + - src/polar_sdk/models/customfieldsortproperty.py + - src/polar_sdk/models/customfieldtext.py + - src/polar_sdk/models/customfieldtextproperties.py + - src/polar_sdk/models/customfieldtype.py + - src/polar_sdk/models/customfieldupdate.py + - src/polar_sdk/models/customfieldupdatecheckbox.py + - src/polar_sdk/models/customfieldupdatedate.py + - src/polar_sdk/models/customfieldupdatenumber.py + - src/polar_sdk/models/customfieldupdateselect.py + - src/polar_sdk/models/customfieldupdatetext.py - src/polar_sdk/models/donation.py - src/polar_sdk/models/donationorganization.py - src/polar_sdk/models/donationuser.py @@ -798,6 +893,7 @@ generatedFiles: - src/polar_sdk/models/licensekeyuser.py - src/polar_sdk/models/licensekeyvalidate.py - src/polar_sdk/models/licensekeywithactivations.py + - src/polar_sdk/models/listresource_.py - src/polar_sdk/models/listresource_article_.py - src/polar_sdk/models/listresource_benefit_.py - src/polar_sdk/models/listresource_benefitgrant_.py @@ -874,6 +970,7 @@ generatedFiles: - src/polar_sdk/models/polar_checkout_schemas_checkoutcreate.py - src/polar_sdk/models/polar_enums_paymentprocessor.py - src/polar_sdk/models/product.py + - src/polar_sdk/models/product_input.py - src/polar_sdk/models/productbenefitsupdate.py - src/polar_sdk/models/productmediafilecreate.py - src/polar_sdk/models/productmediafileread.py @@ -922,7 +1019,6 @@ generatedFiles: - src/polar_sdk/models/security.py - src/polar_sdk/models/state.py - src/polar_sdk/models/subscription.py - - src/polar_sdk/models/subscription_input.py - src/polar_sdk/models/subscriptionrecurringinterval.py - src/polar_sdk/models/subscriptions_exportop.py - src/polar_sdk/models/subscriptions_listop.py @@ -1034,7 +1130,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2023-09-05T11:33:52.011Z", "modified_at": "2023-08-20T11:11:04.610Z", "id": "", "description": "hundred whereas dimly unused cone restructure gadzooks", "selectable": false, "deletable": false, "organization_id": "", "properties": {"repository_owner": "polarsource", "repository_name": "private_repo"}} + application/json: {"created_at": "2023-09-05T11:33:52.011Z", "modified_at": "2023-08-20T11:11:04.610Z", "id": "", "description": "hundred whereas dimly unused cone restructure gadzooks", "selectable": false, "deletable": false, "organization_id": "", "grants": [{"created_at": "2023-03-12T15:23:46.888Z", "modified_at": "2024-03-05T14:23:34.462Z", "id": "", "is_granted": true, "is_revoked": true, "subscription_id": "", "order_id": "", "user_id": "", "benefit_id": ""}, {"created_at": "2024-02-24T17:48:17.639Z", "modified_at": "2023-03-07T06:16:39.367Z", "id": "", "is_granted": false, "is_revoked": false, "subscription_id": "", "order_id": "", "user_id": "", "benefit_id": ""}, {"created_at": "2024-07-13T14:31:52.430Z", "modified_at": "2023-04-01T04:11:43.083Z", "id": "", "is_granted": true, "is_revoked": false, "subscription_id": "", "order_id": "", "user_id": "", "benefit_id": ""}], "organization": {"created_at": "2023-07-07T00:34:30.082Z", "modified_at": "2024-11-07T20:31:03.453Z", "id": "", "name": "", "slug": "", "avatar_url": "https://bleak-birdcage.com/", "bio": "", "company": "Orn and Sons", "blog": "", "location": "", "email": "Lowell_Greenholt28@gmail.com", "twitter_username": "", "pledge_minimum_amount": 710636, "pledge_badge_show_amount": true, "default_upfront_split_to_contributors": 786952, "donations_enabled": false}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo"}} "404": application/json: {"detail": ""} "422": {} @@ -1051,7 +1147,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "amount": 558834, "tax_amount": 844199, "currency": "Ouguiya", "user_id": "", "product_id": "", "product_price_id": "", "subscription_id": "", "product": {"created_at": "2024-06-29T09:01:50.308Z", "modified_at": "2023-07-26T06:33:15.886Z", "id": "", "name": "", "description": "Centralized well-modulated strategy", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []}, "product_price": {"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 458049, "maximum_amount": 450824, "preset_amount": 262795}, "subscription": {"created_at": "2022-11-08T10:33:23.061Z", "modified_at": "2023-04-26T04:53:50.205Z", "id": "", "amount": 521235, "currency": "Bulgarian Lev", "recurring_interval": "year", "status": "trialing", "current_period_start": "2024-05-28T07:17:56.701Z", "current_period_end": "2024-03-20T23:00:26.309Z", "cancel_at_period_end": false, "started_at": "2024-12-06T14:08:11.458Z", "ended_at": "2022-08-30T01:43:46.083Z", "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": "", "amount": 558834, "tax_amount": 844199, "currency": "Ouguiya", "user_id": "", "product_id": "", "product_price_id": "", "subscription_id": "", "product": {"created_at": "2024-06-29T09:01:50.308Z", "modified_at": "2023-07-26T06:33:15.886Z", "id": "", "name": "", "description": "Centralized well-modulated strategy", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "organization": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "slug": "", "avatar_url": "https://misguided-violin.info", "bio": "", "company": "Gislason Group", "blog": "", "location": "", "email": "Ian.Block31@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 552582, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 380699, "donations_enabled": false}}, "product_price": {"created_at": "2022-12-20T13:59:56.783Z", "modified_at": "2022-12-21T05:04:07.004Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 243354, "maximum_amount": 780262, "preset_amount": 284041}, "subscription": {"created_at": "2022-11-08T10:33:23.061Z", "modified_at": "2023-04-26T04:53:50.205Z", "id": "", "amount": 521235, "currency": "Bulgarian Lev", "recurring_interval": "year", "status": "trialing", "current_period_start": "2024-05-28T07:17:56.701Z", "current_period_end": "2024-03-20T23:00:26.309Z", "cancel_at_period_end": false, "started_at": "2024-12-06T14:08:11.458Z", "ended_at": "2022-08-30T01:43:46.083Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": ""}} "404": application/json: {"detail": ""} "422": {} @@ -1091,7 +1187,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "amount": 700347, "currency": "Burundi Franc", "recurring_interval": "year", "status": "active", "current_period_start": "2024-07-14T05:47:45.857Z", "current_period_end": "2023-08-20T11:11:04.289Z", "cancel_at_period_end": false, "started_at": "2023-07-26T06:33:15.886Z", "ended_at": "2022-03-28T03:17:21.516Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2024-11-29T01:50:48.387Z", "modified_at": "2024-08-07T07:28:43.175Z", "id": "", "name": "", "description": "Multi-channelled optimal hierarchy", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []}, "price": {"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 458049, "maximum_amount": 450824, "preset_amount": 262795}} + application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "amount": 700347, "currency": "Burundi Franc", "recurring_interval": "year", "status": "active", "current_period_start": "2024-07-14T05:47:45.857Z", "current_period_end": "2023-08-20T11:11:04.289Z", "cancel_at_period_end": false, "started_at": "2023-07-26T06:33:15.886Z", "ended_at": "2022-03-28T03:17:21.516Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2024-11-29T01:50:48.387Z", "modified_at": "2024-08-07T07:28:43.175Z", "id": "", "name": "", "description": "Multi-channelled optimal hierarchy", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "organization": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "slug": "", "avatar_url": "https://misguided-violin.info", "bio": "", "company": "Gislason Group", "blog": "", "location": "", "email": "Ian.Block31@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 552582, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 380699, "donations_enabled": false}}, "price": {"created_at": "2022-12-20T13:59:56.783Z", "modified_at": "2022-12-21T05:04:07.004Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 243354, "maximum_amount": 780262, "preset_amount": 284041}} "404": application/json: {"detail": ""} "422": {} @@ -1104,7 +1200,7 @@ examples: application/json: {"product_price_id": ""} responses: "200": - application/json: {"created_at": "2024-07-28T19:04:48.900Z", "modified_at": "2022-01-27T21:53:39.052Z", "id": "", "amount": 857478, "currency": "Netherlands Antillian Guilder", "recurring_interval": "year", "status": "past_due", "current_period_start": "2022-01-18T03:43:33.232Z", "current_period_end": "2023-01-13T16:52:57.237Z", "cancel_at_period_end": true, "started_at": "2024-12-22T15:27:45.933Z", "ended_at": "2022-10-24T06:37:05.817Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2023-11-19T22:44:57.818Z", "modified_at": "2024-01-20T21:09:11.127Z", "id": "", "name": "", "description": "Multi-tiered grid-enabled website", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [], "medias": []}, "price": {"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 488852, "maximum_amount": 984008, "preset_amount": 54062}} + application/json: {"created_at": "2024-07-28T19:04:48.900Z", "modified_at": "2022-01-27T21:53:39.052Z", "id": "", "amount": 857478, "currency": "Netherlands Antillian Guilder", "recurring_interval": "year", "status": "past_due", "current_period_start": "2022-01-18T03:43:33.232Z", "current_period_end": "2023-01-13T16:52:57.237Z", "cancel_at_period_end": true, "started_at": "2024-12-22T15:27:45.933Z", "ended_at": "2022-10-24T06:37:05.817Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2023-11-19T22:44:57.818Z", "modified_at": "2024-01-20T21:09:11.127Z", "id": "", "name": "", "description": "Multi-tiered grid-enabled website", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [], "medias": [], "organization": {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "name": "", "slug": "", "avatar_url": "https://yearly-order.info/", "bio": "", "company": "Becker, Treutel and King", "blog": "", "location": "", "email": "Delphia_Schamberger@gmail.com", "twitter_username": "", "pledge_minimum_amount": 771203, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 404265, "donations_enabled": true}}, "price": {"created_at": "2023-04-27T07:27:10.489Z", "modified_at": "2023-07-04T05:50:56.527Z", "id": "", "is_archived": true, "product_id": ""}} "403": application/json: {"detail": ""} "404": @@ -1117,7 +1213,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2022-01-28T04:39:19.402Z", "modified_at": "2022-07-26T00:54:13.634Z", "id": "", "amount": 24812, "currency": "Cuban Peso", "recurring_interval": "year", "status": "unpaid", "current_period_start": "2023-12-06T17:35:22.378Z", "current_period_end": "2023-06-04T09:53:22.955Z", "cancel_at_period_end": false, "started_at": "2022-04-04T13:59:58.493Z", "ended_at": "2022-07-16T10:00:54.807Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2022-08-03T23:44:35.164Z", "modified_at": "2022-05-01T05:45:14.845Z", "id": "", "name": "", "description": "Fully-configurable multimedia alliance", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []}, "price": {"created_at": "2023-06-04T09:53:22.758Z", "modified_at": "2022-04-04T13:59:58.090Z", "id": "", "is_archived": true, "product_id": "", "recurring_interval": "month"}} + application/json: {"created_at": "2022-01-28T04:39:19.402Z", "modified_at": "2022-07-26T00:54:13.634Z", "id": "", "amount": 24812, "currency": "Cuban Peso", "recurring_interval": "year", "status": "unpaid", "current_period_start": "2023-12-06T17:35:22.378Z", "current_period_end": "2023-06-04T09:53:22.955Z", "cancel_at_period_end": false, "started_at": "2022-04-04T13:59:58.493Z", "ended_at": "2022-07-16T10:00:54.807Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2022-08-03T23:44:35.164Z", "modified_at": "2022-05-01T05:45:14.845Z", "id": "", "name": "", "description": "Fully-configurable multimedia alliance", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "organization": {"created_at": "2022-01-28T04:39:19.513Z", "modified_at": "2024-12-24T10:36:51.473Z", "id": "", "name": "", "slug": "", "avatar_url": "https://brave-costume.biz/", "bio": "", "company": "Crooks - Marvin", "blog": "", "location": "", "email": "Dagmar41@gmail.com", "twitter_username": "", "pledge_minimum_amount": 730293, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 786521, "donations_enabled": true}}, "price": {"created_at": "2024-03-25T08:27:38.783Z", "modified_at": "2023-06-25T17:34:35.287Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 816224, "recurring_interval": "year"}} "403": application/json: {"detail": ""} "404": @@ -1268,7 +1364,7 @@ examples: id: "" responses: "200": - application/json: {"id": "b18d8d81-fd7b-4764-a31e-475cb1f36591", "is_private": false, "name": "MyOrg", "description": "Optional reciprocal projection", "stars": 1337, "license": "", "homepage": "", "organization": {"id": "c65bc928-1545-452e-b0c0-48b8c2b5ed5f", "name": "", "avatar_url": "", "is_personal": true, "bio": "", "pretty_name": "", "company": "Windler, Bahringer and Kilback", "blog": "", "location": "", "email": "Herbert14@hotmail.com", "twitter_username": "", "organization_id": ""}} + application/json: {"id": "b18d8d81-fd7b-4764-a31e-475cb1f36591", "is_private": false, "name": "MyOrg", "description": "Optional reciprocal projection", "stars": 1337, "license": "", "homepage": "", "organization": {"id": "c65bc928-1545-452e-b0c0-48b8c2b5ed5f", "name": "", "avatar_url": "", "is_personal": true, "bio": "", "pretty_name": "", "company": "Windler, Bahringer and Kilback", "blog": "", "location": "", "email": "Herbert14@hotmail.com", "twitter_username": "", "organization_id": ""}, "internal_organization": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "slug": "", "avatar_url": "https://misguided-violin.info", "bio": "", "company": "Gislason Group", "blog": "", "location": "", "email": "Ian.Block31@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 552582, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 380699, "donations_enabled": false}} "404": application/json: {"detail": ""} "422": {} @@ -1279,7 +1375,7 @@ examples: id: "" responses: "200": - application/json: {"id": "d0905bf4-aa77-4f20-8e77-54c352acfe54", "is_private": true, "name": "MyOrg", "description": "Multi-lateral grid-enabled product", "stars": 1337, "license": "", "homepage": "", "organization": {"id": "abf6805c-5ca7-4187-9435-5ad7d4e1b584", "name": "", "avatar_url": "", "is_personal": false, "bio": "", "pretty_name": "", "company": "Lubowitz - Wiza", "blog": "", "location": "", "email": "Reta_Larkin@yahoo.com", "twitter_username": "", "organization_id": ""}} + application/json: {"id": "d0905bf4-aa77-4f20-8e77-54c352acfe54", "is_private": true, "name": "MyOrg", "description": "Multi-lateral grid-enabled product", "stars": 1337, "license": "", "homepage": "", "organization": {"id": "abf6805c-5ca7-4187-9435-5ad7d4e1b584", "name": "", "avatar_url": "", "is_personal": false, "bio": "", "pretty_name": "", "company": "Lubowitz - Wiza", "blog": "", "location": "", "email": "Reta_Larkin@yahoo.com", "twitter_username": "", "organization_id": ""}, "internal_organization": {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "name": "", "slug": "", "avatar_url": "https://yearly-order.info/", "bio": "", "company": "Becker, Treutel and King", "blog": "", "location": "", "email": "Delphia_Schamberger@gmail.com", "twitter_username": "", "pledge_minimum_amount": 771203, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 404265, "donations_enabled": true}} "403": application/json: {"detail": ""} "404": @@ -1599,7 +1695,7 @@ examples: application/json: {"name": "", "prices": [{"recurring_interval": "month"}]} responses: "201": - application/json: {"created_at": "2023-12-01T17:06:07.793Z", "modified_at": "2024-07-30T16:43:31.437Z", "id": "", "name": "", "description": "Inverse discrete benchmark", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []} + application/json: {"created_at": "2023-12-01T17:06:07.793Z", "modified_at": "2024-07-30T16:43:31.437Z", "id": "", "name": "", "description": "Inverse discrete benchmark", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "attached_custom_fields": []} "422": {} products:get: speakeasy-default-products:get: @@ -1608,7 +1704,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "name": "", "description": "Optional static intranet", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []} + application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "name": "", "description": "Optional static intranet", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 458049, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2022-08-22T22:47:10.166Z", "modified_at": "2024-10-24T02:41:21.259Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 801373, "required": true}]} "404": application/json: {"detail": ""} "422": {} @@ -1619,7 +1715,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-07-28T19:04:48.900Z", "modified_at": "2022-01-27T21:53:39.052Z", "id": "", "name": "", "description": "Persistent 24/7 focus group", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [], "medias": []} + application/json: {"created_at": "2024-07-28T19:04:48.900Z", "modified_at": "2022-01-27T21:53:39.052Z", "id": "", "name": "", "description": "Persistent 24/7 focus group", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 488852, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-09-09T13:32:29.600Z", "modified_at": "2023-05-05T18:16:40.936Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 249440, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-09-02T06:16:41.919Z", "modified_at": "2022-11-28T11:56:11.232Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 693508, "required": true}]} "403": application/json: {"detail": ""} "404": @@ -1634,7 +1730,7 @@ examples: application/json: {"benefits": []} responses: "200": - application/json: {"created_at": "2023-02-17T23:13:10.706Z", "modified_at": "2024-10-03T16:30:23.323Z", "id": "", "name": "", "description": "Intuitive object-oriented parallelism", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []} + application/json: {"created_at": "2023-02-17T23:13:10.706Z", "modified_at": "2024-10-03T16:30:23.323Z", "id": "", "name": "", "description": "Intuitive object-oriented parallelism", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-03-05T13:29:26.777Z", "modified_at": "2022-09-25T14:37:15.072Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 176757, "required": false}]} "403": application/json: {"detail": ""} "404": @@ -1800,7 +1896,7 @@ examples: speakeasy-default-checkouts:custom:list: responses: "200": - application/json: {"items": [{"created_at": "2023-08-23T19:26:20.850Z", "modified_at": "2024-01-14T10:26:00.433Z", "id": "", "status": "open", "client_secret": "", "url": "https://average-fedora.org/", "expires_at": "2022-09-09T18:28:08.953Z", "success_url": "https://primary-paintwork.com/", "embed_origin": "", "amount": 718303, "tax_amount": 86140, "currency": "Convertible Marks", "total_amount": 687960, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Adam7@yahoo.com", "customer_ip_address": "", "customer_billing_address": {"country": "Mauritius"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2024-04-22T08:39:55.981Z", "modified_at": "2023-08-23T19:26:20.850Z", "id": "", "name": "", "description": "mmm avalanche jungle unto meanwhile beside tromp worth", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [{"created_at": "2023-08-23T19:26:20.850Z", "modified_at": "2024-01-14T10:26:00.433Z", "id": "", "description": "bob inwardly beautifully comparison", "selectable": true, "deletable": false, "organization_id": "", "properties": {"paid_articles": true}}, {"created_at": "2023-02-10T20:11:51.410Z", "modified_at": "2023-05-17T08:33:13.471Z", "id": "", "type": "articles", "description": "commonly softly boo massive sorrowful aw strict behind along energetic", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2023-04-12T03:59:08.538Z", "modified_at": "2023-04-20T11:47:41.889Z", "id": "", "type": "discord", "description": "cleverly blossom defiantly", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/private/var", "mime_type": "", "size": 704478, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-05-27T06:03:00.110Z", "version": "", "is_uploaded": false, "created_at": "2024-01-10T05:13:52.456Z", "size_readable": "", "public_url": "https://jam-packed-median.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 186930, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-03-11T17:32:08.709Z", "version": "", "is_uploaded": false, "created_at": "2022-12-07T09:46:44.632Z", "size_readable": "", "public_url": "https://hateful-linseed.info"}, {"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 694688, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-08-19T17:38:55.606Z", "version": "", "is_uploaded": false, "created_at": "2024-10-13T14:46:57.561Z", "size_readable": "", "public_url": "https://left-exterior.biz/"}]}, "product_price": {"created_at": "2023-12-29T19:56:44.465Z", "modified_at": "2022-11-08T21:35:05.868Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 544651}, "subscription_id": ""}, {"created_at": "2022-01-21T00:48:05.986Z", "modified_at": "2024-09-10T07:49:25.657Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://practical-trick.org/", "expires_at": "2024-09-28T03:47:03.515Z", "success_url": "https://blue-technologist.com/", "embed_origin": "", "amount": 460276, "tax_amount": 425334, "currency": "Kenyan Shilling", "total_amount": 480616, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Roman.Stracke39@yahoo.com", "customer_ip_address": "", "customer_billing_address": {"country": "China"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2023-12-15T18:53:29.970Z", "modified_at": "2023-10-06T17:09:46.559Z", "id": "", "name": "", "description": "soap cheerfully distinction range", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2022-11-19T07:34:10.466Z", "modified_at": "2024-12-24T15:52:28.107Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 258945, "recurring_interval": "month"}, {"created_at": "2023-05-04T10:59:46.313Z", "modified_at": "2022-01-06T17:33:20.863Z", "id": "", "is_archived": false, "product_id": "", "recurring_interval": "year"}, {"created_at": "2024-11-05T16:19:50.933Z", "modified_at": "2024-09-13T12:26:55.235Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 467775, "maximum_amount": 993677, "preset_amount": 726700}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/src", "mime_type": "", "size": 88338, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-07T09:30:51.196Z", "version": "", "is_uploaded": false, "created_at": "2024-10-06T07:08:41.329Z", "size_readable": "", "public_url": "https://damaged-tapioca.com"}, {"id": "", "organization_id": "", "name": "", "path": "/root", "mime_type": "", "size": 387926, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-10-05T10:11:23.447Z", "version": "", "is_uploaded": true, "created_at": "2024-05-23T21:54:30.697Z", "size_readable": "", "public_url": "https://favorite-digit.biz"}]}, "product_price": {"created_at": "2022-02-02T01:51:19.643Z", "modified_at": "2023-12-16T22:46:18.179Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 605070, "maximum_amount": 408066, "preset_amount": 41398}, "subscription_id": ""}, {"created_at": "2022-04-03T06:30:19.876Z", "modified_at": "2024-01-30T10:30:11.361Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://bustling-plastic.info/", "expires_at": "2024-07-08T11:13:00.198Z", "success_url": "https://yummy-birdcage.com", "embed_origin": "", "amount": 73973, "tax_amount": 836788, "currency": "Leone", "total_amount": 141764, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Oswald29@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Saint Helena"}, "customer_tax_id": "", "metadata": {"key": ""}, "product": {"created_at": "2022-04-29T02:27:27.855Z", "modified_at": "2024-09-02T23:08:00.186Z", "id": "", "name": "", "description": "frenetically from yuck failing consign tedious scar failing unknown in", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-03-22T09:41:56.524Z", "modified_at": "2022-03-28T18:28:26.777Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "price_amount": 943672}], "benefits": [{"created_at": "2023-04-09T13:05:11.917Z", "modified_at": "2023-02-10T20:11:51.410Z", "id": "", "description": "fooey a supposing regarding times uselessly", "selectable": true, "deletable": false, "organization_id": "", "properties": {"paid_articles": true}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 679829, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-04-24T19:54:59.989Z", "version": "", "is_uploaded": false, "created_at": "2023-08-01T10:27:50.144Z", "size_readable": "", "public_url": "https://plump-markup.net"}]}, "product_price": {"created_at": "2022-10-09T03:58:07.827Z", "modified_at": "2024-10-07T04:54:41.981Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 806103}, "subscription_id": ""}], "pagination": {"total_count": 5229, "max_page": 810770}} + application/json: {"items": [{"created_at": "2023-08-23T19:26:20.850Z", "modified_at": "2024-01-14T10:26:00.433Z", "id": "", "status": "open", "client_secret": "", "url": "https://average-fedora.org/", "expires_at": "2022-09-09T18:28:08.953Z", "success_url": "https://primary-paintwork.com/", "embed_origin": "", "amount": 718303, "tax_amount": 86140, "currency": "Convertible Marks", "total_amount": 687960, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Adam7@yahoo.com", "customer_ip_address": "", "customer_billing_address": {"country": "Mauritius"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2024-04-22T08:39:55.981Z", "modified_at": "2023-08-23T19:26:20.850Z", "id": "", "name": "", "description": "mmm avalanche jungle unto meanwhile beside tromp worth", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [{"created_at": "2023-08-23T19:26:20.850Z", "modified_at": "2024-01-14T10:26:00.433Z", "id": "", "description": "bob inwardly beautifully comparison", "selectable": true, "deletable": false, "organization_id": "", "properties": {"paid_articles": true}}, {"created_at": "2023-02-10T20:11:51.410Z", "modified_at": "2023-05-17T08:33:13.471Z", "id": "", "type": "articles", "description": "commonly softly boo massive sorrowful aw strict behind along energetic", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2023-04-12T03:59:08.538Z", "modified_at": "2023-04-20T11:47:41.889Z", "id": "", "type": "discord", "description": "cleverly blossom defiantly", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/private/var", "mime_type": "", "size": 704478, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-05-27T06:03:00.110Z", "version": "", "is_uploaded": false, "created_at": "2024-01-10T05:13:52.456Z", "size_readable": "", "public_url": "https://jam-packed-median.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 186930, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-03-11T17:32:08.709Z", "version": "", "is_uploaded": false, "created_at": "2022-12-07T09:46:44.632Z", "size_readable": "", "public_url": "https://hateful-linseed.info"}, {"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 694688, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-08-19T17:38:55.606Z", "version": "", "is_uploaded": false, "created_at": "2024-10-13T14:46:57.561Z", "size_readable": "", "public_url": "https://left-exterior.biz/"}]}, "product_price": {"created_at": "2023-04-20T11:47:41.889Z", "modified_at": "2023-06-11T18:07:18.321Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 523875, "maximum_amount": 841031, "preset_amount": 410206, "recurring_interval": "year"}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2022-05-05T09:08:16.530Z", "modified_at": "2022-07-18T12:08:53.113Z", "id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 33597, "required": false}]}, {"created_at": "2022-01-21T00:48:05.986Z", "modified_at": "2024-09-10T07:49:25.657Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://practical-trick.org/", "expires_at": "2024-09-28T03:47:03.515Z", "success_url": "https://blue-technologist.com/", "embed_origin": "", "amount": 460276, "tax_amount": 425334, "currency": "Kenyan Shilling", "total_amount": 480616, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Roman.Stracke39@yahoo.com", "customer_ip_address": "", "customer_billing_address": {"country": "China"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2023-12-15T18:53:29.970Z", "modified_at": "2023-10-06T17:09:46.559Z", "id": "", "name": "", "description": "soap cheerfully distinction range", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2022-04-03T06:30:19.876Z", "modified_at": "2024-01-30T10:30:11.361Z", "id": "", "is_archived": false, "product_id": ""}, {"created_at": "2024-12-27T15:09:02.427Z", "modified_at": "2022-03-31T02:45:39.610Z", "id": "", "is_archived": true, "product_id": ""}, {"created_at": "2024-05-01T20:38:29.097Z", "modified_at": "2022-06-05T08:58:03.644Z", "id": "", "is_archived": false, "product_id": "", "recurring_interval": "month"}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/src", "mime_type": "", "size": 88338, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-07T09:30:51.196Z", "version": "", "is_uploaded": false, "created_at": "2024-10-06T07:08:41.329Z", "size_readable": "", "public_url": "https://damaged-tapioca.com"}, {"id": "", "organization_id": "", "name": "", "path": "/root", "mime_type": "", "size": 387926, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-10-05T10:11:23.447Z", "version": "", "is_uploaded": true, "created_at": "2024-05-23T21:54:30.697Z", "size_readable": "", "public_url": "https://favorite-digit.biz"}]}, "product_price": {"created_at": "2022-03-15T10:11:56.132Z", "modified_at": "2022-03-08T17:05:22.411Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 993305, "maximum_amount": 747562, "preset_amount": 258945}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-01-14T06:48:49.446Z", "modified_at": "2023-05-04T10:59:46.313Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 810770, "required": false}]}, {"created_at": "2022-04-03T06:30:19.876Z", "modified_at": "2024-01-30T10:30:11.361Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://bustling-plastic.info/", "expires_at": "2024-07-08T11:13:00.198Z", "success_url": "https://yummy-birdcage.com", "embed_origin": "", "amount": 73973, "tax_amount": 836788, "currency": "Leone", "total_amount": 141764, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Oswald29@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Saint Helena"}, "customer_tax_id": "", "metadata": {"key": ""}, "product": {"created_at": "2022-04-29T02:27:27.855Z", "modified_at": "2024-09-02T23:08:00.186Z", "id": "", "name": "", "description": "frenetically from yuck failing consign tedious scar failing unknown in", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2024-11-05T16:19:50.933Z", "modified_at": "2024-09-13T12:26:55.235Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 467775, "maximum_amount": 993677, "preset_amount": 726700}], "benefits": [{"created_at": "2023-03-22T14:01:55.283Z", "modified_at": "2022-02-02T01:51:19.643Z", "id": "", "description": "kindheartedly nor fooey a supposing regarding times uselessly", "selectable": true, "deletable": false, "organization_id": "", "properties": {"paid_articles": true}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 679829, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-04-24T19:54:59.989Z", "version": "", "is_uploaded": false, "created_at": "2023-08-01T10:27:50.144Z", "size_readable": "", "public_url": "https://plump-markup.net"}]}, "product_price": {"created_at": "2022-10-09T03:58:07.827Z", "modified_at": "2024-10-07T04:54:41.981Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 806103}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2022-06-14T04:35:02.740Z", "modified_at": "2023-06-11T07:32:02.289Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 282091, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2022-07-28T12:54:58.990Z", "modified_at": "2024-06-29T11:50:30.649Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 634941, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-05-23T16:01:48.733Z", "modified_at": "2022-11-05T03:32:00.916Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 520064, "required": false}]}], "pagination": {"total_count": 5229, "max_page": 810770}} "422": {} checkouts:custom:create: speakeasy-default-checkouts:custom:create: @@ -1808,7 +1904,7 @@ examples: application/json: {"product_price_id": ""} responses: "201": - application/json: {"created_at": "2023-06-18T07:14:55.338Z", "modified_at": "2023-12-01T17:06:07.804Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://blind-breastplate.name/", "expires_at": "2022-05-28T06:20:22.766Z", "success_url": "https://standard-utilization.com/", "embed_origin": "", "amount": 169727, "tax_amount": 89964, "currency": "South Sudanese pound", "total_amount": 816588, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Vernice.Gerlach23@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Bahamas"}, "customer_tax_id": "", "metadata": {"key": ""}, "product": {"created_at": "2023-06-18T07:14:55.338Z", "modified_at": "2023-12-01T17:06:07.804Z", "id": "", "name": "", "description": "calmly fortunately bench around igloo scaffold", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-04-03T12:48:32.253Z", "modified_at": "2022-05-28T06:20:22.766Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 796474, "maximum_amount": 951062, "preset_amount": 86, "recurring_interval": "month"}], "benefits": [{"created_at": "2024-05-18T17:03:53.906Z", "modified_at": "2024-06-13T23:30:51.782Z", "id": "", "type": "github_repository", "description": "barracks approximate though championship kookily attend alongside aw blend", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 282436, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-06-30T08:34:56.549Z", "version": "", "is_uploaded": false, "created_at": "2024-05-17T00:17:31.738Z", "size_readable": "", "public_url": "https://vivid-understanding.org"}, {"id": "", "organization_id": "", "name": "", "path": "/opt/lib", "mime_type": "", "size": 78523, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-03-01T22:29:56.777Z", "version": "", "is_uploaded": false, "created_at": "2023-02-12T14:03:31.774Z", "size_readable": "", "public_url": "https://frequent-cope.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 239872, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-18T18:56:43.213Z", "version": "", "is_uploaded": false, "created_at": "2023-06-02T16:37:35.306Z", "size_readable": "", "public_url": "https://spotless-catalyst.biz/"}]}, "product_price": {"created_at": "2022-08-11T18:29:05.567Z", "modified_at": "2023-04-20T19:31:49.649Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 995852}, "subscription_id": ""} + application/json: {"created_at": "2023-06-18T07:14:55.338Z", "modified_at": "2023-12-01T17:06:07.804Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://blind-breastplate.name/", "expires_at": "2022-05-28T06:20:22.766Z", "success_url": "https://standard-utilization.com/", "embed_origin": "", "amount": 169727, "tax_amount": 89964, "currency": "South Sudanese pound", "total_amount": 816588, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Vernice.Gerlach23@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Bahamas"}, "customer_tax_id": "", "metadata": {"key": ""}, "product": {"created_at": "2023-06-18T07:14:55.338Z", "modified_at": "2023-12-01T17:06:07.804Z", "id": "", "name": "", "description": "calmly fortunately bench around igloo scaffold", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-04-03T12:48:32.253Z", "modified_at": "2022-05-28T06:20:22.766Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 796474, "maximum_amount": 951062, "preset_amount": 86, "recurring_interval": "month"}], "benefits": [{"created_at": "2024-05-18T17:03:53.906Z", "modified_at": "2024-06-13T23:30:51.782Z", "id": "", "type": "github_repository", "description": "barracks approximate though championship kookily attend alongside aw blend", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 282436, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-06-30T08:34:56.549Z", "version": "", "is_uploaded": false, "created_at": "2024-05-17T00:17:31.738Z", "size_readable": "", "public_url": "https://vivid-understanding.org"}, {"id": "", "organization_id": "", "name": "", "path": "/opt/lib", "mime_type": "", "size": 78523, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-03-01T22:29:56.777Z", "version": "", "is_uploaded": false, "created_at": "2023-02-12T14:03:31.774Z", "size_readable": "", "public_url": "https://frequent-cope.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 239872, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-18T18:56:43.213Z", "version": "", "is_uploaded": false, "created_at": "2023-06-02T16:37:35.306Z", "size_readable": "", "public_url": "https://spotless-catalyst.biz/"}]}, "product_price": {"created_at": "2024-06-13T23:30:51.782Z", "modified_at": "2023-10-05T11:56:21.731Z", "id": "", "is_archived": false, "product_id": "", "recurring_interval": "year"}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2022-01-20T11:09:16.789Z", "modified_at": "2022-09-10T10:08:53.440Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 64738, "required": true}]} "422": {} checkouts:custom:get: speakeasy-default-checkouts:custom:get: @@ -1817,7 +1913,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://glossy-concentration.biz/", "expires_at": "2023-07-26T06:33:15.810Z", "success_url": "https://lavish-ice-cream.biz", "embed_origin": "", "amount": 213457, "tax_amount": 937146, "currency": "Som", "total_amount": 801373, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Elyssa38@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Mozambique"}, "customer_tax_id": "", "metadata": {"key": "", "key1": ""}, "product": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "description": "tune only fellow scary but embarrassment metabolise", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 458049, "maximum_amount": 450824, "preset_amount": 262795}, {"created_at": "2023-04-26T04:53:50.189Z", "modified_at": "2024-05-28T07:17:57.134Z", "id": "", "is_archived": true, "product_id": "", "recurring_interval": "month"}], "benefits": [{"created_at": "2022-04-14T16:04:46.468Z", "modified_at": "2023-08-29T15:06:35.685Z", "id": "", "type": "downloadables", "description": "disapprove glum ugh roundabout middle ha", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2024-07-13T14:31:52.430Z", "modified_at": "2023-04-01T04:11:43.083Z", "id": "", "description": "congregate ah ack aha", "selectable": true, "deletable": true, "organization_id": "", "properties": {"paid_articles": false}}], "medias": []}, "product_price": {"created_at": "2023-11-27T02:36:46.301Z", "modified_at": "2023-12-02T00:21:35.045Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 974994, "maximum_amount": 547184, "preset_amount": 786783, "recurring_interval": "year"}, "subscription_id": ""} + application/json: {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://glossy-concentration.biz/", "expires_at": "2023-07-26T06:33:15.810Z", "success_url": "https://lavish-ice-cream.biz", "embed_origin": "", "amount": 213457, "tax_amount": 937146, "currency": "Som", "total_amount": 801373, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Elyssa38@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Mozambique"}, "customer_tax_id": "", "metadata": {"key": "", "key1": ""}, "product": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "description": "tune only fellow scary but embarrassment metabolise", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 458049, "maximum_amount": 450824, "preset_amount": 262795}, {"created_at": "2023-04-26T04:53:50.189Z", "modified_at": "2024-05-28T07:17:57.134Z", "id": "", "is_archived": true, "product_id": "", "recurring_interval": "month"}], "benefits": [{"created_at": "2022-04-14T16:04:46.468Z", "modified_at": "2023-08-29T15:06:35.685Z", "id": "", "type": "downloadables", "description": "disapprove glum ugh roundabout middle ha", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2022-04-14T16:04:46.468Z", "modified_at": "2023-08-29T15:06:35.685Z", "id": "", "type": "downloadables", "description": "disapprove glum ugh roundabout middle ha", "selectable": true, "deletable": false, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2023-04-01T04:11:43.083Z", "modified_at": "2022-06-13T10:08:35.363Z", "id": "", "is_archived": false, "product_id": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-06-18T09:19:42.888Z", "modified_at": "2022-03-21T00:44:28.600Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 165215, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-12-19T20:27:48.074Z", "modified_at": "2022-01-28T10:42:29.356Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 292469, "required": false}]} "404": application/json: {"detail": ""} "422": {} @@ -1828,7 +1924,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "status": "expired", "client_secret": "", "url": "https://joyful-knight.com", "expires_at": "2024-12-22T15:27:45.882Z", "success_url": "https://lumbering-wheel.com", "embed_origin": "", "amount": 896501, "tax_amount": 446863, "currency": "Gibraltar Pound", "total_amount": 249440, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Sienna_Kohler@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Antarctica"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "name": "", "description": "hydrolyze for drat underneath sticky", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 488852, "maximum_amount": 984008, "preset_amount": 54062}], "benefits": [{"created_at": "2023-01-18T02:16:35.227Z", "modified_at": "2023-03-19T19:37:57.642Z", "id": "", "type": "articles", "description": "qualified cycle woot abseil perfumed fisherman with duh", "selectable": true, "deletable": true, "organization_id": ""}, {"created_at": "2022-01-23T15:34:13.017Z", "modified_at": "2023-07-24T20:53:49.881Z", "id": "", "type": "downloadables", "description": "urgently voluntarily scale gut", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2023-12-06T20:36:03.050Z", "modified_at": "2022-11-28T09:21:21.867Z", "id": "", "type": "discord", "description": "concerning statement nice consequently provided when rim league", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 249923, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-05-14T05:25:13.723Z", "version": "", "is_uploaded": true, "created_at": "2023-11-11T05:00:44.440Z", "size_readable": "", "public_url": "https://exotic-importance.info/"}, {"id": "", "organization_id": "", "name": "", "path": "/boot", "mime_type": "", "size": 472933, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-08-03T05:43:47.592Z", "version": "", "is_uploaded": false, "created_at": "2022-10-01T21:33:23.746Z", "size_readable": "", "public_url": "https://gigantic-reconsideration.info/"}]}, "product_price": {"created_at": "2022-12-08T09:52:54.805Z", "modified_at": "2022-10-01T09:16:09.932Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 789275, "maximum_amount": 889838, "preset_amount": 302461}, "subscription_id": ""} + application/json: {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "status": "expired", "client_secret": "", "url": "https://joyful-knight.com", "expires_at": "2024-12-22T15:27:45.882Z", "success_url": "https://lumbering-wheel.com", "embed_origin": "", "amount": 896501, "tax_amount": 446863, "currency": "Gibraltar Pound", "total_amount": 249440, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Sienna_Kohler@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Antarctica"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "name": "", "description": "hydrolyze for drat underneath sticky", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 488852, "maximum_amount": 984008, "preset_amount": 54062}], "benefits": [{"created_at": "2023-01-18T02:16:35.227Z", "modified_at": "2023-03-19T19:37:57.642Z", "id": "", "type": "articles", "description": "qualified cycle woot abseil perfumed fisherman with duh", "selectable": true, "deletable": true, "organization_id": ""}, {"created_at": "2022-01-23T15:34:13.017Z", "modified_at": "2023-07-24T20:53:49.881Z", "id": "", "type": "downloadables", "description": "urgently voluntarily scale gut", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2023-12-06T20:36:03.050Z", "modified_at": "2022-11-28T09:21:21.867Z", "id": "", "type": "discord", "description": "concerning statement nice consequently provided when rim league", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 249923, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-05-14T05:25:13.723Z", "version": "", "is_uploaded": true, "created_at": "2023-11-11T05:00:44.440Z", "size_readable": "", "public_url": "https://exotic-importance.info/"}, {"id": "", "organization_id": "", "name": "", "path": "/boot", "mime_type": "", "size": 472933, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-08-03T05:43:47.592Z", "version": "", "is_uploaded": false, "created_at": "2022-10-01T21:33:23.746Z", "size_readable": "", "public_url": "https://gigantic-reconsideration.info/"}]}, "product_price": {"created_at": "2022-12-08T09:52:54.805Z", "modified_at": "2022-10-01T09:16:09.932Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 789275, "maximum_amount": 889838, "preset_amount": 302461}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-01-31T02:01:14.461Z", "modified_at": "2023-03-20T01:46:46.018Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 810877, "required": true}]} "404": application/json: {"detail": ""} "422": {} @@ -1839,7 +1935,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": "", "url": "https://lumpy-jellyfish.com", "expires_at": "2023-08-07T16:01:01.665Z", "success_url": "https://obedient-operating.org/", "embed_origin": "", "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": "2024-04-14T21:02:40.457Z", "modified_at": "2023-08-07T16:01:01.665Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "price_amount": 564186, "recurring_interval": "year"}} + application/json: {"created_at": "2022-06-23T19:45:02.115Z", "modified_at": "2022-11-26T05:04:17.930Z", "id": "", "status": "succeeded", "client_secret": "", "url": "https://lumpy-jellyfish.com", "expires_at": "2023-08-07T16:01:01.665Z", "success_url": "https://obedient-operating.org/", "embed_origin": "", "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": "2024-04-14T21:02:40.457Z", "modified_at": "2023-08-07T16:01:01.665Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "price_amount": 564186, "recurring_interval": "year"}, "organization": {"created_at": "2024-10-05T02:43:03.106Z", "modified_at": "2023-08-31T01:50:30.615Z", "id": "", "name": "", "slug": "", "avatar_url": "https://shy-kettledrum.name/", "bio": "", "company": "Douglas, Nolan and Rutherford", "blog": "", "location": "", "email": "Gregoria.Littel92@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 528457, "pledge_badge_show_amount": true, "default_upfront_split_to_contributors": 944792, "donations_enabled": true}, "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-11-06T08:59:00.297Z", "modified_at": "2024-03-24T21:11:57.960Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 250741, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-11-17T17:15:41.835Z", "modified_at": "2023-01-01T21:38:27.210Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 113721, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2023-06-27T14:22:25.878Z", "modified_at": "2023-01-07T11:27:39.543Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": []}}, "order": 241475, "required": true}]} "404": application/json: {"detail": ""} "422": {} @@ -1850,7 +1946,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": "", "url": "https://simple-flint.org/", "expires_at": "2023-07-14T01:44:24.320Z", "success_url": "https://passionate-understanding.com/", "embed_origin": "", "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, "product_id": "", "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, "product_id": ""}, {"created_at": "2024-07-08T15:45:04.860Z", "modified_at": "2023-09-22T09:06:50.882Z", "id": "", "is_archived": true, "product_id": "", "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, "product_id": "", "price_currency": "", "price_amount": 172495}} + application/json: {"created_at": "2024-10-22T20:45:21.815Z", "modified_at": "2023-07-17T23:31:05.499Z", "id": "", "status": "expired", "client_secret": "", "url": "https://simple-flint.org/", "expires_at": "2023-07-14T01:44:24.320Z", "success_url": "https://passionate-understanding.com/", "embed_origin": "", "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, "product_id": "", "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, "product_id": ""}, {"created_at": "2024-07-08T15:45:04.860Z", "modified_at": "2023-09-22T09:06:50.882Z", "id": "", "is_archived": true, "product_id": "", "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, "product_id": "", "price_currency": "", "price_amount": 172495}, "organization": {"created_at": "2023-07-15T16:51:46.519Z", "modified_at": "2023-07-18T07:58:43.752Z", "id": "", "name": "", "slug": "", "avatar_url": "https://squiggly-conservative.name/", "bio": "", "company": "Parker - Funk", "blog": "", "location": "", "email": "Lelia.Lind1@yahoo.com", "twitter_username": "", "pledge_minimum_amount": 359631, "pledge_badge_show_amount": true, "default_upfront_split_to_contributors": 600341, "donations_enabled": true}, "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-12-05T04:32:54.622Z", "modified_at": "2022-01-11T00:30:48.312Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 278568, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-08-15T02:59:51.195Z", "modified_at": "2023-10-21T13:26:17.528Z", "id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 873793, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-10-29T00:58:59.731Z", "modified_at": "2023-12-13T05:03:13.184Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 458158, "required": true}]} "404": application/json: {"detail": ""} "422": {} @@ -1861,7 +1957,7 @@ 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": "", "url": "https://apt-devastation.biz/", "expires_at": "2022-07-30T06:29:51.767Z", "success_url": "https://secondary-gallery.net", "embed_origin": "", "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, "product_id": ""}], "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, "product_id": "", "price_currency": "", "minimum_amount": 638939, "maximum_amount": 942266, "preset_amount": 508098}} + application/json: {"created_at": "2024-09-27T22:33:04.250Z", "modified_at": "2024-07-24T02:45:26.067Z", "id": "", "status": "succeeded", "client_secret": "", "url": "https://apt-devastation.biz/", "expires_at": "2022-07-30T06:29:51.767Z", "success_url": "https://secondary-gallery.net", "embed_origin": "", "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, "product_id": ""}], "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, "product_id": "", "price_currency": "", "minimum_amount": 638939, "maximum_amount": 942266, "preset_amount": 508098}, "organization": {"created_at": "2024-01-09T08:11:20.495Z", "modified_at": "2024-08-15T01:27:14.128Z", "id": "", "name": "", "slug": "", "avatar_url": "https://clear-cut-deer.net", "bio": "", "company": "Hauck Inc", "blog": "", "location": "", "email": "Janae.Hirthe@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 851973, "pledge_badge_show_amount": true, "default_upfront_split_to_contributors": 267069, "donations_enabled": true}, "attached_custom_fields": []} "404": application/json: {"detail": ""} "422": {} @@ -1919,3 +2015,48 @@ examples: "404": application/json: {"detail": ""} "422": {} + custom-fields:list: + speakeasy-default-custom-fields:list: + responses: + "200": + application/json: {"items": [{"created_at": "2024-01-14T10:26:00.433Z", "modified_at": "2022-07-14T18:23:27.528Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, {"created_at": "2023-11-28T13:02:27.296Z", "modified_at": "2023-12-02T18:25:37.169Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, {"created_at": "2022-04-05T09:49:38.010Z", "modified_at": "2022-03-17T01:57:00.187Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}]}}], "pagination": {"total_count": 633911, "max_page": 7468}} + "422": {} + custom-fields:create: + speakeasy-default-custom-fields:create: + requestBody: + application/json: {"slug": "", "name": ""} + responses: + "201": + application/json: {"created_at": "2023-04-03T12:48:32.253Z", "modified_at": "2022-05-28T06:20:22.766Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}} + "422": {} + custom-fields:get: + speakeasy-default-custom-fields:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2023-09-05T11:33:52.011Z", "modified_at": "2023-08-20T11:11:04.610Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}} + "404": + application/json: {"detail": ""} + "422": {} + custom-fields:update: + speakeasy-default-custom-fields:update: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": ""} + "404": + application/json: {"detail": ""} + "422": {} + custom-fields:delete: + speakeasy-default-custom-fields:delete: + parameters: + path: + id: "" + responses: + "404": + application/json: {"detail": ""} + "422": {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index daf57e8..778ec21 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -14,8 +14,9 @@ generation: requestResponseComponentNamesFeb2024: true auth: oAuth2ClientCredentialsEnabled: true + oAuth2PasswordEnabled: false python: - version: 0.7.0 + version: 0.7.1 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index bc1b128..ec7e0c4 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.424.0 +speakeasyVersion: 1.431.0 sources: Polar-OAS: sourceNamespace: polar-oas - sourceRevisionDigest: sha256:814854f05d50ba78118c85640341bf5523d41e08d3d90789a3804f5b58bbdda6 - sourceBlobDigest: sha256:47c4285003255d7bf61593438fcc7f5cc4650bece8005ac801a6c26cd2eabba7 + sourceRevisionDigest: sha256:bdfd06b23a17ee112bbcfaaf77e0e5293d2305ec4704ab750626221f270c5bfc + sourceBlobDigest: sha256:7316038513ebb138e351a2af12f12b570b62f9691c2be6df032216ee0406f91a tags: - latest - main @@ -11,8 +11,8 @@ targets: polar: source: Polar-OAS sourceNamespace: polar-oas - sourceRevisionDigest: sha256:814854f05d50ba78118c85640341bf5523d41e08d3d90789a3804f5b58bbdda6 - sourceBlobDigest: sha256:47c4285003255d7bf61593438fcc7f5cc4650bece8005ac801a6c26cd2eabba7 + sourceRevisionDigest: sha256:bdfd06b23a17ee112bbcfaaf77e0e5293d2305ec4704ab750626221f270c5bfc + sourceBlobDigest: sha256:7316038513ebb138e351a2af12f12b570b62f9691c2be6df032216ee0406f91a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 818898e..d9eef51 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,14 @@ asyncio.run(main()) * [client_update](docs/sdks/custom/README.md#client_update) - Update Checkout Session from Client * [client_confirm](docs/sdks/custom/README.md#client_confirm) - Confirm Checkout Session from Client +### [custom_fields](docs/sdks/customfields/README.md) + +* [list](docs/sdks/customfields/README.md#list) - List Custom Fields +* [create](docs/sdks/customfields/README.md#create) - Create Custom Field +* [get](docs/sdks/customfields/README.md#get) - Get Custom Field +* [update](docs/sdks/customfields/README.md#update) - Update Custom Field +* [delete](docs/sdks/customfields/README.md#delete) - Delete Custom Field + ### [external_organizations](docs/sdks/externalorganizations/README.md) * [list](docs/sdks/externalorganizations/README.md#list) - List External Organizations diff --git a/RELEASES.md b/RELEASES.md index 787cc0b..b4f8225 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -273,4 +273,14 @@ Based on: ### Generated - [python v0.7.0] . ### Releases -- [PyPI v0.7.0] https://pypi.org/project/polar-sdk/0.7.0 - . \ No newline at end of file +- [PyPI v0.7.0] https://pypi.org/project/polar-sdk/0.7.0 - . + +## 2024-11-06 00:11:45 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.431.0 (2.451.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.7.1] . +### Releases +- [PyPI v0.7.1] https://pypi.org/project/polar-sdk/0.7.1 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 02afa2f..77dff1b 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -177,6 +177,36 @@ actions: - "lang": "python" "label": "update" "source": "from polar_sdk import Polar\n\ns = Polar(\n access_token=\"\",\n)\n\nres = s.checkouts.custom.update(id=\"\", checkout_update={})\n\nif res is not None:\n # handle response\n pass" + - target: $["paths"]["/v1/custom-fields/"]["get"] + update: + "x-codeSamples": + - "lang": "python" + "label": "list" + "source": "from polar_sdk import Polar\n\ns = Polar(\n access_token=\"\",\n)\n\nres = s.custom_fields.list()\n\nif res is not None:\n while True:\n # handle items\n\n res = res.next()\n if res is None:\n break" + - target: $["paths"]["/v1/custom-fields/"]["post"] + update: + "x-codeSamples": + - "lang": "python" + "label": "create" + "source": "import polar_sdk\nfrom polar_sdk import Polar\n\ns = Polar(\n access_token=\"\",\n)\n\nres = s.custom_fields.create(request={\n \"type\": polar_sdk.CustomFieldCreateNumberType.NUMBER,\n \"slug\": \"\",\n \"name\": \"\",\n \"properties\": {},\n})\n\nif res is not None:\n # handle response\n pass" + - target: $["paths"]["/v1/custom-fields/{id}"]["delete"] + update: + "x-codeSamples": + - "lang": "python" + "label": "delete" + "source": "from polar_sdk import Polar\n\ns = Polar(\n access_token=\"\",\n)\n\ns.custom_fields.delete(id=\"\")\n\n# Use the SDK ..." + - target: $["paths"]["/v1/custom-fields/{id}"]["get"] + update: + "x-codeSamples": + - "lang": "python" + "label": "get" + "source": "from polar_sdk import Polar\n\ns = Polar(\n access_token=\"\",\n)\n\nres = s.custom_fields.get(id=\"\")\n\nif res is not None:\n # handle response\n pass" + - target: $["paths"]["/v1/custom-fields/{id}"]["patch"] + update: + "x-codeSamples": + - "lang": "python" + "label": "update" + "source": "import polar_sdk\nfrom polar_sdk import Polar\n\ns = Polar(\n access_token=\"\",\n)\n\nres = s.custom_fields.update(id=\"\", custom_field_update={\n \"type\": polar_sdk.CustomFieldUpdateTextType.TEXT,\n})\n\nif res is not None:\n # handle response\n pass" - target: $["paths"]["/v1/external_organizations/"]["get"] update: "x-codeSamples": diff --git a/docs/models/attachedcustomfield.md b/docs/models/attachedcustomfield.md new file mode 100644 index 0000000..ad01da3 --- /dev/null +++ b/docs/models/attachedcustomfield.md @@ -0,0 +1,13 @@ +# AttachedCustomField + +Schema of a custom field attached to a resource. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `custom_field_id` | *str* | :heavy_check_mark: | ID of the custom field. | +| `custom_field` | [models.CustomField](../models/customfield.md) | :heavy_check_mark: | N/A | +| `order` | *int* | :heavy_check_mark: | Order of the custom field in the resource. | +| `required` | *bool* | :heavy_check_mark: | Whether the value is required for this custom field. | \ No newline at end of file diff --git a/docs/models/attachedcustomfieldcreate.md b/docs/models/attachedcustomfieldcreate.md new file mode 100644 index 0000000..c5ef60e --- /dev/null +++ b/docs/models/attachedcustomfieldcreate.md @@ -0,0 +1,11 @@ +# AttachedCustomFieldCreate + +Schema to attach a custom field to a resource. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `custom_field_id` | *str* | :heavy_check_mark: | ID of the custom field to attach. | +| `required` | *bool* | :heavy_check_mark: | Whether the value is required for this custom field. | \ No newline at end of file diff --git a/docs/models/benefitadssubscriber.md b/docs/models/benefitadssubscriber.md index 1a9f0aa..1fc8166 100644 --- a/docs/models/benefitadssubscriber.md +++ b/docs/models/benefitadssubscriber.md @@ -12,6 +12,7 @@ | `selectable` | *bool* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the benefit. | -| `properties` | [models.BenefitAdsProperties](../models/benefitadsproperties.md) | :heavy_check_mark: | Properties for a benefit of type `ads`. | | `grants` | List[[models.BenefitGrantAds](../models/benefitgrantads.md)] | :heavy_check_mark: | N/A | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [models.BenefitAdsProperties](../models/benefitadsproperties.md) | :heavy_check_mark: | Properties for a benefit of type `ads`. | | `type` | [models.BenefitAdsSubscriberType](../models/benefitadssubscribertype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/benefitarticlessubscriber.md b/docs/models/benefitarticlessubscriber.md index b00cc85..4fdcace 100644 --- a/docs/models/benefitarticlessubscriber.md +++ b/docs/models/benefitarticlessubscriber.md @@ -12,5 +12,7 @@ | `selectable` | *bool* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `grants` | List[[models.BenefitGrantSubscriber](../models/benefitgrantsubscriber.md)] | :heavy_check_mark: | N/A | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | | `properties` | [models.BenefitArticlesSubscriberProperties](../models/benefitarticlessubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `articles`. | | `type` | [models.Type](../models/type.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/benefitcustomsubscriber.md b/docs/models/benefitcustomsubscriber.md index 9aa9adf..92d38e8 100644 --- a/docs/models/benefitcustomsubscriber.md +++ b/docs/models/benefitcustomsubscriber.md @@ -13,5 +13,6 @@ | `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the benefit. | | `grants` | List[[models.BenefitGrantSubscriber](../models/benefitgrantsubscriber.md)] | :heavy_check_mark: | N/A | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | | `properties` | [models.BenefitCustomSubscriberProperties](../models/benefitcustomsubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `custom`. | | `type` | [models.BenefitCustomSubscriberType](../models/benefitcustomsubscribertype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/benefitdiscordsubscriber.md b/docs/models/benefitdiscordsubscriber.md index a741ef0..312b1cb 100644 --- a/docs/models/benefitdiscordsubscriber.md +++ b/docs/models/benefitdiscordsubscriber.md @@ -12,5 +12,7 @@ | `selectable` | *bool* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `grants` | List[[models.BenefitGrantSubscriber](../models/benefitgrantsubscriber.md)] | :heavy_check_mark: | N/A | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | | `properties` | [models.BenefitDiscordSubscriberProperties](../models/benefitdiscordsubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `discord`. | | `type` | [models.BenefitDiscordSubscriberType](../models/benefitdiscordsubscribertype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/benefitdownloadablessubscriber.md b/docs/models/benefitdownloadablessubscriber.md index d03175c..89a754e 100644 --- a/docs/models/benefitdownloadablessubscriber.md +++ b/docs/models/benefitdownloadablessubscriber.md @@ -12,5 +12,7 @@ | `selectable` | *bool* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `grants` | List[[models.BenefitGrantSubscriber](../models/benefitgrantsubscriber.md)] | :heavy_check_mark: | N/A | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | | `properties` | [models.BenefitDownloadablesSubscriberProperties](../models/benefitdownloadablessubscriberproperties.md) | :heavy_check_mark: | N/A | | `type` | [models.BenefitDownloadablesSubscriberType](../models/benefitdownloadablessubscribertype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/benefitgithubrepositorysubscriber.md b/docs/models/benefitgithubrepositorysubscriber.md index fc49760..de199fe 100644 --- a/docs/models/benefitgithubrepositorysubscriber.md +++ b/docs/models/benefitgithubrepositorysubscriber.md @@ -12,5 +12,7 @@ | `selectable` | *bool* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `grants` | List[[models.BenefitGrantSubscriber](../models/benefitgrantsubscriber.md)] | :heavy_check_mark: | N/A | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | | `properties` | [models.BenefitGitHubRepositorySubscriberProperties](../models/benefitgithubrepositorysubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `github_repository`. | | `type` | [models.BenefitGitHubRepositorySubscriberType](../models/benefitgithubrepositorysubscribertype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/benefitlicensekeyssubscriber.md b/docs/models/benefitlicensekeyssubscriber.md index 59e0145..cf7e580 100644 --- a/docs/models/benefitlicensekeyssubscriber.md +++ b/docs/models/benefitlicensekeyssubscriber.md @@ -12,6 +12,7 @@ | `selectable` | *bool* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *bool* | :heavy_check_mark: | Whether the benefit is deletable. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the benefit. | -| `properties` | [models.BenefitLicenseKeysSubscriberProperties](../models/benefitlicensekeyssubscriberproperties.md) | :heavy_check_mark: | N/A | | `grants` | List[[models.BenefitGrantLicenseKeys](../models/benefitgrantlicensekeys.md)] | :heavy_check_mark: | N/A | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [models.BenefitLicenseKeysSubscriberProperties](../models/benefitlicensekeyssubscriberproperties.md) | :heavy_check_mark: | N/A | | `type` | [models.BenefitLicenseKeysSubscriberType](../models/benefitlicensekeyssubscribertype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/checkoutconfirmstripe.md b/docs/models/checkoutconfirmstripe.md index e4fb095..4278c04 100644 --- a/docs/models/checkoutconfirmstripe.md +++ b/docs/models/checkoutconfirmstripe.md @@ -5,12 +5,13 @@ Confirm a checkout session using a Stripe confirmation token. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `product_price_id` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | -| `amount` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `customer_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `customer_email` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `customer_billing_address` | [OptionalNullable[models.Address]](../models/address.md) | :heavy_minus_sign: | N/A | -| `customer_tax_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `confirmation_token_id` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the Stripe confirmation token. Required for fixed prices and custom prices. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `custom_field_data` | [OptionalNullable[models.CheckoutConfirmStripeCustomFieldData]](../models/checkoutconfirmstripecustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | +| `product_price_id` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | +| `amount` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `customer_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `customer_email` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `customer_billing_address` | [OptionalNullable[models.Address]](../models/address.md) | :heavy_minus_sign: | N/A | +| `customer_tax_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `confirmation_token_id` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the Stripe confirmation token. Required for fixed prices and custom prices. | \ No newline at end of file diff --git a/docs/models/checkoutconfirmstripecustomfielddata.md b/docs/models/checkoutconfirmstripecustomfielddata.md new file mode 100644 index 0000000..126166a --- /dev/null +++ b/docs/models/checkoutconfirmstripecustomfielddata.md @@ -0,0 +1,7 @@ +# CheckoutConfirmStripeCustomFieldData + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/checkoutproduct.md b/docs/models/checkoutproduct.md new file mode 100644 index 0000000..6f3f419 --- /dev/null +++ b/docs/models/checkoutproduct.md @@ -0,0 +1,20 @@ +# CheckoutProduct + +Product data for a checkout session. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `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 product. | +| `name` | *str* | :heavy_check_mark: | The name of the product. | +| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the product. | +| `is_recurring` | *bool* | :heavy_check_mark: | Whether the product is a subscription tier. | +| `is_archived` | *bool* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the product. | +| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | List[[models.CheckoutProductBenefits](../models/checkoutproductbenefits.md)] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | List[[models.ProductMediaFileRead](../models/productmediafileread.md)] | :heavy_check_mark: | List of medias associated to the product. | \ No newline at end of file diff --git a/docs/models/productbenefits.md b/docs/models/checkoutproductbenefits.md similarity index 88% rename from docs/models/productbenefits.md rename to docs/models/checkoutproductbenefits.md index 406c707..16c7449 100644 --- a/docs/models/productbenefits.md +++ b/docs/models/checkoutproductbenefits.md @@ -1,4 +1,4 @@ -# ProductBenefits +# CheckoutProductBenefits ## Supported Types diff --git a/docs/models/checkoutproductinput.md b/docs/models/checkoutproductinput.md new file mode 100644 index 0000000..1aadc6a --- /dev/null +++ b/docs/models/checkoutproductinput.md @@ -0,0 +1,20 @@ +# CheckoutProductInput + +Product data for a checkout session. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `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 product. | +| `name` | *str* | :heavy_check_mark: | The name of the product. | +| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the product. | +| `is_recurring` | *bool* | :heavy_check_mark: | Whether the product is a subscription tier. | +| `is_archived` | *bool* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the product. | +| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | List[[models.CheckoutProductBenefits](../models/checkoutproductbenefits.md)] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | List[[models.ProductMediaFileReadInput](../models/productmediafilereadinput.md)] | :heavy_check_mark: | List of medias associated to the product. | \ No newline at end of file diff --git a/docs/models/checkoutpublic.md b/docs/models/checkoutpublic.md index fb28169..410b26f 100644 --- a/docs/models/checkoutpublic.md +++ b/docs/models/checkoutpublic.md @@ -30,6 +30,9 @@ Checkout session data retrieved using the client secret. | `customer_billing_address` | [Nullable[models.Address]](../models/address.md) | :heavy_check_mark: | N/A | | `customer_tax_id` | *Nullable[str]* | :heavy_check_mark: | N/A | | `payment_processor_metadata` | [models.CheckoutPublicPaymentProcessorMetadata](../models/checkoutpublicpaymentprocessormetadata.md) | :heavy_check_mark: | N/A | -| `product` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | +| `product` | [models.CheckoutProduct](../models/checkoutproduct.md) | :heavy_check_mark: | Product data for a checkout session. | | `product_price` | [models.ProductPrice](../models/productprice.md) | :heavy_check_mark: | N/A | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | +| `attached_custom_fields` | List[[models.AttachedCustomField](../models/attachedcustomfield.md)] | :heavy_check_mark: | N/A | +| `custom_field_data` | [Optional[models.CheckoutPublicCustomFieldData]](../models/checkoutpubliccustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `payment_processor` | [models.PolarEnumsPaymentProcessor](../models/polarenumspaymentprocessor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/checkoutpubliccustomfielddata.md b/docs/models/checkoutpubliccustomfielddata.md new file mode 100644 index 0000000..84b61ac --- /dev/null +++ b/docs/models/checkoutpubliccustomfielddata.md @@ -0,0 +1,9 @@ +# CheckoutPublicCustomFieldData + +Key-value object storing custom field values. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/checkoutupdate.md b/docs/models/checkoutupdate.md index 2a24dac..263e954 100644 --- a/docs/models/checkoutupdate.md +++ b/docs/models/checkoutupdate.md @@ -7,6 +7,7 @@ Update an existing checkout session using an access token. | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `custom_field_data` | [OptionalNullable[models.CustomFieldData]](../models/customfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `product_price_id` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | | `amount` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | `customer_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/checkoutupdatepublic.md b/docs/models/checkoutupdatepublic.md index 0798fcc..fb83f22 100644 --- a/docs/models/checkoutupdatepublic.md +++ b/docs/models/checkoutupdatepublic.md @@ -5,11 +5,12 @@ Update an existing checkout session using the client secret. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `product_price_id` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | -| `amount` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `customer_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `customer_email` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `customer_billing_address` | [OptionalNullable[models.Address]](../models/address.md) | :heavy_minus_sign: | N/A | -| `customer_tax_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `custom_field_data` | [OptionalNullable[models.CheckoutUpdatePublicCustomFieldData]](../models/checkoutupdatepubliccustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | +| `product_price_id` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | +| `amount` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `customer_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `customer_email` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `customer_billing_address` | [OptionalNullable[models.Address]](../models/address.md) | :heavy_minus_sign: | N/A | +| `customer_tax_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/checkoutupdatepubliccustomfielddata.md b/docs/models/checkoutupdatepubliccustomfielddata.md new file mode 100644 index 0000000..3bbacc6 --- /dev/null +++ b/docs/models/checkoutupdatepubliccustomfielddata.md @@ -0,0 +1,7 @@ +# CheckoutUpdatePublicCustomFieldData + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/customfield.md b/docs/models/customfield.md new file mode 100644 index 0000000..2884268 --- /dev/null +++ b/docs/models/customfield.md @@ -0,0 +1,35 @@ +# CustomField + + +## Supported Types + +### `models.CustomFieldCheckbox` + +```python +value: models.CustomFieldCheckbox = /* values here */ +``` + +### `models.CustomFieldDate` + +```python +value: models.CustomFieldDate = /* values here */ +``` + +### `models.CustomFieldNumber` + +```python +value: models.CustomFieldNumber = /* values here */ +``` + +### `models.CustomFieldSelect` + +```python +value: models.CustomFieldSelect = /* values here */ +``` + +### `models.CustomFieldText` + +```python +value: models.CustomFieldText = /* values here */ +``` + diff --git a/docs/models/customfieldcheckbox.md b/docs/models/customfieldcheckbox.md new file mode 100644 index 0000000..0d8945f --- /dev/null +++ b/docs/models/customfieldcheckbox.md @@ -0,0 +1,18 @@ +# CustomFieldCheckbox + +Schema for a custom field of type checkbox. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `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. | +| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [models.CustomFieldCheckboxProperties](../models/customfieldcheckboxproperties.md) | :heavy_check_mark: | N/A | +| `type` | [models.CustomFieldCheckboxType](../models/customfieldcheckboxtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldcheckboxproperties.md b/docs/models/customfieldcheckboxproperties.md new file mode 100644 index 0000000..2b66cc1 --- /dev/null +++ b/docs/models/customfieldcheckboxproperties.md @@ -0,0 +1,10 @@ +# CustomFieldCheckboxProperties + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `form_label` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_help_text` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldcheckboxtype.md b/docs/models/customfieldcheckboxtype.md new file mode 100644 index 0000000..bb98c7c --- /dev/null +++ b/docs/models/customfieldcheckboxtype.md @@ -0,0 +1,8 @@ +# CustomFieldCheckboxType + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `CHECKBOX` | checkbox | \ No newline at end of file diff --git a/docs/models/customfieldcreate.md b/docs/models/customfieldcreate.md new file mode 100644 index 0000000..e92d1f5 --- /dev/null +++ b/docs/models/customfieldcreate.md @@ -0,0 +1,35 @@ +# CustomFieldCreate + + +## Supported Types + +### `models.CustomFieldCreateCheckbox` + +```python +value: models.CustomFieldCreateCheckbox = /* values here */ +``` + +### `models.CustomFieldCreateDate` + +```python +value: models.CustomFieldCreateDate = /* values here */ +``` + +### `models.CustomFieldCreateNumber` + +```python +value: models.CustomFieldCreateNumber = /* values here */ +``` + +### `models.CustomFieldCreateSelect` + +```python +value: models.CustomFieldCreateSelect = /* values here */ +``` + +### `models.CustomFieldCreateText` + +```python +value: models.CustomFieldCreateText = /* values here */ +``` + diff --git a/docs/models/customfieldcreatecheckbox.md b/docs/models/customfieldcreatecheckbox.md new file mode 100644 index 0000000..808b5e8 --- /dev/null +++ b/docs/models/customfieldcreatecheckbox.md @@ -0,0 +1,15 @@ +# CustomFieldCreateCheckbox + +Schema to create a custom field of type checkbox. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `properties` | [models.CustomFieldCheckboxProperties](../models/customfieldcheckboxproperties.md) | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [models.CustomFieldCreateCheckboxType](../models/customfieldcreatecheckboxtype.md) | :heavy_check_mark: | N/A | +| `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | \ No newline at end of file diff --git a/docs/models/customfieldcreatecheckboxtype.md b/docs/models/customfieldcreatecheckboxtype.md new file mode 100644 index 0000000..c844014 --- /dev/null +++ b/docs/models/customfieldcreatecheckboxtype.md @@ -0,0 +1,8 @@ +# CustomFieldCreateCheckboxType + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `CHECKBOX` | checkbox | \ No newline at end of file diff --git a/docs/models/customfieldcreatedate.md b/docs/models/customfieldcreatedate.md new file mode 100644 index 0000000..00288de --- /dev/null +++ b/docs/models/customfieldcreatedate.md @@ -0,0 +1,15 @@ +# CustomFieldCreateDate + +Schema to create a custom field of type date. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `properties` | [models.CustomFieldDateProperties](../models/customfielddateproperties.md) | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [models.CustomFieldCreateDateType](../models/customfieldcreatedatetype.md) | :heavy_check_mark: | N/A | +| `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | \ No newline at end of file diff --git a/docs/models/customfieldcreatedatetype.md b/docs/models/customfieldcreatedatetype.md new file mode 100644 index 0000000..b4f0d8c --- /dev/null +++ b/docs/models/customfieldcreatedatetype.md @@ -0,0 +1,8 @@ +# CustomFieldCreateDateType + + +## Values + +| Name | Value | +| ------ | ------ | +| `DATE` | date | \ No newline at end of file diff --git a/docs/models/customfieldcreatenumber.md b/docs/models/customfieldcreatenumber.md new file mode 100644 index 0000000..4f96d71 --- /dev/null +++ b/docs/models/customfieldcreatenumber.md @@ -0,0 +1,15 @@ +# CustomFieldCreateNumber + +Schema to create a custom field of type number. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `properties` | [models.CustomFieldNumberProperties](../models/customfieldnumberproperties.md) | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [models.CustomFieldCreateNumberType](../models/customfieldcreatenumbertype.md) | :heavy_check_mark: | N/A | +| `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | \ No newline at end of file diff --git a/docs/models/customfieldcreatenumbertype.md b/docs/models/customfieldcreatenumbertype.md new file mode 100644 index 0000000..244706e --- /dev/null +++ b/docs/models/customfieldcreatenumbertype.md @@ -0,0 +1,8 @@ +# CustomFieldCreateNumberType + + +## Values + +| Name | Value | +| -------- | -------- | +| `NUMBER` | number | \ No newline at end of file diff --git a/docs/models/customfieldcreateselect.md b/docs/models/customfieldcreateselect.md new file mode 100644 index 0000000..9d2f006 --- /dev/null +++ b/docs/models/customfieldcreateselect.md @@ -0,0 +1,15 @@ +# CustomFieldCreateSelect + +Schema to create a custom field of type select. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `properties` | [models.CustomFieldSelectProperties](../models/customfieldselectproperties.md) | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [models.CustomFieldCreateSelectType](../models/customfieldcreateselecttype.md) | :heavy_check_mark: | N/A | +| `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | \ No newline at end of file diff --git a/docs/models/customfieldcreateselecttype.md b/docs/models/customfieldcreateselecttype.md new file mode 100644 index 0000000..2b2b035 --- /dev/null +++ b/docs/models/customfieldcreateselecttype.md @@ -0,0 +1,8 @@ +# CustomFieldCreateSelectType + + +## Values + +| Name | Value | +| -------- | -------- | +| `SELECT` | select | \ No newline at end of file diff --git a/docs/models/customfieldcreatetext.md b/docs/models/customfieldcreatetext.md new file mode 100644 index 0000000..77b5fcb --- /dev/null +++ b/docs/models/customfieldcreatetext.md @@ -0,0 +1,15 @@ +# CustomFieldCreateText + +Schema to create a custom field of type text. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `properties` | [models.CustomFieldTextProperties](../models/customfieldtextproperties.md) | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [models.CustomFieldCreateTextType](../models/customfieldcreatetexttype.md) | :heavy_check_mark: | N/A | +| `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | \ No newline at end of file diff --git a/docs/models/customfieldcreatetexttype.md b/docs/models/customfieldcreatetexttype.md new file mode 100644 index 0000000..6d7529d --- /dev/null +++ b/docs/models/customfieldcreatetexttype.md @@ -0,0 +1,8 @@ +# CustomFieldCreateTextType + + +## Values + +| Name | Value | +| ------ | ------ | +| `TEXT` | text | \ No newline at end of file diff --git a/docs/models/customfielddata.md b/docs/models/customfielddata.md new file mode 100644 index 0000000..8bf0994 --- /dev/null +++ b/docs/models/customfielddata.md @@ -0,0 +1,7 @@ +# CustomFieldData + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/customfielddate.md b/docs/models/customfielddate.md new file mode 100644 index 0000000..7044f71 --- /dev/null +++ b/docs/models/customfielddate.md @@ -0,0 +1,18 @@ +# CustomFieldDate + +Schema for a custom field of type date. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `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. | +| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [models.CustomFieldDateProperties](../models/customfielddateproperties.md) | :heavy_check_mark: | N/A | +| `type` | [models.CustomFieldDateType](../models/customfielddatetype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customfielddateproperties.md b/docs/models/customfielddateproperties.md new file mode 100644 index 0000000..3baeb48 --- /dev/null +++ b/docs/models/customfielddateproperties.md @@ -0,0 +1,12 @@ +# CustomFieldDateProperties + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `form_label` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_help_text` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `ge` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `le` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfielddatetype.md b/docs/models/customfielddatetype.md new file mode 100644 index 0000000..a7f1b0e --- /dev/null +++ b/docs/models/customfielddatetype.md @@ -0,0 +1,8 @@ +# CustomFieldDateType + + +## Values + +| Name | Value | +| ------ | ------ | +| `DATE` | date | \ No newline at end of file diff --git a/docs/models/customfieldnumber.md b/docs/models/customfieldnumber.md new file mode 100644 index 0000000..bba4bb1 --- /dev/null +++ b/docs/models/customfieldnumber.md @@ -0,0 +1,18 @@ +# CustomFieldNumber + +Schema for a custom field of type number. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `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. | +| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [models.CustomFieldNumberProperties](../models/customfieldnumberproperties.md) | :heavy_check_mark: | N/A | +| `type` | [models.CustomFieldNumberType](../models/customfieldnumbertype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldnumberproperties.md b/docs/models/customfieldnumberproperties.md new file mode 100644 index 0000000..41670f9 --- /dev/null +++ b/docs/models/customfieldnumberproperties.md @@ -0,0 +1,12 @@ +# CustomFieldNumberProperties + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `form_label` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_help_text` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `ge` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `le` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldnumbertype.md b/docs/models/customfieldnumbertype.md new file mode 100644 index 0000000..0f204a8 --- /dev/null +++ b/docs/models/customfieldnumbertype.md @@ -0,0 +1,8 @@ +# CustomFieldNumberType + + +## Values + +| Name | Value | +| -------- | -------- | +| `NUMBER` | number | \ No newline at end of file diff --git a/docs/models/customfieldsdeleterequest.md b/docs/models/customfieldsdeleterequest.md new file mode 100644 index 0000000..5376335 --- /dev/null +++ b/docs/models/customfieldsdeleterequest.md @@ -0,0 +1,8 @@ +# CustomFieldsDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *str* | :heavy_check_mark: | The custom field ID. | \ No newline at end of file diff --git a/docs/models/customfieldselect.md b/docs/models/customfieldselect.md new file mode 100644 index 0000000..35f4b3c --- /dev/null +++ b/docs/models/customfieldselect.md @@ -0,0 +1,18 @@ +# CustomFieldSelect + +Schema for a custom field of type select. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `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. | +| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [models.CustomFieldSelectProperties](../models/customfieldselectproperties.md) | :heavy_check_mark: | N/A | +| `type` | [models.CustomFieldSelectType](../models/customfieldselecttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldselectoption.md b/docs/models/customfieldselectoption.md new file mode 100644 index 0000000..49f9cfb --- /dev/null +++ b/docs/models/customfieldselectoption.md @@ -0,0 +1,9 @@ +# CustomFieldSelectOption + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `value` | *str* | :heavy_check_mark: | N/A | +| `label` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldselectproperties.md b/docs/models/customfieldselectproperties.md new file mode 100644 index 0000000..39d5263 --- /dev/null +++ b/docs/models/customfieldselectproperties.md @@ -0,0 +1,11 @@ +# CustomFieldSelectProperties + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `options` | List[[models.CustomFieldSelectOption](../models/customfieldselectoption.md)] | :heavy_check_mark: | N/A | +| `form_label` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_help_text` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldselecttype.md b/docs/models/customfieldselecttype.md new file mode 100644 index 0000000..8c59d9a --- /dev/null +++ b/docs/models/customfieldselecttype.md @@ -0,0 +1,8 @@ +# CustomFieldSelectType + + +## Values + +| Name | Value | +| -------- | -------- | +| `SELECT` | select | \ No newline at end of file diff --git a/docs/models/customfieldsgetrequest.md b/docs/models/customfieldsgetrequest.md new file mode 100644 index 0000000..a458e07 --- /dev/null +++ b/docs/models/customfieldsgetrequest.md @@ -0,0 +1,8 @@ +# CustomFieldsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *str* | :heavy_check_mark: | The custom field ID. | \ No newline at end of file diff --git a/docs/models/customfieldslistqueryparamorganizationidfilter.md b/docs/models/customfieldslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..53e84e5 --- /dev/null +++ b/docs/models/customfieldslistqueryparamorganizationidfilter.md @@ -0,0 +1,19 @@ +# CustomFieldsListQueryParamOrganizationIDFilter + +Filter by organization ID. + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/docs/models/customfieldslistrequest.md b/docs/models/customfieldslistrequest.md new file mode 100644 index 0000000..2e72b53 --- /dev/null +++ b/docs/models/customfieldslistrequest.md @@ -0,0 +1,13 @@ +# CustomFieldsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [OptionalNullable[models.CustomFieldsListQueryParamOrganizationIDFilter]](../models/customfieldslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `query` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by custom field name or slug. | +| `type_filter` | [OptionalNullable[models.CustomFieldTypeFilter]](../models/customfieldtypefilter.md) | :heavy_minus_sign: | Filter by custom field type. | +| `page` | *Optional[int]* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | List[[models.CustomFieldSortProperty](../models/customfieldsortproperty.md)] | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/customfieldslistresponse.md b/docs/models/customfieldslistresponse.md new file mode 100644 index 0000000..953ca73 --- /dev/null +++ b/docs/models/customfieldslistresponse.md @@ -0,0 +1,8 @@ +# CustomFieldsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `result` | [models.ListResource](../models/listresource.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldsortproperty.md b/docs/models/customfieldsortproperty.md new file mode 100644 index 0000000..a9597c6 --- /dev/null +++ b/docs/models/customfieldsortproperty.md @@ -0,0 +1,15 @@ +# CustomFieldSortProperty + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `SLUG` | slug | +| `MINUS_SLUG` | -slug | +| `NAME` | name | +| `MINUS_NAME` | -name | +| `TYPE` | type | +| `MINUS_TYPE` | -type | \ No newline at end of file diff --git a/docs/models/customfieldsupdaterequest.md b/docs/models/customfieldsupdaterequest.md new file mode 100644 index 0000000..b645671 --- /dev/null +++ b/docs/models/customfieldsupdaterequest.md @@ -0,0 +1,9 @@ +# CustomFieldsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The custom field ID. | +| `custom_field_update` | [models.CustomFieldUpdate](../models/customfieldupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldtext.md b/docs/models/customfieldtext.md new file mode 100644 index 0000000..ff14284 --- /dev/null +++ b/docs/models/customfieldtext.md @@ -0,0 +1,18 @@ +# CustomFieldText + +Schema for a custom field of type text. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `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. | +| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `slug` | *str* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *str* | :heavy_check_mark: | Name of the custom field. | +| `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [models.CustomFieldTextProperties](../models/customfieldtextproperties.md) | :heavy_check_mark: | N/A | +| `type` | [models.CustomFieldTextType](../models/customfieldtexttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldtextproperties.md b/docs/models/customfieldtextproperties.md new file mode 100644 index 0000000..7cedb4f --- /dev/null +++ b/docs/models/customfieldtextproperties.md @@ -0,0 +1,13 @@ +# CustomFieldTextProperties + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `form_label` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_help_text` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `textarea` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `min_length` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `max_length` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldtexttype.md b/docs/models/customfieldtexttype.md new file mode 100644 index 0000000..a19693b --- /dev/null +++ b/docs/models/customfieldtexttype.md @@ -0,0 +1,8 @@ +# CustomFieldTextType + + +## Values + +| Name | Value | +| ------ | ------ | +| `TEXT` | text | \ No newline at end of file diff --git a/docs/models/customfieldtype.md b/docs/models/customfieldtype.md new file mode 100644 index 0000000..20cf91e --- /dev/null +++ b/docs/models/customfieldtype.md @@ -0,0 +1,12 @@ +# CustomFieldType + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `TEXT` | text | +| `NUMBER` | number | +| `DATE` | date | +| `CHECKBOX` | checkbox | +| `SELECT` | select | \ No newline at end of file diff --git a/docs/models/customfieldtypefilter.md b/docs/models/customfieldtypefilter.md new file mode 100644 index 0000000..f0ac355 --- /dev/null +++ b/docs/models/customfieldtypefilter.md @@ -0,0 +1,19 @@ +# CustomFieldTypeFilter + +Filter by custom field type. + + +## Supported Types + +### `models.CustomFieldType` + +```python +value: models.CustomFieldType = /* values here */ +``` + +### `List[models.CustomFieldType]` + +```python +value: List[models.CustomFieldType] = /* values here */ +``` + diff --git a/docs/models/customfieldupdate.md b/docs/models/customfieldupdate.md new file mode 100644 index 0000000..660bf41 --- /dev/null +++ b/docs/models/customfieldupdate.md @@ -0,0 +1,35 @@ +# CustomFieldUpdate + + +## Supported Types + +### `models.CustomFieldUpdateCheckbox` + +```python +value: models.CustomFieldUpdateCheckbox = /* values here */ +``` + +### `models.CustomFieldUpdateDate` + +```python +value: models.CustomFieldUpdateDate = /* values here */ +``` + +### `models.CustomFieldUpdateNumber` + +```python +value: models.CustomFieldUpdateNumber = /* values here */ +``` + +### `models.CustomFieldUpdateSelect` + +```python +value: models.CustomFieldUpdateSelect = /* values here */ +``` + +### `models.CustomFieldUpdateText` + +```python +value: models.CustomFieldUpdateText = /* values here */ +``` + diff --git a/docs/models/customfieldupdatecheckbox.md b/docs/models/customfieldupdatecheckbox.md new file mode 100644 index 0000000..0e736d1 --- /dev/null +++ b/docs/models/customfieldupdatecheckbox.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateCheckbox + +Schema to update a custom field of type checkbox. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `type` | [models.CustomFieldUpdateCheckboxType](../models/customfieldupdatecheckboxtype.md) | :heavy_check_mark: | N/A | +| `properties` | [OptionalNullable[models.CustomFieldCheckboxProperties]](../models/customfieldcheckboxproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldupdatecheckboxtype.md b/docs/models/customfieldupdatecheckboxtype.md new file mode 100644 index 0000000..e9f0972 --- /dev/null +++ b/docs/models/customfieldupdatecheckboxtype.md @@ -0,0 +1,8 @@ +# CustomFieldUpdateCheckboxType + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `CHECKBOX` | checkbox | \ No newline at end of file diff --git a/docs/models/customfieldupdatedate.md b/docs/models/customfieldupdatedate.md new file mode 100644 index 0000000..f10682d --- /dev/null +++ b/docs/models/customfieldupdatedate.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateDate + +Schema to update a custom field of type date. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `type` | [models.CustomFieldUpdateDateType](../models/customfieldupdatedatetype.md) | :heavy_check_mark: | N/A | +| `properties` | [OptionalNullable[models.CustomFieldDateProperties]](../models/customfielddateproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldupdatedatetype.md b/docs/models/customfieldupdatedatetype.md new file mode 100644 index 0000000..fc591ce --- /dev/null +++ b/docs/models/customfieldupdatedatetype.md @@ -0,0 +1,8 @@ +# CustomFieldUpdateDateType + + +## Values + +| Name | Value | +| ------ | ------ | +| `DATE` | date | \ No newline at end of file diff --git a/docs/models/customfieldupdatenumber.md b/docs/models/customfieldupdatenumber.md new file mode 100644 index 0000000..3133533 --- /dev/null +++ b/docs/models/customfieldupdatenumber.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateNumber + +Schema to update a custom field of type number. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `type` | [models.CustomFieldUpdateNumberType](../models/customfieldupdatenumbertype.md) | :heavy_check_mark: | N/A | +| `properties` | [OptionalNullable[models.CustomFieldNumberProperties]](../models/customfieldnumberproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldupdatenumbertype.md b/docs/models/customfieldupdatenumbertype.md new file mode 100644 index 0000000..565902d --- /dev/null +++ b/docs/models/customfieldupdatenumbertype.md @@ -0,0 +1,8 @@ +# CustomFieldUpdateNumberType + + +## Values + +| Name | Value | +| -------- | -------- | +| `NUMBER` | number | \ No newline at end of file diff --git a/docs/models/customfieldupdateselect.md b/docs/models/customfieldupdateselect.md new file mode 100644 index 0000000..fb5406f --- /dev/null +++ b/docs/models/customfieldupdateselect.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateSelect + +Schema to update a custom field of type select. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `type` | [models.CustomFieldUpdateSelectType](../models/customfieldupdateselecttype.md) | :heavy_check_mark: | N/A | +| `properties` | [OptionalNullable[models.CustomFieldSelectProperties]](../models/customfieldselectproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldupdateselecttype.md b/docs/models/customfieldupdateselecttype.md new file mode 100644 index 0000000..67e421c --- /dev/null +++ b/docs/models/customfieldupdateselecttype.md @@ -0,0 +1,8 @@ +# CustomFieldUpdateSelectType + + +## Values + +| Name | Value | +| -------- | -------- | +| `SELECT` | select | \ No newline at end of file diff --git a/docs/models/customfieldupdatetext.md b/docs/models/customfieldupdatetext.md new file mode 100644 index 0000000..b9e9830 --- /dev/null +++ b/docs/models/customfieldupdatetext.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateText + +Schema to update a custom field of type text. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `type` | [models.CustomFieldUpdateTextType](../models/customfieldupdatetexttype.md) | :heavy_check_mark: | N/A | +| `properties` | [OptionalNullable[models.CustomFieldTextProperties]](../models/customfieldtextproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customfieldupdatetexttype.md b/docs/models/customfieldupdatetexttype.md new file mode 100644 index 0000000..3918830 --- /dev/null +++ b/docs/models/customfieldupdatetexttype.md @@ -0,0 +1,8 @@ +# CustomFieldUpdateTextType + + +## Values + +| Name | Value | +| ------ | ------ | +| `TEXT` | text | \ No newline at end of file diff --git a/docs/models/listresource.md b/docs/models/listresource.md new file mode 100644 index 0000000..d0505ef --- /dev/null +++ b/docs/models/listresource.md @@ -0,0 +1,9 @@ +# ListResource + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `items` | List[[models.CustomField](../models/customfield.md)] | :heavy_check_mark: | N/A | +| `pagination` | [models.Pagination](../models/pagination.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 c17a357..7c03ef6 100644 --- a/docs/models/order.md +++ b/docs/models/order.md @@ -3,22 +3,23 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `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. | -| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | -| `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 | -| `subscription_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `checkout_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `user` | [models.OrderUser](../models/orderuser.md) | :heavy_check_mark: | N/A | -| `product` | [models.OrderProduct](../models/orderproduct.md) | :heavy_check_mark: | N/A | -| `product_price` | [models.ProductPrice](../models/productprice.md) | :heavy_check_mark: | N/A | -| `subscription` | [Nullable[models.OrderSubscription]](../models/ordersubscription.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `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. | +| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `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 | +| `subscription_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `checkout_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `user` | [models.OrderUser](../models/orderuser.md) | :heavy_check_mark: | N/A | +| `product` | [models.OrderProduct](../models/orderproduct.md) | :heavy_check_mark: | N/A | +| `product_price` | [models.ProductPrice](../models/productprice.md) | :heavy_check_mark: | N/A | +| `subscription` | [Nullable[models.OrderSubscription]](../models/ordersubscription.md) | :heavy_check_mark: | N/A | +| `custom_field_data` | [Optional[models.OrderCustomFieldData]](../models/ordercustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | \ No newline at end of file diff --git a/docs/models/ordercustomfielddata.md b/docs/models/ordercustomfielddata.md new file mode 100644 index 0000000..8d371a0 --- /dev/null +++ b/docs/models/ordercustomfielddata.md @@ -0,0 +1,9 @@ +# OrderCustomFieldData + +Key-value object storing custom field values. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/organizationslistrequest.md b/docs/models/organizationslistrequest.md index 17d34ab..6b142f2 100644 --- a/docs/models/organizationslistrequest.md +++ b/docs/models/organizationslistrequest.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by slug. | -| `is_member` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by membership. If `true`, only organizations the user is a member of are returned. If `false`, only organizations the user is not a member of are returned. | | `page` | *Optional[int]* | :heavy_minus_sign: | Page number, defaults to 1. | | `limit` | *Optional[int]* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | | `sorting` | List[[models.OrganizationSortProperty](../models/organizationsortproperty.md)] | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/polarcheckoutlegacyschemascheckout.md b/docs/models/polarcheckoutlegacyschemascheckout.md index b45d9f7..29ada61 100644 --- a/docs/models/polarcheckoutlegacyschemascheckout.md +++ b/docs/models/polarcheckoutlegacyschemascheckout.md @@ -10,6 +10,6 @@ A checkout session. | `id` | *str* | :heavy_check_mark: | The ID of the checkout. | | `customer_email` | *Nullable[str]* | :heavy_check_mark: | N/A | | `customer_name` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `product` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | +| `product` | [models.CheckoutProduct](../models/checkoutproduct.md) | :heavy_check_mark: | Product data for a checkout session. | | `product_price` | [models.ProductPrice](../models/productprice.md) | :heavy_check_mark: | N/A | | `url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL the customer should be redirected to complete the purchase. | \ No newline at end of file diff --git a/docs/models/polarcheckoutschemascheckout.md b/docs/models/polarcheckoutschemascheckout.md index be4a6c5..a237ed8 100644 --- a/docs/models/polarcheckoutschemascheckout.md +++ b/docs/models/polarcheckoutschemascheckout.md @@ -31,7 +31,9 @@ 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 | -| `product` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | +| `product` | [models.CheckoutProduct](../models/checkoutproduct.md) | :heavy_check_mark: | Product data for a checkout session. | | `product_price` | [models.ProductPrice](../models/productprice.md) | :heavy_check_mark: | N/A | | `subscription_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `attached_custom_fields` | List[[models.AttachedCustomField](../models/attachedcustomfield.md)] | :heavy_check_mark: | N/A | +| `custom_field_data` | [Optional[models.PolarCheckoutSchemasCheckoutCustomFieldData]](../models/polarcheckoutschemascheckoutcustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `payment_processor` | [models.PolarEnumsPaymentProcessor](../models/polarenumspaymentprocessor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/polarcheckoutschemascheckoutcreate.md b/docs/models/polarcheckoutschemascheckoutcreate.md index c9f156c..1fb7a7a 100644 --- a/docs/models/polarcheckoutschemascheckoutcreate.md +++ b/docs/models/polarcheckoutschemascheckoutcreate.md @@ -12,6 +12,7 @@ to the resulting order and/or subscription. | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `product_price_id` | *str* | :heavy_check_mark: | ID of the product price to checkout. | | `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `custom_field_data` | [Optional[models.PolarCheckoutSchemasCheckoutCreateCustomFieldData]](../models/polarcheckoutschemascheckoutcreatecustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `payment_processor` | [models.PaymentProcessor](../models/paymentprocessor.md) | :heavy_check_mark: | Payment processor to use. Currently only Stripe is supported. | | `amount` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | `customer_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/polarcheckoutschemascheckoutcreatecustomfielddata.md b/docs/models/polarcheckoutschemascheckoutcreatecustomfielddata.md new file mode 100644 index 0000000..db626ba --- /dev/null +++ b/docs/models/polarcheckoutschemascheckoutcreatecustomfielddata.md @@ -0,0 +1,9 @@ +# PolarCheckoutSchemasCheckoutCreateCustomFieldData + +Key-value object storing custom field values. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/polarcheckoutschemascheckoutcustomfielddata.md b/docs/models/polarcheckoutschemascheckoutcustomfielddata.md new file mode 100644 index 0000000..52598e4 --- /dev/null +++ b/docs/models/polarcheckoutschemascheckoutcustomfielddata.md @@ -0,0 +1,9 @@ +# PolarCheckoutSchemasCheckoutCustomFieldData + +Key-value object storing custom field values. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/polarcheckoutschemascheckoutinput.md b/docs/models/polarcheckoutschemascheckoutinput.md index 3a114cb..00a159c 100644 --- a/docs/models/polarcheckoutschemascheckoutinput.md +++ b/docs/models/polarcheckoutschemascheckoutinput.md @@ -31,7 +31,9 @@ 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 | -| `product` | [models.ProductInput](../models/productinput.md) | :heavy_check_mark: | A product. | +| `product` | [models.CheckoutProductInput](../models/checkoutproductinput.md) | :heavy_check_mark: | Product data for a checkout session. | | `product_price` | [models.ProductPrice](../models/productprice.md) | :heavy_check_mark: | N/A | | `subscription_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `attached_custom_fields` | List[[models.AttachedCustomField](../models/attachedcustomfield.md)] | :heavy_check_mark: | N/A | +| `custom_field_data` | [Optional[models.PolarCheckoutSchemasCheckoutCustomFieldData]](../models/polarcheckoutschemascheckoutcustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `payment_processor` | [models.PolarEnumsPaymentProcessor](../models/polarenumspaymentprocessor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/product.md b/docs/models/product.md index 3371f0c..5c3ee14 100644 --- a/docs/models/product.md +++ b/docs/models/product.md @@ -15,6 +15,7 @@ A product. | `is_recurring` | *bool* | :heavy_check_mark: | Whether the product is a subscription tier. | | `is_archived` | *bool* | :heavy_check_mark: | Whether the product is archived and no longer available. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the product. | -| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of available prices for this product. | -| `benefits` | List[[models.ProductBenefits](../models/productbenefits.md)] | :heavy_check_mark: | The benefits granted by the product. | -| `medias` | List[[models.ProductMediaFileRead](../models/productmediafileread.md)] | :heavy_check_mark: | The medias associated to the product. | \ No newline at end of file +| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | List[[models.Benefit](../models/benefit.md)] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | List[[models.ProductMediaFileRead](../models/productmediafileread.md)] | :heavy_check_mark: | List of medias associated to the product. | +| `attached_custom_fields` | List[[models.AttachedCustomField](../models/attachedcustomfield.md)] | :heavy_check_mark: | List of custom fields attached to the product. | \ No newline at end of file diff --git a/docs/models/productinput.md b/docs/models/productinput.md index c05b537..87ac662 100644 --- a/docs/models/productinput.md +++ b/docs/models/productinput.md @@ -15,6 +15,7 @@ A product. | `is_recurring` | *bool* | :heavy_check_mark: | Whether the product is a subscription tier. | | `is_archived` | *bool* | :heavy_check_mark: | Whether the product is archived and no longer available. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the product. | -| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of available prices for this product. | -| `benefits` | List[[models.ProductBenefits](../models/productbenefits.md)] | :heavy_check_mark: | The benefits granted by the product. | -| `medias` | List[[models.ProductMediaFileReadInput](../models/productmediafilereadinput.md)] | :heavy_check_mark: | The medias associated to the product. | \ No newline at end of file +| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | List[[models.BenefitInput](../models/benefitinput.md)] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | List[[models.ProductMediaFileReadInput](../models/productmediafilereadinput.md)] | :heavy_check_mark: | List of medias associated to the product. | +| `attached_custom_fields` | List[[models.AttachedCustomField](../models/attachedcustomfield.md)] | :heavy_check_mark: | List of custom fields attached to the product. | \ No newline at end of file diff --git a/docs/models/productonetimecreate.md b/docs/models/productonetimecreate.md index 3692479..e13c192 100644 --- a/docs/models/productonetimecreate.md +++ b/docs/models/productonetimecreate.md @@ -11,4 +11,5 @@ Schema to create a one-time product. | `prices` | List[[models.Prices](../models/prices.md)] | :heavy_check_mark: | List of available prices for this product. | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the product. | | `medias` | List[*str*] | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | +| `attached_custom_fields` | List[[models.AttachedCustomFieldCreate](../models/attachedcustomfieldcreate.md)] | :heavy_minus_sign: | List of custom fields to attach. | | `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the organization owning the product. **Required unless you use an organization token.** | \ No newline at end of file diff --git a/docs/models/productrecurringcreate.md b/docs/models/productrecurringcreate.md index e334c66..78a1b4f 100644 --- a/docs/models/productrecurringcreate.md +++ b/docs/models/productrecurringcreate.md @@ -11,4 +11,5 @@ Schema to create a recurring product, i.e. a subscription. | `prices` | [models.ProductRecurringCreatePrices](../models/productrecurringcreateprices.md) | :heavy_check_mark: | List of available prices for this product. | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the product. | | `medias` | List[*str*] | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | +| `attached_custom_fields` | List[[models.AttachedCustomFieldCreate](../models/attachedcustomfieldcreate.md)] | :heavy_minus_sign: | List of custom fields to attach. | | `organization_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the organization owning the product. **Required unless you use an organization token.** | \ No newline at end of file diff --git a/docs/models/productslistqueryparamorganizationidfilter.md b/docs/models/productslistqueryparamorganizationidfilter.md index 4489b3b..28183e2 100644 --- a/docs/models/productslistqueryparamorganizationidfilter.md +++ b/docs/models/productslistqueryparamorganizationidfilter.md @@ -1,6 +1,6 @@ # ProductsListQueryParamOrganizationIDFilter -Filter by organization ID. **Required unless you use an organization token.** +Filter by organization ID. ## Supported Types diff --git a/docs/models/productslistrequest.md b/docs/models/productslistrequest.md index 68629dc..3db0a7f 100644 --- a/docs/models/productslistrequest.md +++ b/docs/models/productslistrequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `organization_id` | [OptionalNullable[models.ProductsListQueryParamOrganizationIDFilter]](../models/productslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. **Required unless you use an organization token.** | +| `organization_id` | [OptionalNullable[models.ProductsListQueryParamOrganizationIDFilter]](../models/productslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | | `query` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by product name. | | `is_archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter on archived products. | | `is_recurring` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. | diff --git a/docs/models/productupdate.md b/docs/models/productupdate.md index 458ac57..497959f 100644 --- a/docs/models/productupdate.md +++ b/docs/models/productupdate.md @@ -11,4 +11,5 @@ Schema to update a product. | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the product. | | `is_archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally. | | `prices` | List[[models.ProductUpdatePrices](../models/productupdateprices.md)] | :heavy_minus_sign: | List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object. | -| `medias` | List[*str*] | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | \ No newline at end of file +| `medias` | List[*str*] | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | +| `attached_custom_fields` | List[[models.AttachedCustomFieldCreate](../models/attachedcustomfieldcreate.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/repository.md b/docs/models/repository.md index 7910a5e..61841b9 100644 --- a/docs/models/repository.md +++ b/docs/models/repository.md @@ -14,4 +14,5 @@ | `homepage` | *Nullable[str]* | :heavy_check_mark: | N/A | | | `profile_settings` | [Nullable[models.RepositoryProfileSettings]](../models/repositoryprofilesettings.md) | :heavy_check_mark: | Settings for the repository profile | | | `organization` | [models.ExternalOrganization](../models/externalorganization.md) | :heavy_check_mark: | N/A | | +| `internal_organization` | [Nullable[models.Organization]](../models/organization.md) | :heavy_check_mark: | N/A | | | `platform` | [models.Platforms](../models/platforms.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/subscription.md b/docs/models/subscription.md index 631fce9..bb5b1d7 100644 --- a/docs/models/subscription.md +++ b/docs/models/subscription.md @@ -3,25 +3,26 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `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. | -| `amount` | *Nullable[int]* | :heavy_check_mark: | N/A | -| `currency` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | -| `status` | [models.SubscriptionStatus](../models/subscriptionstatus.md) | :heavy_check_mark: | N/A | -| `current_period_start` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `current_period_end` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `cancel_at_period_end` | *bool* | :heavy_check_mark: | N/A | -| `started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `ended_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `user_id` | *str* | :heavy_check_mark: | N/A | -| `product_id` | *str* | :heavy_check_mark: | N/A | -| `price_id` | *str* | :heavy_check_mark: | N/A | -| `checkout_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | -| `user` | [models.SubscriptionUser](../models/subscriptionuser.md) | :heavy_check_mark: | N/A | -| `product` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | -| `price` | [models.ProductPriceRecurring](../models/productpricerecurring.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `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. | +| `amount` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `currency` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | +| `status` | [models.SubscriptionStatus](../models/subscriptionstatus.md) | :heavy_check_mark: | N/A | +| `current_period_start` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `current_period_end` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `cancel_at_period_end` | *bool* | :heavy_check_mark: | N/A | +| `started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `ended_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `user_id` | *str* | :heavy_check_mark: | N/A | +| `product_id` | *str* | :heavy_check_mark: | N/A | +| `price_id` | *str* | :heavy_check_mark: | N/A | +| `checkout_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `user` | [models.SubscriptionUser](../models/subscriptionuser.md) | :heavy_check_mark: | N/A | +| `product` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | +| `price` | [models.ProductPriceRecurring](../models/productpricerecurring.md) | :heavy_check_mark: | N/A | +| `custom_field_data` | [Optional[models.SubscriptionCustomFieldData]](../models/subscriptioncustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | \ No newline at end of file diff --git a/docs/models/subscriptioncustomfielddata.md b/docs/models/subscriptioncustomfielddata.md new file mode 100644 index 0000000..92d7b36 --- /dev/null +++ b/docs/models/subscriptioncustomfielddata.md @@ -0,0 +1,9 @@ +# SubscriptionCustomFieldData + +Key-value object storing custom field values. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/subscriptioninput.md b/docs/models/subscriptioninput.md index d3acb9f..11b8158 100644 --- a/docs/models/subscriptioninput.md +++ b/docs/models/subscriptioninput.md @@ -3,25 +3,26 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `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. | -| `amount` | *Nullable[int]* | :heavy_check_mark: | N/A | -| `currency` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | -| `status` | [models.SubscriptionStatus](../models/subscriptionstatus.md) | :heavy_check_mark: | N/A | -| `current_period_start` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `current_period_end` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `cancel_at_period_end` | *bool* | :heavy_check_mark: | N/A | -| `started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `ended_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `user_id` | *str* | :heavy_check_mark: | N/A | -| `product_id` | *str* | :heavy_check_mark: | N/A | -| `price_id` | *str* | :heavy_check_mark: | N/A | -| `checkout_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | -| `user` | [models.SubscriptionUser](../models/subscriptionuser.md) | :heavy_check_mark: | N/A | -| `product` | [models.ProductInput](../models/productinput.md) | :heavy_check_mark: | A product. | -| `price` | [models.ProductPriceRecurring](../models/productpricerecurring.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `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. | +| `amount` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `currency` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `recurring_interval` | [models.SubscriptionRecurringInterval](../models/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | +| `status` | [models.SubscriptionStatus](../models/subscriptionstatus.md) | :heavy_check_mark: | N/A | +| `current_period_start` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `current_period_end` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `cancel_at_period_end` | *bool* | :heavy_check_mark: | N/A | +| `started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `ended_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `user_id` | *str* | :heavy_check_mark: | N/A | +| `product_id` | *str* | :heavy_check_mark: | N/A | +| `price_id` | *str* | :heavy_check_mark: | N/A | +| `checkout_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `user` | [models.SubscriptionUser](../models/subscriptionuser.md) | :heavy_check_mark: | N/A | +| `product` | [models.ProductInput](../models/productinput.md) | :heavy_check_mark: | A product. | +| `price` | [models.ProductPriceRecurring](../models/productpricerecurring.md) | :heavy_check_mark: | N/A | +| `custom_field_data` | [Optional[models.SubscriptionCustomFieldData]](../models/subscriptioncustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | \ No newline at end of file diff --git a/docs/models/userorderproduct.md b/docs/models/userorderproduct.md index 934b5ed..2b22ef8 100644 --- a/docs/models/userorderproduct.md +++ b/docs/models/userorderproduct.md @@ -13,6 +13,7 @@ | `is_recurring` | *bool* | :heavy_check_mark: | Whether the product is a subscription tier. | | `is_archived` | *bool* | :heavy_check_mark: | Whether the product is archived and no longer available. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the product. | -| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of available prices for this product. | -| `benefits` | List[[models.BenefitsModel](../models/benefitsmodel.md)] | :heavy_check_mark: | The benefits granted by the product. | -| `medias` | List[[models.ProductMediaFileRead](../models/productmediafileread.md)] | :heavy_check_mark: | The medias associated to the product. | \ No newline at end of file +| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | List[[models.BenefitsModel](../models/benefitsmodel.md)] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | List[[models.ProductMediaFileRead](../models/productmediafileread.md)] | :heavy_check_mark: | List of medias associated to the product. | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/usersubscriptionproduct.md b/docs/models/usersubscriptionproduct.md index 7cb0e7a..984e0e0 100644 --- a/docs/models/usersubscriptionproduct.md +++ b/docs/models/usersubscriptionproduct.md @@ -13,6 +13,7 @@ | `is_recurring` | *bool* | :heavy_check_mark: | Whether the product is a subscription tier. | | `is_archived` | *bool* | :heavy_check_mark: | Whether the product is archived and no longer available. | | `organization_id` | *str* | :heavy_check_mark: | The ID of the organization owning the product. | -| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of available prices for this product. | -| `benefits` | List[[models.UserSubscriptionProductBenefits](../models/usersubscriptionproductbenefits.md)] | :heavy_check_mark: | The benefits granted by the product. | -| `medias` | List[[models.ProductMediaFileRead](../models/productmediafileread.md)] | :heavy_check_mark: | The medias associated to the product. | \ No newline at end of file +| `prices` | List[[models.ProductPrice](../models/productprice.md)] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | List[[models.UserSubscriptionProductBenefits](../models/usersubscriptionproductbenefits.md)] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | List[[models.ProductMediaFileRead](../models/productmediafileread.md)] | :heavy_check_mark: | List of medias associated to the product. | +| `organization` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/customfields/README.md b/docs/sdks/customfields/README.md new file mode 100644 index 0000000..8752b4c --- /dev/null +++ b/docs/sdks/customfields/README.md @@ -0,0 +1,223 @@ +# CustomFields +(*custom_fields*) + +## Overview + +### Available Operations + +* [list](#list) - List Custom Fields +* [create](#create) - Create Custom Field +* [get](#get) - Get Custom Field +* [update](#update) - Update Custom Field +* [delete](#delete) - Delete Custom Field + +## list + +List custom fields. + +### Example Usage + +```python +from polar_sdk import Polar + +s = Polar( + access_token="", +) + +res = s.custom_fields.list() + +if res is not None: + while True: + # handle items + + res = res.next() + if res is None: + break + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [OptionalNullable[models.CustomFieldsListQueryParamOrganizationIDFilter]](../../models/customfieldslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `query` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by custom field name or slug. | +| `type_filter` | [OptionalNullable[models.CustomFieldTypeFilter]](../../models/customfieldtypefilter.md) | :heavy_minus_sign: | Filter by custom field type. | +| `page` | *Optional[int]* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | List[[models.CustomFieldSortProperty](../../models/customfieldsortproperty.md)] | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CustomFieldsListResponse](../../models/customfieldslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.HTTPValidationError | 422 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## create + +Create a custom field. + +### Example Usage + +```python +import polar_sdk +from polar_sdk import Polar + +s = Polar( + access_token="", +) + +res = s.custom_fields.create(request={ + "slug": "", + "name": "", + "properties": {}, + "type": polar_sdk.CustomFieldCreateNumberType.NUMBER, +}) + +if res is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [models.CustomFieldCreate](../../models/customfieldcreate.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CustomField](../../models/customfield.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.HTTPValidationError | 422 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## get + +Get a custom field by ID. + +### Example Usage + +```python +from polar_sdk import Polar + +s = Polar( + access_token="", +) + +res = s.custom_fields.get(id="") + +if res is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The custom field ID. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CustomField](../../models/customfield.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.ResourceNotFound | 404 | application/json | +| models.HTTPValidationError | 422 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## update + +Update a custom field. + +### Example Usage + +```python +import polar_sdk +from polar_sdk import Polar + +s = Polar( + access_token="", +) + +res = s.custom_fields.update(id="", custom_field_update={ + "type": polar_sdk.CustomFieldUpdateTextType.TEXT, +}) + +if res is not None: + # handle response + pass + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The custom field ID. | +| `custom_field_update` | [models.CustomFieldUpdate](../../models/customfieldupdate.md) | :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 + +**[models.CustomField](../../models/customfield.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.ResourceNotFound | 404 | application/json | +| models.HTTPValidationError | 422 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete a custom field. + +### Example Usage + +```python +from polar_sdk import Polar + +s = Polar( + access_token="", +) + +s.custom_fields.delete(id="") + +# Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The custom field ID. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.ResourceNotFound | 404 | application/json | +| models.HTTPValidationError | 422 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index cef3315..db0994d 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -40,7 +40,6 @@ if res is not None: | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by slug. | -| `is_member` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by membership. If `true`, only organizations the user is a member of are returned. If `false`, only organizations the user is not a member of are returned. | | `page` | *Optional[int]* | :heavy_minus_sign: | Page number, defaults to 1. | | `limit` | *Optional[int]* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | | `sorting` | List[[models.OrganizationSortProperty](../../models/organizationsortproperty.md)] | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | diff --git a/docs/sdks/products/README.md b/docs/sdks/products/README.md index be65ba1..8311f09 100644 --- a/docs/sdks/products/README.md +++ b/docs/sdks/products/README.md @@ -42,7 +42,7 @@ if res is not None: | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `organization_id` | [OptionalNullable[models.ProductsListQueryParamOrganizationIDFilter]](../../models/productslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. **Required unless you use an organization token.** | +| `organization_id` | [OptionalNullable[models.ProductsListQueryParamOrganizationIDFilter]](../../models/productslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | | `query` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by product name. | | `is_archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter on archived products. | | `is_recurring` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. | diff --git a/poetry.lock b/poetry.lock index 81b2cc2..80d6aec 100644 --- a/poetry.lock +++ b/poetry.lock @@ -308,8 +308,8 @@ files = [ annotated-types = ">=0.6.0" pydantic-core = "2.23.4" typing-extensions = [ - {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, {version = ">=4.6.1", markers = "python_version < \"3.13\""}, + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, ] [package.extras] @@ -432,8 +432,8 @@ files = [ astroid = ">=3.2.2,<=3.3.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ - {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, {version = ">=0.2", markers = "python_version < \"3.11\""}, + {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, ] isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" diff --git a/pylintrc b/pylintrc index 5080038..395eaf8 100644 --- a/pylintrc +++ b/pylintrc @@ -188,7 +188,9 @@ good-names=i, Run, _, e, - id + id, + ge, + le # Good variable names regexes, separated by a comma. If names match any regex, # they will always be accepted diff --git a/pyproject.toml b/pyproject.toml index f809cec..df04a38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "polar-sdk" -version = "0.7.0" +version = "0.7.1" description = "Polar SDK for Python" authors = ["Polar",] readme = "README-PYPI.md" diff --git a/scripts/compile.sh b/scripts/compile.sh deleted file mode 100755 index fafe635..0000000 --- a/scripts/compile.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail # Ensure pipeline failures are propagated - -# Use temporary files to store outputs and exit statuses -declare -A output_files -declare -A status_files - -# Function to run a command with temporary output and status files -run_command() { - local cmd="$1" - local key="$2" - local output_file="$3" - local status_file="$4" - - # Run the command and store output and exit status - { - eval "$cmd" - echo $? > "$status_file" - } &> "$output_file" & -} - -poetry run python scripts/prepare-readme.py - -# Create temporary files for outputs and statuses -for cmd in compileall pylint mypy pyright; do - output_files[$cmd]=$(mktemp) - status_files[$cmd]=$(mktemp) -done - -# Collect PIDs for background processes -declare -a pids - -# Run commands in parallel using temporary files -echo "Running python -m compileall" -run_command 'poetry run python -m compileall -q . && echo "Success"' 'compileall' "${output_files[compileall]}" "${status_files[compileall]}" -pids+=($!) - -echo "Running pylint" -run_command 'poetry run pylint src' 'pylint' "${output_files[pylint]}" "${status_files[pylint]}" -pids+=($!) - -echo "Running mypy" -run_command 'poetry run mypy src' 'mypy' "${output_files[mypy]}" "${status_files[mypy]}" -pids+=($!) - -echo "Running pyright (optional)" -run_command 'if command -v pyright > /dev/null 2>&1; then pyright src; else echo "pyright not found, skipping"; fi' 'pyright' "${output_files[pyright]}" "${status_files[pyright]}" -pids+=($!) - -# Wait for all processes to complete -echo "Waiting for processes to complete" -for pid in "${pids[@]}"; do - wait "$pid" -done - -# Print output sequentially and check for failures -failed=false -for key in "${!output_files[@]}"; do - echo "--- Output from Command: $key ---" - echo - cat "${output_files[$key]}" - echo # Empty line for separation - echo "--- End of Output from Command: $key ---" - echo - - exit_status=$(cat "${status_files[$key]}") - if [ "$exit_status" -ne 0 ]; then - echo "Command $key failed with exit status $exit_status" >&2 - failed=true - fi -done - -# Clean up temporary files -for tmp_file in "${output_files[@]}" "${status_files[@]}"; do - rm -f "$tmp_file" -done - -if $failed; then - echo "One or more commands failed." >&2 - exit 1 -else - echo "All commands completed successfully." - exit 0 -fi diff --git a/src/polar_sdk/_version.py b/src/polar_sdk/_version.py index 871e414..e12353c 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.7.0" +__version__: str = "0.7.1" try: if __package__ is not None: diff --git a/src/polar_sdk/custom_fields.py b/src/polar_sdk/custom_fields.py new file mode 100644 index 0000000..2a3a09c --- /dev/null +++ b/src/polar_sdk/custom_fields.py @@ -0,0 +1,1012 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from jsonpath import JSONPath +from polar_sdk import models, utils +from polar_sdk._hooks import HookContext +from polar_sdk.types import BaseModel, OptionalNullable, UNSET +from typing import Any, Dict, List, Optional, Union, cast + + +class CustomFields(BaseSDK): + def list( + self, + *, + organization_id: OptionalNullable[ + Union[ + models.CustomFieldsListQueryParamOrganizationIDFilter, + models.CustomFieldsListQueryParamOrganizationIDFilterTypedDict, + ] + ] = UNSET, + query: OptionalNullable[str] = UNSET, + type_filter: OptionalNullable[ + Union[models.CustomFieldTypeFilter, models.CustomFieldTypeFilterTypedDict] + ] = UNSET, + page: Optional[int] = 1, + limit: Optional[int] = 10, + sorting: OptionalNullable[List[models.CustomFieldSortProperty]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[models.CustomFieldsListResponse]: + r"""List Custom Fields + + List custom fields. + + :param organization_id: Filter by organization ID. + :param query: Filter by custom field name or slug. + :param type_filter: Filter by custom field type. + :param page: Page number, defaults to 1. + :param limit: Size of a page, defaults to 10. Maximum is 100. + :param sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + :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.CustomFieldsListRequest( + organization_id=organization_id, + query=query, + type_filter=type_filter, + page=page, + limit=limit, + sorting=sorting, + ) + + req = self.build_request( + method="GET", + path="/v1/custom-fields/", + 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="custom-fields:list", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.CustomFieldsListResponse]: + body = utils.unmarshal_json(http_res.text, Dict[Any, Any]) + page = request.page if not request.page is None else 0 + next_page = page + 1 + + num_pages = JSONPath("$.pagination.max_page").parse(body) + if len(num_pages) == 0 or num_pages[0] <= page: + return None + + if not http_res.text: + return None + results = JSONPath("$.items").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit = request.limit if not request.limit is None else 0 + if len(results[0]) < limit: + return None + + return self.list( + organization_id=organization_id, + query=query, + type_filter=type_filter, + page=next_page, + limit=limit, + sorting=sorting, + retries=retries, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.CustomFieldsListResponse( + result=utils.unmarshal_json( + http_res.text, Optional[models.ListResource] + ), + next=next_func, + ) + 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"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + 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 list_async( + self, + *, + organization_id: OptionalNullable[ + Union[ + models.CustomFieldsListQueryParamOrganizationIDFilter, + models.CustomFieldsListQueryParamOrganizationIDFilterTypedDict, + ] + ] = UNSET, + query: OptionalNullable[str] = UNSET, + type_filter: OptionalNullable[ + Union[models.CustomFieldTypeFilter, models.CustomFieldTypeFilterTypedDict] + ] = UNSET, + page: Optional[int] = 1, + limit: Optional[int] = 10, + sorting: OptionalNullable[List[models.CustomFieldSortProperty]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[models.CustomFieldsListResponse]: + r"""List Custom Fields + + List custom fields. + + :param organization_id: Filter by organization ID. + :param query: Filter by custom field name or slug. + :param type_filter: Filter by custom field type. + :param page: Page number, defaults to 1. + :param limit: Size of a page, defaults to 10. Maximum is 100. + :param sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + :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.CustomFieldsListRequest( + organization_id=organization_id, + query=query, + type_filter=type_filter, + page=page, + limit=limit, + sorting=sorting, + ) + + req = self.build_request_async( + method="GET", + path="/v1/custom-fields/", + 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="custom-fields:list", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.CustomFieldsListResponse]: + body = utils.unmarshal_json(http_res.text, Dict[Any, Any]) + page = request.page if not request.page is None else 0 + next_page = page + 1 + + num_pages = JSONPath("$.pagination.max_page").parse(body) + if len(num_pages) == 0 or num_pages[0] <= page: + return None + + if not http_res.text: + return None + results = JSONPath("$.items").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit = request.limit if not request.limit is None else 0 + if len(results[0]) < limit: + return None + + return self.list( + organization_id=organization_id, + query=query, + type_filter=type_filter, + page=next_page, + limit=limit, + sorting=sorting, + retries=retries, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.CustomFieldsListResponse( + result=utils.unmarshal_json( + http_res.text, Optional[models.ListResource] + ), + next=next_func, + ) + 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"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + 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 create( + self, + *, + request: Union[models.CustomFieldCreate, models.CustomFieldCreateTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[models.CustomField]: + r"""Create Custom Field + + Create a custom field. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + """ + 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 + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.CustomFieldCreate) + request = cast(models.CustomFieldCreate, request) + + req = self.build_request( + method="POST", + path="/v1/custom-fields/", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + 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, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CustomFieldCreate + ), + 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="custom-fields:create", + 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, "201", "application/json"): + return utils.unmarshal_json(http_res.text, Optional[models.CustomField]) + 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"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + 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 create_async( + self, + *, + request: Union[models.CustomFieldCreate, models.CustomFieldCreateTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[models.CustomField]: + r"""Create Custom Field + + Create a custom field. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + """ + 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 + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.CustomFieldCreate) + request = cast(models.CustomFieldCreate, request) + + req = self.build_request_async( + method="POST", + path="/v1/custom-fields/", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + 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, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CustomFieldCreate + ), + 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="custom-fields:create", + 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, "201", "application/json"): + return utils.unmarshal_json(http_res.text, Optional[models.CustomField]) + 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"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + 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, + *, + id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[models.CustomField]: + r"""Get Custom Field + + Get a custom field by ID. + + :param id: The custom field 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.CustomFieldsGetRequest( + id=id, + ) + + req = self.build_request( + method="GET", + path="/v1/custom-fields/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + 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="custom-fields:get", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "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[models.CustomField]) + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json(http_res.text, models.ResourceNotFoundData) + raise models.ResourceNotFound(data=data) + 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"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + 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 get_async( + self, + *, + id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[models.CustomField]: + r"""Get Custom Field + + Get a custom field by ID. + + :param id: The custom field 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.CustomFieldsGetRequest( + id=id, + ) + + req = self.build_request_async( + method="GET", + path="/v1/custom-fields/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + 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="custom-fields:get", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "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[models.CustomField]) + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json(http_res.text, models.ResourceNotFoundData) + raise models.ResourceNotFound(data=data) + 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"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + 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 update( + self, + *, + id: str, + custom_field_update: Union[ + models.CustomFieldUpdate, models.CustomFieldUpdateTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[models.CustomField]: + r"""Update Custom Field + + Update a custom field. + + :param id: The custom field ID. + :param custom_field_update: + :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.CustomFieldsUpdateRequest( + id=id, + custom_field_update=utils.get_pydantic_model( + custom_field_update, models.CustomFieldUpdate + ), + ) + + req = self.build_request( + method="PATCH", + path="/v1/custom-fields/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.custom_field_update, + False, + False, + "json", + models.CustomFieldUpdate, + ), + 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="custom-fields:update", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "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[models.CustomField]) + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json(http_res.text, models.ResourceNotFoundData) + raise models.ResourceNotFound(data=data) + 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"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + 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 update_async( + self, + *, + id: str, + custom_field_update: Union[ + models.CustomFieldUpdate, models.CustomFieldUpdateTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ) -> Optional[models.CustomField]: + r"""Update Custom Field + + Update a custom field. + + :param id: The custom field ID. + :param custom_field_update: + :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.CustomFieldsUpdateRequest( + id=id, + custom_field_update=utils.get_pydantic_model( + custom_field_update, models.CustomFieldUpdate + ), + ) + + req = self.build_request_async( + method="PATCH", + path="/v1/custom-fields/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.custom_field_update, + False, + False, + "json", + models.CustomFieldUpdate, + ), + 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="custom-fields:update", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "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[models.CustomField]) + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json(http_res.text, models.ResourceNotFoundData) + raise models.ResourceNotFound(data=data) + 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"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + 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 delete( + self, + *, + id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ): + r"""Delete Custom Field + + Delete a custom field. + + :param id: The custom field 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.CustomFieldsDeleteRequest( + id=id, + ) + + req = self.build_request( + method="DELETE", + path="/v1/custom-fields/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + 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="custom-fields:delete", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json(http_res.text, models.ResourceNotFoundData) + raise models.ResourceNotFound(data=data) + 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"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + 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 delete_async( + self, + *, + id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + ): + r"""Delete Custom Field + + Delete a custom field. + + :param id: The custom field 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.CustomFieldsDeleteRequest( + id=id, + ) + + req = self.build_request_async( + method="DELETE", + path="/v1/custom-fields/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + 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="custom-fields:delete", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "404", "application/json"): + data = utils.unmarshal_json(http_res.text, models.ResourceNotFoundData) + raise models.ResourceNotFound(data=data) + 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"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) diff --git a/src/polar_sdk/models/__init__.py b/src/polar_sdk/models/__init__.py index b1b6092..32949c0 100644 --- a/src/polar_sdk/models/__init__.py +++ b/src/polar_sdk/models/__init__.py @@ -50,6 +50,11 @@ from .articleupdate import ArticleUpdate, ArticleUpdateTypedDict from .articlevisibility import ArticleVisibility from .assignee import Assignee, AssigneeTypedDict +from .attachedcustomfield import AttachedCustomField, AttachedCustomFieldTypedDict +from .attachedcustomfieldcreate import ( + AttachedCustomFieldCreate, + AttachedCustomFieldCreateTypedDict, +) from .author import Author, AuthorTypedDict from .benefit import Benefit, BenefitTypedDict from .benefit_input import BenefitInput, BenefitInputTypedDict @@ -375,7 +380,12 @@ CheckoutLinksUpdateRequest, CheckoutLinksUpdateRequestTypedDict, ) -from .checkoutconfirmstripe import CheckoutConfirmStripe, CheckoutConfirmStripeTypedDict +from .checkoutconfirmstripe import ( + CheckoutConfirmStripe, + CheckoutConfirmStripeCustomFieldData, + CheckoutConfirmStripeCustomFieldDataTypedDict, + CheckoutConfirmStripeTypedDict, +) from .checkoutlink import CheckoutLink, CheckoutLinkTypedDict from .checkoutlinkcreate import ( CheckoutLinkCreate, @@ -384,8 +394,18 @@ ) from .checkoutlinksortproperty import CheckoutLinkSortProperty from .checkoutlinkupdate import CheckoutLinkUpdate, CheckoutLinkUpdateTypedDict +from .checkoutproduct import ( + CheckoutProduct, + CheckoutProductBenefits, + CheckoutProductBenefitsTypedDict, + CheckoutProductInput, + CheckoutProductInputTypedDict, + CheckoutProductTypedDict, +) from .checkoutpublic import ( CheckoutPublic, + CheckoutPublicCustomFieldData, + CheckoutPublicCustomFieldDataTypedDict, CheckoutPublicPaymentProcessorMetadata, CheckoutPublicPaymentProcessorMetadataTypedDict, CheckoutPublicTypedDict, @@ -423,9 +443,142 @@ from .checkouts_getop import CheckoutsGetRequest, CheckoutsGetRequestTypedDict from .checkoutsortproperty import CheckoutSortProperty from .checkoutstatus import CheckoutStatus -from .checkoutupdate import CheckoutUpdate, CheckoutUpdateTypedDict -from .checkoutupdatepublic import CheckoutUpdatePublic, CheckoutUpdatePublicTypedDict +from .checkoutupdate import ( + CheckoutUpdate, + CheckoutUpdateTypedDict, + CustomFieldData, + CustomFieldDataTypedDict, +) +from .checkoutupdatepublic import ( + CheckoutUpdatePublic, + CheckoutUpdatePublicCustomFieldData, + CheckoutUpdatePublicCustomFieldDataTypedDict, + CheckoutUpdatePublicTypedDict, +) from .currencyamount import CurrencyAmount, CurrencyAmountTypedDict +from .custom_fields_deleteop import ( + CustomFieldsDeleteRequest, + CustomFieldsDeleteRequestTypedDict, +) +from .custom_fields_getop import CustomFieldsGetRequest, CustomFieldsGetRequestTypedDict +from .custom_fields_listop import ( + CustomFieldTypeFilter, + CustomFieldTypeFilterTypedDict, + CustomFieldsListQueryParamOrganizationIDFilter, + CustomFieldsListQueryParamOrganizationIDFilterTypedDict, + CustomFieldsListRequest, + CustomFieldsListRequestTypedDict, + CustomFieldsListResponse, + CustomFieldsListResponseTypedDict, +) +from .custom_fields_updateop import ( + CustomFieldsUpdateRequest, + CustomFieldsUpdateRequestTypedDict, +) +from .customfield import CustomField, CustomFieldTypedDict +from .customfieldcheckbox import ( + CustomFieldCheckbox, + CustomFieldCheckboxType, + CustomFieldCheckboxTypedDict, +) +from .customfieldcheckboxproperties import ( + CustomFieldCheckboxProperties, + CustomFieldCheckboxPropertiesTypedDict, +) +from .customfieldcreate import CustomFieldCreate, CustomFieldCreateTypedDict +from .customfieldcreatecheckbox import ( + CustomFieldCreateCheckbox, + CustomFieldCreateCheckboxType, + CustomFieldCreateCheckboxTypedDict, +) +from .customfieldcreatedate import ( + CustomFieldCreateDate, + CustomFieldCreateDateType, + CustomFieldCreateDateTypedDict, +) +from .customfieldcreatenumber import ( + CustomFieldCreateNumber, + CustomFieldCreateNumberType, + CustomFieldCreateNumberTypedDict, +) +from .customfieldcreateselect import ( + CustomFieldCreateSelect, + CustomFieldCreateSelectType, + CustomFieldCreateSelectTypedDict, +) +from .customfieldcreatetext import ( + CustomFieldCreateText, + CustomFieldCreateTextType, + CustomFieldCreateTextTypedDict, +) +from .customfielddate import ( + CustomFieldDate, + CustomFieldDateType, + CustomFieldDateTypedDict, +) +from .customfielddateproperties import ( + CustomFieldDateProperties, + CustomFieldDatePropertiesTypedDict, +) +from .customfieldnumber import ( + CustomFieldNumber, + CustomFieldNumberType, + CustomFieldNumberTypedDict, +) +from .customfieldnumberproperties import ( + CustomFieldNumberProperties, + CustomFieldNumberPropertiesTypedDict, +) +from .customfieldselect import ( + CustomFieldSelect, + CustomFieldSelectType, + CustomFieldSelectTypedDict, +) +from .customfieldselectoption import ( + CustomFieldSelectOption, + CustomFieldSelectOptionTypedDict, +) +from .customfieldselectproperties import ( + CustomFieldSelectProperties, + CustomFieldSelectPropertiesTypedDict, +) +from .customfieldsortproperty import CustomFieldSortProperty +from .customfieldtext import ( + CustomFieldText, + CustomFieldTextType, + CustomFieldTextTypedDict, +) +from .customfieldtextproperties import ( + CustomFieldTextProperties, + CustomFieldTextPropertiesTypedDict, +) +from .customfieldtype import CustomFieldType +from .customfieldupdate import CustomFieldUpdate, CustomFieldUpdateTypedDict +from .customfieldupdatecheckbox import ( + CustomFieldUpdateCheckbox, + CustomFieldUpdateCheckboxType, + CustomFieldUpdateCheckboxTypedDict, +) +from .customfieldupdatedate import ( + CustomFieldUpdateDate, + CustomFieldUpdateDateType, + CustomFieldUpdateDateTypedDict, +) +from .customfieldupdatenumber import ( + CustomFieldUpdateNumber, + CustomFieldUpdateNumberType, + CustomFieldUpdateNumberTypedDict, +) +from .customfieldupdateselect import ( + CustomFieldUpdateSelect, + CustomFieldUpdateSelectType, + CustomFieldUpdateSelectTypedDict, +) +from .customfieldupdatetext import ( + CustomFieldUpdateText, + CustomFieldUpdateTextType, + CustomFieldUpdateTextTypedDict, +) from .donation import Donation, DonationTypedDict, Donor, DonorTypedDict from .donationorganization import DonationOrganization, DonationOrganizationTypedDict from .donationuser import DonationUser, DonationUserTypedDict @@ -543,6 +696,7 @@ LicenseKeyWithActivations, LicenseKeyWithActivationsTypedDict, ) +from .listresource_ import ListResource, ListResourceTypedDict from .listresource_article_ import ListResourceArticle, ListResourceArticleTypedDict from .listresource_benefit_ import ListResourceBenefit, ListResourceBenefitTypedDict from .listresource_benefitgrant_ import ( @@ -697,7 +851,12 @@ Onev11oauth21tokenPostXComponentsRefreshTokenRequestGrantType, Onev11oauth21tokenPostXComponentsRefreshTokenRequestTypedDict, ) -from .order import Order, OrderTypedDict +from .order import ( + Order, + OrderCustomFieldData, + OrderCustomFieldDataTypedDict, + OrderTypedDict, +) from .orderbillingreason import OrderBillingReason from .orderinvoice import OrderInvoice, OrderInvoiceTypedDict from .orderproduct import OrderProduct, OrderProductTypedDict @@ -778,6 +937,8 @@ PaymentProcessorMetadata, PaymentProcessorMetadataTypedDict, PolarCheckoutSchemasCheckout, + PolarCheckoutSchemasCheckoutCustomFieldData, + PolarCheckoutSchemasCheckoutCustomFieldDataTypedDict, PolarCheckoutSchemasCheckoutInput, PolarCheckoutSchemasCheckoutInputTypedDict, PolarCheckoutSchemasCheckoutTypedDict, @@ -785,17 +946,13 @@ from .polar_checkout_schemas_checkoutcreate import ( PaymentProcessor, PolarCheckoutSchemasCheckoutCreate, + PolarCheckoutSchemasCheckoutCreateCustomFieldData, + PolarCheckoutSchemasCheckoutCreateCustomFieldDataTypedDict, PolarCheckoutSchemasCheckoutCreateTypedDict, ) from .polar_enums_paymentprocessor import PolarEnumsPaymentProcessor -from .product import ( - Product, - ProductBenefits, - ProductBenefitsTypedDict, - ProductInput, - ProductInputTypedDict, - ProductTypedDict, -) +from .product import Product, ProductTypedDict +from .product_input import ProductInput, ProductInputTypedDict from .productbenefitsupdate import ProductBenefitsUpdate, ProductBenefitsUpdateTypedDict from .productmediafilecreate import ( ProductMediaFileCreate, @@ -967,8 +1124,14 @@ from .sdkerror import SDKError from .security import Security, SecurityTypedDict from .state import State -from .subscription import Subscription, SubscriptionTypedDict -from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict +from .subscription import ( + Subscription, + SubscriptionCustomFieldData, + SubscriptionCustomFieldDataTypedDict, + SubscriptionInput, + SubscriptionInputTypedDict, + SubscriptionTypedDict, +) from .subscriptionrecurringinterval import SubscriptionRecurringInterval from .subscriptions_exportop import ( OrganizationID, @@ -1300,6 +1463,10 @@ "ArticlesUpdateRequestTypedDict", "Assignee", "AssigneeTypedDict", + "AttachedCustomField", + "AttachedCustomFieldCreate", + "AttachedCustomFieldCreateTypedDict", + "AttachedCustomFieldTypedDict", "Author", "AuthorTypedDict", "Benefit", @@ -1492,6 +1659,8 @@ "BylineProfile", "BylineProfileTypedDict", "CheckoutConfirmStripe", + "CheckoutConfirmStripeCustomFieldData", + "CheckoutConfirmStripeCustomFieldDataTypedDict", "CheckoutConfirmStripeTypedDict", "CheckoutLink", "CheckoutLinkCreate", @@ -1515,7 +1684,15 @@ "CheckoutLinksListResponseTypedDict", "CheckoutLinksUpdateRequest", "CheckoutLinksUpdateRequestTypedDict", + "CheckoutProduct", + "CheckoutProductBenefits", + "CheckoutProductBenefitsTypedDict", + "CheckoutProductInput", + "CheckoutProductInputTypedDict", + "CheckoutProductTypedDict", "CheckoutPublic", + "CheckoutPublicCustomFieldData", + "CheckoutPublicCustomFieldDataTypedDict", "CheckoutPublicPaymentProcessorMetadata", "CheckoutPublicPaymentProcessorMetadataTypedDict", "CheckoutPublicTypedDict", @@ -1523,6 +1700,8 @@ "CheckoutStatus", "CheckoutUpdate", "CheckoutUpdatePublic", + "CheckoutUpdatePublicCustomFieldData", + "CheckoutUpdatePublicCustomFieldDataTypedDict", "CheckoutUpdatePublicTypedDict", "CheckoutUpdateTypedDict", "CheckoutsCustomClientConfirmRequest", @@ -1549,6 +1728,87 @@ "ConditionsTypedDict", "CurrencyAmount", "CurrencyAmountTypedDict", + "CustomField", + "CustomFieldCheckbox", + "CustomFieldCheckboxProperties", + "CustomFieldCheckboxPropertiesTypedDict", + "CustomFieldCheckboxType", + "CustomFieldCheckboxTypedDict", + "CustomFieldCreate", + "CustomFieldCreateCheckbox", + "CustomFieldCreateCheckboxType", + "CustomFieldCreateCheckboxTypedDict", + "CustomFieldCreateDate", + "CustomFieldCreateDateType", + "CustomFieldCreateDateTypedDict", + "CustomFieldCreateNumber", + "CustomFieldCreateNumberType", + "CustomFieldCreateNumberTypedDict", + "CustomFieldCreateSelect", + "CustomFieldCreateSelectType", + "CustomFieldCreateSelectTypedDict", + "CustomFieldCreateText", + "CustomFieldCreateTextType", + "CustomFieldCreateTextTypedDict", + "CustomFieldCreateTypedDict", + "CustomFieldData", + "CustomFieldDataTypedDict", + "CustomFieldDate", + "CustomFieldDateProperties", + "CustomFieldDatePropertiesTypedDict", + "CustomFieldDateType", + "CustomFieldDateTypedDict", + "CustomFieldNumber", + "CustomFieldNumberProperties", + "CustomFieldNumberPropertiesTypedDict", + "CustomFieldNumberType", + "CustomFieldNumberTypedDict", + "CustomFieldSelect", + "CustomFieldSelectOption", + "CustomFieldSelectOptionTypedDict", + "CustomFieldSelectProperties", + "CustomFieldSelectPropertiesTypedDict", + "CustomFieldSelectType", + "CustomFieldSelectTypedDict", + "CustomFieldSortProperty", + "CustomFieldText", + "CustomFieldTextProperties", + "CustomFieldTextPropertiesTypedDict", + "CustomFieldTextType", + "CustomFieldTextTypedDict", + "CustomFieldType", + "CustomFieldTypeFilter", + "CustomFieldTypeFilterTypedDict", + "CustomFieldTypedDict", + "CustomFieldUpdate", + "CustomFieldUpdateCheckbox", + "CustomFieldUpdateCheckboxType", + "CustomFieldUpdateCheckboxTypedDict", + "CustomFieldUpdateDate", + "CustomFieldUpdateDateType", + "CustomFieldUpdateDateTypedDict", + "CustomFieldUpdateNumber", + "CustomFieldUpdateNumberType", + "CustomFieldUpdateNumberTypedDict", + "CustomFieldUpdateSelect", + "CustomFieldUpdateSelectType", + "CustomFieldUpdateSelectTypedDict", + "CustomFieldUpdateText", + "CustomFieldUpdateTextType", + "CustomFieldUpdateTextTypedDict", + "CustomFieldUpdateTypedDict", + "CustomFieldsDeleteRequest", + "CustomFieldsDeleteRequestTypedDict", + "CustomFieldsGetRequest", + "CustomFieldsGetRequestTypedDict", + "CustomFieldsListQueryParamOrganizationIDFilter", + "CustomFieldsListQueryParamOrganizationIDFilterTypedDict", + "CustomFieldsListRequest", + "CustomFieldsListRequestTypedDict", + "CustomFieldsListResponse", + "CustomFieldsListResponseTypedDict", + "CustomFieldsUpdateRequest", + "CustomFieldsUpdateRequestTypedDict", "Donation", "DonationOrganization", "DonationOrganizationTypedDict", @@ -1659,6 +1919,7 @@ "LicenseKeysListResponseTypedDict", "LicenseKeysUpdateRequest", "LicenseKeysUpdateRequestTypedDict", + "ListResource", "ListResourceArticle", "ListResourceArticleTypedDict", "ListResourceBenefit", @@ -1689,6 +1950,7 @@ "ListResourceRepositoryTypedDict", "ListResourceSubscription", "ListResourceSubscriptionTypedDict", + "ListResourceTypedDict", "ListResourceUserAdvertisementCampaign", "ListResourceUserAdvertisementCampaignTypedDict", "ListResourceUserBenefit", @@ -1765,6 +2027,8 @@ "Onev11oauth21tokenPostXComponentsRefreshTokenRequestTypedDict", "Order", "OrderBillingReason", + "OrderCustomFieldData", + "OrderCustomFieldDataTypedDict", "OrderIDFilter", "OrderIDFilterTypedDict", "OrderInvoice", @@ -1841,7 +2105,11 @@ "PolarCheckoutLegacySchemasCheckoutTypedDict", "PolarCheckoutSchemasCheckout", "PolarCheckoutSchemasCheckoutCreate", + "PolarCheckoutSchemasCheckoutCreateCustomFieldData", + "PolarCheckoutSchemasCheckoutCreateCustomFieldDataTypedDict", "PolarCheckoutSchemasCheckoutCreateTypedDict", + "PolarCheckoutSchemasCheckoutCustomFieldData", + "PolarCheckoutSchemasCheckoutCustomFieldDataTypedDict", "PolarCheckoutSchemasCheckoutInput", "PolarCheckoutSchemasCheckoutInputTypedDict", "PolarCheckoutSchemasCheckoutTypedDict", @@ -1851,8 +2119,6 @@ "Prices", "PricesTypedDict", "Product", - "ProductBenefits", - "ProductBenefitsTypedDict", "ProductBenefitsUpdate", "ProductBenefitsUpdateTypedDict", "ProductIDFilter", @@ -2010,6 +2276,8 @@ "State", "SubType", "Subscription", + "SubscriptionCustomFieldData", + "SubscriptionCustomFieldDataTypedDict", "SubscriptionIDFilter", "SubscriptionIDFilterTypedDict", "SubscriptionInput", diff --git a/src/polar_sdk/models/attachedcustomfield.py b/src/polar_sdk/models/attachedcustomfield.py new file mode 100644 index 0000000..6239365 --- /dev/null +++ b/src/polar_sdk/models/attachedcustomfield.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfield import CustomField, CustomFieldTypedDict +from polar_sdk.types import BaseModel +from typing_extensions import TypedDict + + +class AttachedCustomFieldTypedDict(TypedDict): + r"""Schema of a custom field attached to a resource.""" + + custom_field_id: str + r"""ID of the custom field.""" + custom_field: CustomFieldTypedDict + order: int + r"""Order of the custom field in the resource.""" + required: bool + r"""Whether the value is required for this custom field.""" + + +class AttachedCustomField(BaseModel): + r"""Schema of a custom field attached to a resource.""" + + custom_field_id: str + r"""ID of the custom field.""" + + custom_field: CustomField + + order: int + r"""Order of the custom field in the resource.""" + + required: bool + r"""Whether the value is required for this custom field.""" diff --git a/src/polar_sdk/models/attachedcustomfieldcreate.py b/src/polar_sdk/models/attachedcustomfieldcreate.py new file mode 100644 index 0000000..bf6036b --- /dev/null +++ b/src/polar_sdk/models/attachedcustomfieldcreate.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from polar_sdk.types import BaseModel +from typing_extensions import TypedDict + + +class AttachedCustomFieldCreateTypedDict(TypedDict): + r"""Schema to attach a custom field to a resource.""" + + custom_field_id: str + r"""ID of the custom field to attach.""" + required: bool + r"""Whether the value is required for this custom field.""" + + +class AttachedCustomFieldCreate(BaseModel): + r"""Schema to attach a custom field to a resource.""" + + custom_field_id: str + r"""ID of the custom field to attach.""" + + required: bool + r"""Whether the value is required for this custom field.""" diff --git a/src/polar_sdk/models/benefitadssubscriber.py b/src/polar_sdk/models/benefitadssubscriber.py index 6a84346..6b2d5df 100644 --- a/src/polar_sdk/models/benefitadssubscriber.py +++ b/src/polar_sdk/models/benefitadssubscriber.py @@ -3,6 +3,7 @@ from __future__ import annotations from .benefitadsproperties import BenefitAdsProperties, BenefitAdsPropertiesTypedDict from .benefitgrantads import BenefitGrantAds, BenefitGrantAdsTypedDict +from .organization import Organization, OrganizationTypedDict from datetime import datetime from enum import Enum from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL @@ -33,9 +34,10 @@ class BenefitAdsSubscriberTypedDict(TypedDict): r"""Whether the benefit is deletable.""" organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantAdsTypedDict] + organization: OrganizationTypedDict properties: BenefitAdsPropertiesTypedDict r"""Properties for a benefit of type `ads`.""" - grants: List[BenefitGrantAdsTypedDict] type: BenefitAdsSubscriberType @@ -61,11 +63,13 @@ class BenefitAdsSubscriber(BaseModel): organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantAds] + + organization: Organization + properties: BenefitAdsProperties r"""Properties for a benefit of type `ads`.""" - grants: List[BenefitGrantAds] - TYPE: Annotated[ Annotated[ BenefitAdsSubscriberType, diff --git a/src/polar_sdk/models/benefitarticlessubscriber.py b/src/polar_sdk/models/benefitarticlessubscriber.py index 9889502..9148b02 100644 --- a/src/polar_sdk/models/benefitarticlessubscriber.py +++ b/src/polar_sdk/models/benefitarticlessubscriber.py @@ -5,6 +5,11 @@ BenefitArticlesSubscriberProperties, BenefitArticlesSubscriberPropertiesTypedDict, ) +from .benefitgrantsubscriber import ( + BenefitGrantSubscriber, + BenefitGrantSubscriberTypedDict, +) +from .organization import Organization, OrganizationTypedDict from datetime import datetime from enum import Enum from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL @@ -12,6 +17,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator +from typing import List from typing_extensions import Annotated, TypedDict @@ -34,6 +40,8 @@ class BenefitArticlesSubscriberTypedDict(TypedDict): r"""Whether the benefit is deletable.""" organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantSubscriberTypedDict] + organization: OrganizationTypedDict properties: BenefitArticlesSubscriberPropertiesTypedDict r"""Properties available to subscribers for a benefit of type `articles`.""" type: Type @@ -61,6 +69,10 @@ class BenefitArticlesSubscriber(BaseModel): organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantSubscriber] + + organization: Organization + properties: BenefitArticlesSubscriberProperties r"""Properties available to subscribers for a benefit of type `articles`.""" diff --git a/src/polar_sdk/models/benefitcustomsubscriber.py b/src/polar_sdk/models/benefitcustomsubscriber.py index 9dea6b4..c578658 100644 --- a/src/polar_sdk/models/benefitcustomsubscriber.py +++ b/src/polar_sdk/models/benefitcustomsubscriber.py @@ -9,6 +9,7 @@ BenefitGrantSubscriber, BenefitGrantSubscriberTypedDict, ) +from .organization import Organization, OrganizationTypedDict from datetime import datetime from enum import Enum from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL @@ -40,6 +41,7 @@ class BenefitCustomSubscriberTypedDict(TypedDict): organization_id: str r"""The ID of the organization owning the benefit.""" grants: List[BenefitGrantSubscriberTypedDict] + organization: OrganizationTypedDict properties: BenefitCustomSubscriberPropertiesTypedDict r"""Properties available to subscribers for a benefit of type `custom`.""" type: BenefitCustomSubscriberType @@ -69,6 +71,8 @@ class BenefitCustomSubscriber(BaseModel): grants: List[BenefitGrantSubscriber] + organization: Organization + properties: BenefitCustomSubscriberProperties r"""Properties available to subscribers for a benefit of type `custom`.""" diff --git a/src/polar_sdk/models/benefitdiscordsubscriber.py b/src/polar_sdk/models/benefitdiscordsubscriber.py index 3a03b44..5e478c8 100644 --- a/src/polar_sdk/models/benefitdiscordsubscriber.py +++ b/src/polar_sdk/models/benefitdiscordsubscriber.py @@ -5,6 +5,11 @@ BenefitDiscordSubscriberProperties, BenefitDiscordSubscriberPropertiesTypedDict, ) +from .benefitgrantsubscriber import ( + BenefitGrantSubscriber, + BenefitGrantSubscriberTypedDict, +) +from .organization import Organization, OrganizationTypedDict from datetime import datetime from enum import Enum from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL @@ -12,6 +17,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator +from typing import List from typing_extensions import Annotated, TypedDict @@ -34,6 +40,8 @@ class BenefitDiscordSubscriberTypedDict(TypedDict): r"""Whether the benefit is deletable.""" organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantSubscriberTypedDict] + organization: OrganizationTypedDict properties: BenefitDiscordSubscriberPropertiesTypedDict r"""Properties available to subscribers for a benefit of type `discord`.""" type: BenefitDiscordSubscriberType @@ -61,6 +69,10 @@ class BenefitDiscordSubscriber(BaseModel): organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantSubscriber] + + organization: Organization + properties: BenefitDiscordSubscriberProperties r"""Properties available to subscribers for a benefit of type `discord`.""" diff --git a/src/polar_sdk/models/benefitdownloadablessubscriber.py b/src/polar_sdk/models/benefitdownloadablessubscriber.py index 0d257ca..8a7a370 100644 --- a/src/polar_sdk/models/benefitdownloadablessubscriber.py +++ b/src/polar_sdk/models/benefitdownloadablessubscriber.py @@ -5,6 +5,11 @@ BenefitDownloadablesSubscriberProperties, BenefitDownloadablesSubscriberPropertiesTypedDict, ) +from .benefitgrantsubscriber import ( + BenefitGrantSubscriber, + BenefitGrantSubscriberTypedDict, +) +from .organization import Organization, OrganizationTypedDict from datetime import datetime from enum import Enum from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL @@ -12,6 +17,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator +from typing import List from typing_extensions import Annotated, TypedDict @@ -34,6 +40,8 @@ class BenefitDownloadablesSubscriberTypedDict(TypedDict): r"""Whether the benefit is deletable.""" organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantSubscriberTypedDict] + organization: OrganizationTypedDict properties: BenefitDownloadablesSubscriberPropertiesTypedDict type: BenefitDownloadablesSubscriberType @@ -60,6 +68,10 @@ class BenefitDownloadablesSubscriber(BaseModel): organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantSubscriber] + + organization: Organization + properties: BenefitDownloadablesSubscriberProperties TYPE: Annotated[ diff --git a/src/polar_sdk/models/benefitgithubrepositorysubscriber.py b/src/polar_sdk/models/benefitgithubrepositorysubscriber.py index de2abdf..507bd15 100644 --- a/src/polar_sdk/models/benefitgithubrepositorysubscriber.py +++ b/src/polar_sdk/models/benefitgithubrepositorysubscriber.py @@ -5,6 +5,11 @@ BenefitGitHubRepositorySubscriberProperties, BenefitGitHubRepositorySubscriberPropertiesTypedDict, ) +from .benefitgrantsubscriber import ( + BenefitGrantSubscriber, + BenefitGrantSubscriberTypedDict, +) +from .organization import Organization, OrganizationTypedDict from datetime import datetime from enum import Enum from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL @@ -12,6 +17,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator +from typing import List from typing_extensions import Annotated, TypedDict @@ -34,6 +40,8 @@ class BenefitGitHubRepositorySubscriberTypedDict(TypedDict): r"""Whether the benefit is deletable.""" organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantSubscriberTypedDict] + organization: OrganizationTypedDict properties: BenefitGitHubRepositorySubscriberPropertiesTypedDict r"""Properties available to subscribers for a benefit of type `github_repository`.""" type: BenefitGitHubRepositorySubscriberType @@ -61,6 +69,10 @@ class BenefitGitHubRepositorySubscriber(BaseModel): organization_id: str r"""The ID of the organization owning the benefit.""" + grants: List[BenefitGrantSubscriber] + + organization: Organization + properties: BenefitGitHubRepositorySubscriberProperties r"""Properties available to subscribers for a benefit of type `github_repository`.""" diff --git a/src/polar_sdk/models/benefitlicensekeyssubscriber.py b/src/polar_sdk/models/benefitlicensekeyssubscriber.py index 4f26b70..3a32b69 100644 --- a/src/polar_sdk/models/benefitlicensekeyssubscriber.py +++ b/src/polar_sdk/models/benefitlicensekeyssubscriber.py @@ -9,6 +9,7 @@ BenefitLicenseKeysSubscriberProperties, BenefitLicenseKeysSubscriberPropertiesTypedDict, ) +from .organization import Organization, OrganizationTypedDict from datetime import datetime from enum import Enum from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL @@ -39,8 +40,9 @@ class BenefitLicenseKeysSubscriberTypedDict(TypedDict): r"""Whether the benefit is deletable.""" organization_id: str r"""The ID of the organization owning the benefit.""" - properties: BenefitLicenseKeysSubscriberPropertiesTypedDict grants: List[BenefitGrantLicenseKeysTypedDict] + organization: OrganizationTypedDict + properties: BenefitLicenseKeysSubscriberPropertiesTypedDict type: BenefitLicenseKeysSubscriberType @@ -66,10 +68,12 @@ class BenefitLicenseKeysSubscriber(BaseModel): organization_id: str r"""The ID of the organization owning the benefit.""" - properties: BenefitLicenseKeysSubscriberProperties - grants: List[BenefitGrantLicenseKeys] + organization: Organization + + properties: BenefitLicenseKeysSubscriberProperties + TYPE: Annotated[ Annotated[ BenefitLicenseKeysSubscriberType, diff --git a/src/polar_sdk/models/checkoutconfirmstripe.py b/src/polar_sdk/models/checkoutconfirmstripe.py index e2fef7e..1e108a5 100644 --- a/src/polar_sdk/models/checkoutconfirmstripe.py +++ b/src/polar_sdk/models/checkoutconfirmstripe.py @@ -7,9 +7,21 @@ from typing_extensions import NotRequired, TypedDict +class CheckoutConfirmStripeCustomFieldDataTypedDict(TypedDict): + pass + + +class CheckoutConfirmStripeCustomFieldData(BaseModel): + pass + + class CheckoutConfirmStripeTypedDict(TypedDict): r"""Confirm a checkout session using a Stripe confirmation token.""" + custom_field_data: NotRequired[ + Nullable[CheckoutConfirmStripeCustomFieldDataTypedDict] + ] + r"""Key-value object storing custom field values.""" product_price_id: NotRequired[Nullable[str]] r"""ID of the product price to checkout. Must correspond to a price linked to the same product.""" amount: NotRequired[Nullable[int]] @@ -24,6 +36,9 @@ class CheckoutConfirmStripeTypedDict(TypedDict): class CheckoutConfirmStripe(BaseModel): r"""Confirm a checkout session using a Stripe confirmation token.""" + custom_field_data: OptionalNullable[CheckoutConfirmStripeCustomFieldData] = UNSET + r"""Key-value object storing custom field values.""" + product_price_id: OptionalNullable[str] = UNSET r"""ID of the product price to checkout. Must correspond to a price linked to the same product.""" @@ -43,6 +58,7 @@ class CheckoutConfirmStripe(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ + "custom_field_data", "product_price_id", "amount", "customer_name", @@ -52,6 +68,7 @@ def serialize_model(self, handler): "confirmation_token_id", ] nullable_fields = [ + "custom_field_data", "product_price_id", "amount", "customer_name", diff --git a/src/polar_sdk/models/checkoutproduct.py b/src/polar_sdk/models/checkoutproduct.py new file mode 100644 index 0000000..8f16b75 --- /dev/null +++ b/src/polar_sdk/models/checkoutproduct.py @@ -0,0 +1,211 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict +from .benefitbase import BenefitBase, BenefitBaseTypedDict +from .productmediafileread import ( + ProductMediaFileRead, + ProductMediaFileReadInput, + ProductMediaFileReadInputTypedDict, + ProductMediaFileReadTypedDict, +) +from .productprice import ProductPrice, ProductPriceTypedDict +from datetime import datetime +from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Union +from typing_extensions import TypedDict + + +CheckoutProductBenefitsTypedDict = Union[BenefitBaseTypedDict, BenefitArticlesTypedDict] + + +CheckoutProductBenefits = Union[BenefitBase, BenefitArticles] + + +class CheckoutProductTypedDict(TypedDict): + r"""Product data for a checkout session.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + id: str + r"""The ID of the product.""" + name: str + r"""The name of the product.""" + description: Nullable[str] + r"""The description of the product.""" + is_recurring: bool + r"""Whether the product is a subscription tier.""" + is_archived: bool + r"""Whether the product is archived and no longer available.""" + organization_id: str + r"""The ID of the organization owning the product.""" + prices: List[ProductPriceTypedDict] + r"""List of prices for this product.""" + benefits: List[CheckoutProductBenefitsTypedDict] + r"""List of benefits granted by the product.""" + medias: List[ProductMediaFileReadTypedDict] + r"""List of medias associated to the product.""" + + +class CheckoutProduct(BaseModel): + r"""Product data for a checkout session.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + + id: str + r"""The ID of the product.""" + + name: str + r"""The name of the product.""" + + description: Nullable[str] + r"""The description of the product.""" + + is_recurring: bool + r"""Whether the product is a subscription tier.""" + + is_archived: bool + r"""Whether the product is archived and no longer available.""" + + organization_id: str + r"""The ID of the organization owning the product.""" + + prices: List[ProductPrice] + r"""List of prices for this product.""" + + benefits: List[CheckoutProductBenefits] + r"""List of benefits granted by the product.""" + + medias: List[ProductMediaFileRead] + r"""List of medias associated to the product.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["modified_at", "description"] + 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 + + +class CheckoutProductInputTypedDict(TypedDict): + r"""Product data for a checkout session.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + id: str + r"""The ID of the product.""" + name: str + r"""The name of the product.""" + description: Nullable[str] + r"""The description of the product.""" + is_recurring: bool + r"""Whether the product is a subscription tier.""" + is_archived: bool + r"""Whether the product is archived and no longer available.""" + organization_id: str + r"""The ID of the organization owning the product.""" + prices: List[ProductPriceTypedDict] + r"""List of prices for this product.""" + benefits: List[CheckoutProductBenefitsTypedDict] + r"""List of benefits granted by the product.""" + medias: List[ProductMediaFileReadInputTypedDict] + r"""List of medias associated to the product.""" + + +class CheckoutProductInput(BaseModel): + r"""Product data for a checkout session.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + + id: str + r"""The ID of the product.""" + + name: str + r"""The name of the product.""" + + description: Nullable[str] + r"""The description of the product.""" + + is_recurring: bool + r"""Whether the product is a subscription tier.""" + + is_archived: bool + r"""Whether the product is archived and no longer available.""" + + organization_id: str + r"""The ID of the organization owning the product.""" + + prices: List[ProductPrice] + r"""List of prices for this product.""" + + benefits: List[CheckoutProductBenefits] + r"""List of benefits granted by the product.""" + + medias: List[ProductMediaFileReadInput] + r"""List of medias associated to the product.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["modified_at", "description"] + 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/checkoutpublic.py b/src/polar_sdk/models/checkoutpublic.py index 45f2b00..a0fb636 100644 --- a/src/polar_sdk/models/checkoutpublic.py +++ b/src/polar_sdk/models/checkoutpublic.py @@ -2,9 +2,11 @@ from __future__ import annotations from .address import Address, AddressTypedDict +from .attachedcustomfield import AttachedCustomField, AttachedCustomFieldTypedDict +from .checkoutproduct import CheckoutProduct, CheckoutProductTypedDict from .checkoutstatus import CheckoutStatus +from .organization import Organization, OrganizationTypedDict from .polar_enums_paymentprocessor import PolarEnumsPaymentProcessor -from .product import Product, ProductTypedDict from .productprice import ProductPrice, ProductPriceTypedDict from datetime import datetime from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL @@ -12,7 +14,16 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing_extensions import Annotated, TypedDict +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CheckoutPublicCustomFieldDataTypedDict(TypedDict): + r"""Key-value object storing custom field values.""" + + +class CheckoutPublicCustomFieldData(BaseModel): + r"""Key-value object storing custom field values.""" class CheckoutPublicPaymentProcessorMetadataTypedDict(TypedDict): @@ -63,9 +74,13 @@ class CheckoutPublicTypedDict(TypedDict): customer_billing_address: Nullable[AddressTypedDict] customer_tax_id: Nullable[str] payment_processor_metadata: CheckoutPublicPaymentProcessorMetadataTypedDict - product: ProductTypedDict - r"""A product.""" + product: CheckoutProductTypedDict + r"""Product data for a checkout session.""" product_price: ProductPriceTypedDict + organization: OrganizationTypedDict + attached_custom_fields: List[AttachedCustomFieldTypedDict] + custom_field_data: NotRequired[CheckoutPublicCustomFieldDataTypedDict] + r"""Key-value object storing custom field values.""" payment_processor: PolarEnumsPaymentProcessor @@ -132,11 +147,18 @@ class CheckoutPublic(BaseModel): payment_processor_metadata: CheckoutPublicPaymentProcessorMetadata - product: Product - r"""A product.""" + product: CheckoutProduct + r"""Product data for a checkout session.""" product_price: ProductPrice + organization: Organization + + attached_custom_fields: List[AttachedCustomField] + + custom_field_data: Optional[CheckoutPublicCustomFieldData] = None + r"""Key-value object storing custom field values.""" + PAYMENT_PROCESSOR: Annotated[ Annotated[ PolarEnumsPaymentProcessor, @@ -147,7 +169,7 @@ class CheckoutPublic(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] + optional_fields = ["custom_field_data"] nullable_fields = [ "modified_at", "embed_origin", diff --git a/src/polar_sdk/models/checkoutupdate.py b/src/polar_sdk/models/checkoutupdate.py index ef5fe88..e159c76 100644 --- a/src/polar_sdk/models/checkoutupdate.py +++ b/src/polar_sdk/models/checkoutupdate.py @@ -8,9 +8,19 @@ from typing_extensions import NotRequired, TypedDict +class CustomFieldDataTypedDict(TypedDict): + pass + + +class CustomFieldData(BaseModel): + pass + + class CheckoutUpdateTypedDict(TypedDict): r"""Update an existing checkout session using an access token.""" + custom_field_data: NotRequired[Nullable[CustomFieldDataTypedDict]] + r"""Key-value object storing custom field values.""" product_price_id: NotRequired[Nullable[str]] r"""ID of the product price to checkout. Must correspond to a price linked to the same product.""" amount: NotRequired[Nullable[int]] @@ -33,6 +43,9 @@ class CheckoutUpdateTypedDict(TypedDict): class CheckoutUpdate(BaseModel): r"""Update an existing checkout session using an access token.""" + custom_field_data: OptionalNullable[CustomFieldData] = UNSET + r"""Key-value object storing custom field values.""" + product_price_id: OptionalNullable[str] = UNSET r"""ID of the product price to checkout. Must correspond to a price linked to the same product.""" @@ -62,6 +75,7 @@ class CheckoutUpdate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ + "custom_field_data", "product_price_id", "amount", "customer_name", @@ -73,6 +87,7 @@ def serialize_model(self, handler): "success_url", ] nullable_fields = [ + "custom_field_data", "product_price_id", "amount", "customer_name", diff --git a/src/polar_sdk/models/checkoutupdatepublic.py b/src/polar_sdk/models/checkoutupdatepublic.py index c16789e..c603b54 100644 --- a/src/polar_sdk/models/checkoutupdatepublic.py +++ b/src/polar_sdk/models/checkoutupdatepublic.py @@ -7,9 +7,21 @@ from typing_extensions import NotRequired, TypedDict +class CheckoutUpdatePublicCustomFieldDataTypedDict(TypedDict): + pass + + +class CheckoutUpdatePublicCustomFieldData(BaseModel): + pass + + class CheckoutUpdatePublicTypedDict(TypedDict): r"""Update an existing checkout session using the client secret.""" + custom_field_data: NotRequired[ + Nullable[CheckoutUpdatePublicCustomFieldDataTypedDict] + ] + r"""Key-value object storing custom field values.""" product_price_id: NotRequired[Nullable[str]] r"""ID of the product price to checkout. Must correspond to a price linked to the same product.""" amount: NotRequired[Nullable[int]] @@ -22,6 +34,9 @@ class CheckoutUpdatePublicTypedDict(TypedDict): class CheckoutUpdatePublic(BaseModel): r"""Update an existing checkout session using the client secret.""" + custom_field_data: OptionalNullable[CheckoutUpdatePublicCustomFieldData] = UNSET + r"""Key-value object storing custom field values.""" + product_price_id: OptionalNullable[str] = UNSET r"""ID of the product price to checkout. Must correspond to a price linked to the same product.""" @@ -38,6 +53,7 @@ class CheckoutUpdatePublic(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ + "custom_field_data", "product_price_id", "amount", "customer_name", @@ -46,6 +62,7 @@ def serialize_model(self, handler): "customer_tax_id", ] nullable_fields = [ + "custom_field_data", "product_price_id", "amount", "customer_name", diff --git a/src/polar_sdk/models/custom_fields_deleteop.py b/src/polar_sdk/models/custom_fields_deleteop.py new file mode 100644 index 0000000..3619b32 --- /dev/null +++ b/src/polar_sdk/models/custom_fields_deleteop.py @@ -0,0 +1,18 @@ +"""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, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class CustomFieldsDeleteRequestTypedDict(TypedDict): + id: str + r"""The custom field ID.""" + + +class CustomFieldsDeleteRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The custom field ID.""" diff --git a/src/polar_sdk/models/custom_fields_getop.py b/src/polar_sdk/models/custom_fields_getop.py new file mode 100644 index 0000000..bce02f1 --- /dev/null +++ b/src/polar_sdk/models/custom_fields_getop.py @@ -0,0 +1,18 @@ +"""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, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class CustomFieldsGetRequestTypedDict(TypedDict): + id: str + r"""The custom field ID.""" + + +class CustomFieldsGetRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The custom field ID.""" diff --git a/src/polar_sdk/models/custom_fields_listop.py b/src/polar_sdk/models/custom_fields_listop.py new file mode 100644 index 0000000..3ec344d --- /dev/null +++ b/src/polar_sdk/models/custom_fields_listop.py @@ -0,0 +1,131 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldsortproperty import CustomFieldSortProperty +from .customfieldtype import CustomFieldType +from .listresource_ import ListResource, ListResourceTypedDict +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import FieldMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Callable, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +CustomFieldsListQueryParamOrganizationIDFilterTypedDict = Union[str, List[str]] +r"""Filter by organization ID.""" + + +CustomFieldsListQueryParamOrganizationIDFilter = Union[str, List[str]] +r"""Filter by organization ID.""" + + +CustomFieldTypeFilterTypedDict = Union[CustomFieldType, List[CustomFieldType]] +r"""Filter by custom field type.""" + + +CustomFieldTypeFilter = Union[CustomFieldType, List[CustomFieldType]] +r"""Filter by custom field type.""" + + +class CustomFieldsListRequestTypedDict(TypedDict): + organization_id: NotRequired[ + Nullable[CustomFieldsListQueryParamOrganizationIDFilterTypedDict] + ] + r"""Filter by organization ID.""" + query: NotRequired[Nullable[str]] + r"""Filter by custom field name or slug.""" + type_filter: NotRequired[Nullable[CustomFieldTypeFilterTypedDict]] + r"""Filter by custom field type.""" + page: NotRequired[int] + r"""Page number, defaults to 1.""" + limit: NotRequired[int] + r"""Size of a page, defaults to 10. Maximum is 100.""" + sorting: NotRequired[Nullable[List[CustomFieldSortProperty]]] + r"""Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.""" + + +class CustomFieldsListRequest(BaseModel): + organization_id: Annotated[ + OptionalNullable[CustomFieldsListQueryParamOrganizationIDFilter], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by organization ID.""" + + query: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by custom field name or slug.""" + + type_filter: Annotated[ + OptionalNullable[CustomFieldTypeFilter], + pydantic.Field(alias="type"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by custom field type.""" + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 1 + r"""Page number, defaults to 1.""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 10 + r"""Size of a page, defaults to 10. Maximum is 100.""" + + sorting: Annotated[ + OptionalNullable[List[CustomFieldSortProperty]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "organization_id", + "query", + "type_filter", + "page", + "limit", + "sorting", + ] + nullable_fields = ["organization_id", "query", "type_filter", "sorting"] + 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 + + +class CustomFieldsListResponseTypedDict(TypedDict): + result: ListResourceTypedDict + + +class CustomFieldsListResponse(BaseModel): + next: Callable[[], Optional[CustomFieldsListResponse]] + + result: ListResource diff --git a/src/polar_sdk/models/custom_fields_updateop.py b/src/polar_sdk/models/custom_fields_updateop.py new file mode 100644 index 0000000..13cae68 --- /dev/null +++ b/src/polar_sdk/models/custom_fields_updateop.py @@ -0,0 +1,25 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldupdate import CustomFieldUpdate, CustomFieldUpdateTypedDict +from polar_sdk.types import BaseModel +from polar_sdk.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class CustomFieldsUpdateRequestTypedDict(TypedDict): + id: str + r"""The custom field ID.""" + custom_field_update: CustomFieldUpdateTypedDict + + +class CustomFieldsUpdateRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The custom field ID.""" + + custom_field_update: Annotated[ + CustomFieldUpdate, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/polar_sdk/models/customfield.py b/src/polar_sdk/models/customfield.py new file mode 100644 index 0000000..641ef96 --- /dev/null +++ b/src/polar_sdk/models/customfield.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldcheckbox import CustomFieldCheckbox, CustomFieldCheckboxTypedDict +from .customfielddate import CustomFieldDate, CustomFieldDateTypedDict +from .customfieldnumber import CustomFieldNumber, CustomFieldNumberTypedDict +from .customfieldselect import CustomFieldSelect, CustomFieldSelectTypedDict +from .customfieldtext import CustomFieldText, CustomFieldTextTypedDict +from polar_sdk.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Union +from typing_extensions import Annotated + + +CustomFieldTypedDict = Union[ + CustomFieldTextTypedDict, + CustomFieldNumberTypedDict, + CustomFieldDateTypedDict, + CustomFieldCheckboxTypedDict, + CustomFieldSelectTypedDict, +] + + +CustomField = Annotated[ + Union[ + Annotated[CustomFieldCheckbox, Tag("checkbox")], + Annotated[CustomFieldDate, Tag("date")], + Annotated[CustomFieldNumber, Tag("number")], + Annotated[CustomFieldSelect, Tag("select")], + Annotated[CustomFieldText, Tag("text")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] diff --git a/src/polar_sdk/models/customfieldcheckbox.py b/src/polar_sdk/models/customfieldcheckbox.py new file mode 100644 index 0000000..77fcc74 --- /dev/null +++ b/src/polar_sdk/models/customfieldcheckbox.py @@ -0,0 +1,104 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldcheckboxproperties import ( + CustomFieldCheckboxProperties, + CustomFieldCheckboxPropertiesTypedDict, +) +from datetime import datetime +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, TypedDict + + +class CustomFieldCheckboxType(str, Enum): + CHECKBOX = "checkbox" + + +class CustomFieldCheckboxTypedDict(TypedDict): + r"""Schema for a custom field of type checkbox.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + id: str + r"""The ID of the object.""" + metadata: Dict[str, str] + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + organization_id: str + r"""The ID of the organization owning the custom field.""" + properties: CustomFieldCheckboxPropertiesTypedDict + type: CustomFieldCheckboxType + + +class CustomFieldCheckbox(BaseModel): + r"""Schema for a custom field of type checkbox.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + + id: str + r"""The ID of the object.""" + + metadata: Dict[str, str] + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + organization_id: str + r"""The ID of the organization owning the custom field.""" + + properties: CustomFieldCheckboxProperties + + TYPE: Annotated[ + Annotated[ + CustomFieldCheckboxType, + AfterValidator(validate_const(CustomFieldCheckboxType.CHECKBOX)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldCheckboxType.CHECKBOX + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["modified_at"] + 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/customfieldcheckboxproperties.py b/src/polar_sdk/models/customfieldcheckboxproperties.py new file mode 100644 index 0000000..819e69a --- /dev/null +++ b/src/polar_sdk/models/customfieldcheckboxproperties.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from polar_sdk.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CustomFieldCheckboxPropertiesTypedDict(TypedDict): + form_label: NotRequired[str] + form_help_text: NotRequired[str] + form_placeholder: NotRequired[str] + + +class CustomFieldCheckboxProperties(BaseModel): + form_label: Optional[str] = None + + form_help_text: Optional[str] = None + + form_placeholder: Optional[str] = None diff --git a/src/polar_sdk/models/customfieldcreate.py b/src/polar_sdk/models/customfieldcreate.py new file mode 100644 index 0000000..932dcb0 --- /dev/null +++ b/src/polar_sdk/models/customfieldcreate.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldcreatecheckbox import ( + CustomFieldCreateCheckbox, + CustomFieldCreateCheckboxTypedDict, +) +from .customfieldcreatedate import CustomFieldCreateDate, CustomFieldCreateDateTypedDict +from .customfieldcreatenumber import ( + CustomFieldCreateNumber, + CustomFieldCreateNumberTypedDict, +) +from .customfieldcreateselect import ( + CustomFieldCreateSelect, + CustomFieldCreateSelectTypedDict, +) +from .customfieldcreatetext import CustomFieldCreateText, CustomFieldCreateTextTypedDict +from polar_sdk.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Union +from typing_extensions import Annotated + + +CustomFieldCreateTypedDict = Union[ + CustomFieldCreateTextTypedDict, + CustomFieldCreateNumberTypedDict, + CustomFieldCreateDateTypedDict, + CustomFieldCreateCheckboxTypedDict, + CustomFieldCreateSelectTypedDict, +] + + +CustomFieldCreate = Annotated[ + Union[ + Annotated[CustomFieldCreateCheckbox, Tag("checkbox")], + Annotated[CustomFieldCreateDate, Tag("date")], + Annotated[CustomFieldCreateNumber, Tag("number")], + Annotated[CustomFieldCreateSelect, Tag("select")], + Annotated[CustomFieldCreateText, Tag("text")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] diff --git a/src/polar_sdk/models/customfieldcreatecheckbox.py b/src/polar_sdk/models/customfieldcreatecheckbox.py new file mode 100644 index 0000000..8637b29 --- /dev/null +++ b/src/polar_sdk/models/customfieldcreatecheckbox.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldcheckboxproperties import ( + CustomFieldCheckboxProperties, + CustomFieldCheckboxPropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldCreateCheckboxType(str, Enum): + CHECKBOX = "checkbox" + + +class CustomFieldCreateCheckboxTypedDict(TypedDict): + r"""Schema to create a custom field of type checkbox.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + properties: CustomFieldCheckboxPropertiesTypedDict + metadata: NotRequired[Dict[str, str]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + type: CustomFieldCreateCheckboxType + organization_id: NotRequired[Nullable[str]] + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + +class CustomFieldCreateCheckbox(BaseModel): + r"""Schema to create a custom field of type checkbox.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + properties: CustomFieldCheckboxProperties + + metadata: Optional[Dict[str, str]] = None + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + TYPE: Annotated[ + Annotated[ + CustomFieldCreateCheckboxType, + AfterValidator(validate_const(CustomFieldCreateCheckboxType.CHECKBOX)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldCreateCheckboxType.CHECKBOX + + organization_id: OptionalNullable[str] = UNSET + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "organization_id"] + nullable_fields = ["organization_id"] + 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/customfieldcreatedate.py b/src/polar_sdk/models/customfieldcreatedate.py new file mode 100644 index 0000000..46d1984 --- /dev/null +++ b/src/polar_sdk/models/customfieldcreatedate.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfielddateproperties import ( + CustomFieldDateProperties, + CustomFieldDatePropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldCreateDateType(str, Enum): + DATE = "date" + + +class CustomFieldCreateDateTypedDict(TypedDict): + r"""Schema to create a custom field of type date.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + properties: CustomFieldDatePropertiesTypedDict + metadata: NotRequired[Dict[str, str]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + type: CustomFieldCreateDateType + organization_id: NotRequired[Nullable[str]] + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + +class CustomFieldCreateDate(BaseModel): + r"""Schema to create a custom field of type date.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + properties: CustomFieldDateProperties + + metadata: Optional[Dict[str, str]] = None + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + TYPE: Annotated[ + Annotated[ + CustomFieldCreateDateType, + AfterValidator(validate_const(CustomFieldCreateDateType.DATE)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldCreateDateType.DATE + + organization_id: OptionalNullable[str] = UNSET + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "organization_id"] + nullable_fields = ["organization_id"] + 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/customfieldcreatenumber.py b/src/polar_sdk/models/customfieldcreatenumber.py new file mode 100644 index 0000000..3fb893e --- /dev/null +++ b/src/polar_sdk/models/customfieldcreatenumber.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldnumberproperties import ( + CustomFieldNumberProperties, + CustomFieldNumberPropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldCreateNumberType(str, Enum): + NUMBER = "number" + + +class CustomFieldCreateNumberTypedDict(TypedDict): + r"""Schema to create a custom field of type number.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + properties: CustomFieldNumberPropertiesTypedDict + metadata: NotRequired[Dict[str, str]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + type: CustomFieldCreateNumberType + organization_id: NotRequired[Nullable[str]] + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + +class CustomFieldCreateNumber(BaseModel): + r"""Schema to create a custom field of type number.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + properties: CustomFieldNumberProperties + + metadata: Optional[Dict[str, str]] = None + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + TYPE: Annotated[ + Annotated[ + CustomFieldCreateNumberType, + AfterValidator(validate_const(CustomFieldCreateNumberType.NUMBER)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldCreateNumberType.NUMBER + + organization_id: OptionalNullable[str] = UNSET + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "organization_id"] + nullable_fields = ["organization_id"] + 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/customfieldcreateselect.py b/src/polar_sdk/models/customfieldcreateselect.py new file mode 100644 index 0000000..f3ec584 --- /dev/null +++ b/src/polar_sdk/models/customfieldcreateselect.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldselectproperties import ( + CustomFieldSelectProperties, + CustomFieldSelectPropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldCreateSelectType(str, Enum): + SELECT = "select" + + +class CustomFieldCreateSelectTypedDict(TypedDict): + r"""Schema to create a custom field of type select.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + properties: CustomFieldSelectPropertiesTypedDict + metadata: NotRequired[Dict[str, str]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + type: CustomFieldCreateSelectType + organization_id: NotRequired[Nullable[str]] + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + +class CustomFieldCreateSelect(BaseModel): + r"""Schema to create a custom field of type select.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + properties: CustomFieldSelectProperties + + metadata: Optional[Dict[str, str]] = None + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + TYPE: Annotated[ + Annotated[ + CustomFieldCreateSelectType, + AfterValidator(validate_const(CustomFieldCreateSelectType.SELECT)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldCreateSelectType.SELECT + + organization_id: OptionalNullable[str] = UNSET + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "organization_id"] + nullable_fields = ["organization_id"] + 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/customfieldcreatetext.py b/src/polar_sdk/models/customfieldcreatetext.py new file mode 100644 index 0000000..9194283 --- /dev/null +++ b/src/polar_sdk/models/customfieldcreatetext.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldtextproperties import ( + CustomFieldTextProperties, + CustomFieldTextPropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldCreateTextType(str, Enum): + TEXT = "text" + + +class CustomFieldCreateTextTypedDict(TypedDict): + r"""Schema to create a custom field of type text.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + properties: CustomFieldTextPropertiesTypedDict + metadata: NotRequired[Dict[str, str]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + type: CustomFieldCreateTextType + organization_id: NotRequired[Nullable[str]] + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + +class CustomFieldCreateText(BaseModel): + r"""Schema to create a custom field of type text.""" + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + properties: CustomFieldTextProperties + + metadata: Optional[Dict[str, str]] = None + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + TYPE: Annotated[ + Annotated[ + CustomFieldCreateTextType, + AfterValidator(validate_const(CustomFieldCreateTextType.TEXT)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldCreateTextType.TEXT + + organization_id: OptionalNullable[str] = UNSET + r"""The ID of the organization owning the custom field. **Required unless you use an organization token.**""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "organization_id"] + nullable_fields = ["organization_id"] + 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/customfielddate.py b/src/polar_sdk/models/customfielddate.py new file mode 100644 index 0000000..6017a2e --- /dev/null +++ b/src/polar_sdk/models/customfielddate.py @@ -0,0 +1,104 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfielddateproperties import ( + CustomFieldDateProperties, + CustomFieldDatePropertiesTypedDict, +) +from datetime import datetime +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, TypedDict + + +class CustomFieldDateType(str, Enum): + DATE = "date" + + +class CustomFieldDateTypedDict(TypedDict): + r"""Schema for a custom field of type date.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + id: str + r"""The ID of the object.""" + metadata: Dict[str, str] + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + organization_id: str + r"""The ID of the organization owning the custom field.""" + properties: CustomFieldDatePropertiesTypedDict + type: CustomFieldDateType + + +class CustomFieldDate(BaseModel): + r"""Schema for a custom field of type date.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + + id: str + r"""The ID of the object.""" + + metadata: Dict[str, str] + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + organization_id: str + r"""The ID of the organization owning the custom field.""" + + properties: CustomFieldDateProperties + + TYPE: Annotated[ + Annotated[ + CustomFieldDateType, + AfterValidator(validate_const(CustomFieldDateType.DATE)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldDateType.DATE + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["modified_at"] + 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/customfielddateproperties.py b/src/polar_sdk/models/customfielddateproperties.py new file mode 100644 index 0000000..7f630d2 --- /dev/null +++ b/src/polar_sdk/models/customfielddateproperties.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from polar_sdk.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CustomFieldDatePropertiesTypedDict(TypedDict): + form_label: NotRequired[str] + form_help_text: NotRequired[str] + form_placeholder: NotRequired[str] + ge: NotRequired[int] + le: NotRequired[int] + + +class CustomFieldDateProperties(BaseModel): + form_label: Optional[str] = None + + form_help_text: Optional[str] = None + + form_placeholder: Optional[str] = None + + ge: Optional[int] = None + + le: Optional[int] = None diff --git a/src/polar_sdk/models/customfieldnumber.py b/src/polar_sdk/models/customfieldnumber.py new file mode 100644 index 0000000..afe7580 --- /dev/null +++ b/src/polar_sdk/models/customfieldnumber.py @@ -0,0 +1,104 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldnumberproperties import ( + CustomFieldNumberProperties, + CustomFieldNumberPropertiesTypedDict, +) +from datetime import datetime +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, TypedDict + + +class CustomFieldNumberType(str, Enum): + NUMBER = "number" + + +class CustomFieldNumberTypedDict(TypedDict): + r"""Schema for a custom field of type number.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + id: str + r"""The ID of the object.""" + metadata: Dict[str, str] + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + organization_id: str + r"""The ID of the organization owning the custom field.""" + properties: CustomFieldNumberPropertiesTypedDict + type: CustomFieldNumberType + + +class CustomFieldNumber(BaseModel): + r"""Schema for a custom field of type number.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + + id: str + r"""The ID of the object.""" + + metadata: Dict[str, str] + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + organization_id: str + r"""The ID of the organization owning the custom field.""" + + properties: CustomFieldNumberProperties + + TYPE: Annotated[ + Annotated[ + CustomFieldNumberType, + AfterValidator(validate_const(CustomFieldNumberType.NUMBER)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldNumberType.NUMBER + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["modified_at"] + 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/customfieldnumberproperties.py b/src/polar_sdk/models/customfieldnumberproperties.py new file mode 100644 index 0000000..41f37a2 --- /dev/null +++ b/src/polar_sdk/models/customfieldnumberproperties.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from polar_sdk.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CustomFieldNumberPropertiesTypedDict(TypedDict): + form_label: NotRequired[str] + form_help_text: NotRequired[str] + form_placeholder: NotRequired[str] + ge: NotRequired[int] + le: NotRequired[int] + + +class CustomFieldNumberProperties(BaseModel): + form_label: Optional[str] = None + + form_help_text: Optional[str] = None + + form_placeholder: Optional[str] = None + + ge: Optional[int] = None + + le: Optional[int] = None diff --git a/src/polar_sdk/models/customfieldselect.py b/src/polar_sdk/models/customfieldselect.py new file mode 100644 index 0000000..54644ad --- /dev/null +++ b/src/polar_sdk/models/customfieldselect.py @@ -0,0 +1,104 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldselectproperties import ( + CustomFieldSelectProperties, + CustomFieldSelectPropertiesTypedDict, +) +from datetime import datetime +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, TypedDict + + +class CustomFieldSelectType(str, Enum): + SELECT = "select" + + +class CustomFieldSelectTypedDict(TypedDict): + r"""Schema for a custom field of type select.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + id: str + r"""The ID of the object.""" + metadata: Dict[str, str] + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + organization_id: str + r"""The ID of the organization owning the custom field.""" + properties: CustomFieldSelectPropertiesTypedDict + type: CustomFieldSelectType + + +class CustomFieldSelect(BaseModel): + r"""Schema for a custom field of type select.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + + id: str + r"""The ID of the object.""" + + metadata: Dict[str, str] + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + organization_id: str + r"""The ID of the organization owning the custom field.""" + + properties: CustomFieldSelectProperties + + TYPE: Annotated[ + Annotated[ + CustomFieldSelectType, + AfterValidator(validate_const(CustomFieldSelectType.SELECT)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldSelectType.SELECT + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["modified_at"] + 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/customfieldselectoption.py b/src/polar_sdk/models/customfieldselectoption.py new file mode 100644 index 0000000..4ebfc88 --- /dev/null +++ b/src/polar_sdk/models/customfieldselectoption.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 typing_extensions import TypedDict + + +class CustomFieldSelectOptionTypedDict(TypedDict): + value: str + label: str + + +class CustomFieldSelectOption(BaseModel): + value: str + + label: str diff --git a/src/polar_sdk/models/customfieldselectproperties.py b/src/polar_sdk/models/customfieldselectproperties.py new file mode 100644 index 0000000..2db0404 --- /dev/null +++ b/src/polar_sdk/models/customfieldselectproperties.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldselectoption import ( + CustomFieldSelectOption, + CustomFieldSelectOptionTypedDict, +) +from polar_sdk.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class CustomFieldSelectPropertiesTypedDict(TypedDict): + options: List[CustomFieldSelectOptionTypedDict] + form_label: NotRequired[str] + form_help_text: NotRequired[str] + form_placeholder: NotRequired[str] + + +class CustomFieldSelectProperties(BaseModel): + options: List[CustomFieldSelectOption] + + form_label: Optional[str] = None + + form_help_text: Optional[str] = None + + form_placeholder: Optional[str] = None diff --git a/src/polar_sdk/models/customfieldsortproperty.py b/src/polar_sdk/models/customfieldsortproperty.py new file mode 100644 index 0000000..34ea14d --- /dev/null +++ b/src/polar_sdk/models/customfieldsortproperty.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class CustomFieldSortProperty(str, Enum): + CREATED_AT = "created_at" + MINUS_CREATED_AT = "-created_at" + SLUG = "slug" + MINUS_SLUG = "-slug" + NAME = "name" + MINUS_NAME = "-name" + TYPE = "type" + MINUS_TYPE = "-type" diff --git a/src/polar_sdk/models/customfieldtext.py b/src/polar_sdk/models/customfieldtext.py new file mode 100644 index 0000000..52cab24 --- /dev/null +++ b/src/polar_sdk/models/customfieldtext.py @@ -0,0 +1,104 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldtextproperties import ( + CustomFieldTextProperties, + CustomFieldTextPropertiesTypedDict, +) +from datetime import datetime +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, TypedDict + + +class CustomFieldTextType(str, Enum): + TEXT = "text" + + +class CustomFieldTextTypedDict(TypedDict): + r"""Schema for a custom field of type text.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + id: str + r"""The ID of the object.""" + metadata: Dict[str, str] + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + name: str + r"""Name of the custom field.""" + organization_id: str + r"""The ID of the organization owning the custom field.""" + properties: CustomFieldTextPropertiesTypedDict + type: CustomFieldTextType + + +class CustomFieldText(BaseModel): + r"""Schema for a custom field of type text.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + + id: str + r"""The ID of the object.""" + + metadata: Dict[str, str] + + slug: str + r"""Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.""" + + name: str + r"""Name of the custom field.""" + + organization_id: str + r"""The ID of the organization owning the custom field.""" + + properties: CustomFieldTextProperties + + TYPE: Annotated[ + Annotated[ + CustomFieldTextType, + AfterValidator(validate_const(CustomFieldTextType.TEXT)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldTextType.TEXT + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["modified_at"] + 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/customfieldtextproperties.py b/src/polar_sdk/models/customfieldtextproperties.py new file mode 100644 index 0000000..19955a2 --- /dev/null +++ b/src/polar_sdk/models/customfieldtextproperties.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from polar_sdk.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CustomFieldTextPropertiesTypedDict(TypedDict): + form_label: NotRequired[str] + form_help_text: NotRequired[str] + form_placeholder: NotRequired[str] + textarea: NotRequired[bool] + min_length: NotRequired[int] + max_length: NotRequired[int] + + +class CustomFieldTextProperties(BaseModel): + form_label: Optional[str] = None + + form_help_text: Optional[str] = None + + form_placeholder: Optional[str] = None + + textarea: Optional[bool] = None + + min_length: Optional[int] = None + + max_length: Optional[int] = None diff --git a/src/polar_sdk/models/customfieldtype.py b/src/polar_sdk/models/customfieldtype.py new file mode 100644 index 0000000..5c5c769 --- /dev/null +++ b/src/polar_sdk/models/customfieldtype.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class CustomFieldType(str, Enum): + TEXT = "text" + NUMBER = "number" + DATE = "date" + CHECKBOX = "checkbox" + SELECT = "select" diff --git a/src/polar_sdk/models/customfieldupdate.py b/src/polar_sdk/models/customfieldupdate.py new file mode 100644 index 0000000..1fb7fce --- /dev/null +++ b/src/polar_sdk/models/customfieldupdate.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldupdatecheckbox import ( + CustomFieldUpdateCheckbox, + CustomFieldUpdateCheckboxTypedDict, +) +from .customfieldupdatedate import CustomFieldUpdateDate, CustomFieldUpdateDateTypedDict +from .customfieldupdatenumber import ( + CustomFieldUpdateNumber, + CustomFieldUpdateNumberTypedDict, +) +from .customfieldupdateselect import ( + CustomFieldUpdateSelect, + CustomFieldUpdateSelectTypedDict, +) +from .customfieldupdatetext import CustomFieldUpdateText, CustomFieldUpdateTextTypedDict +from polar_sdk.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Union +from typing_extensions import Annotated + + +CustomFieldUpdateTypedDict = Union[ + CustomFieldUpdateTextTypedDict, + CustomFieldUpdateNumberTypedDict, + CustomFieldUpdateDateTypedDict, + CustomFieldUpdateCheckboxTypedDict, + CustomFieldUpdateSelectTypedDict, +] + + +CustomFieldUpdate = Annotated[ + Union[ + Annotated[CustomFieldUpdateCheckbox, Tag("checkbox")], + Annotated[CustomFieldUpdateDate, Tag("date")], + Annotated[CustomFieldUpdateNumber, Tag("number")], + Annotated[CustomFieldUpdateSelect, Tag("select")], + Annotated[CustomFieldUpdateText, Tag("text")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] diff --git a/src/polar_sdk/models/customfieldupdatecheckbox.py b/src/polar_sdk/models/customfieldupdatecheckbox.py new file mode 100644 index 0000000..66c1e8e --- /dev/null +++ b/src/polar_sdk/models/customfieldupdatecheckbox.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldcheckboxproperties import ( + CustomFieldCheckboxProperties, + CustomFieldCheckboxPropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldUpdateCheckboxType(str, Enum): + CHECKBOX = "checkbox" + + +class CustomFieldUpdateCheckboxTypedDict(TypedDict): + r"""Schema to update a custom field of type checkbox.""" + + metadata: NotRequired[Nullable[Dict[str, str]]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + name: NotRequired[Nullable[str]] + slug: NotRequired[Nullable[str]] + type: CustomFieldUpdateCheckboxType + properties: NotRequired[Nullable[CustomFieldCheckboxPropertiesTypedDict]] + + +class CustomFieldUpdateCheckbox(BaseModel): + r"""Schema to update a custom field of type checkbox.""" + + metadata: OptionalNullable[Dict[str, str]] = UNSET + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + name: OptionalNullable[str] = UNSET + + slug: OptionalNullable[str] = UNSET + + TYPE: Annotated[ + Annotated[ + CustomFieldUpdateCheckboxType, + AfterValidator(validate_const(CustomFieldUpdateCheckboxType.CHECKBOX)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldUpdateCheckboxType.CHECKBOX + + properties: OptionalNullable[CustomFieldCheckboxProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "name", "slug", "properties"] + nullable_fields = ["metadata", "name", "slug", "properties"] + 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/customfieldupdatedate.py b/src/polar_sdk/models/customfieldupdatedate.py new file mode 100644 index 0000000..5624429 --- /dev/null +++ b/src/polar_sdk/models/customfieldupdatedate.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfielddateproperties import ( + CustomFieldDateProperties, + CustomFieldDatePropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldUpdateDateType(str, Enum): + DATE = "date" + + +class CustomFieldUpdateDateTypedDict(TypedDict): + r"""Schema to update a custom field of type date.""" + + metadata: NotRequired[Nullable[Dict[str, str]]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + name: NotRequired[Nullable[str]] + slug: NotRequired[Nullable[str]] + type: CustomFieldUpdateDateType + properties: NotRequired[Nullable[CustomFieldDatePropertiesTypedDict]] + + +class CustomFieldUpdateDate(BaseModel): + r"""Schema to update a custom field of type date.""" + + metadata: OptionalNullable[Dict[str, str]] = UNSET + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + name: OptionalNullable[str] = UNSET + + slug: OptionalNullable[str] = UNSET + + TYPE: Annotated[ + Annotated[ + CustomFieldUpdateDateType, + AfterValidator(validate_const(CustomFieldUpdateDateType.DATE)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldUpdateDateType.DATE + + properties: OptionalNullable[CustomFieldDateProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "name", "slug", "properties"] + nullable_fields = ["metadata", "name", "slug", "properties"] + 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/customfieldupdatenumber.py b/src/polar_sdk/models/customfieldupdatenumber.py new file mode 100644 index 0000000..e367c96 --- /dev/null +++ b/src/polar_sdk/models/customfieldupdatenumber.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldnumberproperties import ( + CustomFieldNumberProperties, + CustomFieldNumberPropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldUpdateNumberType(str, Enum): + NUMBER = "number" + + +class CustomFieldUpdateNumberTypedDict(TypedDict): + r"""Schema to update a custom field of type number.""" + + metadata: NotRequired[Nullable[Dict[str, str]]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + name: NotRequired[Nullable[str]] + slug: NotRequired[Nullable[str]] + type: CustomFieldUpdateNumberType + properties: NotRequired[Nullable[CustomFieldNumberPropertiesTypedDict]] + + +class CustomFieldUpdateNumber(BaseModel): + r"""Schema to update a custom field of type number.""" + + metadata: OptionalNullable[Dict[str, str]] = UNSET + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + name: OptionalNullable[str] = UNSET + + slug: OptionalNullable[str] = UNSET + + TYPE: Annotated[ + Annotated[ + CustomFieldUpdateNumberType, + AfterValidator(validate_const(CustomFieldUpdateNumberType.NUMBER)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldUpdateNumberType.NUMBER + + properties: OptionalNullable[CustomFieldNumberProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "name", "slug", "properties"] + nullable_fields = ["metadata", "name", "slug", "properties"] + 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/customfieldupdateselect.py b/src/polar_sdk/models/customfieldupdateselect.py new file mode 100644 index 0000000..62cd995 --- /dev/null +++ b/src/polar_sdk/models/customfieldupdateselect.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldselectproperties import ( + CustomFieldSelectProperties, + CustomFieldSelectPropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldUpdateSelectType(str, Enum): + SELECT = "select" + + +class CustomFieldUpdateSelectTypedDict(TypedDict): + r"""Schema to update a custom field of type select.""" + + metadata: NotRequired[Nullable[Dict[str, str]]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + name: NotRequired[Nullable[str]] + slug: NotRequired[Nullable[str]] + type: CustomFieldUpdateSelectType + properties: NotRequired[Nullable[CustomFieldSelectPropertiesTypedDict]] + + +class CustomFieldUpdateSelect(BaseModel): + r"""Schema to update a custom field of type select.""" + + metadata: OptionalNullable[Dict[str, str]] = UNSET + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + name: OptionalNullable[str] = UNSET + + slug: OptionalNullable[str] = UNSET + + TYPE: Annotated[ + Annotated[ + CustomFieldUpdateSelectType, + AfterValidator(validate_const(CustomFieldUpdateSelectType.SELECT)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldUpdateSelectType.SELECT + + properties: OptionalNullable[CustomFieldSelectProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "name", "slug", "properties"] + nullable_fields = ["metadata", "name", "slug", "properties"] + 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/customfieldupdatetext.py b/src/polar_sdk/models/customfieldupdatetext.py new file mode 100644 index 0000000..7e15455 --- /dev/null +++ b/src/polar_sdk/models/customfieldupdatetext.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfieldtextproperties import ( + CustomFieldTextProperties, + CustomFieldTextPropertiesTypedDict, +) +from enum import Enum +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomFieldUpdateTextType(str, Enum): + TEXT = "text" + + +class CustomFieldUpdateTextTypedDict(TypedDict): + r"""Schema to update a custom field of type text.""" + + metadata: NotRequired[Nullable[Dict[str, str]]] + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + name: NotRequired[Nullable[str]] + slug: NotRequired[Nullable[str]] + type: CustomFieldUpdateTextType + properties: NotRequired[Nullable[CustomFieldTextPropertiesTypedDict]] + + +class CustomFieldUpdateText(BaseModel): + r"""Schema to update a custom field of type text.""" + + metadata: OptionalNullable[Dict[str, str]] = UNSET + r"""Key-value object allowing you to store additional information. + + The key must be a string with a maximum length of **40 characters**. + The value must be a string with a maximum length of **500 characters**. + You can store up to **50 key-value pairs**. + """ + + name: OptionalNullable[str] = UNSET + + slug: OptionalNullable[str] = UNSET + + TYPE: Annotated[ + Annotated[ + CustomFieldUpdateTextType, + AfterValidator(validate_const(CustomFieldUpdateTextType.TEXT)), + ], + pydantic.Field(alias="type"), + ] = CustomFieldUpdateTextType.TEXT + + properties: OptionalNullable[CustomFieldTextProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata", "name", "slug", "properties"] + nullable_fields = ["metadata", "name", "slug", "properties"] + 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/listresource_.py b/src/polar_sdk/models/listresource_.py new file mode 100644 index 0000000..c8f416c --- /dev/null +++ b/src/polar_sdk/models/listresource_.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .customfield import CustomField, CustomFieldTypedDict +from .pagination import Pagination, PaginationTypedDict +from polar_sdk.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ListResourceTypedDict(TypedDict): + items: List[CustomFieldTypedDict] + pagination: PaginationTypedDict + + +class ListResource(BaseModel): + items: List[CustomField] + + pagination: Pagination diff --git a/src/polar_sdk/models/listresource_userbenefit_.py b/src/polar_sdk/models/listresource_userbenefit_.py index 37f4fa9..80dad24 100644 --- a/src/polar_sdk/models/listresource_userbenefit_.py +++ b/src/polar_sdk/models/listresource_userbenefit_.py @@ -36,11 +36,11 @@ UserBenefitTypedDict = Union[ BenefitArticlesSubscriberTypedDict, + BenefitAdsSubscriberTypedDict, BenefitDiscordSubscriberTypedDict, + BenefitCustomSubscriberTypedDict, BenefitGitHubRepositorySubscriberTypedDict, BenefitDownloadablesSubscriberTypedDict, - BenefitAdsSubscriberTypedDict, - BenefitCustomSubscriberTypedDict, BenefitLicenseKeysSubscriberTypedDict, ] diff --git a/src/polar_sdk/models/oauth2client.py b/src/polar_sdk/models/oauth2client.py index 6bd25e7..82da18b 100644 --- a/src/polar_sdk/models/oauth2client.py +++ b/src/polar_sdk/models/oauth2client.py @@ -73,7 +73,7 @@ class OAuth2Client(BaseModel): response_types: Optional[List[ResponseTypes]] = None scope: Optional[str] = ( - "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write" + "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write" ) client_uri: OptionalNullable[str] = UNSET diff --git a/src/polar_sdk/models/oauth2clientconfiguration.py b/src/polar_sdk/models/oauth2clientconfiguration.py index d73a722..f5d0e8c 100644 --- a/src/polar_sdk/models/oauth2clientconfiguration.py +++ b/src/polar_sdk/models/oauth2clientconfiguration.py @@ -52,7 +52,7 @@ class OAuth2ClientConfiguration(BaseModel): response_types: Optional[List[OAuth2ClientConfigurationResponseTypes]] = None scope: Optional[str] = ( - "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write" + "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write" ) client_uri: OptionalNullable[str] = UNSET diff --git a/src/polar_sdk/models/oauth2clientconfigurationupdate.py b/src/polar_sdk/models/oauth2clientconfigurationupdate.py index 60654c0..29f3d56 100644 --- a/src/polar_sdk/models/oauth2clientconfigurationupdate.py +++ b/src/polar_sdk/models/oauth2clientconfigurationupdate.py @@ -55,7 +55,7 @@ class OAuth2ClientConfigurationUpdate(BaseModel): response_types: Optional[List[OAuth2ClientConfigurationUpdateResponseTypes]] = None scope: Optional[str] = ( - "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write" + "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write" ) client_uri: OptionalNullable[str] = UNSET diff --git a/src/polar_sdk/models/order.py b/src/polar_sdk/models/order.py index 2a670d0..7372c35 100644 --- a/src/polar_sdk/models/order.py +++ b/src/polar_sdk/models/order.py @@ -9,8 +9,16 @@ from datetime import datetime from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL from pydantic import model_serializer -from typing import Dict -from typing_extensions import TypedDict +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class OrderCustomFieldDataTypedDict(TypedDict): + r"""Key-value object storing custom field values.""" + + +class OrderCustomFieldData(BaseModel): + r"""Key-value object storing custom field values.""" class OrderTypedDict(TypedDict): @@ -34,6 +42,8 @@ class OrderTypedDict(TypedDict): product: OrderProductTypedDict product_price: ProductPriceTypedDict subscription: Nullable[OrderSubscriptionTypedDict] + custom_field_data: NotRequired[OrderCustomFieldDataTypedDict] + r"""Key-value object storing custom field values.""" class Order(BaseModel): @@ -74,9 +84,12 @@ class Order(BaseModel): subscription: Nullable[OrderSubscription] + custom_field_data: Optional[OrderCustomFieldData] = None + r"""Key-value object storing custom field values.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] + optional_fields = ["custom_field_data"] nullable_fields = [ "modified_at", "subscription_id", diff --git a/src/polar_sdk/models/organizations_listop.py b/src/polar_sdk/models/organizations_listop.py index 4824be9..652927d 100644 --- a/src/polar_sdk/models/organizations_listop.py +++ b/src/polar_sdk/models/organizations_listop.py @@ -16,8 +16,6 @@ class OrganizationsListRequestTypedDict(TypedDict): slug: NotRequired[Nullable[str]] r"""Filter by slug.""" - is_member: NotRequired[Nullable[bool]] - r"""Filter by membership. If `true`, only organizations the user is a member of are returned. If `false`, only organizations the user is not a member of are returned.""" page: NotRequired[int] r"""Page number, defaults to 1.""" limit: NotRequired[int] @@ -33,12 +31,6 @@ class OrganizationsListRequest(BaseModel): ] = UNSET r"""Filter by slug.""" - is_member: Annotated[ - OptionalNullable[bool], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = UNSET - r"""Filter by membership. If `true`, only organizations the user is a member of are returned. If `false`, only organizations the user is not a member of are returned.""" - page: Annotated[ Optional[int], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -59,8 +51,8 @@ class OrganizationsListRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["slug", "is_member", "page", "limit", "sorting"] - nullable_fields = ["slug", "is_member", "sorting"] + optional_fields = ["slug", "page", "limit", "sorting"] + nullable_fields = ["slug", "sorting"] null_default_fields = [] serialized = handler(self) diff --git a/src/polar_sdk/models/polar_checkout_legacy_schemas_checkout.py b/src/polar_sdk/models/polar_checkout_legacy_schemas_checkout.py index 8237fa8..552c3c9 100644 --- a/src/polar_sdk/models/polar_checkout_legacy_schemas_checkout.py +++ b/src/polar_sdk/models/polar_checkout_legacy_schemas_checkout.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .product import Product, ProductTypedDict +from .checkoutproduct import CheckoutProduct, CheckoutProductTypedDict from .productprice import ProductPrice, ProductPriceTypedDict from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from pydantic import model_serializer @@ -15,8 +15,8 @@ class PolarCheckoutLegacySchemasCheckoutTypedDict(TypedDict): r"""The ID of the checkout.""" customer_email: Nullable[str] customer_name: Nullable[str] - product: ProductTypedDict - r"""A product.""" + product: CheckoutProductTypedDict + r"""Product data for a checkout session.""" product_price: ProductPriceTypedDict url: NotRequired[Nullable[str]] r"""URL the customer should be redirected to complete the purchase.""" @@ -32,8 +32,8 @@ class PolarCheckoutLegacySchemasCheckout(BaseModel): customer_name: Nullable[str] - product: Product - r"""A product.""" + product: CheckoutProduct + r"""Product data for a checkout session.""" product_price: ProductPrice diff --git a/src/polar_sdk/models/polar_checkout_schemas_checkout.py b/src/polar_sdk/models/polar_checkout_schemas_checkout.py index fc3daa3..f07389b 100644 --- a/src/polar_sdk/models/polar_checkout_schemas_checkout.py +++ b/src/polar_sdk/models/polar_checkout_schemas_checkout.py @@ -2,9 +2,15 @@ from __future__ import annotations from .address import Address, AddressTypedDict +from .attachedcustomfield import AttachedCustomField, AttachedCustomFieldTypedDict +from .checkoutproduct import ( + CheckoutProduct, + CheckoutProductInput, + CheckoutProductInputTypedDict, + CheckoutProductTypedDict, +) from .checkoutstatus import CheckoutStatus from .polar_enums_paymentprocessor import PolarEnumsPaymentProcessor -from .product import Product, ProductInput, ProductInputTypedDict, ProductTypedDict from .productprice import ProductPrice, ProductPriceTypedDict from datetime import datetime from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL @@ -12,8 +18,16 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Dict -from typing_extensions import Annotated, TypedDict +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PolarCheckoutSchemasCheckoutCustomFieldDataTypedDict(TypedDict): + r"""Key-value object storing custom field values.""" + + +class PolarCheckoutSchemasCheckoutCustomFieldData(BaseModel): + r"""Key-value object storing custom field values.""" class PaymentProcessorMetadataTypedDict(TypedDict): @@ -65,10 +79,13 @@ class PolarCheckoutSchemasCheckoutTypedDict(TypedDict): customer_tax_id: Nullable[str] payment_processor_metadata: PaymentProcessorMetadataTypedDict metadata: Dict[str, str] - product: ProductTypedDict - r"""A product.""" + product: CheckoutProductTypedDict + r"""Product data for a checkout session.""" product_price: ProductPriceTypedDict subscription_id: Nullable[str] + attached_custom_fields: List[AttachedCustomFieldTypedDict] + custom_field_data: NotRequired[PolarCheckoutSchemasCheckoutCustomFieldDataTypedDict] + r"""Key-value object storing custom field values.""" payment_processor: PolarEnumsPaymentProcessor @@ -137,13 +154,18 @@ class PolarCheckoutSchemasCheckout(BaseModel): metadata: Dict[str, str] - product: Product - r"""A product.""" + product: CheckoutProduct + r"""Product data for a checkout session.""" product_price: ProductPrice subscription_id: Nullable[str] + attached_custom_fields: List[AttachedCustomField] + + custom_field_data: Optional[PolarCheckoutSchemasCheckoutCustomFieldData] = None + r"""Key-value object storing custom field values.""" + PAYMENT_PROCESSOR: Annotated[ Annotated[ PolarEnumsPaymentProcessor, @@ -154,7 +176,7 @@ class PolarCheckoutSchemasCheckout(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] + optional_fields = ["custom_field_data"] nullable_fields = [ "modified_at", "embed_origin", @@ -238,10 +260,13 @@ class PolarCheckoutSchemasCheckoutInputTypedDict(TypedDict): customer_tax_id: Nullable[str] payment_processor_metadata: PaymentProcessorMetadataTypedDict metadata: Dict[str, str] - product: ProductInputTypedDict - r"""A product.""" + product: CheckoutProductInputTypedDict + r"""Product data for a checkout session.""" product_price: ProductPriceTypedDict subscription_id: Nullable[str] + attached_custom_fields: List[AttachedCustomFieldTypedDict] + custom_field_data: NotRequired[PolarCheckoutSchemasCheckoutCustomFieldDataTypedDict] + r"""Key-value object storing custom field values.""" payment_processor: PolarEnumsPaymentProcessor @@ -310,13 +335,18 @@ class PolarCheckoutSchemasCheckoutInput(BaseModel): metadata: Dict[str, str] - product: ProductInput - r"""A product.""" + product: CheckoutProductInput + r"""Product data for a checkout session.""" product_price: ProductPrice subscription_id: Nullable[str] + attached_custom_fields: List[AttachedCustomField] + + custom_field_data: Optional[PolarCheckoutSchemasCheckoutCustomFieldData] = None + r"""Key-value object storing custom field values.""" + PAYMENT_PROCESSOR: Annotated[ Annotated[ PolarEnumsPaymentProcessor, @@ -327,7 +357,7 @@ class PolarCheckoutSchemasCheckoutInput(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] + optional_fields = ["custom_field_data"] nullable_fields = [ "modified_at", "embed_origin", diff --git a/src/polar_sdk/models/polar_checkout_schemas_checkoutcreate.py b/src/polar_sdk/models/polar_checkout_schemas_checkoutcreate.py index 75b40b9..2d041af 100644 --- a/src/polar_sdk/models/polar_checkout_schemas_checkoutcreate.py +++ b/src/polar_sdk/models/polar_checkout_schemas_checkoutcreate.py @@ -12,6 +12,14 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PolarCheckoutSchemasCheckoutCreateCustomFieldDataTypedDict(TypedDict): + r"""Key-value object storing custom field values.""" + + +class PolarCheckoutSchemasCheckoutCreateCustomFieldData(BaseModel): + r"""Key-value object storing custom field values.""" + + class PaymentProcessor(str, Enum): r"""Payment processor to use. Currently only Stripe is supported.""" @@ -34,6 +42,10 @@ class PolarCheckoutSchemasCheckoutCreateTypedDict(TypedDict): The value must be a string with a maximum length of **500 characters**. You can store up to **50 key-value pairs**. """ + custom_field_data: NotRequired[ + PolarCheckoutSchemasCheckoutCreateCustomFieldDataTypedDict + ] + r"""Key-value object storing custom field values.""" payment_processor: PaymentProcessor r"""Payment processor to use. Currently only Stripe is supported.""" amount: NotRequired[Nullable[int]] @@ -66,6 +78,11 @@ class PolarCheckoutSchemasCheckoutCreate(BaseModel): You can store up to **50 key-value pairs**. """ + custom_field_data: Optional[PolarCheckoutSchemasCheckoutCreateCustomFieldData] = ( + None + ) + r"""Key-value object storing custom field values.""" + PAYMENT_PROCESSOR: Annotated[ Annotated[ PaymentProcessor, AfterValidator(validate_const(PaymentProcessor.STRIPE)) @@ -96,6 +113,7 @@ class PolarCheckoutSchemasCheckoutCreate(BaseModel): def serialize_model(self, handler): optional_fields = [ "metadata", + "custom_field_data", "amount", "customer_name", "customer_email", diff --git a/src/polar_sdk/models/product.py b/src/polar_sdk/models/product.py index c9f0827..ad5ce6e 100644 --- a/src/polar_sdk/models/product.py +++ b/src/polar_sdk/models/product.py @@ -1,28 +1,17 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict -from .benefitbase import BenefitBase, BenefitBaseTypedDict -from .productmediafileread import ( - ProductMediaFileRead, - ProductMediaFileReadInput, - ProductMediaFileReadInputTypedDict, - ProductMediaFileReadTypedDict, -) +from .attachedcustomfield import AttachedCustomField, AttachedCustomFieldTypedDict +from .benefit import Benefit, BenefitTypedDict +from .productmediafileread import ProductMediaFileRead, ProductMediaFileReadTypedDict from .productprice import ProductPrice, ProductPriceTypedDict from datetime import datetime from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL from pydantic import model_serializer -from typing import List, Union +from typing import List from typing_extensions import TypedDict -ProductBenefitsTypedDict = Union[BenefitBaseTypedDict, BenefitArticlesTypedDict] - - -ProductBenefits = Union[BenefitBase, BenefitArticles] - - class ProductTypedDict(TypedDict): r"""A product.""" @@ -43,11 +32,13 @@ class ProductTypedDict(TypedDict): organization_id: str r"""The ID of the organization owning the product.""" prices: List[ProductPriceTypedDict] - r"""List of available prices for this product.""" - benefits: List[ProductBenefitsTypedDict] - r"""The benefits granted by the product.""" + r"""List of prices for this product.""" + benefits: List[BenefitTypedDict] + r"""List of benefits granted by the product.""" medias: List[ProductMediaFileReadTypedDict] - r"""The medias associated to the product.""" + r"""List of medias associated to the product.""" + attached_custom_fields: List[AttachedCustomFieldTypedDict] + r"""List of custom fields attached to the product.""" class Product(BaseModel): @@ -78,107 +69,16 @@ class Product(BaseModel): r"""The ID of the organization owning the product.""" prices: List[ProductPrice] - r"""List of available prices for this product.""" + r"""List of prices for this product.""" - benefits: List[ProductBenefits] - r"""The benefits granted by the product.""" + benefits: List[Benefit] + r"""List of benefits granted by the product.""" medias: List[ProductMediaFileRead] - r"""The medias associated to the product.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["modified_at", "description"] - 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 - - -class ProductInputTypedDict(TypedDict): - r"""A product.""" - - created_at: datetime - r"""Creation timestamp of the object.""" - modified_at: Nullable[datetime] - r"""Last modification timestamp of the object.""" - id: str - r"""The ID of the product.""" - name: str - r"""The name of the product.""" - description: Nullable[str] - r"""The description of the product.""" - is_recurring: bool - r"""Whether the product is a subscription tier.""" - is_archived: bool - r"""Whether the product is archived and no longer available.""" - organization_id: str - r"""The ID of the organization owning the product.""" - prices: List[ProductPriceTypedDict] - r"""List of available prices for this product.""" - benefits: List[ProductBenefitsTypedDict] - r"""The benefits granted by the product.""" - medias: List[ProductMediaFileReadInputTypedDict] - r"""The medias associated to the product.""" - - -class ProductInput(BaseModel): - r"""A product.""" - - created_at: datetime - r"""Creation timestamp of the object.""" - - modified_at: Nullable[datetime] - r"""Last modification timestamp of the object.""" - - id: str - r"""The ID of the product.""" - - name: str - r"""The name of the product.""" - - description: Nullable[str] - r"""The description of the product.""" - - is_recurring: bool - r"""Whether the product is a subscription tier.""" - - is_archived: bool - r"""Whether the product is archived and no longer available.""" - - organization_id: str - r"""The ID of the organization owning the product.""" - - prices: List[ProductPrice] - r"""List of available prices for this product.""" - - benefits: List[ProductBenefits] - r"""The benefits granted by the product.""" + r"""List of medias associated to the product.""" - medias: List[ProductMediaFileReadInput] - r"""The medias associated to the product.""" + attached_custom_fields: List[AttachedCustomField] + r"""List of custom fields attached to the product.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/polar_sdk/models/product_input.py b/src/polar_sdk/models/product_input.py new file mode 100644 index 0000000..3fdf158 --- /dev/null +++ b/src/polar_sdk/models/product_input.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .attachedcustomfield import AttachedCustomField, AttachedCustomFieldTypedDict +from .benefit_input import BenefitInput, BenefitInputTypedDict +from .productmediafileread import ( + ProductMediaFileReadInput, + ProductMediaFileReadInputTypedDict, +) +from .productprice import ProductPrice, ProductPriceTypedDict +from datetime import datetime +from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class ProductInputTypedDict(TypedDict): + r"""A product.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + id: str + r"""The ID of the product.""" + name: str + r"""The name of the product.""" + description: Nullable[str] + r"""The description of the product.""" + is_recurring: bool + r"""Whether the product is a subscription tier.""" + is_archived: bool + r"""Whether the product is archived and no longer available.""" + organization_id: str + r"""The ID of the organization owning the product.""" + prices: List[ProductPriceTypedDict] + r"""List of prices for this product.""" + benefits: List[BenefitInputTypedDict] + r"""List of benefits granted by the product.""" + medias: List[ProductMediaFileReadInputTypedDict] + r"""List of medias associated to the product.""" + attached_custom_fields: List[AttachedCustomFieldTypedDict] + r"""List of custom fields attached to the product.""" + + +class ProductInput(BaseModel): + r"""A product.""" + + created_at: datetime + r"""Creation timestamp of the object.""" + + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + + id: str + r"""The ID of the product.""" + + name: str + r"""The name of the product.""" + + description: Nullable[str] + r"""The description of the product.""" + + is_recurring: bool + r"""Whether the product is a subscription tier.""" + + is_archived: bool + r"""Whether the product is archived and no longer available.""" + + organization_id: str + r"""The ID of the organization owning the product.""" + + prices: List[ProductPrice] + r"""List of prices for this product.""" + + benefits: List[BenefitInput] + r"""List of benefits granted by the product.""" + + medias: List[ProductMediaFileReadInput] + r"""List of medias associated to the product.""" + + attached_custom_fields: List[AttachedCustomField] + r"""List of custom fields attached to the product.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["modified_at", "description"] + 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/productonetimecreate.py b/src/polar_sdk/models/productonetimecreate.py index 0b930d0..3848c0d 100644 --- a/src/polar_sdk/models/productonetimecreate.py +++ b/src/polar_sdk/models/productonetimecreate.py @@ -1,6 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .attachedcustomfieldcreate import ( + AttachedCustomFieldCreate, + AttachedCustomFieldCreateTypedDict, +) from .productpriceonetimecustomcreate import ( ProductPriceOneTimeCustomCreate, ProductPriceOneTimeCustomCreateTypedDict, @@ -15,7 +19,7 @@ ) from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from pydantic import model_serializer -from typing import List, Union +from typing import List, Optional, Union from typing_extensions import NotRequired, TypedDict @@ -44,6 +48,8 @@ class ProductOneTimeCreateTypedDict(TypedDict): r"""The description of the product.""" medias: NotRequired[Nullable[List[str]]] r"""List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.""" + attached_custom_fields: NotRequired[List[AttachedCustomFieldCreateTypedDict]] + r"""List of custom fields to attach.""" organization_id: NotRequired[Nullable[str]] r"""The ID of the organization owning the product. **Required unless you use an organization token.**""" @@ -63,12 +69,20 @@ class ProductOneTimeCreate(BaseModel): medias: OptionalNullable[List[str]] = UNSET r"""List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.""" + attached_custom_fields: Optional[List[AttachedCustomFieldCreate]] = None + r"""List of custom fields to attach.""" + organization_id: OptionalNullable[str] = UNSET r"""The ID of the organization owning the product. **Required unless you use an organization token.**""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "medias", "organization_id"] + optional_fields = [ + "description", + "medias", + "attached_custom_fields", + "organization_id", + ] nullable_fields = ["description", "medias", "organization_id"] null_default_fields = [] diff --git a/src/polar_sdk/models/productrecurringcreate.py b/src/polar_sdk/models/productrecurringcreate.py index 40b1eef..11e5786 100644 --- a/src/polar_sdk/models/productrecurringcreate.py +++ b/src/polar_sdk/models/productrecurringcreate.py @@ -1,6 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .attachedcustomfieldcreate import ( + AttachedCustomFieldCreate, + AttachedCustomFieldCreateTypedDict, +) from .productpricerecurringfixedcreate import ( ProductPriceRecurringFixedCreate, ProductPriceRecurringFixedCreateTypedDict, @@ -11,7 +15,7 @@ ) from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from pydantic import model_serializer -from typing import List, Union +from typing import List, Optional, Union from typing_extensions import NotRequired, TypedDict @@ -39,6 +43,8 @@ class ProductRecurringCreateTypedDict(TypedDict): r"""The description of the product.""" medias: NotRequired[Nullable[List[str]]] r"""List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.""" + attached_custom_fields: NotRequired[List[AttachedCustomFieldCreateTypedDict]] + r"""List of custom fields to attach.""" organization_id: NotRequired[Nullable[str]] r"""The ID of the organization owning the product. **Required unless you use an organization token.**""" @@ -58,12 +64,20 @@ class ProductRecurringCreate(BaseModel): medias: OptionalNullable[List[str]] = UNSET r"""List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.""" + attached_custom_fields: Optional[List[AttachedCustomFieldCreate]] = None + r"""List of custom fields to attach.""" + organization_id: OptionalNullable[str] = UNSET r"""The ID of the organization owning the product. **Required unless you use an organization token.**""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "medias", "organization_id"] + optional_fields = [ + "description", + "medias", + "attached_custom_fields", + "organization_id", + ] nullable_fields = ["description", "medias", "organization_id"] null_default_fields = [] diff --git a/src/polar_sdk/models/products_listop.py b/src/polar_sdk/models/products_listop.py index 5c514a1..015c15a 100644 --- a/src/polar_sdk/models/products_listop.py +++ b/src/polar_sdk/models/products_listop.py @@ -11,11 +11,11 @@ ProductsListQueryParamOrganizationIDFilterTypedDict = Union[str, List[str]] -r"""Filter by organization ID. **Required unless you use an organization token.**""" +r"""Filter by organization ID.""" ProductsListQueryParamOrganizationIDFilter = Union[str, List[str]] -r"""Filter by organization ID. **Required unless you use an organization token.**""" +r"""Filter by organization ID.""" QueryParamBenefitIDFilterTypedDict = Union[str, List[str]] @@ -30,7 +30,7 @@ class ProductsListRequestTypedDict(TypedDict): organization_id: NotRequired[ Nullable[ProductsListQueryParamOrganizationIDFilterTypedDict] ] - r"""Filter by organization ID. **Required unless you use an organization token.**""" + r"""Filter by organization ID.""" query: NotRequired[Nullable[str]] r"""Filter by product name.""" is_archived: NotRequired[Nullable[bool]] @@ -52,7 +52,7 @@ class ProductsListRequest(BaseModel): OptionalNullable[ProductsListQueryParamOrganizationIDFilter], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Filter by organization ID. **Required unless you use an organization token.**""" + r"""Filter by organization ID.""" query: Annotated[ OptionalNullable[str], diff --git a/src/polar_sdk/models/productupdate.py b/src/polar_sdk/models/productupdate.py index ad2e133..fd8702e 100644 --- a/src/polar_sdk/models/productupdate.py +++ b/src/polar_sdk/models/productupdate.py @@ -1,6 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .attachedcustomfieldcreate import ( + AttachedCustomFieldCreate, + AttachedCustomFieldCreateTypedDict, +) from .existingproductprice import ExistingProductPrice, ExistingProductPriceTypedDict from .productpriceonetimecustomcreate import ( ProductPriceOneTimeCustomCreate, @@ -60,6 +64,9 @@ class ProductUpdateTypedDict(TypedDict): r"""List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object.""" medias: NotRequired[Nullable[List[str]]] r"""List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.""" + attached_custom_fields: NotRequired[ + Nullable[List[AttachedCustomFieldCreateTypedDict]] + ] class ProductUpdate(BaseModel): @@ -79,10 +86,26 @@ class ProductUpdate(BaseModel): medias: OptionalNullable[List[str]] = UNSET r"""List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.""" + attached_custom_fields: OptionalNullable[List[AttachedCustomFieldCreate]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["name", "description", "is_archived", "prices", "medias"] - nullable_fields = ["name", "description", "is_archived", "prices", "medias"] + optional_fields = [ + "name", + "description", + "is_archived", + "prices", + "medias", + "attached_custom_fields", + ] + nullable_fields = [ + "name", + "description", + "is_archived", + "prices", + "medias", + "attached_custom_fields", + ] null_default_fields = [] serialized = handler(self) diff --git a/src/polar_sdk/models/repository.py b/src/polar_sdk/models/repository.py index 619549a..908fb53 100644 --- a/src/polar_sdk/models/repository.py +++ b/src/polar_sdk/models/repository.py @@ -2,6 +2,7 @@ from __future__ import annotations from .externalorganization import ExternalOrganization, ExternalOrganizationTypedDict +from .organization import Organization, OrganizationTypedDict from .platforms import Platforms from .repositoryprofilesettings import ( RepositoryProfileSettings, @@ -26,6 +27,7 @@ class RepositoryTypedDict(TypedDict): profile_settings: Nullable[RepositoryProfileSettingsTypedDict] r"""Settings for the repository profile""" organization: ExternalOrganizationTypedDict + internal_organization: Nullable[OrganizationTypedDict] platform: Platforms @@ -49,6 +51,8 @@ class Repository(BaseModel): organization: ExternalOrganization + internal_organization: Nullable[Organization] + PLATFORM: Annotated[ Annotated[Platforms, AfterValidator(validate_const(Platforms.GITHUB))], pydantic.Field(alias="platform"), @@ -63,6 +67,7 @@ def serialize_model(self, handler): "license", "homepage", "profile_settings", + "internal_organization", ] null_default_fields = [] diff --git a/src/polar_sdk/models/subscription.py b/src/polar_sdk/models/subscription.py index f8f8b3c..7f6a923 100644 --- a/src/polar_sdk/models/subscription.py +++ b/src/polar_sdk/models/subscription.py @@ -2,6 +2,7 @@ from __future__ import annotations from .product import Product, ProductTypedDict +from .product_input import ProductInput, ProductInputTypedDict from .productpricerecurring import ProductPriceRecurring, ProductPriceRecurringTypedDict from .subscriptionrecurringinterval import SubscriptionRecurringInterval from .subscriptionstatus import SubscriptionStatus @@ -9,8 +10,16 @@ from datetime import datetime from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL from pydantic import model_serializer -from typing import Dict -from typing_extensions import TypedDict +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class SubscriptionCustomFieldDataTypedDict(TypedDict): + r"""Key-value object storing custom field values.""" + + +class SubscriptionCustomFieldData(BaseModel): + r"""Key-value object storing custom field values.""" class SubscriptionTypedDict(TypedDict): @@ -38,6 +47,8 @@ class SubscriptionTypedDict(TypedDict): product: ProductTypedDict r"""A product.""" price: ProductPriceRecurringTypedDict + custom_field_data: NotRequired[SubscriptionCustomFieldDataTypedDict] + r"""Key-value object storing custom field values.""" class Subscription(BaseModel): @@ -85,9 +96,128 @@ class Subscription(BaseModel): price: ProductPriceRecurring + custom_field_data: Optional[SubscriptionCustomFieldData] = None + r"""Key-value object storing custom field values.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["custom_field_data"] + nullable_fields = [ + "modified_at", + "amount", + "currency", + "current_period_end", + "started_at", + "ended_at", + "checkout_id", + ] + 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 + + +class SubscriptionInputTypedDict(TypedDict): + created_at: datetime + r"""Creation timestamp of the object.""" + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + id: str + r"""The ID of the object.""" + amount: Nullable[int] + currency: Nullable[str] + recurring_interval: SubscriptionRecurringInterval + status: SubscriptionStatus + current_period_start: datetime + current_period_end: Nullable[datetime] + cancel_at_period_end: bool + started_at: Nullable[datetime] + ended_at: Nullable[datetime] + user_id: str + product_id: str + price_id: str + checkout_id: Nullable[str] + metadata: Dict[str, str] + user: SubscriptionUserTypedDict + product: ProductInputTypedDict + r"""A product.""" + price: ProductPriceRecurringTypedDict + custom_field_data: NotRequired[SubscriptionCustomFieldDataTypedDict] + r"""Key-value object storing custom field values.""" + + +class SubscriptionInput(BaseModel): + created_at: datetime + r"""Creation timestamp of the object.""" + + modified_at: Nullable[datetime] + r"""Last modification timestamp of the object.""" + + id: str + r"""The ID of the object.""" + + amount: Nullable[int] + + currency: Nullable[str] + + recurring_interval: SubscriptionRecurringInterval + + status: SubscriptionStatus + + current_period_start: datetime + + current_period_end: Nullable[datetime] + + cancel_at_period_end: bool + + started_at: Nullable[datetime] + + ended_at: Nullable[datetime] + + user_id: str + + product_id: str + + price_id: str + + checkout_id: Nullable[str] + + metadata: Dict[str, str] + + user: SubscriptionUser + + product: ProductInput + r"""A product.""" + + price: ProductPriceRecurring + + custom_field_data: Optional[SubscriptionCustomFieldData] = None + r"""Key-value object storing custom field values.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] + optional_fields = ["custom_field_data"] nullable_fields = [ "modified_at", "amount", diff --git a/src/polar_sdk/models/subscription_input.py b/src/polar_sdk/models/subscription_input.py deleted file mode 100644 index 88e8212..0000000 --- a/src/polar_sdk/models/subscription_input.py +++ /dev/null @@ -1,124 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .product import ProductInput, ProductInputTypedDict -from .productpricerecurring import ProductPriceRecurring, ProductPriceRecurringTypedDict -from .subscriptionrecurringinterval import SubscriptionRecurringInterval -from .subscriptionstatus import SubscriptionStatus -from .subscriptionuser import SubscriptionUser, SubscriptionUserTypedDict -from datetime import datetime -from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Dict -from typing_extensions import TypedDict - - -class SubscriptionInputTypedDict(TypedDict): - created_at: datetime - r"""Creation timestamp of the object.""" - modified_at: Nullable[datetime] - r"""Last modification timestamp of the object.""" - id: str - r"""The ID of the object.""" - amount: Nullable[int] - currency: Nullable[str] - recurring_interval: SubscriptionRecurringInterval - status: SubscriptionStatus - current_period_start: datetime - current_period_end: Nullable[datetime] - cancel_at_period_end: bool - started_at: Nullable[datetime] - ended_at: Nullable[datetime] - user_id: str - product_id: str - price_id: str - checkout_id: Nullable[str] - metadata: Dict[str, str] - user: SubscriptionUserTypedDict - product: ProductInputTypedDict - r"""A product.""" - price: ProductPriceRecurringTypedDict - - -class SubscriptionInput(BaseModel): - created_at: datetime - r"""Creation timestamp of the object.""" - - modified_at: Nullable[datetime] - r"""Last modification timestamp of the object.""" - - id: str - r"""The ID of the object.""" - - amount: Nullable[int] - - currency: Nullable[str] - - recurring_interval: SubscriptionRecurringInterval - - status: SubscriptionStatus - - current_period_start: datetime - - current_period_end: Nullable[datetime] - - cancel_at_period_end: bool - - started_at: Nullable[datetime] - - ended_at: Nullable[datetime] - - user_id: str - - product_id: str - - price_id: str - - checkout_id: Nullable[str] - - metadata: Dict[str, str] - - user: SubscriptionUser - - product: ProductInput - r"""A product.""" - - price: ProductPriceRecurring - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "modified_at", - "amount", - "currency", - "current_period_end", - "started_at", - "ended_at", - "checkout_id", - ] - 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/userorderproduct.py b/src/polar_sdk/models/userorderproduct.py index 79744ec..d5db923 100644 --- a/src/polar_sdk/models/userorderproduct.py +++ b/src/polar_sdk/models/userorderproduct.py @@ -3,6 +3,7 @@ from __future__ import annotations from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict from .benefitbase import BenefitBase, BenefitBaseTypedDict +from .organization import Organization, OrganizationTypedDict from .productmediafileread import ProductMediaFileRead, ProductMediaFileReadTypedDict from .productprice import ProductPrice, ProductPriceTypedDict from datetime import datetime @@ -36,11 +37,12 @@ class UserOrderProductTypedDict(TypedDict): organization_id: str r"""The ID of the organization owning the product.""" prices: List[ProductPriceTypedDict] - r"""List of available prices for this product.""" + r"""List of prices for this product.""" benefits: List[BenefitsModelTypedDict] - r"""The benefits granted by the product.""" + r"""List of benefits granted by the product.""" medias: List[ProductMediaFileReadTypedDict] - r"""The medias associated to the product.""" + r"""List of medias associated to the product.""" + organization: OrganizationTypedDict class UserOrderProduct(BaseModel): @@ -69,13 +71,15 @@ class UserOrderProduct(BaseModel): r"""The ID of the organization owning the product.""" prices: List[ProductPrice] - r"""List of available prices for this product.""" + r"""List of prices for this product.""" benefits: List[BenefitsModel] - r"""The benefits granted by the product.""" + r"""List of benefits granted by the product.""" medias: List[ProductMediaFileRead] - r"""The medias associated to the product.""" + r"""List of medias associated to the product.""" + + organization: Organization @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/polar_sdk/models/users_benefits_getop.py b/src/polar_sdk/models/users_benefits_getop.py index 9e52aed..beca819 100644 --- a/src/polar_sdk/models/users_benefits_getop.py +++ b/src/polar_sdk/models/users_benefits_getop.py @@ -47,11 +47,11 @@ class UsersBenefitsGetRequest(BaseModel): UsersBenefitsGetResponseUsersBenefitsGetTypedDict = Union[ BenefitArticlesSubscriberTypedDict, + BenefitAdsSubscriberTypedDict, BenefitDiscordSubscriberTypedDict, + BenefitCustomSubscriberTypedDict, BenefitGitHubRepositorySubscriberTypedDict, BenefitDownloadablesSubscriberTypedDict, - BenefitAdsSubscriberTypedDict, - BenefitCustomSubscriberTypedDict, BenefitLicenseKeysSubscriberTypedDict, ] r"""Successful Response""" diff --git a/src/polar_sdk/models/usersubscriptionproduct.py b/src/polar_sdk/models/usersubscriptionproduct.py index 236cab7..be5f56b 100644 --- a/src/polar_sdk/models/usersubscriptionproduct.py +++ b/src/polar_sdk/models/usersubscriptionproduct.py @@ -3,6 +3,7 @@ from __future__ import annotations from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict from .benefitbase import BenefitBase, BenefitBaseTypedDict +from .organization import Organization, OrganizationTypedDict from .productmediafileread import ProductMediaFileRead, ProductMediaFileReadTypedDict from .productprice import ProductPrice, ProductPriceTypedDict from datetime import datetime @@ -38,11 +39,12 @@ class UserSubscriptionProductTypedDict(TypedDict): organization_id: str r"""The ID of the organization owning the product.""" prices: List[ProductPriceTypedDict] - r"""List of available prices for this product.""" + r"""List of prices for this product.""" benefits: List[UserSubscriptionProductBenefitsTypedDict] - r"""The benefits granted by the product.""" + r"""List of benefits granted by the product.""" medias: List[ProductMediaFileReadTypedDict] - r"""The medias associated to the product.""" + r"""List of medias associated to the product.""" + organization: OrganizationTypedDict class UserSubscriptionProduct(BaseModel): @@ -71,13 +73,15 @@ class UserSubscriptionProduct(BaseModel): r"""The ID of the organization owning the product.""" prices: List[ProductPrice] - r"""List of available prices for this product.""" + r"""List of prices for this product.""" benefits: List[UserSubscriptionProductBenefits] - r"""The benefits granted by the product.""" + r"""List of benefits granted by the product.""" medias: List[ProductMediaFileRead] - r"""The medias associated to the product.""" + r"""List of medias associated to the product.""" + + organization: Organization @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/polar_sdk/models/webhookproductcreatedpayload.py b/src/polar_sdk/models/webhookproductcreatedpayload.py index d1ee462..831469d 100644 --- a/src/polar_sdk/models/webhookproductcreatedpayload.py +++ b/src/polar_sdk/models/webhookproductcreatedpayload.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .product import ProductInput, ProductInputTypedDict +from .product_input import ProductInput, ProductInputTypedDict from enum import Enum from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const diff --git a/src/polar_sdk/models/webhookproductupdatedpayload.py b/src/polar_sdk/models/webhookproductupdatedpayload.py index b061e15..f5c3f2c 100644 --- a/src/polar_sdk/models/webhookproductupdatedpayload.py +++ b/src/polar_sdk/models/webhookproductupdatedpayload.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .product import ProductInput, ProductInputTypedDict +from .product_input import ProductInput, ProductInputTypedDict from enum import Enum from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const diff --git a/src/polar_sdk/models/webhooksubscriptionactivepayload.py b/src/polar_sdk/models/webhooksubscriptionactivepayload.py index 86f9427..2fd172d 100644 --- a/src/polar_sdk/models/webhooksubscriptionactivepayload.py +++ b/src/polar_sdk/models/webhooksubscriptionactivepayload.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict +from .subscription import SubscriptionInput, SubscriptionInputTypedDict from enum import Enum from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const diff --git a/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py b/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py index 7190e25..9b21670 100644 --- a/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py +++ b/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict +from .subscription import SubscriptionInput, SubscriptionInputTypedDict from enum import Enum from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const diff --git a/src/polar_sdk/models/webhooksubscriptioncreatedpayload.py b/src/polar_sdk/models/webhooksubscriptioncreatedpayload.py index 96f106c..c85e106 100644 --- a/src/polar_sdk/models/webhooksubscriptioncreatedpayload.py +++ b/src/polar_sdk/models/webhooksubscriptioncreatedpayload.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict +from .subscription import SubscriptionInput, SubscriptionInputTypedDict from enum import Enum from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const diff --git a/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py b/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py index 15c09a5..b62986a 100644 --- a/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py +++ b/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict +from .subscription import SubscriptionInput, SubscriptionInputTypedDict from enum import Enum from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const diff --git a/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py b/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py index 185e98b..6f8aae6 100644 --- a/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py +++ b/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .subscription_input import SubscriptionInput, SubscriptionInputTypedDict +from .subscription import SubscriptionInput, SubscriptionInputTypedDict from enum import Enum from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const diff --git a/src/polar_sdk/organizations.py b/src/polar_sdk/organizations.py index 1f314d1..1c5fd5f 100644 --- a/src/polar_sdk/organizations.py +++ b/src/polar_sdk/organizations.py @@ -13,7 +13,6 @@ def list( self, *, slug: OptionalNullable[str] = UNSET, - is_member: OptionalNullable[bool] = UNSET, page: Optional[int] = 1, limit: Optional[int] = 10, sorting: OptionalNullable[List[models.OrganizationSortProperty]] = UNSET, @@ -26,7 +25,6 @@ def list( List organizations. :param slug: Filter by slug. - :param is_member: Filter by membership. If `true`, only organizations the user is a member of are returned. If `false`, only organizations the user is not a member of are returned. :param page: Page number, defaults to 1. :param limit: Size of a page, defaults to 10. Maximum is 100. :param sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. @@ -44,7 +42,6 @@ def list( request = models.OrganizationsListRequest( slug=slug, - is_member=is_member, page=page, limit=limit, sorting=sorting, @@ -104,7 +101,6 @@ def next_func() -> Optional[models.OrganizationsListResponse]: return self.list( slug=slug, - is_member=is_member, page=next_page, limit=limit, sorting=sorting, @@ -141,7 +137,6 @@ async def list_async( self, *, slug: OptionalNullable[str] = UNSET, - is_member: OptionalNullable[bool] = UNSET, page: Optional[int] = 1, limit: Optional[int] = 10, sorting: OptionalNullable[List[models.OrganizationSortProperty]] = UNSET, @@ -154,7 +149,6 @@ async def list_async( List organizations. :param slug: Filter by slug. - :param is_member: Filter by membership. If `true`, only organizations the user is a member of are returned. If `false`, only organizations the user is not a member of are returned. :param page: Page number, defaults to 1. :param limit: Size of a page, defaults to 10. Maximum is 100. :param sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. @@ -172,7 +166,6 @@ async def list_async( request = models.OrganizationsListRequest( slug=slug, - is_member=is_member, page=page, limit=limit, sorting=sorting, @@ -232,7 +225,6 @@ def next_func() -> Optional[models.OrganizationsListResponse]: return self.list( slug=slug, - is_member=is_member, page=next_page, limit=limit, sorting=sorting, diff --git a/src/polar_sdk/products.py b/src/polar_sdk/products.py index 4b71dea..cb56faa 100644 --- a/src/polar_sdk/products.py +++ b/src/polar_sdk/products.py @@ -38,7 +38,7 @@ def list( List products. - :param organization_id: Filter by organization ID. **Required unless you use an organization token.** + :param organization_id: Filter by organization ID. :param query: Filter by product name. :param is_archived: Filter on archived products. :param is_recurring: Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. @@ -188,7 +188,7 @@ async def list_async( List products. - :param organization_id: Filter by organization ID. **Required unless you use an organization token.** + :param organization_id: Filter by organization ID. :param query: Filter by product name. :param is_archived: Filter on archived products. :param is_recurring: Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. diff --git a/src/polar_sdk/sdk.py b/src/polar_sdk/sdk.py index 3e86bdc..ba94367 100644 --- a/src/polar_sdk/sdk.py +++ b/src/polar_sdk/sdk.py @@ -13,6 +13,7 @@ from polar_sdk.benefits import Benefits from polar_sdk.checkout_links import CheckoutLinks from polar_sdk.checkouts import Checkouts +from polar_sdk.custom_fields import CustomFields from polar_sdk.external_organizations import ExternalOrganizations from polar_sdk.files import Files from polar_sdk.license_keys import LicenseKeys @@ -50,6 +51,7 @@ class Polar(BaseSDK): metrics: MetricsSDK license_keys: LicenseKeys checkout_links: CheckoutLinks + custom_fields: CustomFields def __init__( self, @@ -146,3 +148,4 @@ def _init_sdks(self): self.metrics = MetricsSDK(self.sdk_configuration) self.license_keys = LicenseKeys(self.sdk_configuration) self.checkout_links = CheckoutLinks(self.sdk_configuration) + self.custom_fields = CustomFields(self.sdk_configuration) diff --git a/src/polar_sdk/sdkconfiguration.py b/src/polar_sdk/sdkconfiguration.py index 8cee4cc..5340bfe 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.7.0" - gen_version: str = "2.445.1" - user_agent: str = "speakeasy-sdk/python 0.7.0 2.445.1 0.1.0 polar-sdk" + sdk_version: str = "0.7.1" + gen_version: str = "2.451.0" + user_agent: str = "speakeasy-sdk/python 0.7.1 2.451.0 0.1.0 polar-sdk" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None