diff --git a/.gitignore b/.gitignore index 4045ca01..417f0888 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.env +.env.local **/__pycache__/ **/.speakeasy/temp/ **/.speakeasy/logs/ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 9e482a90..8eec4918 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: 3721564a1db1b7a536d00f0f876a4abc + docChecksum: 49ddfc0c8803b87fc256e9762ba74fb2 docVersion: 0.1.0 - speakeasyVersion: 1.609.0 - generationVersion: 2.692.0 - releaseVersion: 0.23.0 - configChecksum: 60859e06b689b7e59770a13aa1ddec76 + speakeasyVersion: 1.615.2 + generationVersion: 2.698.4 + releaseVersion: 0.23.1 + configChecksum: 9e3d4839404aa139f527a844e995c547 repoURL: https://github.com/polarsource/polar-python.git installationURL: https://github.com/polarsource/polar-python.git published: true @@ -14,7 +14,7 @@ features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.5 - core: 5.20.3 + core: 5.20.4 customCodeRegions: 0.1.1 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 @@ -23,7 +23,7 @@ features: envVarSecurityUsage: 0.3.2 errorUnions: 1.0.2 flattening: 3.1.1 - globalSecurity: 3.0.3 + globalSecurity: 3.0.4 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.1.1 @@ -109,17 +109,22 @@ generatedFiles: - docs/models/benefitgithubrepositoryupdatemetadata.md - docs/models/benefitgrant.md - docs/models/benefitgrantcustomproperties.md + - docs/models/benefitgrantcustomwebhook.md - docs/models/benefitgrantdiscordproperties.md + - docs/models/benefitgrantdiscordwebhook.md - docs/models/benefitgrantdownloadablesproperties.md + - docs/models/benefitgrantdownloadableswebhook.md - docs/models/benefitgrantedevent.md - docs/models/benefitgranterror.md - docs/models/benefitgrantgithubrepositoryproperties.md - docs/models/benefitgrantgithubrepositorypropertiespermission.md + - docs/models/benefitgrantgithubrepositorywebhook.md - docs/models/benefitgrantlicensekeysproperties.md + - docs/models/benefitgrantlicensekeyswebhook.md - docs/models/benefitgrantmetadata.md - docs/models/benefitgrantmetercreditproperties.md + - docs/models/benefitgrantmetercreditwebhook.md - docs/models/benefitgrantwebhook.md - - docs/models/benefitgrantwebhookproperties.md - docs/models/benefitidfilter.md - docs/models/benefitlicensekeyactivationcreateproperties.md - docs/models/benefitlicensekeyactivationproperties.md @@ -181,6 +186,7 @@ generatedFiles: - docs/models/checkoutforbiddenerror.md - docs/models/checkoutidfilter.md - docs/models/checkoutlink.md + - docs/models/checkoutlinkcreate.md - docs/models/checkoutlinkcreateproduct.md - docs/models/checkoutlinkcreateproductmetadata.md - docs/models/checkoutlinkcreateproductprice.md @@ -192,7 +198,6 @@ generatedFiles: - docs/models/checkoutlinkproduct.md - docs/models/checkoutlinkproductmetadata.md - docs/models/checkoutlinkproductprices.md - - docs/models/checkoutlinkscreatecheckoutlinkcreate.md - docs/models/checkoutlinksdeleterequest.md - docs/models/checkoutlinksgetrequest.md - docs/models/checkoutlinkslistqueryparamorganizationidfilter.md @@ -751,7 +756,6 @@ generatedFiles: - docs/models/paymentsortproperty.md - docs/models/paymentstatus.md - docs/models/permission.md - - docs/models/previousproperties.md - docs/models/prices.md - docs/models/product.md - docs/models/productbenefitsupdate.md @@ -1033,14 +1037,20 @@ generatedFiles: - src/polar_sdk/models/benefitgithubrepositoryupdate.py - src/polar_sdk/models/benefitgrant.py - src/polar_sdk/models/benefitgrantcustomproperties.py + - src/polar_sdk/models/benefitgrantcustomwebhook.py - src/polar_sdk/models/benefitgrantdiscordproperties.py + - src/polar_sdk/models/benefitgrantdiscordwebhook.py - src/polar_sdk/models/benefitgrantdownloadablesproperties.py + - src/polar_sdk/models/benefitgrantdownloadableswebhook.py - src/polar_sdk/models/benefitgrantedevent.py - src/polar_sdk/models/benefitgranterror.py - src/polar_sdk/models/benefitgrantgithubrepositoryproperties.py + - src/polar_sdk/models/benefitgrantgithubrepositorywebhook.py - src/polar_sdk/models/benefitgrantlicensekeysproperties.py + - src/polar_sdk/models/benefitgrantlicensekeyswebhook.py - src/polar_sdk/models/benefitgrantmetadata.py - src/polar_sdk/models/benefitgrantmetercreditproperties.py + - src/polar_sdk/models/benefitgrantmetercreditwebhook.py - src/polar_sdk/models/benefitgrantwebhook.py - src/polar_sdk/models/benefitlicensekeyactivationcreateproperties.py - src/polar_sdk/models/benefitlicensekeyactivationproperties.py @@ -1072,7 +1082,6 @@ generatedFiles: - src/polar_sdk/models/cardpayment.py - src/polar_sdk/models/cardpaymentmetadata.py - src/polar_sdk/models/checkout.py - - src/polar_sdk/models/checkout_links_createop.py - src/polar_sdk/models/checkout_links_deleteop.py - src/polar_sdk/models/checkout_links_getop.py - src/polar_sdk/models/checkout_links_listop.py @@ -1086,6 +1095,7 @@ generatedFiles: - src/polar_sdk/models/checkoutdiscountpercentagerepeatduration.py - src/polar_sdk/models/checkoutforbiddenerror.py - src/polar_sdk/models/checkoutlink.py + - src/polar_sdk/models/checkoutlinkcreate.py - src/polar_sdk/models/checkoutlinkcreateproduct.py - src/polar_sdk/models/checkoutlinkcreateproductprice.py - src/polar_sdk/models/checkoutlinkcreateproducts.py @@ -1574,7 +1584,7 @@ examples: _endpointcheckout_created_post: speakeasy-default-endpointcheckout-created-post: requestBody: - application/json: {"type": "checkout.created", "data": {"created_at": "2023-02-15T15:44:21.478Z", "modified_at": "2023-09-13T08:36:46.434Z", "id": "", "payment_processor": "stripe", "status": "expired", "client_secret": "", "url": "https://whole-aftermath.net/", "expires_at": "2023-12-28T10:30:56.042Z", "success_url": "https://moral-premier.name/", "embed_origin": "", "amount": 929514, "discount_amount": 323773, "net_amount": 115799, "tax_amount": 97012, "total_amount": 859980, "currency": "Fiji Dollar", "product_id": "", "product_price_id": "", "discount_id": null, "allow_discount_codes": true, "require_billing_address": true, "is_discount_applicable": true, "is_free_product_price": true, "is_payment_required": true, "is_payment_setup_required": true, "is_payment_form_required": true, "customer_id": "", "is_business_customer": false, "customer_name": "", "customer_email": null, "customer_ip_address": null, "customer_billing_name": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {"key": "", "key1": "", "key2": ""}, "billing_address_fields": {"country": "required", "state": "disabled", "city": "required", "postal_code": "required", "line1": "required", "line2": "disabled"}, "metadata": {"key": false, "key1": false}, "external_customer_id": null, "customer_external_id": "", "products": [{"created_at": "2025-07-23T17:21:51.405Z", "modified_at": "2024-01-17T03:32:08.030Z", "id": "", "name": "", "description": "funny abscond fairly except slight", "recurring_interval": null, "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-09-13T08:36:46.434Z", "modified_at": "2023-10-05T12:55:46.428Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/log", "mime_type": "", "size": 982910, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-13T03:57:17.676Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-03-23T06:47:50.944Z", "size_readable": "", "public_url": "https://yummy-ocelot.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/log", "mime_type": "", "size": 982910, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-13T03:57:17.676Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-03-23T06:47:50.944Z", "size_readable": "", "public_url": "https://yummy-ocelot.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/log", "mime_type": "", "size": 982910, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-13T03:57:17.676Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-03-23T06:47:50.944Z", "size_readable": "", "public_url": "https://yummy-ocelot.biz/"}]}], "product": {"created_at": "2023-03-01T03:35:30.257Z", "modified_at": "2024-12-19T15:40:11.887Z", "id": "", "name": "", "description": "until joyful how", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-05-02T18:25:33.974Z", "modified_at": "2025-02-06T12:55:07.640Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 115799, "legacy": true}, {"created_at": "2025-07-31T12:54:47.590Z", "modified_at": "2023-01-11T22:31:47.320Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 203013, "maximum_amount": null, "preset_amount": 119260, "legacy": true}, {"created_at": "2024-04-06T18:48:21.449Z", "modified_at": null, "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}], "benefits": [{"id": "", "created_at": "2023-11-22T11:07:53.319Z", "modified_at": "2025-09-17T18:38:51.288Z", "type": "discord", "description": "brr now psst", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2023-11-22T11:07:53.319Z", "modified_at": "2025-09-17T18:38:51.288Z", "type": "discord", "description": "brr now psst", "selectable": true, "deletable": true, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2024-08-14T23:26:30.929Z", "modified_at": "2025-01-15T11:59:21.523Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 499786, "legacy": true}, "discount": {"duration": "repeating", "duration_in_months": 470604, "type": "fixed", "basis_points": 567071, "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-01-27T12:44:05.844Z", "modified_at": "2023-11-12T13:10:44.040Z", "id": "", "metadata": {"key": 833527, "key1": false}, "type": "number", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 786803, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-01-27T12:44:05.844Z", "modified_at": "2023-11-12T13:10:44.040Z", "id": "", "metadata": {"key": 833527, "key1": false}, "type": "number", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 786803, "required": false}], "customer_metadata": {}}} + application/json: {"type": "checkout.created", "timestamp": "2023-02-15T15:44:21.478Z", "data": {"created_at": "2023-02-15T15:44:21.478Z", "modified_at": "2023-09-13T08:36:46.434Z", "id": "", "payment_processor": "stripe", "status": "expired", "client_secret": "", "url": "https://whole-aftermath.net/", "expires_at": "2023-12-28T10:30:56.042Z", "success_url": "https://moral-premier.name/", "embed_origin": "", "amount": 929514, "discount_amount": 323773, "net_amount": 115799, "tax_amount": 97012, "total_amount": 859980, "currency": "Fiji Dollar", "product_id": "", "product_price_id": "", "discount_id": null, "allow_discount_codes": true, "require_billing_address": true, "is_discount_applicable": true, "is_free_product_price": true, "is_payment_required": true, "is_payment_setup_required": true, "is_payment_form_required": true, "customer_id": "", "is_business_customer": false, "customer_name": "", "customer_email": null, "customer_ip_address": null, "customer_billing_name": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {"key": "", "key1": "", "key2": ""}, "billing_address_fields": {"country": "required", "state": "disabled", "city": "required", "postal_code": "required", "line1": "required", "line2": "disabled"}, "metadata": {"key": false, "key1": false}, "external_customer_id": null, "customer_external_id": "", "products": [{"created_at": "2025-07-23T17:21:51.405Z", "modified_at": "2024-01-17T03:32:08.030Z", "id": "", "name": "", "description": "funny abscond fairly except slight", "recurring_interval": null, "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-09-13T08:36:46.434Z", "modified_at": "2023-10-05T12:55:46.428Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/log", "mime_type": "", "size": 982910, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-13T03:57:17.676Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-03-23T06:47:50.944Z", "size_readable": "", "public_url": "https://yummy-ocelot.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/log", "mime_type": "", "size": 982910, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-13T03:57:17.676Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-03-23T06:47:50.944Z", "size_readable": "", "public_url": "https://yummy-ocelot.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/log", "mime_type": "", "size": 982910, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-13T03:57:17.676Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-03-23T06:47:50.944Z", "size_readable": "", "public_url": "https://yummy-ocelot.biz/"}]}], "product": {"created_at": "2023-03-01T03:35:30.257Z", "modified_at": "2024-12-19T15:40:11.887Z", "id": "", "name": "", "description": "until joyful how", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-05-02T18:25:33.974Z", "modified_at": "2025-02-06T12:55:07.640Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 115799, "legacy": true}, {"created_at": "2025-07-31T12:54:47.590Z", "modified_at": "2023-01-11T22:31:47.320Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 203013, "maximum_amount": null, "preset_amount": 119260, "legacy": true}, {"created_at": "2024-04-06T18:48:21.449Z", "modified_at": null, "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}], "benefits": [{"id": "", "created_at": "2023-11-22T11:07:53.319Z", "modified_at": "2025-09-17T18:38:51.288Z", "type": "discord", "description": "brr now psst", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2023-11-22T11:07:53.319Z", "modified_at": "2025-09-17T18:38:51.288Z", "type": "discord", "description": "brr now psst", "selectable": true, "deletable": true, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2024-08-14T23:26:30.929Z", "modified_at": "2025-01-15T11:59:21.523Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 499786, "legacy": true}, "discount": {"duration": "repeating", "duration_in_months": 470604, "type": "fixed", "basis_points": 567071, "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-01-27T12:44:05.844Z", "modified_at": "2023-11-12T13:10:44.040Z", "id": "", "metadata": {"key": 833527, "key1": false}, "type": "number", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 786803, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-01-27T12:44:05.844Z", "modified_at": "2023-11-12T13:10:44.040Z", "id": "", "metadata": {"key": 833527, "key1": false}, "type": "number", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 786803, "required": false}], "customer_metadata": {}}} responses: "200": application/json: "" @@ -1583,7 +1593,7 @@ examples: _endpointcheckout_updated_post: speakeasy-default-endpointcheckout-updated-post: requestBody: - application/json: {"type": "checkout.updated", "data": {"created_at": "2023-03-19T05:40:46.816Z", "modified_at": "2025-01-17T21:45:54.449Z", "id": "", "payment_processor": "stripe", "status": "succeeded", "client_secret": "", "url": "https://wasteful-kinase.net/", "expires_at": "2024-07-13T07:40:45.762Z", "success_url": "https://unwieldy-lift.name", "embed_origin": "", "amount": 328864, "discount_amount": 67168, "net_amount": 710560, "tax_amount": 164230, "total_amount": 754328, "currency": "New Taiwan Dollar", "product_id": "", "product_price_id": "", "discount_id": "", "allow_discount_codes": true, "require_billing_address": true, "is_discount_applicable": true, "is_free_product_price": true, "is_payment_required": true, "is_payment_setup_required": false, "is_payment_form_required": true, "customer_id": null, "is_business_customer": false, "customer_name": "", "customer_email": "", "customer_ip_address": "", "customer_billing_name": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {}, "billing_address_fields": {"country": "required", "state": "optional", "city": "disabled", "postal_code": "optional", "line1": "required", "line2": "disabled"}, "metadata": {"key": 8729.81, "key1": "", "key2": 302746}, "external_customer_id": null, "customer_external_id": "", "products": [{"created_at": "2024-02-06T13:10:07.718Z", "modified_at": "2025-05-28T09:18:17.409Z", "id": "", "name": "", "description": "gee unlike aboard entice which break", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2025-01-17T21:45:54.449Z", "modified_at": "2024-01-01T01:21:07.047Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 720125, "legacy": true}, {"created_at": "2025-09-27T00:00:25.178Z", "modified_at": "2024-09-03T16:16:06.332Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}], "benefits": [{"id": "", "created_at": "2025-07-05T15:21:14.498Z", "modified_at": "2023-11-21T02:59:50.838Z", "type": "downloadables", "description": "highlight sandy overspend scratchy yet by", "selectable": true, "deletable": false, "organization_id": ""}], "medias": []}, {"created_at": "2024-02-06T13:10:07.718Z", "modified_at": "2025-05-28T09:18:17.409Z", "id": "", "name": "", "description": "gee unlike aboard entice which break", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-06-29T23:54:25.932Z", "modified_at": "2025-08-08T18:57:45.007Z", "id": "", "amount_type": "metered_unit", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "unit_amount": "", "cap_amount": null, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2024-04-12T18:30:19.906Z", "modified_at": null, "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}], "benefits": [{"id": "", "created_at": "2025-07-05T15:21:14.498Z", "modified_at": "2023-11-21T02:59:50.838Z", "type": "downloadables", "description": "highlight sandy overspend scratchy yet by", "selectable": true, "deletable": false, "organization_id": ""}], "medias": []}, {"created_at": "2024-02-06T13:10:07.718Z", "modified_at": "2025-05-28T09:18:17.409Z", "id": "", "name": "", "description": "gee unlike aboard entice which break", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2025-04-08T09:51:58.249Z", "modified_at": "2025-07-16T15:01:26.410Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}, {"created_at": "2023-11-28T19:26:30.837Z", "modified_at": "2025-10-14T04:57:44.285Z", "id": "", "amount_type": "fixed", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 801449, "legacy": true}], "benefits": [{"id": "", "created_at": "2025-07-05T15:21:14.498Z", "modified_at": "2023-11-21T02:59:50.838Z", "type": "downloadables", "description": "highlight sandy overspend scratchy yet by", "selectable": true, "deletable": false, "organization_id": ""}], "medias": []}], "product": {"created_at": "2024-04-04T09:43:29.328Z", "modified_at": "2024-01-03T07:24:30.583Z", "id": "", "name": "", "description": "patroller fax sadly sick bitterly indeed grandson bravely loyally wholly", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2025-11-27T17:16:31.119Z", "modified_at": "2025-06-04T15:43:18.802Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 72487, "legacy": true}, {"created_at": "2024-06-14T15:19:42.985Z", "modified_at": "2025-08-21T13:42:50.786Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}, {"created_at": "2025-02-06T04:48:01.265Z", "modified_at": "2024-01-15T02:31:30.334Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 849243, "maximum_amount": 295343, "preset_amount": 994380, "legacy": true}], "benefits": [{"id": "", "created_at": "2025-07-05T15:21:14.498Z", "modified_at": "2023-11-21T02:59:50.838Z", "type": "downloadables", "description": "highlight sandy overspend scratchy yet by", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 349206, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-11-20T22:00:21.061Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-01T19:20:04.513Z", "size_readable": "", "public_url": "https://noted-availability.info"}, {"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 349206, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-11-20T22:00:21.061Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-01T19:20:04.513Z", "size_readable": "", "public_url": "https://noted-availability.info"}, {"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 349206, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-11-20T22:00:21.061Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-01T19:20:04.513Z", "size_readable": "", "public_url": "https://noted-availability.info"}]}, "product_price": {"created_at": "2025-11-24T07:57:40.732Z", "modified_at": "2025-12-23T16:30:04.627Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}, "discount": {"duration": "once", "duration_in_months": 187379, "type": "fixed", "basis_points": 373595, "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-09-18T09:12:02.157Z", "modified_at": "2023-07-11T01:18:07.226Z", "id": "", "metadata": {"key": ""}, "type": "date", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 704552, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-09-18T09:12:02.157Z", "modified_at": "2023-07-11T01:18:07.226Z", "id": "", "metadata": {"key": ""}, "type": "date", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 704552, "required": true}], "customer_metadata": {"key": 384374, "key1": 126671, "key2": 568803}}} + application/json: {"type": "checkout.updated", "timestamp": "2023-03-19T05:40:46.816Z", "data": {"created_at": "2023-03-19T05:40:46.816Z", "modified_at": "2025-01-17T21:45:54.449Z", "id": "", "payment_processor": "stripe", "status": "succeeded", "client_secret": "", "url": "https://wasteful-kinase.net/", "expires_at": "2024-07-13T07:40:45.762Z", "success_url": "https://unwieldy-lift.name", "embed_origin": "", "amount": 328864, "discount_amount": 67168, "net_amount": 710560, "tax_amount": 164230, "total_amount": 754328, "currency": "New Taiwan Dollar", "product_id": "", "product_price_id": "", "discount_id": "", "allow_discount_codes": true, "require_billing_address": true, "is_discount_applicable": true, "is_free_product_price": true, "is_payment_required": true, "is_payment_setup_required": false, "is_payment_form_required": true, "customer_id": null, "is_business_customer": false, "customer_name": "", "customer_email": "", "customer_ip_address": "", "customer_billing_name": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {}, "billing_address_fields": {"country": "required", "state": "optional", "city": "disabled", "postal_code": "optional", "line1": "required", "line2": "disabled"}, "metadata": {"key": 8729.81, "key1": "", "key2": 302746}, "external_customer_id": null, "customer_external_id": "", "products": [{"created_at": "2024-02-06T13:10:07.718Z", "modified_at": "2025-05-28T09:18:17.409Z", "id": "", "name": "", "description": "gee unlike aboard entice which break", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2025-01-17T21:45:54.449Z", "modified_at": "2024-01-01T01:21:07.047Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 720125, "legacy": true}, {"created_at": "2025-09-27T00:00:25.178Z", "modified_at": "2024-09-03T16:16:06.332Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}], "benefits": [{"id": "", "created_at": "2025-07-05T15:21:14.498Z", "modified_at": "2023-11-21T02:59:50.838Z", "type": "downloadables", "description": "highlight sandy overspend scratchy yet by", "selectable": true, "deletable": false, "organization_id": ""}], "medias": []}, {"created_at": "2024-02-06T13:10:07.718Z", "modified_at": "2025-05-28T09:18:17.409Z", "id": "", "name": "", "description": "gee unlike aboard entice which break", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-06-29T23:54:25.932Z", "modified_at": "2025-08-08T18:57:45.007Z", "id": "", "amount_type": "metered_unit", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "unit_amount": "", "cap_amount": null, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2024-04-12T18:30:19.906Z", "modified_at": null, "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}], "benefits": [{"id": "", "created_at": "2025-07-05T15:21:14.498Z", "modified_at": "2023-11-21T02:59:50.838Z", "type": "downloadables", "description": "highlight sandy overspend scratchy yet by", "selectable": true, "deletable": false, "organization_id": ""}], "medias": []}, {"created_at": "2024-02-06T13:10:07.718Z", "modified_at": "2025-05-28T09:18:17.409Z", "id": "", "name": "", "description": "gee unlike aboard entice which break", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2025-04-08T09:51:58.249Z", "modified_at": "2025-07-16T15:01:26.410Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}, {"created_at": "2023-11-28T19:26:30.837Z", "modified_at": "2025-10-14T04:57:44.285Z", "id": "", "amount_type": "fixed", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 801449, "legacy": true}], "benefits": [{"id": "", "created_at": "2025-07-05T15:21:14.498Z", "modified_at": "2023-11-21T02:59:50.838Z", "type": "downloadables", "description": "highlight sandy overspend scratchy yet by", "selectable": true, "deletable": false, "organization_id": ""}], "medias": []}], "product": {"created_at": "2024-04-04T09:43:29.328Z", "modified_at": "2024-01-03T07:24:30.583Z", "id": "", "name": "", "description": "patroller fax sadly sick bitterly indeed grandson bravely loyally wholly", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2025-11-27T17:16:31.119Z", "modified_at": "2025-06-04T15:43:18.802Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 72487, "legacy": true}, {"created_at": "2024-06-14T15:19:42.985Z", "modified_at": "2025-08-21T13:42:50.786Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}, {"created_at": "2025-02-06T04:48:01.265Z", "modified_at": "2024-01-15T02:31:30.334Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 849243, "maximum_amount": 295343, "preset_amount": 994380, "legacy": true}], "benefits": [{"id": "", "created_at": "2025-07-05T15:21:14.498Z", "modified_at": "2023-11-21T02:59:50.838Z", "type": "downloadables", "description": "highlight sandy overspend scratchy yet by", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 349206, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-11-20T22:00:21.061Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-01T19:20:04.513Z", "size_readable": "", "public_url": "https://noted-availability.info"}, {"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 349206, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-11-20T22:00:21.061Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-01T19:20:04.513Z", "size_readable": "", "public_url": "https://noted-availability.info"}, {"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 349206, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-11-20T22:00:21.061Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-01T19:20:04.513Z", "size_readable": "", "public_url": "https://noted-availability.info"}]}, "product_price": {"created_at": "2025-11-24T07:57:40.732Z", "modified_at": "2025-12-23T16:30:04.627Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}, "discount": {"duration": "once", "duration_in_months": 187379, "type": "fixed", "basis_points": 373595, "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-09-18T09:12:02.157Z", "modified_at": "2023-07-11T01:18:07.226Z", "id": "", "metadata": {"key": ""}, "type": "date", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 704552, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-09-18T09:12:02.157Z", "modified_at": "2023-07-11T01:18:07.226Z", "id": "", "metadata": {"key": ""}, "type": "date", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 704552, "required": true}], "customer_metadata": {"key": 384374, "key1": 126671, "key2": 568803}}} responses: "200": application/json: "" @@ -1592,7 +1602,7 @@ examples: _endpointcustomer_created_post: speakeasy-default-endpointcustomer-created-post: requestBody: - application/json: {"type": "customer.created", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-10-24T17:37:29.711Z", "modified_at": "2025-07-16T19:46:09.413Z", "metadata": {"key": "", "key1": 9709.6}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": null, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-10-26T06:10:46.111Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}} + application/json: {"type": "customer.created", "timestamp": "2025-10-24T17:37:29.711Z", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-10-24T17:37:29.711Z", "modified_at": "2025-07-16T19:46:09.413Z", "metadata": {"key": "", "key1": 9709.6}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": null, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-10-26T06:10:46.111Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}} responses: "200": application/json: "" @@ -1601,7 +1611,7 @@ examples: _endpointcustomer_updated_post: speakeasy-default-endpointcustomer-updated-post: requestBody: - application/json: {"type": "customer.updated", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-07-09T20:22:33.716Z", "modified_at": "2024-10-16T21:39:43.150Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-12-14T00:37:03.564Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}} + application/json: {"type": "customer.updated", "timestamp": "2023-07-09T20:22:33.716Z", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-07-09T20:22:33.716Z", "modified_at": "2024-10-16T21:39:43.150Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-12-14T00:37:03.564Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}} responses: "200": application/json: "" @@ -1610,7 +1620,7 @@ examples: _endpointcustomer_deleted_post: speakeasy-default-endpointcustomer-deleted-post: requestBody: - application/json: {"type": "customer.deleted", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-07-12T21:40:34.752Z", "modified_at": "2025-02-26T09:36:28.870Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-07-08T00:32:27.730Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}} + application/json: {"type": "customer.deleted", "timestamp": "2023-07-12T21:40:34.752Z", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-07-12T21:40:34.752Z", "modified_at": "2025-02-26T09:36:28.870Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-07-08T00:32:27.730Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}} responses: "200": application/json: "" @@ -1619,7 +1629,7 @@ examples: _endpointcustomer_state_changed_post: speakeasy-default-endpointcustomer-state-changed-post: requestBody: - application/json: {"type": "customer.state_changed", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-05-22T16:03:32.369Z", "modified_at": "2023-04-17T22:11:17.879Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-09-08T18:19:10.187Z", "active_subscriptions": [{"id": "e5149aae-e521-42b9-b24c-abb3d71eea2e", "created_at": "2025-06-22T09:12:55.079Z", "modified_at": "2025-03-01T22:24:58.561Z", "metadata": {"key": true}, "status": "active", "amount": 1000, "currency": "usd", "recurring_interval": "year", "current_period_start": "2025-02-03T13:37:00Z", "current_period_end": "2025-03-03T13:37:00Z", "cancel_at_period_end": false, "canceled_at": null, "started_at": "2025-01-03T13:37:00Z", "ends_at": null, "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23", "discount_id": null, "meters": []}], "granted_benefits": [], "active_meters": [{"id": "", "created_at": "2023-10-04T09:01:19.436Z", "modified_at": "2025-07-31T21:26:56.213Z", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75}, {"id": "", "created_at": "2023-10-04T09:01:19.436Z", "modified_at": "2025-07-31T21:26:56.213Z", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75}], "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}} + application/json: {"type": "customer.state_changed", "timestamp": "2025-05-22T16:03:32.369Z", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-05-22T16:03:32.369Z", "modified_at": "2023-04-17T22:11:17.879Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-09-08T18:19:10.187Z", "active_subscriptions": [{"id": "e5149aae-e521-42b9-b24c-abb3d71eea2e", "created_at": "2025-06-22T09:12:55.079Z", "modified_at": "2025-03-01T22:24:58.561Z", "metadata": {"key": true}, "status": "active", "amount": 1000, "currency": "usd", "recurring_interval": "year", "current_period_start": "2025-02-03T13:37:00Z", "current_period_end": "2025-03-03T13:37:00Z", "cancel_at_period_end": false, "canceled_at": null, "started_at": "2025-01-03T13:37:00Z", "ends_at": null, "product_id": "d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23", "discount_id": null, "meters": []}], "granted_benefits": [], "active_meters": [{"id": "", "created_at": "2023-10-04T09:01:19.436Z", "modified_at": "2025-07-31T21:26:56.213Z", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75}, {"id": "", "created_at": "2023-10-04T09:01:19.436Z", "modified_at": "2025-07-31T21:26:56.213Z", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75}], "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}} responses: "200": application/json: "" @@ -1628,7 +1638,7 @@ examples: _endpointorder_created_post: speakeasy-default-endpointorder-created-post: requestBody: - application/json: {"type": "order.created", "data": {"id": "", "created_at": "2024-08-21T06:55:49.348Z", "modified_at": null, "status": "refunded", "paid": true, "subtotal_amount": 952546, "discount_amount": 47294, "net_amount": 220865, "tax_amount": 913636, "total_amount": 727987, "refunded_amount": 597376, "refunded_tax_amount": 864844, "currency": "Kip", "billing_reason": "subscription_cycle", "billing_name": "", "billing_address": {"country": "US"}, "is_invoice_generated": true, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": true, "key1": 2184.01, "key2": ""}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-11-07T09:52:21.455Z", "modified_at": "2025-06-03T19:46:15.179Z", "metadata": {"key": 526331}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-10-25T07:11:48.501Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "user_id": "", "product": {"metadata": {}, "created_at": "2025-02-09T20:19:15.400Z", "modified_at": "2023-03-30T07:05:37.419Z", "id": "", "name": "", "description": "against outbid to petty yeast off meanwhile colonialism", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": ""}, "discount": {"duration": "repeating", "duration_in_months": 425196, "type": "fixed", "amount": 778891, "currency": "Armenian Dram", "created_at": "2023-03-20T16:46:25.677Z", "modified_at": "2023-03-06T18:58:41.541Z", "id": "", "metadata": {"key": 298954}, "name": "", "code": "", "starts_at": "2023-04-08T15:39:19.572Z", "ends_at": "2024-01-04T15:31:18.185Z", "max_redemptions": 313467, "redemptions_count": 237254, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": null, "items": [{"created_at": "2023-10-09T05:35:46.860Z", "modified_at": "2025-11-19T12:55:15.055Z", "id": "", "label": "", "amount": 921740, "tax_amount": 964357, "proration": true, "product_price_id": ""}, {"created_at": "2023-10-09T05:35:46.860Z", "modified_at": "2025-11-19T12:55:15.055Z", "id": "", "label": "", "amount": 921740, "tax_amount": 964357, "proration": true, "product_price_id": ""}]}} + application/json: {"type": "order.created", "timestamp": "2024-08-21T06:55:49.348Z", "data": {"id": "", "created_at": "2024-08-21T06:55:49.348Z", "modified_at": null, "status": "refunded", "paid": true, "subtotal_amount": 952546, "discount_amount": 47294, "net_amount": 220865, "tax_amount": 913636, "total_amount": 727987, "refunded_amount": 597376, "refunded_tax_amount": 864844, "currency": "Kip", "billing_reason": "subscription_cycle", "billing_name": "", "billing_address": {"country": "US"}, "is_invoice_generated": true, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": true, "key1": 2184.01, "key2": ""}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-11-07T09:52:21.455Z", "modified_at": "2025-06-03T19:46:15.179Z", "metadata": {"key": 526331}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-10-25T07:11:48.501Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "user_id": "", "product": {"metadata": {}, "created_at": "2025-02-09T20:19:15.400Z", "modified_at": "2023-03-30T07:05:37.419Z", "id": "", "name": "", "description": "against outbid to petty yeast off meanwhile colonialism", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": ""}, "discount": {"duration": "repeating", "duration_in_months": 425196, "type": "fixed", "amount": 778891, "currency": "Armenian Dram", "created_at": "2023-03-20T16:46:25.677Z", "modified_at": "2023-03-06T18:58:41.541Z", "id": "", "metadata": {"key": 298954}, "name": "", "code": "", "starts_at": "2023-04-08T15:39:19.572Z", "ends_at": "2024-01-04T15:31:18.185Z", "max_redemptions": 313467, "redemptions_count": 237254, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": null, "items": [{"created_at": "2023-10-09T05:35:46.860Z", "modified_at": "2025-11-19T12:55:15.055Z", "id": "", "label": "", "amount": 921740, "tax_amount": 964357, "proration": true, "product_price_id": ""}, {"created_at": "2023-10-09T05:35:46.860Z", "modified_at": "2025-11-19T12:55:15.055Z", "id": "", "label": "", "amount": 921740, "tax_amount": 964357, "proration": true, "product_price_id": ""}]}} responses: "200": application/json: "" @@ -1637,7 +1647,7 @@ examples: _endpointorder_updated_post: speakeasy-default-endpointorder-updated-post: requestBody: - application/json: {"type": "order.updated", "data": {"id": "", "created_at": "2023-10-25T00:08:50.290Z", "modified_at": "2024-01-08T20:00:47.692Z", "status": "partially_refunded", "paid": true, "subtotal_amount": 198772, "discount_amount": 338283, "net_amount": 321919, "tax_amount": 380359, "total_amount": 596980, "refunded_amount": 404069, "refunded_tax_amount": 718668, "currency": "Nuevo Sol", "billing_reason": "subscription_create", "billing_name": "", "billing_address": {"country": "US"}, "is_invoice_generated": true, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": false, "key1": 187509}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-12-03T05:16:11.415Z", "modified_at": "2023-03-11T05:58:05.184Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": null, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-06-26T15:51:37.068Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "user_id": "", "product": {"metadata": {}, "created_at": "2024-07-10T12:45:44.731Z", "modified_at": "2024-09-19T13:13:25.785Z", "id": "", "name": "", "description": "bossy direct reservation quaintly atop interestingly", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": ""}, "discount": {"duration": "once", "duration_in_months": 227959, "type": "fixed", "amount": 785594, "currency": "Barbados Dollar", "created_at": "2025-08-02T14:17:04.679Z", "modified_at": "2023-04-10T21:27:35.876Z", "id": "", "metadata": {"key": "", "key1": 330083}, "name": "", "code": "", "starts_at": "2023-09-01T14:56:03.459Z", "ends_at": "2024-10-01T02:03:16.161Z", "max_redemptions": 723901, "redemptions_count": 125128, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {}, "created_at": "2024-10-31T22:22:01.280Z", "modified_at": "2025-05-03T18:27:32.620Z", "id": "", "amount": 405025, "currency": "Pa'anga", "recurring_interval": "month", "status": "unpaid", "current_period_start": "2023-08-26T12:56:24.423Z", "current_period_end": "2024-02-06T09:06:51.703Z", "cancel_at_period_end": true, "canceled_at": "2024-03-28T15:10:13.508Z", "started_at": "2023-11-03T05:13:30.202Z", "ends_at": "2024-03-03T03:52:46.888Z", "ended_at": "2025-07-30T00:35:38.035Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": null, "customer_cancellation_reason": "switched_service", "customer_cancellation_comment": ""}, "items": [{"created_at": "2025-01-03T16:01:28.999Z", "modified_at": null, "id": "", "label": "", "amount": 516134, "tax_amount": 41202, "proration": false, "product_price_id": ""}, {"created_at": "2025-01-03T16:01:28.999Z", "modified_at": null, "id": "", "label": "", "amount": 516134, "tax_amount": 41202, "proration": false, "product_price_id": ""}, {"created_at": "2025-01-03T16:01:28.999Z", "modified_at": null, "id": "", "label": "", "amount": 516134, "tax_amount": 41202, "proration": false, "product_price_id": ""}]}} + application/json: {"type": "order.updated", "timestamp": "2023-10-25T00:08:50.290Z", "data": {"id": "", "created_at": "2023-10-25T00:08:50.290Z", "modified_at": "2024-01-08T20:00:47.692Z", "status": "partially_refunded", "paid": true, "subtotal_amount": 198772, "discount_amount": 338283, "net_amount": 321919, "tax_amount": 380359, "total_amount": 596980, "refunded_amount": 404069, "refunded_tax_amount": 718668, "currency": "Nuevo Sol", "billing_reason": "subscription_create", "billing_name": "", "billing_address": {"country": "US"}, "is_invoice_generated": true, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": false, "key1": 187509}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-12-03T05:16:11.415Z", "modified_at": "2023-03-11T05:58:05.184Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": null, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-06-26T15:51:37.068Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "user_id": "", "product": {"metadata": {}, "created_at": "2024-07-10T12:45:44.731Z", "modified_at": "2024-09-19T13:13:25.785Z", "id": "", "name": "", "description": "bossy direct reservation quaintly atop interestingly", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": ""}, "discount": {"duration": "once", "duration_in_months": 227959, "type": "fixed", "amount": 785594, "currency": "Barbados Dollar", "created_at": "2025-08-02T14:17:04.679Z", "modified_at": "2023-04-10T21:27:35.876Z", "id": "", "metadata": {"key": "", "key1": 330083}, "name": "", "code": "", "starts_at": "2023-09-01T14:56:03.459Z", "ends_at": "2024-10-01T02:03:16.161Z", "max_redemptions": 723901, "redemptions_count": 125128, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {}, "created_at": "2024-10-31T22:22:01.280Z", "modified_at": "2025-05-03T18:27:32.620Z", "id": "", "amount": 405025, "currency": "Pa'anga", "recurring_interval": "month", "status": "unpaid", "current_period_start": "2023-08-26T12:56:24.423Z", "current_period_end": "2024-02-06T09:06:51.703Z", "cancel_at_period_end": true, "canceled_at": "2024-03-28T15:10:13.508Z", "started_at": "2023-11-03T05:13:30.202Z", "ends_at": "2024-03-03T03:52:46.888Z", "ended_at": "2025-07-30T00:35:38.035Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": null, "customer_cancellation_reason": "switched_service", "customer_cancellation_comment": ""}, "items": [{"created_at": "2025-01-03T16:01:28.999Z", "modified_at": null, "id": "", "label": "", "amount": 516134, "tax_amount": 41202, "proration": false, "product_price_id": ""}, {"created_at": "2025-01-03T16:01:28.999Z", "modified_at": null, "id": "", "label": "", "amount": 516134, "tax_amount": 41202, "proration": false, "product_price_id": ""}, {"created_at": "2025-01-03T16:01:28.999Z", "modified_at": null, "id": "", "label": "", "amount": 516134, "tax_amount": 41202, "proration": false, "product_price_id": ""}]}} responses: "200": application/json: "" @@ -1646,7 +1656,7 @@ examples: _endpointorder_paid_post: speakeasy-default-endpointorder-paid-post: requestBody: - application/json: {"type": "order.paid", "data": {"id": "", "created_at": "2025-12-05T07:44:21.172Z", "modified_at": "2024-12-11T22:14:44.762Z", "status": "refunded", "paid": true, "subtotal_amount": 806442, "discount_amount": 990825, "net_amount": 746396, "tax_amount": 486648, "total_amount": 562504, "refunded_amount": 314047, "refunded_tax_amount": 570780, "currency": "Norwegian Krone", "billing_reason": "subscription_create", "billing_name": "", "billing_address": {"country": "US"}, "is_invoice_generated": false, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-08-30T09:47:22.437Z", "modified_at": "2025-04-20T14:41:24.727Z", "metadata": {"key": 154136, "key1": false, "key2": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-06-08T00:11:47.056Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "user_id": "", "product": {"metadata": {"key": "", "key1": false, "key2": 1122.47}, "created_at": "2024-03-19T01:07:15.346Z", "modified_at": "2025-03-22T13:41:39.854Z", "id": "", "name": "", "description": "instead unnaturally curly scared but definite knowledgeably", "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": ""}, "discount": {"duration": "forever", "duration_in_months": 458129, "type": "fixed", "basis_points": 400985, "created_at": "2025-12-02T15:10:04.656Z", "modified_at": "2024-10-30T18:07:50.242Z", "id": "", "metadata": {"key": 4652.15}, "name": "", "code": "", "starts_at": "2023-11-24T17:59:56.836Z", "ends_at": "2025-08-12T18:11:29.547Z", "max_redemptions": 727805, "redemptions_count": 584469, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {}, "created_at": "2025-07-17T03:39:23.964Z", "modified_at": "2025-10-30T20:20:46.051Z", "id": "", "amount": 540428, "currency": "Moroccan Dirham", "recurring_interval": "year", "status": "canceled", "current_period_start": "2023-02-24T15:15:22.018Z", "current_period_end": "2023-12-07T15:09:08.144Z", "cancel_at_period_end": false, "canceled_at": "2023-07-01T03:36:16.430Z", "started_at": "2024-09-21T14:56:16.106Z", "ends_at": "2023-01-21T03:35:38.158Z", "ended_at": "2023-12-02T06:46:04.196Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "other", "customer_cancellation_comment": ""}, "items": []}} + application/json: {"type": "order.paid", "timestamp": "2025-12-05T07:44:21.172Z", "data": {"id": "", "created_at": "2025-12-05T07:44:21.172Z", "modified_at": "2024-12-11T22:14:44.762Z", "status": "refunded", "paid": true, "subtotal_amount": 806442, "discount_amount": 990825, "net_amount": 746396, "tax_amount": 486648, "total_amount": 562504, "refunded_amount": 314047, "refunded_tax_amount": 570780, "currency": "Norwegian Krone", "billing_reason": "subscription_create", "billing_name": "", "billing_address": {"country": "US"}, "is_invoice_generated": false, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-08-30T09:47:22.437Z", "modified_at": "2025-04-20T14:41:24.727Z", "metadata": {"key": 154136, "key1": false, "key2": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-06-08T00:11:47.056Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "user_id": "", "product": {"metadata": {"key": "", "key1": false, "key2": 1122.47}, "created_at": "2024-03-19T01:07:15.346Z", "modified_at": "2025-03-22T13:41:39.854Z", "id": "", "name": "", "description": "instead unnaturally curly scared but definite knowledgeably", "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": ""}, "discount": {"duration": "forever", "duration_in_months": 458129, "type": "fixed", "basis_points": 400985, "created_at": "2025-12-02T15:10:04.656Z", "modified_at": "2024-10-30T18:07:50.242Z", "id": "", "metadata": {"key": 4652.15}, "name": "", "code": "", "starts_at": "2023-11-24T17:59:56.836Z", "ends_at": "2025-08-12T18:11:29.547Z", "max_redemptions": 727805, "redemptions_count": 584469, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {}, "created_at": "2025-07-17T03:39:23.964Z", "modified_at": "2025-10-30T20:20:46.051Z", "id": "", "amount": 540428, "currency": "Moroccan Dirham", "recurring_interval": "year", "status": "canceled", "current_period_start": "2023-02-24T15:15:22.018Z", "current_period_end": "2023-12-07T15:09:08.144Z", "cancel_at_period_end": false, "canceled_at": "2023-07-01T03:36:16.430Z", "started_at": "2024-09-21T14:56:16.106Z", "ends_at": "2023-01-21T03:35:38.158Z", "ended_at": "2023-12-02T06:46:04.196Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "other", "customer_cancellation_comment": ""}, "items": []}} responses: "200": application/json: "" @@ -1655,7 +1665,7 @@ examples: _endpointorder_refunded_post: speakeasy-default-endpointorder-refunded-post: requestBody: - application/json: {"type": "order.refunded", "data": {"id": "", "created_at": "2024-07-23T18:00:11.615Z", "modified_at": "2024-08-23T03:13:11.383Z", "status": "refunded", "paid": true, "subtotal_amount": 678552, "discount_amount": 294178, "net_amount": 721778, "tax_amount": 518308, "total_amount": 820663, "refunded_amount": 472431, "refunded_tax_amount": 879331, "currency": "Hong Kong Dollar", "billing_reason": "subscription_create", "billing_name": "", "billing_address": {"country": "US"}, "is_invoice_generated": false, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": 4542.91}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-08-11T17:50:11.031Z", "modified_at": "2023-02-24T05:25:29.794Z", "metadata": {"key": 97027, "key1": 958634}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": null, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-01-16T07:26:04.196Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "user_id": "", "product": {"metadata": {"key": 4016.73, "key1": 9058.31, "key2": true}, "created_at": "2024-10-26T18:25:25.517Z", "modified_at": "2023-07-26T10:28:20.791Z", "id": "", "name": "", "description": null, "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": ""}, "discount": {"duration": "forever", "duration_in_months": 333301, "type": "percentage", "amount": 985928, "currency": "Tunisian Dinar", "created_at": "2025-03-31T17:18:12.309Z", "modified_at": "2025-04-04T07:20:27.321Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": null, "ends_at": "2025-11-07T12:21:07.975Z", "max_redemptions": 986922, "redemptions_count": 691292, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {}, "created_at": "2023-03-16T14:38:58.849Z", "modified_at": "2024-08-12T02:18:50.288Z", "id": "", "amount": 443730, "currency": "Pa'anga", "recurring_interval": "month", "status": "past_due", "current_period_start": "2025-08-22T13:19:25.286Z", "current_period_end": "2025-05-03T08:49:50.424Z", "cancel_at_period_end": true, "canceled_at": "2023-11-21T12:57:47.903Z", "started_at": "2023-09-21T04:07:05.991Z", "ends_at": "2023-10-30T23:29:28.584Z", "ended_at": "2025-05-20T18:28:46.249Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": ""}, "items": [{"created_at": "2023-01-22T05:05:29.797Z", "modified_at": "2025-11-07T21:20:59.535Z", "id": "", "label": "", "amount": 287841, "tax_amount": 922801, "proration": false, "product_price_id": ""}]}} + application/json: {"type": "order.refunded", "timestamp": "2024-07-23T18:00:11.615Z", "data": {"id": "", "created_at": "2024-07-23T18:00:11.615Z", "modified_at": "2024-08-23T03:13:11.383Z", "status": "refunded", "paid": true, "subtotal_amount": 678552, "discount_amount": 294178, "net_amount": 721778, "tax_amount": 518308, "total_amount": 820663, "refunded_amount": 472431, "refunded_tax_amount": 879331, "currency": "Hong Kong Dollar", "billing_reason": "subscription_create", "billing_name": "", "billing_address": {"country": "US"}, "is_invoice_generated": false, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": 4542.91}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-08-11T17:50:11.031Z", "modified_at": "2023-02-24T05:25:29.794Z", "metadata": {"key": 97027, "key1": 958634}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": null, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-01-16T07:26:04.196Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "user_id": "", "product": {"metadata": {"key": 4016.73, "key1": 9058.31, "key2": true}, "created_at": "2024-10-26T18:25:25.517Z", "modified_at": "2023-07-26T10:28:20.791Z", "id": "", "name": "", "description": null, "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": ""}, "discount": {"duration": "forever", "duration_in_months": 333301, "type": "percentage", "amount": 985928, "currency": "Tunisian Dinar", "created_at": "2025-03-31T17:18:12.309Z", "modified_at": "2025-04-04T07:20:27.321Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": null, "ends_at": "2025-11-07T12:21:07.975Z", "max_redemptions": 986922, "redemptions_count": 691292, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {}, "created_at": "2023-03-16T14:38:58.849Z", "modified_at": "2024-08-12T02:18:50.288Z", "id": "", "amount": 443730, "currency": "Pa'anga", "recurring_interval": "month", "status": "past_due", "current_period_start": "2025-08-22T13:19:25.286Z", "current_period_end": "2025-05-03T08:49:50.424Z", "cancel_at_period_end": true, "canceled_at": "2023-11-21T12:57:47.903Z", "started_at": "2023-09-21T04:07:05.991Z", "ends_at": "2023-10-30T23:29:28.584Z", "ended_at": "2025-05-20T18:28:46.249Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": ""}, "items": [{"created_at": "2023-01-22T05:05:29.797Z", "modified_at": "2025-11-07T21:20:59.535Z", "id": "", "label": "", "amount": 287841, "tax_amount": 922801, "proration": false, "product_price_id": ""}]}} responses: "200": application/json: "" @@ -1664,7 +1674,7 @@ examples: _endpointsubscription_created_post: speakeasy-default-endpointsubscription-created-post: requestBody: - application/json: {"type": "subscription.created", "data": {"created_at": "2024-05-03T11:46:21.459Z", "modified_at": "2025-01-12T06:30:14.360Z", "id": "", "amount": 469182, "currency": "Boliviano boliviano", "recurring_interval": "year", "status": "incomplete", "current_period_start": "2024-01-07T06:33:36.381Z", "current_period_end": "2024-07-30T16:54:44.427Z", "cancel_at_period_end": true, "canceled_at": "2023-09-10T18:39:16.136Z", "started_at": "2025-08-30T21:29:16.432Z", "ends_at": "2024-06-27T22:01:23.333Z", "ended_at": "2024-07-24T19:43:04.879Z", "customer_id": "", "product_id": "", "discount_id": null, "checkout_id": "", "customer_cancellation_reason": "missing_features", "customer_cancellation_comment": "", "metadata": {"key": false}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-05-18T22:55:50.482Z", "modified_at": "2024-08-04T23:52:10.438Z", "metadata": {"key": false, "key1": false}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-05-15T22:05:41.858Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2024-05-25T09:51:02.679Z", "modified_at": "2025-12-23T23:39:23.705Z", "id": "", "name": "", "description": "slink needily cemetery hydrocarbon a fledgling knit shirk appertain rural", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "metadata": {}, "prices": [{"created_at": "2025-01-12T06:30:14.360Z", "modified_at": "2023-05-11T16:29:33.481Z", "id": "", "amount_type": "custom", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 363951, "maximum_amount": 267138, "preset_amount": 230636, "legacy": true}, {"created_at": "2024-09-02T19:02:23.015Z", "modified_at": "2023-08-19T21:45:43.735Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}], "benefits": [{"id": "", "created_at": "2024-08-16T04:04:01.242Z", "modified_at": "2023-08-30T05:19:40.088Z", "type": "meter_credit", "description": "courageously quick-witted out equally toward though quietly", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": 3195.27}, "properties": {"units": 371901, "rollover": false, "meter_id": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/lost+found", "mime_type": "", "size": 719695, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-08-21T14:37:14.488Z", "version": null, "service": "product_media", "is_uploaded": false, "created_at": "2025-10-28T06:08:47.416Z", "size_readable": "", "public_url": "https://repentant-unit.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/lost+found", "mime_type": "", "size": 719695, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-08-21T14:37:14.488Z", "version": null, "service": "product_media", "is_uploaded": false, "created_at": "2025-10-28T06:08:47.416Z", "size_readable": "", "public_url": "https://repentant-unit.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/lost+found", "mime_type": "", "size": 719695, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-08-21T14:37:14.488Z", "version": null, "service": "product_media", "is_uploaded": false, "created_at": "2025-10-28T06:08:47.416Z", "size_readable": "", "public_url": "https://repentant-unit.org/"}], "attached_custom_fields": []}, "discount": {"duration": "once", "type": "fixed", "basis_points": 745503, "created_at": "2024-04-19T20:53:32.186Z", "modified_at": "2024-11-15T00:04:04.545Z", "id": "", "metadata": {"key": 3699.53}, "name": "", "code": "", "starts_at": "2024-10-15T21:24:43.202Z", "ends_at": "2025-09-26T06:55:01.272Z", "max_redemptions": 104800, "redemptions_count": 570322, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-11-26T09:15:00.973Z", "modified_at": "2024-01-19T16:01:53.249Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 125871, "legacy": true}], "meters": [{"created_at": "2025-05-17T01:58:02.155Z", "modified_at": "2024-09-29T09:35:40.427Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 201601, "key1": true, "key2": 2057.75}, "created_at": "2025-03-06T04:32:46.256Z", "modified_at": "2024-01-13T00:47:03.334Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}, {"created_at": "2025-05-17T01:58:02.155Z", "modified_at": "2024-09-29T09:35:40.427Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 201601, "key1": true, "key2": 2057.75}, "created_at": "2025-03-06T04:32:46.256Z", "modified_at": "2024-01-13T00:47:03.334Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}, {"created_at": "2025-05-17T01:58:02.155Z", "modified_at": "2024-09-29T09:35:40.427Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 201601, "key1": true, "key2": 2057.75}, "created_at": "2025-03-06T04:32:46.256Z", "modified_at": "2024-01-13T00:47:03.334Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}]}} + application/json: {"type": "subscription.created", "timestamp": "2024-05-03T11:46:21.459Z", "data": {"created_at": "2024-05-03T11:46:21.459Z", "modified_at": "2025-01-12T06:30:14.360Z", "id": "", "amount": 469182, "currency": "Boliviano boliviano", "recurring_interval": "year", "status": "incomplete", "current_period_start": "2024-01-07T06:33:36.381Z", "current_period_end": "2024-07-30T16:54:44.427Z", "cancel_at_period_end": true, "canceled_at": "2023-09-10T18:39:16.136Z", "started_at": "2025-08-30T21:29:16.432Z", "ends_at": "2024-06-27T22:01:23.333Z", "ended_at": "2024-07-24T19:43:04.879Z", "customer_id": "", "product_id": "", "discount_id": null, "checkout_id": "", "customer_cancellation_reason": "missing_features", "customer_cancellation_comment": "", "metadata": {"key": false}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-05-18T22:55:50.482Z", "modified_at": "2024-08-04T23:52:10.438Z", "metadata": {"key": false, "key1": false}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-05-15T22:05:41.858Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2024-05-25T09:51:02.679Z", "modified_at": "2025-12-23T23:39:23.705Z", "id": "", "name": "", "description": "slink needily cemetery hydrocarbon a fledgling knit shirk appertain rural", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "metadata": {}, "prices": [{"created_at": "2025-01-12T06:30:14.360Z", "modified_at": "2023-05-11T16:29:33.481Z", "id": "", "amount_type": "custom", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 363951, "maximum_amount": 267138, "preset_amount": 230636, "legacy": true}, {"created_at": "2024-09-02T19:02:23.015Z", "modified_at": "2023-08-19T21:45:43.735Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}], "benefits": [{"id": "", "created_at": "2024-08-16T04:04:01.242Z", "modified_at": "2023-08-30T05:19:40.088Z", "type": "meter_credit", "description": "courageously quick-witted out equally toward though quietly", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": 3195.27}, "properties": {"units": 371901, "rollover": false, "meter_id": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/lost+found", "mime_type": "", "size": 719695, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-08-21T14:37:14.488Z", "version": null, "service": "product_media", "is_uploaded": false, "created_at": "2025-10-28T06:08:47.416Z", "size_readable": "", "public_url": "https://repentant-unit.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/lost+found", "mime_type": "", "size": 719695, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-08-21T14:37:14.488Z", "version": null, "service": "product_media", "is_uploaded": false, "created_at": "2025-10-28T06:08:47.416Z", "size_readable": "", "public_url": "https://repentant-unit.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/lost+found", "mime_type": "", "size": 719695, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-08-21T14:37:14.488Z", "version": null, "service": "product_media", "is_uploaded": false, "created_at": "2025-10-28T06:08:47.416Z", "size_readable": "", "public_url": "https://repentant-unit.org/"}], "attached_custom_fields": []}, "discount": {"duration": "once", "type": "fixed", "basis_points": 745503, "created_at": "2024-04-19T20:53:32.186Z", "modified_at": "2024-11-15T00:04:04.545Z", "id": "", "metadata": {"key": 3699.53}, "name": "", "code": "", "starts_at": "2024-10-15T21:24:43.202Z", "ends_at": "2025-09-26T06:55:01.272Z", "max_redemptions": 104800, "redemptions_count": 570322, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-11-26T09:15:00.973Z", "modified_at": "2024-01-19T16:01:53.249Z", "id": "", "amount_type": "fixed", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 125871, "legacy": true}], "meters": [{"created_at": "2025-05-17T01:58:02.155Z", "modified_at": "2024-09-29T09:35:40.427Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 201601, "key1": true, "key2": 2057.75}, "created_at": "2025-03-06T04:32:46.256Z", "modified_at": "2024-01-13T00:47:03.334Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}, {"created_at": "2025-05-17T01:58:02.155Z", "modified_at": "2024-09-29T09:35:40.427Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 201601, "key1": true, "key2": 2057.75}, "created_at": "2025-03-06T04:32:46.256Z", "modified_at": "2024-01-13T00:47:03.334Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}, {"created_at": "2025-05-17T01:58:02.155Z", "modified_at": "2024-09-29T09:35:40.427Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 201601, "key1": true, "key2": 2057.75}, "created_at": "2025-03-06T04:32:46.256Z", "modified_at": "2024-01-13T00:47:03.334Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}]}} responses: "200": application/json: "" @@ -1673,7 +1683,7 @@ examples: _endpointsubscription_updated_post: speakeasy-default-endpointsubscription-updated-post: requestBody: - application/json: {"type": "subscription.updated", "data": {"created_at": "2023-06-24T13:26:25.969Z", "modified_at": "2024-10-16T16:24:20.274Z", "id": "", "amount": 505562, "currency": "Guyana Dollar", "recurring_interval": "month", "status": "canceled", "current_period_start": "2024-06-19T12:29:28.503Z", "current_period_end": "2023-08-24T22:14:10.131Z", "cancel_at_period_end": false, "canceled_at": "2025-08-31T06:08:08.476Z", "started_at": "2023-06-01T08:01:27.951Z", "ends_at": "2025-01-23T22:07:32.693Z", "ended_at": "2025-05-14T13:55:44.367Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": "", "metadata": {"key": 477870, "key1": true, "key2": 485359}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-01-10T06:45:35.933Z", "modified_at": "2024-01-24T02:08:13.039Z", "metadata": {"key": 117983, "key1": 8500.16}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-08-09T14:29:57.545Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2024-12-02T17:09:45.787Z", "modified_at": "2025-03-11T00:51:56.943Z", "id": "", "name": "", "description": "obnoxiously save following clinch striking juicy", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": "", "metadata": {"key": false, "key1": 884041, "key2": 4257.66}, "prices": [{"created_at": "2024-10-16T16:24:20.274Z", "modified_at": "2024-01-05T22:20:15.867Z", "id": "", "amount_type": "fixed", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 488614, "legacy": true}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 29348, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": null, "last_modified_at": "2023-10-03T10:28:13.472Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-07T09:47:56.854Z", "size_readable": "", "public_url": "https://flowery-promise.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 29348, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": null, "last_modified_at": "2023-10-03T10:28:13.472Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-07T09:47:56.854Z", "size_readable": "", "public_url": "https://flowery-promise.org/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-01-10T20:33:55.554Z", "modified_at": "2023-03-14T14:16:19.041Z", "id": "", "metadata": {}, "type": "checkbox", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 766194, "required": false}]}, "discount": {"duration": "once", "duration_in_months": 892166, "type": "fixed", "amount": 996997, "currency": "Canadian Dollar", "created_at": "2023-06-09T06:11:59.062Z", "modified_at": "2024-09-28T05:16:48.757Z", "id": "", "metadata": {"key": 962223, "key1": 587522}, "name": "", "code": "", "starts_at": "2023-04-12T20:54:06.410Z", "ends_at": "2025-03-19T14:28:57.223Z", "max_redemptions": 852845, "redemptions_count": 658199, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [], "meters": [{"created_at": "2025-06-07T13:44:19.881Z", "modified_at": "2023-12-06T20:26:36.699Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 6882, "key1": 556425, "key2": 117069}, "created_at": "2023-05-21T02:26:27.963Z", "modified_at": "2025-06-09T17:54:52.162Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": [{"conjunction": "or", "clauses": []}, {"conjunction": "or", "clauses": []}]}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}, {"created_at": "2025-06-07T13:44:19.881Z", "modified_at": "2023-12-06T20:26:36.699Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 6882, "key1": 556425, "key2": 117069}, "created_at": "2023-05-21T02:26:27.963Z", "modified_at": "2025-06-09T17:54:52.162Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": [{"conjunction": "or", "clauses": []}, {"conjunction": "or", "clauses": []}]}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}]}} + application/json: {"type": "subscription.updated", "timestamp": "2023-06-24T13:26:25.969Z", "data": {"created_at": "2023-06-24T13:26:25.969Z", "modified_at": "2024-10-16T16:24:20.274Z", "id": "", "amount": 505562, "currency": "Guyana Dollar", "recurring_interval": "month", "status": "canceled", "current_period_start": "2024-06-19T12:29:28.503Z", "current_period_end": "2023-08-24T22:14:10.131Z", "cancel_at_period_end": false, "canceled_at": "2025-08-31T06:08:08.476Z", "started_at": "2023-06-01T08:01:27.951Z", "ends_at": "2025-01-23T22:07:32.693Z", "ended_at": "2025-05-14T13:55:44.367Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": "", "metadata": {"key": 477870, "key1": true, "key2": 485359}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-01-10T06:45:35.933Z", "modified_at": "2024-01-24T02:08:13.039Z", "metadata": {"key": 117983, "key1": 8500.16}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-08-09T14:29:57.545Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2024-12-02T17:09:45.787Z", "modified_at": "2025-03-11T00:51:56.943Z", "id": "", "name": "", "description": "obnoxiously save following clinch striking juicy", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": "", "metadata": {"key": false, "key1": 884041, "key2": 4257.66}, "prices": [{"created_at": "2024-10-16T16:24:20.274Z", "modified_at": "2024-01-05T22:20:15.867Z", "id": "", "amount_type": "fixed", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 488614, "legacy": true}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 29348, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": null, "last_modified_at": "2023-10-03T10:28:13.472Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-07T09:47:56.854Z", "size_readable": "", "public_url": "https://flowery-promise.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 29348, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": null, "last_modified_at": "2023-10-03T10:28:13.472Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-10-07T09:47:56.854Z", "size_readable": "", "public_url": "https://flowery-promise.org/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-01-10T20:33:55.554Z", "modified_at": "2023-03-14T14:16:19.041Z", "id": "", "metadata": {}, "type": "checkbox", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 766194, "required": false}]}, "discount": {"duration": "once", "duration_in_months": 892166, "type": "fixed", "amount": 996997, "currency": "Canadian Dollar", "created_at": "2023-06-09T06:11:59.062Z", "modified_at": "2024-09-28T05:16:48.757Z", "id": "", "metadata": {"key": 962223, "key1": 587522}, "name": "", "code": "", "starts_at": "2023-04-12T20:54:06.410Z", "ends_at": "2025-03-19T14:28:57.223Z", "max_redemptions": 852845, "redemptions_count": 658199, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [], "meters": [{"created_at": "2025-06-07T13:44:19.881Z", "modified_at": "2023-12-06T20:26:36.699Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 6882, "key1": 556425, "key2": 117069}, "created_at": "2023-05-21T02:26:27.963Z", "modified_at": "2025-06-09T17:54:52.162Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": [{"conjunction": "or", "clauses": []}, {"conjunction": "or", "clauses": []}]}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}, {"created_at": "2025-06-07T13:44:19.881Z", "modified_at": "2023-12-06T20:26:36.699Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 6882, "key1": 556425, "key2": 117069}, "created_at": "2023-05-21T02:26:27.963Z", "modified_at": "2025-06-09T17:54:52.162Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": [{"conjunction": "or", "clauses": []}, {"conjunction": "or", "clauses": []}]}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}]}} responses: "200": application/json: "" @@ -1682,7 +1692,7 @@ examples: _endpointsubscription_active_post: speakeasy-default-endpointsubscription-active-post: requestBody: - application/json: {"type": "subscription.active", "data": {"created_at": "2023-08-13T01:28:21.362Z", "modified_at": "2024-06-25T00:41:05.678Z", "id": "", "amount": 320436, "currency": "Peso Uruguayo", "recurring_interval": "month", "status": "past_due", "current_period_start": "2023-06-09T14:14:48.363Z", "current_period_end": null, "cancel_at_period_end": true, "canceled_at": null, "started_at": "2023-07-21T07:29:31.409Z", "ends_at": "2025-08-05T11:38:46.213Z", "ended_at": "2024-09-05T04:27:23.768Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "too_complex", "customer_cancellation_comment": "", "metadata": {"key": false}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-08-17T18:35:42.212Z", "modified_at": "2025-01-01T23:32:39.659Z", "metadata": {"key": 7303.56, "key1": 796236}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": null, "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2025-11-05T10:18:40.300Z", "modified_at": "2024-04-23T18:24:43.408Z", "id": "", "name": "", "description": "athwart fail wound oh nor boohoo reasoning against since", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "metadata": {"key": 722592}, "prices": [], "benefits": [{"id": "", "created_at": "2025-05-21T10:49:13.924Z", "modified_at": null, "type": "license_keys", "description": "chime softly outgoing gray", "selectable": false, "deletable": false, "organization_id": "", "metadata": {}, "properties": {"prefix": "", "expires": {"ttl": 18256, "timeframe": "day"}, "activations": {"limit": 776442, "enable_customer_admin": false}, "limit_usage": 89994}}, {"id": "", "created_at": "2023-02-11T00:08:34.711Z", "modified_at": "2024-10-21T08:00:16.195Z", "type": "github_repository", "description": "as draft noon kettledrum alligator", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 331688, "key1": 10869, "key2": true}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "maintain"}}, {"id": "", "created_at": "2023-02-11T00:08:34.711Z", "modified_at": "2024-10-21T08:00:16.195Z", "type": "github_repository", "description": "as draft noon kettledrum alligator", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 331688, "key1": 10869, "key2": true}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "maintain"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 980211, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-09-01T03:11:19.881Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-05-05T22:00:20.852Z", "size_readable": "", "public_url": "https://shabby-integer.org"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 980211, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-09-01T03:11:19.881Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-05-05T22:00:20.852Z", "size_readable": "", "public_url": "https://shabby-integer.org"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 980211, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-09-01T03:11:19.881Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-05-05T22:00:20.852Z", "size_readable": "", "public_url": "https://shabby-integer.org"}], "attached_custom_fields": []}, "discount": {"duration": "repeating", "duration_in_months": 482318, "type": "percentage", "amount": 489921, "currency": "Chilean Peso", "created_at": "2023-10-09T08:41:16.911Z", "modified_at": "2025-08-16T07:28:28.929Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2024-04-06T16:40:05.860Z", "ends_at": "2023-01-06T22:21:47.288Z", "max_redemptions": null, "redemptions_count": 313365, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2024-06-25T00:41:05.678Z", "modified_at": "2025-09-12T00:30:21.037Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 89762, "maximum_amount": null, "preset_amount": null, "legacy": true}, {"created_at": "2024-09-14T15:19:58.463Z", "modified_at": "2024-07-30T05:01:30.550Z", "id": "", "amount_type": "custom", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 720352, "maximum_amount": 761885, "preset_amount": 542678, "legacy": true}, {"created_at": "2025-02-14T12:59:50.680Z", "modified_at": "2025-03-11T11:17:02.540Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}], "meters": []}} + application/json: {"type": "subscription.active", "timestamp": "2023-08-13T01:28:21.362Z", "data": {"created_at": "2023-08-13T01:28:21.362Z", "modified_at": "2024-06-25T00:41:05.678Z", "id": "", "amount": 320436, "currency": "Peso Uruguayo", "recurring_interval": "month", "status": "past_due", "current_period_start": "2023-06-09T14:14:48.363Z", "current_period_end": null, "cancel_at_period_end": true, "canceled_at": null, "started_at": "2023-07-21T07:29:31.409Z", "ends_at": "2025-08-05T11:38:46.213Z", "ended_at": "2024-09-05T04:27:23.768Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "too_complex", "customer_cancellation_comment": "", "metadata": {"key": false}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-08-17T18:35:42.212Z", "modified_at": "2025-01-01T23:32:39.659Z", "metadata": {"key": 7303.56, "key1": 796236}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": null, "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2025-11-05T10:18:40.300Z", "modified_at": "2024-04-23T18:24:43.408Z", "id": "", "name": "", "description": "athwart fail wound oh nor boohoo reasoning against since", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "metadata": {"key": 722592}, "prices": [], "benefits": [{"id": "", "created_at": "2025-05-21T10:49:13.924Z", "modified_at": null, "type": "license_keys", "description": "chime softly outgoing gray", "selectable": false, "deletable": false, "organization_id": "", "metadata": {}, "properties": {"prefix": "", "expires": {"ttl": 18256, "timeframe": "day"}, "activations": {"limit": 776442, "enable_customer_admin": false}, "limit_usage": 89994}}, {"id": "", "created_at": "2023-02-11T00:08:34.711Z", "modified_at": "2024-10-21T08:00:16.195Z", "type": "github_repository", "description": "as draft noon kettledrum alligator", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 331688, "key1": 10869, "key2": true}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "maintain"}}, {"id": "", "created_at": "2023-02-11T00:08:34.711Z", "modified_at": "2024-10-21T08:00:16.195Z", "type": "github_repository", "description": "as draft noon kettledrum alligator", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 331688, "key1": 10869, "key2": true}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "maintain"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 980211, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-09-01T03:11:19.881Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-05-05T22:00:20.852Z", "size_readable": "", "public_url": "https://shabby-integer.org"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 980211, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-09-01T03:11:19.881Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-05-05T22:00:20.852Z", "size_readable": "", "public_url": "https://shabby-integer.org"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 980211, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-09-01T03:11:19.881Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-05-05T22:00:20.852Z", "size_readable": "", "public_url": "https://shabby-integer.org"}], "attached_custom_fields": []}, "discount": {"duration": "repeating", "duration_in_months": 482318, "type": "percentage", "amount": 489921, "currency": "Chilean Peso", "created_at": "2023-10-09T08:41:16.911Z", "modified_at": "2025-08-16T07:28:28.929Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2024-04-06T16:40:05.860Z", "ends_at": "2023-01-06T22:21:47.288Z", "max_redemptions": null, "redemptions_count": 313365, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2024-06-25T00:41:05.678Z", "modified_at": "2025-09-12T00:30:21.037Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 89762, "maximum_amount": null, "preset_amount": null, "legacy": true}, {"created_at": "2024-09-14T15:19:58.463Z", "modified_at": "2024-07-30T05:01:30.550Z", "id": "", "amount_type": "custom", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 720352, "maximum_amount": 761885, "preset_amount": 542678, "legacy": true}, {"created_at": "2025-02-14T12:59:50.680Z", "modified_at": "2025-03-11T11:17:02.540Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}], "meters": []}} responses: "200": application/json: "" @@ -1691,7 +1701,7 @@ examples: _endpointsubscription_canceled_post: speakeasy-default-endpointsubscription-canceled-post: requestBody: - application/json: {"type": "subscription.canceled", "data": {"created_at": "2025-02-09T04:39:02.332Z", "modified_at": "2023-04-18T10:38:03.481Z", "id": "", "amount": 137392, "currency": "New Taiwan Dollar", "recurring_interval": "month", "status": "active", "current_period_start": "2023-06-17T04:15:56.819Z", "current_period_end": "2023-06-02T15:48:16.857Z", "cancel_at_period_end": false, "canceled_at": "2024-01-07T18:54:45.602Z", "started_at": "2025-02-23T12:23:49.579Z", "ends_at": "2023-11-16T08:24:59.166Z", "ended_at": "2023-07-21T16:25:14.433Z", "customer_id": "", "product_id": "", "discount_id": null, "checkout_id": null, "customer_cancellation_reason": null, "customer_cancellation_comment": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-10-25T05:52:42.846Z", "modified_at": "2023-09-20T10:20:50.540Z", "metadata": {"key": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-07-13T08:26:56.650Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2025-06-11T17:21:10.206Z", "modified_at": "2025-03-18T13:26:34.470Z", "id": "", "name": "", "description": "unimpressively stiffen promptly", "recurring_interval": "year", "is_recurring": false, "is_archived": true, "organization_id": "", "metadata": {"key": true}, "prices": [{"created_at": "2023-04-18T10:38:03.481Z", "modified_at": "2025-08-08T10:15:56.533Z", "id": "", "amount_type": "metered_unit", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "unit_amount": "", "cap_amount": 739654, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2025-04-18T11:08:34.147Z", "modified_at": "2023-05-05T03:28:24.281Z", "id": "", "amount_type": "fixed", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 25751, "legacy": true}], "benefits": [{"id": "", "created_at": "2024-09-21T18:00:22.332Z", "modified_at": "2023-05-12T19:14:12.206Z", "type": "downloadables", "description": "ostrich smog zowie loyally naturally noisily castanet pace deliberately", "selectable": false, "deletable": true, "organization_id": "", "metadata": {}, "properties": {"archived": {"key": true, "key1": true}, "files": []}}, {"id": "", "created_at": "2025-12-18T22:12:17.302Z", "modified_at": "2024-10-10T09:48:09.804Z", "type": "custom", "description": "knavishly goat programme intrigue elegantly fooey decisive", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": false, "key1": 922.01, "key2": 5307.16}, "properties": {"note": ""}}, {"id": "", "created_at": "2024-06-11T13:23:03.299Z", "modified_at": "2024-10-18T20:00:03.185Z", "type": "meter_credit", "description": "at like through stale yum corny", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": false}, "properties": {"units": 743161, "rollover": false, "meter_id": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 91402, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": null, "checksum_sha256_hex": "", "last_modified_at": null, "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-02-20T02:39:11.781Z", "size_readable": "", "public_url": "https://young-obesity.org"}, {"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 91402, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": null, "checksum_sha256_hex": "", "last_modified_at": null, "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-02-20T02:39:11.781Z", "size_readable": "", "public_url": "https://young-obesity.org"}], "attached_custom_fields": []}, "discount": {"duration": "once", "type": "fixed", "basis_points": 942713, "created_at": "2025-05-02T10:03:23.149Z", "modified_at": "2024-03-07T17:30:21.663Z", "id": "", "metadata": {"key": "", "key1": false, "key2": ""}, "name": "", "code": "", "starts_at": "2025-11-05T08:42:03.906Z", "ends_at": null, "max_redemptions": 510938, "redemptions_count": 760335, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-08-10T09:00:25.178Z", "modified_at": "2023-05-20T04:28:47.140Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}], "meters": []}} + application/json: {"type": "subscription.canceled", "timestamp": "2025-02-09T04:39:02.332Z", "data": {"created_at": "2025-02-09T04:39:02.332Z", "modified_at": "2023-04-18T10:38:03.481Z", "id": "", "amount": 137392, "currency": "New Taiwan Dollar", "recurring_interval": "month", "status": "active", "current_period_start": "2023-06-17T04:15:56.819Z", "current_period_end": "2023-06-02T15:48:16.857Z", "cancel_at_period_end": false, "canceled_at": "2024-01-07T18:54:45.602Z", "started_at": "2025-02-23T12:23:49.579Z", "ends_at": "2023-11-16T08:24:59.166Z", "ended_at": "2023-07-21T16:25:14.433Z", "customer_id": "", "product_id": "", "discount_id": null, "checkout_id": null, "customer_cancellation_reason": null, "customer_cancellation_comment": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-10-25T05:52:42.846Z", "modified_at": "2023-09-20T10:20:50.540Z", "metadata": {"key": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-07-13T08:26:56.650Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2025-06-11T17:21:10.206Z", "modified_at": "2025-03-18T13:26:34.470Z", "id": "", "name": "", "description": "unimpressively stiffen promptly", "recurring_interval": "year", "is_recurring": false, "is_archived": true, "organization_id": "", "metadata": {"key": true}, "prices": [{"created_at": "2023-04-18T10:38:03.481Z", "modified_at": "2025-08-08T10:15:56.533Z", "id": "", "amount_type": "metered_unit", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "unit_amount": "", "cap_amount": 739654, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2025-04-18T11:08:34.147Z", "modified_at": "2023-05-05T03:28:24.281Z", "id": "", "amount_type": "fixed", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 25751, "legacy": true}], "benefits": [{"id": "", "created_at": "2024-09-21T18:00:22.332Z", "modified_at": "2023-05-12T19:14:12.206Z", "type": "downloadables", "description": "ostrich smog zowie loyally naturally noisily castanet pace deliberately", "selectable": false, "deletable": true, "organization_id": "", "metadata": {}, "properties": {"archived": {"key": true, "key1": true}, "files": []}}, {"id": "", "created_at": "2025-12-18T22:12:17.302Z", "modified_at": "2024-10-10T09:48:09.804Z", "type": "custom", "description": "knavishly goat programme intrigue elegantly fooey decisive", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": false, "key1": 922.01, "key2": 5307.16}, "properties": {"note": ""}}, {"id": "", "created_at": "2024-06-11T13:23:03.299Z", "modified_at": "2024-10-18T20:00:03.185Z", "type": "meter_credit", "description": "at like through stale yum corny", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": false}, "properties": {"units": 743161, "rollover": false, "meter_id": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 91402, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": null, "checksum_sha256_hex": "", "last_modified_at": null, "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-02-20T02:39:11.781Z", "size_readable": "", "public_url": "https://young-obesity.org"}, {"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 91402, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": null, "checksum_sha256_hex": "", "last_modified_at": null, "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2023-02-20T02:39:11.781Z", "size_readable": "", "public_url": "https://young-obesity.org"}], "attached_custom_fields": []}, "discount": {"duration": "once", "type": "fixed", "basis_points": 942713, "created_at": "2025-05-02T10:03:23.149Z", "modified_at": "2024-03-07T17:30:21.663Z", "id": "", "metadata": {"key": "", "key1": false, "key2": ""}, "name": "", "code": "", "starts_at": "2025-11-05T08:42:03.906Z", "ends_at": null, "max_redemptions": 510938, "redemptions_count": 760335, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-08-10T09:00:25.178Z", "modified_at": "2023-05-20T04:28:47.140Z", "id": "", "amount_type": "free", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}], "meters": []}} responses: "200": application/json: "" @@ -1700,7 +1710,7 @@ examples: _endpointsubscription_uncanceled_post: speakeasy-default-endpointsubscription-uncanceled-post: requestBody: - application/json: {"type": "subscription.uncanceled", "data": {"created_at": "2023-02-06T17:25:10.106Z", "modified_at": "2023-01-25T07:20:02.381Z", "id": "", "amount": 755736, "currency": "Iceland Krona", "recurring_interval": "month", "status": "canceled", "current_period_start": "2024-04-11T19:08:16.655Z", "current_period_end": "2023-08-23T01:03:59.107Z", "cancel_at_period_end": true, "canceled_at": "2024-11-16T02:01:16.824Z", "started_at": null, "ends_at": "2023-12-23T04:50:00.016Z", "ended_at": "2024-10-18T16:25:47.209Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": null, "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-10-01T20:42:25.530Z", "modified_at": "2024-07-04T17:30:56.477Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-12-20T09:31:52.259Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2024-03-26T06:19:23.237Z", "modified_at": "2024-05-11T18:08:21.251Z", "id": "", "name": "", "description": "questioningly proliferate yet vanish mooch yowza hopeful", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {}, "prices": [{"created_at": "2023-01-25T07:20:02.381Z", "modified_at": "2024-03-21T16:37:42.322Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 107066, "maximum_amount": 251812, "preset_amount": 625077, "legacy": true}], "benefits": [{"id": "", "created_at": "2024-07-09T11:35:46.121Z", "modified_at": "2024-07-14T11:45:04.348Z", "type": "downloadables", "description": "esteemed aha arcade", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 549444}, "properties": {"archived": {"key": false, "key1": false, "key2": true}, "files": [""]}}, {"id": "", "created_at": "2023-07-17T10:10:30.145Z", "modified_at": "2024-02-22T01:39:19.437Z", "type": "github_repository", "description": "hmph frantically for into unfurl rapidly when", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": ""}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "admin"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/etc/namedb", "mime_type": "", "size": 865781, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": null, "checksum_sha256_hex": "", "last_modified_at": "2024-09-05T02:35:48.322Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-12-06T10:04:39.843Z", "size_readable": "", "public_url": "https://normal-giant.org/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2025-05-08T20:53:14.936Z", "modified_at": "2025-08-01T19:32:49.347Z", "id": "", "metadata": {"key": 791230}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 887720, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2025-05-08T20:53:14.936Z", "modified_at": "2025-08-01T19:32:49.347Z", "id": "", "metadata": {"key": 791230}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 887720, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2025-05-08T20:53:14.936Z", "modified_at": "2025-08-01T19:32:49.347Z", "id": "", "metadata": {"key": 791230}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 887720, "required": false}]}, "discount": {"duration": "once", "type": "fixed", "basis_points": 408479, "created_at": "2023-03-14T02:37:49.424Z", "modified_at": "2025-12-23T02:41:08.695Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2024-07-07T16:21:42.534Z", "ends_at": "2023-05-08T21:16:10.476Z", "max_redemptions": 431440, "redemptions_count": 127195, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-12-23T04:50:00.016Z", "modified_at": "2024-10-18T16:25:47.209Z", "id": "", "amount_type": "custom", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 138645, "maximum_amount": 95755, "preset_amount": 417130, "legacy": true}], "meters": [{"created_at": "2025-11-08T06:13:24.540Z", "modified_at": "2023-05-26T16:36:35.734Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 479423, "key1": 327992}, "created_at": "2025-01-03T20:59:19.837Z", "modified_at": "2024-09-23T23:32:35.223Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}, {"created_at": "2025-11-08T06:13:24.540Z", "modified_at": "2023-05-26T16:36:35.734Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 479423, "key1": 327992}, "created_at": "2025-01-03T20:59:19.837Z", "modified_at": "2024-09-23T23:32:35.223Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}, {"created_at": "2025-11-08T06:13:24.540Z", "modified_at": "2023-05-26T16:36:35.734Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 479423, "key1": 327992}, "created_at": "2025-01-03T20:59:19.837Z", "modified_at": "2024-09-23T23:32:35.223Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}]}} + application/json: {"type": "subscription.uncanceled", "timestamp": "2023-02-06T17:25:10.106Z", "data": {"created_at": "2023-02-06T17:25:10.106Z", "modified_at": "2023-01-25T07:20:02.381Z", "id": "", "amount": 755736, "currency": "Iceland Krona", "recurring_interval": "month", "status": "canceled", "current_period_start": "2024-04-11T19:08:16.655Z", "current_period_end": "2023-08-23T01:03:59.107Z", "cancel_at_period_end": true, "canceled_at": "2024-11-16T02:01:16.824Z", "started_at": null, "ends_at": "2023-12-23T04:50:00.016Z", "ended_at": "2024-10-18T16:25:47.209Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": null, "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-10-01T20:42:25.530Z", "modified_at": "2024-07-04T17:30:56.477Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-12-20T09:31:52.259Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2024-03-26T06:19:23.237Z", "modified_at": "2024-05-11T18:08:21.251Z", "id": "", "name": "", "description": "questioningly proliferate yet vanish mooch yowza hopeful", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {}, "prices": [{"created_at": "2023-01-25T07:20:02.381Z", "modified_at": "2024-03-21T16:37:42.322Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 107066, "maximum_amount": 251812, "preset_amount": 625077, "legacy": true}], "benefits": [{"id": "", "created_at": "2024-07-09T11:35:46.121Z", "modified_at": "2024-07-14T11:45:04.348Z", "type": "downloadables", "description": "esteemed aha arcade", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 549444}, "properties": {"archived": {"key": false, "key1": false, "key2": true}, "files": [""]}}, {"id": "", "created_at": "2023-07-17T10:10:30.145Z", "modified_at": "2024-02-22T01:39:19.437Z", "type": "github_repository", "description": "hmph frantically for into unfurl rapidly when", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": ""}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "admin"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/etc/namedb", "mime_type": "", "size": 865781, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": null, "checksum_sha256_hex": "", "last_modified_at": "2024-09-05T02:35:48.322Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-12-06T10:04:39.843Z", "size_readable": "", "public_url": "https://normal-giant.org/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2025-05-08T20:53:14.936Z", "modified_at": "2025-08-01T19:32:49.347Z", "id": "", "metadata": {"key": 791230}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 887720, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2025-05-08T20:53:14.936Z", "modified_at": "2025-08-01T19:32:49.347Z", "id": "", "metadata": {"key": 791230}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 887720, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2025-05-08T20:53:14.936Z", "modified_at": "2025-08-01T19:32:49.347Z", "id": "", "metadata": {"key": 791230}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 887720, "required": false}]}, "discount": {"duration": "once", "type": "fixed", "basis_points": 408479, "created_at": "2023-03-14T02:37:49.424Z", "modified_at": "2025-12-23T02:41:08.695Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2024-07-07T16:21:42.534Z", "ends_at": "2023-05-08T21:16:10.476Z", "max_redemptions": 431440, "redemptions_count": 127195, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-12-23T04:50:00.016Z", "modified_at": "2024-10-18T16:25:47.209Z", "id": "", "amount_type": "custom", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 138645, "maximum_amount": 95755, "preset_amount": 417130, "legacy": true}], "meters": [{"created_at": "2025-11-08T06:13:24.540Z", "modified_at": "2023-05-26T16:36:35.734Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 479423, "key1": 327992}, "created_at": "2025-01-03T20:59:19.837Z", "modified_at": "2024-09-23T23:32:35.223Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}, {"created_at": "2025-11-08T06:13:24.540Z", "modified_at": "2023-05-26T16:36:35.734Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 479423, "key1": 327992}, "created_at": "2025-01-03T20:59:19.837Z", "modified_at": "2024-09-23T23:32:35.223Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}, {"created_at": "2025-11-08T06:13:24.540Z", "modified_at": "2023-05-26T16:36:35.734Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 479423, "key1": 327992}, "created_at": "2025-01-03T20:59:19.837Z", "modified_at": "2024-09-23T23:32:35.223Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}]}} responses: "200": application/json: "" @@ -1709,7 +1719,7 @@ examples: _endpointsubscription_revoked_post: speakeasy-default-endpointsubscription-revoked-post: requestBody: - application/json: {"type": "subscription.revoked", "data": {"created_at": "2024-01-02T06:40:50.860Z", "modified_at": null, "id": "", "amount": 357630, "currency": "Fiji Dollar", "recurring_interval": "month", "status": "canceled", "current_period_start": "2024-04-30T10:39:59.432Z", "current_period_end": "2025-03-19T11:29:47.842Z", "cancel_at_period_end": true, "canceled_at": "2023-02-17T04:59:11.584Z", "started_at": "2024-02-14T23:20:57.498Z", "ends_at": "2025-04-28T23:19:31.379Z", "ended_at": "2023-04-29T06:37:50.213Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "customer_service", "customer_cancellation_comment": "", "metadata": {"key": 764246}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-03-17T11:47:03.932Z", "modified_at": "2025-12-12T02:48:12.123Z", "metadata": {"key": true, "key1": 683572}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-12-09T13:41:39.970Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2025-05-31T05:10:14.997Z", "modified_at": "2024-05-08T09:12:04.956Z", "id": "", "name": "", "description": "pace aside typewriter if oh almost supposing twine", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": "", "metadata": {"key": 956675}, "prices": [], "benefits": [{"id": "", "created_at": "2024-06-28T04:33:55.419Z", "modified_at": "2023-04-08T23:58:31.520Z", "type": "github_repository", "description": "eventually holster drab finished than sanity wiggly surprisingly judicious", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": false, "key1": 683668, "key2": 4880.9}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "admin"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/Users", "mime_type": "", "size": 789606, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-10-08T06:21:41.000Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2024-12-10T00:21:44.017Z", "size_readable": "", "public_url": "https://poor-duster.name/"}, {"id": "", "organization_id": "", "name": "", "path": "/Users", "mime_type": "", "size": 789606, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-10-08T06:21:41.000Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2024-12-10T00:21:44.017Z", "size_readable": "", "public_url": "https://poor-duster.name/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-02-06T03:19:32.386Z", "modified_at": "2023-10-17T04:09:43.608Z", "id": "", "metadata": {}, "type": "date", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 575720, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-02-06T03:19:32.386Z", "modified_at": "2023-10-17T04:09:43.608Z", "id": "", "metadata": {}, "type": "date", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 575720, "required": false}]}, "discount": null, "prices": [], "meters": []}} + application/json: {"type": "subscription.revoked", "timestamp": "2024-01-02T06:40:50.860Z", "data": {"created_at": "2024-01-02T06:40:50.860Z", "modified_at": null, "id": "", "amount": 357630, "currency": "Fiji Dollar", "recurring_interval": "month", "status": "canceled", "current_period_start": "2024-04-30T10:39:59.432Z", "current_period_end": "2025-03-19T11:29:47.842Z", "cancel_at_period_end": true, "canceled_at": "2023-02-17T04:59:11.584Z", "started_at": "2024-02-14T23:20:57.498Z", "ends_at": "2025-04-28T23:19:31.379Z", "ended_at": "2023-04-29T06:37:50.213Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "customer_service", "customer_cancellation_comment": "", "metadata": {"key": 764246}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-03-17T11:47:03.932Z", "modified_at": "2025-12-12T02:48:12.123Z", "metadata": {"key": true, "key1": 683572}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-12-09T13:41:39.970Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "product": {"created_at": "2025-05-31T05:10:14.997Z", "modified_at": "2024-05-08T09:12:04.956Z", "id": "", "name": "", "description": "pace aside typewriter if oh almost supposing twine", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": "", "metadata": {"key": 956675}, "prices": [], "benefits": [{"id": "", "created_at": "2024-06-28T04:33:55.419Z", "modified_at": "2023-04-08T23:58:31.520Z", "type": "github_repository", "description": "eventually holster drab finished than sanity wiggly surprisingly judicious", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": false, "key1": 683668, "key2": 4880.9}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "admin"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/Users", "mime_type": "", "size": 789606, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-10-08T06:21:41.000Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2024-12-10T00:21:44.017Z", "size_readable": "", "public_url": "https://poor-duster.name/"}, {"id": "", "organization_id": "", "name": "", "path": "/Users", "mime_type": "", "size": 789606, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-10-08T06:21:41.000Z", "version": "", "service": "product_media", "is_uploaded": false, "created_at": "2024-12-10T00:21:44.017Z", "size_readable": "", "public_url": "https://poor-duster.name/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-02-06T03:19:32.386Z", "modified_at": "2023-10-17T04:09:43.608Z", "id": "", "metadata": {}, "type": "date", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 575720, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-02-06T03:19:32.386Z", "modified_at": "2023-10-17T04:09:43.608Z", "id": "", "metadata": {}, "type": "date", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 575720, "required": false}]}, "discount": null, "prices": [], "meters": []}} responses: "200": application/json: "" @@ -1718,7 +1728,7 @@ examples: _endpointrefund_created_post: speakeasy-default-endpointrefund-created-post: requestBody: - application/json: {"type": "refund.created", "data": {"created_at": "2025-02-15T13:46:01.700Z", "modified_at": "2024-07-08T10:47:55.917Z", "id": "", "metadata": {"key": 1671.19, "key1": "", "key2": true}, "status": "succeeded", "reason": "satisfaction_guarantee", "amount": 800478, "tax_amount": 856871, "currency": "Lebanese Pound", "organization_id": "", "order_id": "", "subscription_id": "", "customer_id": "", "revoke_benefits": false}} + application/json: {"type": "refund.created", "timestamp": "2025-02-15T13:46:01.700Z", "data": {"created_at": "2025-02-15T13:46:01.700Z", "modified_at": "2024-07-08T10:47:55.917Z", "id": "", "metadata": {"key": 1671.19, "key1": "", "key2": true}, "status": "succeeded", "reason": "satisfaction_guarantee", "amount": 800478, "tax_amount": 856871, "currency": "Lebanese Pound", "organization_id": "", "order_id": "", "subscription_id": "", "customer_id": "", "revoke_benefits": false}} responses: "200": application/json: "" @@ -1727,7 +1737,7 @@ examples: _endpointrefund_updated_post: speakeasy-default-endpointrefund-updated-post: requestBody: - application/json: {"type": "refund.updated", "data": {"created_at": "2023-01-08T20:35:39.672Z", "modified_at": "2025-09-12T22:02:00.691Z", "id": "", "metadata": {"key": "", "key1": false}, "status": "canceled", "reason": "satisfaction_guarantee", "amount": 168595, "tax_amount": 859949, "currency": "Venezuelan bolívar", "organization_id": "", "order_id": "", "subscription_id": "", "customer_id": "", "revoke_benefits": true}} + application/json: {"type": "refund.updated", "timestamp": "2023-01-08T20:35:39.672Z", "data": {"created_at": "2023-01-08T20:35:39.672Z", "modified_at": "2025-09-12T22:02:00.691Z", "id": "", "metadata": {"key": "", "key1": false}, "status": "canceled", "reason": "satisfaction_guarantee", "amount": 168595, "tax_amount": 859949, "currency": "Venezuelan bolívar", "organization_id": "", "order_id": "", "subscription_id": "", "customer_id": "", "revoke_benefits": true}} responses: "200": application/json: "" @@ -1736,7 +1746,7 @@ examples: _endpointproduct_created_post: speakeasy-default-endpointproduct-created-post: requestBody: - application/json: {"type": "product.created", "data": {"created_at": "2023-10-13T02:47:55.082Z", "modified_at": null, "id": "", "name": "", "description": "till that ew put", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "metadata": {"key": 785881, "key1": false, "key2": false}, "prices": [{"created_at": "2024-07-28T01:37:16.074Z", "modified_at": "2024-06-21T04:06:38.404Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 351958, "maximum_amount": 675813, "preset_amount": 835712, "legacy": true}, {"created_at": "2024-01-23T05:50:45.318Z", "modified_at": "2024-12-09T02:07:21.938Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}, {"created_at": "2023-09-12T18:18:34.397Z", "modified_at": null, "id": "", "amount_type": "fixed", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 575460, "legacy": true}], "benefits": [{"id": "", "created_at": "2023-01-15T03:15:59.062Z", "modified_at": "2023-07-04T11:33:29.001Z", "type": "discord", "description": "soybean till mortise brr yet sympathetically", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": 247381}, "properties": {"guild_id": "", "role_id": "", "kick_member": true, "guild_token": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/Users", "mime_type": "", "size": 616062, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-10-29T10:58:55.115Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-02-03T23:25:29.448Z", "size_readable": "", "public_url": "https://livid-stool.biz/"}], "attached_custom_fields": []}} + application/json: {"type": "product.created", "timestamp": "2023-10-13T02:47:55.082Z", "data": {"created_at": "2023-10-13T02:47:55.082Z", "modified_at": null, "id": "", "name": "", "description": "till that ew put", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "metadata": {"key": 785881, "key1": false, "key2": false}, "prices": [{"created_at": "2024-07-28T01:37:16.074Z", "modified_at": "2024-06-21T04:06:38.404Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 351958, "maximum_amount": 675813, "preset_amount": 835712, "legacy": true}, {"created_at": "2024-01-23T05:50:45.318Z", "modified_at": "2024-12-09T02:07:21.938Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "legacy": true}, {"created_at": "2023-09-12T18:18:34.397Z", "modified_at": null, "id": "", "amount_type": "fixed", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "price_amount": 575460, "legacy": true}], "benefits": [{"id": "", "created_at": "2023-01-15T03:15:59.062Z", "modified_at": "2023-07-04T11:33:29.001Z", "type": "discord", "description": "soybean till mortise brr yet sympathetically", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": 247381}, "properties": {"guild_id": "", "role_id": "", "kick_member": true, "guild_token": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/Users", "mime_type": "", "size": 616062, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-10-29T10:58:55.115Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-02-03T23:25:29.448Z", "size_readable": "", "public_url": "https://livid-stool.biz/"}], "attached_custom_fields": []}} responses: "200": application/json: "" @@ -1745,7 +1755,7 @@ examples: _endpointproduct_updated_post: speakeasy-default-endpointproduct-updated-post: requestBody: - application/json: {"type": "product.updated", "data": {"created_at": "2024-08-25T02:00:54.049Z", "modified_at": "2023-07-21T03:22:42.071Z", "id": "", "name": "", "description": "fooey optimistic beyond dress helpfully whispered structure heartfelt consequently", "recurring_interval": "year", "is_recurring": false, "is_archived": false, "organization_id": "", "metadata": {"key": 495401, "key1": true}, "prices": [{"created_at": "2023-07-21T03:22:42.071Z", "modified_at": "2025-05-10T05:05:05.968Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}, {"created_at": "2023-08-10T13:22:51.241Z", "modified_at": "2024-10-05T01:46:47.680Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 753291, "maximum_amount": 103642, "preset_amount": 38424, "legacy": true}, {"created_at": "2024-11-15T20:13:31.076Z", "modified_at": "2025-08-03T01:42:10.311Z", "id": "", "amount_type": "custom", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 586326, "maximum_amount": 272075, "preset_amount": 946258, "legacy": true}], "benefits": [{"id": "", "created_at": "2024-12-26T20:43:42.655Z", "modified_at": "2023-11-13T02:29:49.304Z", "type": "downloadables", "description": "towards avaricious oof after nutritious", "selectable": true, "deletable": true, "organization_id": "", "metadata": {}, "properties": {"archived": {"key": false}, "files": ["", "", ""]}}, {"id": "", "created_at": "2023-09-18T01:08:29.935Z", "modified_at": "2025-06-15T04:30:20.706Z", "type": "meter_credit", "description": "where patroller after aw arid", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": true, "key1": ""}, "properties": {"units": 292879, "rollover": true, "meter_id": ""}}, {"id": "", "created_at": "2023-08-06T07:32:57.958Z", "modified_at": "2023-04-29T20:41:41.892Z", "type": "github_repository", "description": "once however abnormally pace wretched presell", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": false}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "pull"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 435627, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-04-14T07:39:07.142Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-04-21T20:24:54.389Z", "size_readable": "", "public_url": "https://uneven-juggernaut.net"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2025-10-22T03:22:15.717Z", "modified_at": "2024-11-21T19:59:56.303Z", "id": "", "metadata": {"key": true, "key1": false}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 876633, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2025-10-22T03:22:15.717Z", "modified_at": "2024-11-21T19:59:56.303Z", "id": "", "metadata": {"key": true, "key1": false}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 876633, "required": true}]}} + application/json: {"type": "product.updated", "timestamp": "2024-08-25T02:00:54.049Z", "data": {"created_at": "2024-08-25T02:00:54.049Z", "modified_at": "2023-07-21T03:22:42.071Z", "id": "", "name": "", "description": "fooey optimistic beyond dress helpfully whispered structure heartfelt consequently", "recurring_interval": "year", "is_recurring": false, "is_archived": false, "organization_id": "", "metadata": {"key": 495401, "key1": true}, "prices": [{"created_at": "2023-07-21T03:22:42.071Z", "modified_at": "2025-05-10T05:05:05.968Z", "id": "", "amount_type": "free", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "legacy": true}, {"created_at": "2023-08-10T13:22:51.241Z", "modified_at": "2024-10-05T01:46:47.680Z", "id": "", "amount_type": "custom", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 753291, "maximum_amount": 103642, "preset_amount": 38424, "legacy": true}, {"created_at": "2024-11-15T20:13:31.076Z", "modified_at": "2025-08-03T01:42:10.311Z", "id": "", "amount_type": "custom", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 586326, "maximum_amount": 272075, "preset_amount": 946258, "legacy": true}], "benefits": [{"id": "", "created_at": "2024-12-26T20:43:42.655Z", "modified_at": "2023-11-13T02:29:49.304Z", "type": "downloadables", "description": "towards avaricious oof after nutritious", "selectable": true, "deletable": true, "organization_id": "", "metadata": {}, "properties": {"archived": {"key": false}, "files": ["", "", ""]}}, {"id": "", "created_at": "2023-09-18T01:08:29.935Z", "modified_at": "2025-06-15T04:30:20.706Z", "type": "meter_credit", "description": "where patroller after aw arid", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": true, "key1": ""}, "properties": {"units": 292879, "rollover": true, "meter_id": ""}}, {"id": "", "created_at": "2023-08-06T07:32:57.958Z", "modified_at": "2023-04-29T20:41:41.892Z", "type": "github_repository", "description": "once however abnormally pace wretched presell", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": false}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "pull"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 435627, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-04-14T07:39:07.142Z", "version": "", "service": "product_media", "is_uploaded": true, "created_at": "2024-04-21T20:24:54.389Z", "size_readable": "", "public_url": "https://uneven-juggernaut.net"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2025-10-22T03:22:15.717Z", "modified_at": "2024-11-21T19:59:56.303Z", "id": "", "metadata": {"key": true, "key1": false}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 876633, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2025-10-22T03:22:15.717Z", "modified_at": "2024-11-21T19:59:56.303Z", "id": "", "metadata": {"key": true, "key1": false}, "type": "text", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 876633, "required": true}]}} responses: "200": application/json: "" @@ -1754,7 +1764,7 @@ examples: _endpointorganization_updated_post: speakeasy-default-endpointorganization-updated-post: requestBody: - application/json: {"type": "organization.updated", "data": {"created_at": "2025-08-19T15:02:44.139Z", "modified_at": "2025-08-23T00:45:50.780Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": null, "email": "Lemuel44@gmail.com", "website": "", "socials": [{"platform": "tiktok", "url": "https://grizzled-patroller.info/"}, {"platform": "tiktok", "url": "https://grizzled-patroller.info/"}], "status": "active", "details_submitted_at": null, "feature_settings": {"issue_funding_enabled": false}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "invoice"}, "notification_settings": {"new_order": false, "new_subscription": false}}} + application/json: {"type": "organization.updated", "timestamp": "2025-08-19T15:02:44.139Z", "data": {"created_at": "2025-08-19T15:02:44.139Z", "modified_at": "2025-08-23T00:45:50.780Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": null, "email": "Lemuel44@gmail.com", "website": "", "socials": [{"platform": "tiktok", "url": "https://grizzled-patroller.info/"}, {"platform": "tiktok", "url": "https://grizzled-patroller.info/"}], "status": "active", "details_submitted_at": null, "feature_settings": {"issue_funding_enabled": false}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "invoice"}, "notification_settings": {"new_order": false, "new_subscription": false}}} responses: "200": application/json: "" @@ -1763,7 +1773,7 @@ examples: _endpointbenefit_created_post: speakeasy-default-endpointbenefit-created-post: requestBody: - application/json: {"type": "benefit.created", "data": {"id": "", "created_at": "2024-05-25T19:36:21.799Z", "modified_at": "2023-12-03T18:35:26.911Z", "type": "meter_credit", "description": "futon redraw forenenst pecan evince if", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": "", "key1": 9.17, "key2": 469914}, "properties": {"units": 479716, "rollover": false, "meter_id": ""}}} + application/json: {"type": "benefit.created", "timestamp": "2025-10-17T23:42:52.571Z", "data": {"id": "", "created_at": "2024-05-25T19:36:21.799Z", "modified_at": "2023-12-03T18:35:26.911Z", "type": "meter_credit", "description": "futon redraw forenenst pecan evince if", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": "", "key1": 9.17, "key2": 469914}, "properties": {"units": 479716, "rollover": false, "meter_id": ""}}} responses: "200": application/json: "" @@ -1772,7 +1782,7 @@ examples: _endpointbenefit_updated_post: speakeasy-default-endpointbenefit-updated-post: requestBody: - application/json: {"type": "benefit.updated", "data": {"id": "", "created_at": "2023-05-30T17:26:31.997Z", "modified_at": "2024-07-30T05:38:56.086Z", "type": "downloadables", "description": "metal preregister psst woot somber", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": 938.65}, "properties": {"archived": {"key": true, "key1": true, "key2": true}, "files": []}}} + application/json: {"type": "benefit.updated", "timestamp": "2024-09-24T20:33:20.375Z", "data": {"id": "", "created_at": "2023-05-30T17:26:31.997Z", "modified_at": "2024-07-30T05:38:56.086Z", "type": "downloadables", "description": "metal preregister psst woot somber", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": 938.65}, "properties": {"archived": {"key": true, "key1": true, "key2": true}, "files": []}}} responses: "200": application/json: "" @@ -1781,7 +1791,7 @@ examples: _endpointbenefit_grant_created_post: speakeasy-default-endpointbenefit-grant-created-post: requestBody: - application/json: {"type": "benefit_grant.created", "data": {"created_at": "2025-07-29T09:12:26.895Z", "modified_at": "2025-07-26T11:51:14.320Z", "id": "", "is_granted": false, "is_revoked": true, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-05-22T17:07:22.158Z", "modified_at": "2025-05-12T01:27:02.379Z", "metadata": {"key": 74631, "key1": 8472.54, "key2": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-02-04T07:22:26.555Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "properties": {}, "benefit": {"id": "", "created_at": "2023-06-12T14:51:22.188Z", "modified_at": "2023-06-04T11:09:21.440Z", "type": "github_repository", "description": "vibraphone however abseil yet conservative", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": "", "key1": 164738, "key2": 826637}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "maintain"}}}} + application/json: {"type": "benefit_grant.created", "timestamp": "2025-07-29T09:12:26.895Z", "data": {"created_at": "2025-07-29T09:12:26.895Z", "modified_at": "2025-07-26T11:51:14.320Z", "id": "", "is_granted": false, "is_revoked": true, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-05-22T17:07:22.158Z", "modified_at": "2025-05-12T01:27:02.379Z", "metadata": {"key": 74631, "key1": 8472.54, "key2": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-02-04T07:22:26.555Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "benefit": {"id": "", "created_at": "2023-06-12T14:51:22.188Z", "modified_at": "2023-06-04T11:09:21.440Z", "type": "github_repository", "description": "vibraphone however abseil yet conservative", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": "", "key1": 164738, "key2": 826637}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "maintain"}}, "properties": {}}} responses: "200": application/json: "" @@ -1790,7 +1800,7 @@ examples: _endpointbenefit_grant_updated_post: speakeasy-default-endpointbenefit-grant-updated-post: requestBody: - application/json: {"type": "benefit_grant.updated", "data": {"created_at": "2023-06-15T00:42:20.858Z", "modified_at": "2023-09-09T02:35:13.085Z", "id": "", "is_granted": true, "is_revoked": true, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-07-19T15:08:59.439Z", "modified_at": "2024-06-22T06:57:35.281Z", "metadata": {"key": false, "key1": 322224}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-09-29T05:46:04.457Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "properties": {}, "benefit": {"id": "", "created_at": "2023-12-23T22:21:47.780Z", "modified_at": "2024-02-26T16:39:20.374Z", "type": "downloadables", "description": "cutlet flickering ecstatic materialise verbally appliance", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 2069.39, "key1": ""}, "properties": {"archived": {}, "files": [""]}}}} + application/json: {"type": "benefit_grant.updated", "timestamp": "2023-06-15T00:42:20.858Z", "data": {"created_at": "2023-06-15T00:42:20.858Z", "modified_at": "2023-09-09T02:35:13.085Z", "id": "", "is_granted": true, "is_revoked": true, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-07-19T15:08:59.439Z", "modified_at": "2024-06-22T06:57:35.281Z", "metadata": {"key": false, "key1": 322224}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-09-29T05:46:04.457Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "benefit": {"id": "", "created_at": "2023-12-23T22:21:47.780Z", "modified_at": "2024-02-26T16:39:20.374Z", "type": "downloadables", "description": "cutlet flickering ecstatic materialise verbally appliance", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 2069.39, "key1": ""}, "properties": {"archived": {}, "files": [""]}}, "properties": {}}} responses: "200": application/json: "" @@ -1799,7 +1809,7 @@ examples: _endpointbenefit_grant_cycled_post: speakeasy-default-endpointbenefit-grant-cycled-post: requestBody: - application/json: {"type": "benefit_grant.cycled", "data": {"created_at": "2023-11-21T13:26:50.948Z", "modified_at": null, "id": "", "is_granted": true, "is_revoked": true, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-02-09T07:31:14.605Z", "modified_at": "2024-01-29T22:31:09.229Z", "metadata": {"key": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": null, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-08-25T13:47:56.433Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "properties": {}, "benefit": {"id": "", "created_at": "2025-07-14T03:36:29.696Z", "modified_at": "2023-08-20T01:19:24.073Z", "type": "downloadables", "description": "witty noisily negative colligate hence geez phew pacemaker marten", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": ""}, "properties": {"archived": {"key": true}, "files": []}}}} + application/json: {"type": "benefit_grant.cycled", "timestamp": "2023-11-21T13:26:50.948Z", "data": {"created_at": "2023-11-21T13:26:50.948Z", "modified_at": null, "id": "", "is_granted": true, "is_revoked": true, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-02-09T07:31:14.605Z", "modified_at": "2024-01-29T22:31:09.229Z", "metadata": {"key": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": null, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-08-25T13:47:56.433Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "benefit": {"id": "", "created_at": "2025-07-14T03:36:29.696Z", "modified_at": "2023-08-20T01:19:24.073Z", "type": "downloadables", "description": "witty noisily negative colligate hence geez phew pacemaker marten", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": ""}, "properties": {"archived": {"key": true}, "files": []}}, "properties": {}}} responses: "200": application/json: "" @@ -1808,7 +1818,7 @@ examples: _endpointbenefit_grant_revoked_post: speakeasy-default-endpointbenefit-grant-revoked-post: requestBody: - application/json: {"type": "benefit_grant.revoked", "data": {"created_at": "2025-10-11T18:40:00.865Z", "modified_at": null, "id": "", "is_granted": true, "is_revoked": true, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-02-19T18:50:01.394Z", "modified_at": "2024-11-20T19:24:54.327Z", "metadata": {"key": 571706}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": null, "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "properties": {}, "benefit": {"id": "", "created_at": "2024-03-12T16:39:36.178Z", "modified_at": "2024-07-08T07:08:59.377Z", "type": "meter_credit", "description": "grandiose royal surface before ouch silently authentic more override reassuringly", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": "", "key1": 6254.36, "key2": ""}, "properties": {"units": 708154, "rollover": true, "meter_id": ""}}}} + application/json: {"type": "benefit_grant.revoked", "timestamp": "2025-10-11T18:40:00.865Z", "data": {"created_at": "2025-10-11T18:40:00.865Z", "modified_at": null, "id": "", "is_granted": true, "is_revoked": true, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-02-19T18:50:01.394Z", "modified_at": "2024-11-20T19:24:54.327Z", "metadata": {"key": 571706}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": null, "avatar_url": "https://www.gravatar.com/avatar/xxx?d=404"}, "benefit": {"id": "", "created_at": "2024-03-12T16:39:36.178Z", "modified_at": "2024-07-08T07:08:59.377Z", "type": "meter_credit", "description": "grandiose royal surface before ouch silently authentic more override reassuringly", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": "", "key1": 6254.36, "key2": ""}, "properties": {"units": 708154, "rollover": true, "meter_id": ""}}, "properties": {}}} responses: "200": application/json: "" @@ -3438,4 +3448,10 @@ examples: application/json: {"error": "OrderNotEligibleForRetry", "detail": ""} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes Detected:\n* `polar.customer_portal.benefit-grants.get()`: `response` **Changed** **Breaking** :warning:\n* `polar.customers.get_state_external()`: `response.granted_benefits.[].properties` **Changed** **Breaking** :warning:\n* `polar.customer_portal.benefit-grants.list()`: `response.items.[]` **Changed** **Breaking** :warning:\n* `polar.customer_portal.benefit-grants.update()`: \n * `request.customer_benefit_grant_update` **Changed**\n * `response` **Changed** **Breaking** :warning:\n* `polar.benefits.grants()`: `response.items.[].properties` **Changed** **Breaking** :warning:\n* `polar.customers.get_state()`: `response.granted_benefits.[].properties` **Changed** **Breaking** :warning:\n* `polar.customer_portal.customers.delete_payment_method()`: `error.status[400]` **Added**\n* `polar.subscriptions.revoke()`: \n * `response.meters.[].meter.archived_at` **Added**\n * `error.status[409]` **Added**\n* `polar.subscriptions.get()`: `response.meters.[].meter.archived_at` **Added**\n* `polar.subscriptions.list()`: `response.items.[].meters.[].meter.archived_at` **Added**\n* `polar.subscriptions.update()`: \n * `response.meters.[].meter.archived_at` **Added**\n * `error.status[409]` **Added**\n* `polar.events.list()`: `response.items.[].[system_event]` **Changed**\n* `polar.events.get()`: `response.[system_event]` **Changed**\n* `polar.meters.list()`: \n * `request.is_archived` **Added**\n * `response.items.[].archived_at` **Added**\n* `polar.meters.create()`: `response.archived_at` **Added**\n* `polar.meters.get()`: `response.archived_at` **Added**\n* `polar.meters.update()`: \n * `request.meter_update.is_archived` **Added**\n * `response.archived_at` **Added**\n* `polar.customer_meters.list()`: `response.items.[].meter.archived_at` **Added**\n* `polar.customer_meters.get()`: `response.meter.archived_at` **Added**\n" +releaseNotes: | + ## Python SDK Changes Detected: + * `polar.webhooks.list_webhook_deliveries()`: `response.items.[]` **Changed** **Breaking** :warning: + * `polar.benefits.list()`: `request.sorting` **Changed** + * `polar.customer_portal.benefit-grants.list()`: `response.items.[].[customer_benefit_grant_meter_credit].properties` **Changed** + * `polar.customer_portal.benefit-grants.get()`: `response.[customer_benefit_grant_meter_credit].properties` **Changed** + * `polar.customer_portal.benefit-grants.update()`: `response.[customer_benefit_grant_meter_credit].properties` **Changed** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 3b8a4883..b1bedafa 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -19,12 +19,13 @@ generation: auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false + hoistGlobalSecurity: true tests: generateTests: true generateNewTests: false skipResponseBodyAssertions: false python: - version: 0.23.0 + version: 0.23.1 additionalDependencies: dev: pydantic-ai-slim: ^0.1.0 @@ -66,4 +67,5 @@ python: pytestFilterWarnings: [] pytestTimeout: 0 responseFormat: flat + sseFlatResponse: false templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c326cd83..e4a3dd1c 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.609.0 +speakeasyVersion: 1.615.2 sources: Polar-OAS: sourceNamespace: polar-oas - sourceRevisionDigest: sha256:10b25f4c69799d98076ce42400b21e7aca688f6a4936f0b0ae3a157f8303e9b5 - sourceBlobDigest: sha256:9ddf6e719736b4116c5ce6de12d0b3913dea4124e72d64858ea679159be31b85 + sourceRevisionDigest: sha256:0609c2f786cf41c405047e351611a410c5e1993dd3edb8e1c8607a800d9ba45f + sourceBlobDigest: sha256:a63f46911db62fcac2879f63c5173739ee400f0b9439775e24615d8e3b8039d8 tags: - latest - - speakeasy-sdk-regen-1756167230 + - speakeasy-sdk-regen-1757117557 - 0.1.0 targets: polar: source: Polar-OAS sourceNamespace: polar-oas - sourceRevisionDigest: sha256:10b25f4c69799d98076ce42400b21e7aca688f6a4936f0b0ae3a157f8303e9b5 - sourceBlobDigest: sha256:9ddf6e719736b4116c5ce6de12d0b3913dea4124e72d64858ea679159be31b85 + sourceRevisionDigest: sha256:0609c2f786cf41c405047e351611a410c5e1993dd3edb8e1c8607a800d9ba45f + sourceBlobDigest: sha256:a63f46911db62fcac2879f63c5173739ee400f0b9439775e24615d8e3b8039d8 codeSamplesNamespace: polar-oas-py-code-samples - codeSamplesRevisionDigest: sha256:0b87c3d5ea9fe791d0c2c4b94e007f6b0b840a5ae94b0c228d43d5ae3d35a291 + codeSamplesRevisionDigest: sha256:02a649ad7724ad6c84fe2565e5629bccf761c08396baf4c0b9289cc1d9f25148 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 89d009a2..66c31ea3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -883,4 +883,14 @@ Based on: ### Generated - [python v0.23.0] . ### Releases -- [PyPI v0.23.0] https://pypi.org/project/polar-sdk/0.23.0 - . \ No newline at end of file +- [PyPI v0.23.0] https://pypi.org/project/polar-sdk/0.23.0 - . + +## 2025-09-16 00:12:52 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.615.2 (2.698.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.23.1] . +### Releases +- [PyPI v0.23.1] https://pypi.org/project/polar-sdk/0.23.1 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index cf98ee8e..af5ecdbe 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -776,160 +776,160 @@ actions: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "from polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_created_post(request={\n \"type\": \"benefit.created\",\n \"data\": {\n \"id\": \"\",\n \"created_at\": parse_datetime(\"2024-05-25T19:36:21.799Z\"),\n \"modified_at\": parse_datetime(\"2023-12-03T18:35:26.911Z\"),\n \"type\": \"meter_credit\",\n \"description\": \"futon redraw forenenst pecan evince if\",\n \"selectable\": False,\n \"deletable\": False,\n \"organization_id\": \"\",\n \"metadata\": {\n \"key\": \"\",\n },\n \"properties\": {\n \"units\": 623977,\n \"rollover\": True,\n \"meter_id\": \"\",\n },\n },\n })\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_created_post(request={\n \"type\": \"benefit.created\",\n \"timestamp\": parse_datetime(\"2025-10-17T23:42:52.571Z\"),\n \"data\": {\n \"id\": \"\",\n \"created_at\": parse_datetime(\"2025-05-24T21:27:59.843Z\"),\n \"modified_at\": parse_datetime(\"2024-07-01T06:29:09.775Z\"),\n \"type\": \"github_repository\",\n \"description\": \"beneath terrorise but about uh-huh\",\n \"selectable\": False,\n \"deletable\": True,\n \"organization_id\": \"\",\n \"metadata\": {\n\n },\n \"properties\": {\n \"repository_owner\": \"polarsource\",\n \"repository_name\": \"private_repo\",\n \"permission\": polar_sdk.Permission.PUSH,\n },\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["benefit.updated"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "from polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_updated_post(request={\n \"type\": \"benefit.updated\",\n \"data\": {\n \"id\": \"\",\n \"created_at\": parse_datetime(\"2023-05-30T17:26:31.997Z\"),\n \"modified_at\": parse_datetime(\"2024-07-30T05:38:56.086Z\"),\n \"type\": \"downloadables\",\n \"description\": \"metal preregister psst woot somber\",\n \"selectable\": False,\n \"deletable\": False,\n \"organization_id\": \"\",\n \"metadata\": {\n\n },\n \"properties\": {\n \"archived\": {\n \"key\": True,\n \"key1\": False,\n },\n \"files\": [\n \"\",\n ],\n },\n },\n })\n\n # Handle response\n print(res)" + "source": "from polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_updated_post(request={\n \"type\": \"benefit.updated\",\n \"timestamp\": parse_datetime(\"2024-09-24T20:33:20.375Z\"),\n \"data\": {\n \"id\": \"\",\n \"created_at\": parse_datetime(\"2025-12-28T13:48:13.081Z\"),\n \"modified_at\": parse_datetime(\"2023-10-27T10:32:06.844Z\"),\n \"type\": \"custom\",\n \"description\": \"fooey save simple an prime fast modulo nor randomize worth\",\n \"selectable\": False,\n \"deletable\": True,\n \"organization_id\": \"\",\n \"metadata\": {\n \"key\": \"\",\n },\n \"properties\": {\n \"note\": \"\",\n },\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["benefit_grant.created"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_grant_created_post(request=polar_sdk.WebhookBenefitGrantCreatedPayload(\n data=polar_sdk.BenefitGrantWebhook(\n created_at=parse_datetime(\"2025-07-29T09:12:26.895Z\"),\n modified_at=parse_datetime(\"2025-07-26T11:51:14.320Z\"),\n id=\"\",\n is_granted=False,\n is_revoked=True,\n subscription_id=\"\",\n order_id=\"\",\n customer_id=\"\",\n benefit_id=\"\",\n customer=polar_sdk.Customer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-05-22T17:07:22.158Z\"),\n modified_at=parse_datetime(\"2025-05-12T01:27:02.379Z\"),\n metadata={\n \"key\": 74631,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2023-02-21T01:01:33.050Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n properties=polar_sdk.BenefitGrantCustomProperties(),\n benefit=polar_sdk.BenefitDiscord(\n id=\"\",\n created_at=parse_datetime(\"2024-02-04T07:22:26.555Z\"),\n modified_at=parse_datetime(\"2024-01-11T07:21:59.726Z\"),\n description=\"sand um plagiarise dearly\",\n selectable=False,\n deletable=True,\n organization_id=\"\",\n metadata={\n \"key\": False,\n },\n properties=polar_sdk.BenefitDiscordProperties(\n guild_id=\"\",\n role_id=\"\",\n kick_member=False,\n guild_token=\"\",\n ),\n ),\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_grant_created_post(request=polar_sdk.WebhookBenefitGrantCreatedPayload(\n timestamp=parse_datetime(\"2025-07-29T09:12:26.895Z\"),\n data=polar_sdk.BenefitGrantCustomWebhook(\n created_at=parse_datetime(\"2025-07-26T11:51:14.320Z\"),\n modified_at=parse_datetime(\"2023-06-26T18:19:56.152Z\"),\n id=\"\",\n is_granted=False,\n is_revoked=True,\n subscription_id=\"\",\n order_id=\"\",\n customer_id=\"\",\n benefit_id=\"\",\n customer=polar_sdk.Customer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-05-12T01:27:02.379Z\"),\n modified_at=parse_datetime(\"2023-11-17T04:22:37.821Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2023-02-21T01:01:33.050Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n benefit=polar_sdk.BenefitCustom(\n id=\"\",\n created_at=parse_datetime(\"2023-07-27T17:46:55.663Z\"),\n modified_at=parse_datetime(\"2024-02-04T07:22:26.555Z\"),\n description=\"blah even spirit reprove gee instead that longingly\",\n selectable=False,\n deletable=True,\n organization_id=\"\",\n metadata={\n\n },\n properties=polar_sdk.BenefitCustomProperties(\n note=None,\n ),\n ),\n properties=polar_sdk.BenefitGrantCustomProperties(),\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["benefit_grant.cycled"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_grant_cycled_post(request=polar_sdk.WebhookBenefitGrantCycledPayload(\n data=polar_sdk.BenefitGrantWebhook(\n created_at=parse_datetime(\"2023-11-21T13:26:50.948Z\"),\n modified_at=None,\n id=\"\",\n is_granted=True,\n is_revoked=True,\n subscription_id=\"\",\n order_id=\"\",\n customer_id=\"\",\n benefit_id=\"\",\n customer=polar_sdk.Customer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-02-09T07:31:14.605Z\"),\n modified_at=parse_datetime(\"2024-01-29T22:31:09.229Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2023-02-26T15:17:14.361Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n properties=polar_sdk.BenefitGrantCustomProperties(),\n benefit=polar_sdk.BenefitMeterCredit(\n id=\"\",\n created_at=parse_datetime(\"2025-09-22T10:01:13.690Z\"),\n modified_at=parse_datetime(\"2025-07-14T03:36:29.696Z\"),\n description=\"soulful which reapply muddy never pish plus duh up ecliptic\",\n selectable=True,\n deletable=True,\n organization_id=\"\",\n metadata={\n \"key\": \"\",\n },\n properties=polar_sdk.BenefitMeterCreditProperties(\n units=107264,\n rollover=False,\n meter_id=\"\",\n ),\n ),\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_grant_cycled_post(request=polar_sdk.WebhookBenefitGrantCycledPayload(\n timestamp=parse_datetime(\"2023-11-21T13:26:50.948Z\"),\n data=polar_sdk.BenefitGrantDiscordWebhook(\n created_at=parse_datetime(\"2023-07-19T03:56:32.649Z\"),\n modified_at=parse_datetime(\"2025-06-08T22:06:37.934Z\"),\n id=\"\",\n is_granted=False,\n is_revoked=False,\n subscription_id=\"\",\n order_id=\"\",\n customer_id=\"\",\n benefit_id=\"\",\n customer=polar_sdk.Customer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-06-18T10:06:52.830Z\"),\n modified_at=parse_datetime(\"2024-06-29T04:36:34.181Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-09-22T10:01:13.690Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n benefit=polar_sdk.BenefitDiscord(\n id=\"\",\n created_at=parse_datetime(\"2024-08-15T00:34:14.846Z\"),\n modified_at=parse_datetime(\"2025-10-24T15:26:44.314Z\"),\n description=\"unimportant ah prickly past\",\n selectable=True,\n deletable=True,\n organization_id=\"\",\n metadata={\n \"key\": \"\",\n },\n properties=polar_sdk.BenefitDiscordProperties(\n guild_id=\"\",\n role_id=\"\",\n kick_member=True,\n guild_token=\"\",\n ),\n ),\n properties=polar_sdk.BenefitGrantDiscordProperties(),\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["benefit_grant.revoked"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_grant_revoked_post(request=polar_sdk.WebhookBenefitGrantRevokedPayload(\n data=polar_sdk.BenefitGrantWebhook(\n created_at=parse_datetime(\"2025-10-11T18:40:00.865Z\"),\n modified_at=None,\n id=\"\",\n is_granted=True,\n is_revoked=True,\n subscription_id=\"\",\n order_id=\"\",\n customer_id=\"\",\n benefit_id=\"\",\n customer=polar_sdk.Customer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-02-19T18:50:01.394Z\"),\n modified_at=parse_datetime(\"2024-11-20T19:24:54.327Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2024-05-31T18:00:43.998Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n properties=polar_sdk.BenefitGrantCustomProperties(),\n benefit=polar_sdk.BenefitGitHubRepository(\n id=\"\",\n created_at=parse_datetime(\"2025-11-04T03:19:52.925Z\"),\n modified_at=parse_datetime(\"2024-12-07T07:46:15.545Z\"),\n description=\"maestro silk er hence furthermore commandeer practical\",\n selectable=True,\n deletable=False,\n organization_id=\"\",\n metadata={\n \"key\": False,\n },\n properties=polar_sdk.BenefitGitHubRepositoryProperties(\n repository_owner=\"polarsource\",\n repository_name=\"private_repo\",\n permission=polar_sdk.Permission.MAINTAIN,\n ),\n ),\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_grant_revoked_post(request=polar_sdk.WebhookBenefitGrantRevokedPayload(\n timestamp=parse_datetime(\"2025-10-11T18:40:00.865Z\"),\n data=polar_sdk.BenefitGrantDiscordWebhook(\n created_at=parse_datetime(\"2023-04-30T09:48:15.700Z\"),\n modified_at=parse_datetime(\"2024-12-06T00:35:53.453Z\"),\n id=\"\",\n is_granted=True,\n is_revoked=True,\n subscription_id=\"\",\n order_id=\"\",\n customer_id=\"\",\n benefit_id=\"\",\n customer=polar_sdk.Customer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-05-05T05:52:04.552Z\"),\n modified_at=parse_datetime(\"2024-09-18T14:08:44.723Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=None,\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-11-04T03:19:52.925Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n benefit=polar_sdk.BenefitDiscord(\n id=\"\",\n created_at=parse_datetime(\"2024-03-12T16:39:36.178Z\"),\n modified_at=parse_datetime(\"2024-07-08T07:08:59.377Z\"),\n description=\"grandiose royal surface before ouch silently authentic more override reassuringly\",\n selectable=False,\n deletable=True,\n organization_id=\"\",\n metadata={\n \"key\": \"\",\n },\n properties=polar_sdk.BenefitDiscordProperties(\n guild_id=\"\",\n role_id=\"\",\n kick_member=False,\n guild_token=\"\",\n ),\n ),\n properties=polar_sdk.BenefitGrantDiscordProperties(),\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["benefit_grant.updated"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_grant_updated_post(request=polar_sdk.WebhookBenefitGrantUpdatedPayload(\n data=polar_sdk.BenefitGrantWebhook(\n created_at=parse_datetime(\"2023-06-15T00:42:20.858Z\"),\n modified_at=parse_datetime(\"2023-09-09T02:35:13.085Z\"),\n id=\"\",\n is_granted=True,\n is_revoked=True,\n subscription_id=\"\",\n order_id=\"\",\n customer_id=\"\",\n benefit_id=\"\",\n customer=polar_sdk.Customer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2023-07-19T15:08:59.439Z\"),\n modified_at=parse_datetime(\"2024-06-22T06:57:35.281Z\"),\n metadata={\n \"key\": False,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-12-12T05:42:20.338Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n properties=polar_sdk.BenefitGrantCustomProperties(),\n benefit=polar_sdk.BenefitMeterCredit(\n id=\"\",\n created_at=parse_datetime(\"2025-09-22T18:19:02.554Z\"),\n modified_at=parse_datetime(\"2023-12-23T22:21:47.780Z\"),\n description=\"diligently phony super boo veg crafty\",\n selectable=False,\n deletable=True,\n organization_id=\"\",\n metadata={\n\n },\n properties=polar_sdk.BenefitMeterCreditProperties(\n units=763456,\n rollover=False,\n meter_id=\"\",\n ),\n ),\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointbenefit_grant_updated_post(request=polar_sdk.WebhookBenefitGrantUpdatedPayload(\n timestamp=parse_datetime(\"2023-06-15T00:42:20.858Z\"),\n data=polar_sdk.BenefitGrantDownloadablesWebhook(\n created_at=parse_datetime(\"2023-09-09T02:35:13.085Z\"),\n modified_at=parse_datetime(\"2024-04-28T04:44:42.040Z\"),\n id=\"\",\n is_granted=True,\n is_revoked=False,\n subscription_id=\"\",\n order_id=\"\",\n customer_id=\"\",\n benefit_id=\"\",\n customer=polar_sdk.Customer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-06-22T06:57:35.281Z\"),\n modified_at=parse_datetime(\"2025-06-14T15:07:20.731Z\"),\n metadata={\n \"key\": 322224,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-09-29T05:46:04.457Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n benefit=polar_sdk.BenefitDownloadables(\n id=\"\",\n created_at=parse_datetime(\"2025-09-22T18:19:02.554Z\"),\n modified_at=parse_datetime(\"2023-12-23T22:21:47.780Z\"),\n description=\"diligently phony super boo veg crafty\",\n selectable=False,\n deletable=True,\n organization_id=\"\",\n metadata={\n\n },\n properties=polar_sdk.BenefitDownloadablesProperties(\n archived={\n \"key\": False,\n \"key1\": False,\n \"key2\": True,\n },\n files=[],\n ),\n ),\n properties=polar_sdk.BenefitGrantDownloadablesProperties(),\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["checkout.created"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcheckout_created_post(request=polar_sdk.WebhookCheckoutCreatedPayload(\n data=polar_sdk.Checkout(\n created_at=parse_datetime(\"2023-02-15T15:44:21.478Z\"),\n modified_at=parse_datetime(\"2023-09-13T08:36:46.434Z\"),\n id=\"\",\n payment_processor=polar_sdk.PaymentProcessor.STRIPE,\n status=polar_sdk.CheckoutStatus.EXPIRED,\n client_secret=\"\",\n url=\"https://whole-aftermath.net/\",\n expires_at=parse_datetime(\"2023-12-28T10:30:56.042Z\"),\n success_url=\"https://moral-premier.name/\",\n embed_origin=\"\",\n amount=929514,\n discount_amount=323773,\n net_amount=115799,\n tax_amount=97012,\n total_amount=859980,\n currency=\"Fiji Dollar\",\n product_id=\"\",\n product_price_id=\"\",\n discount_id=None,\n allow_discount_codes=True,\n require_billing_address=True,\n is_discount_applicable=True,\n is_free_product_price=True,\n is_payment_required=True,\n is_payment_setup_required=True,\n is_payment_form_required=True,\n customer_id=\"\",\n is_business_customer=False,\n customer_name=\"\",\n customer_email=None,\n customer_ip_address=None,\n customer_billing_name=\"\",\n customer_billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n customer_tax_id=\"\",\n payment_processor_metadata={\n \"key\": \"\",\n \"key1\": \"\",\n \"key2\": \"\",\n },\n billing_address_fields=polar_sdk.CheckoutBillingAddressFields(\n country=polar_sdk.BillingAddressFieldMode.DISABLED,\n state=polar_sdk.BillingAddressFieldMode.DISABLED,\n city=polar_sdk.BillingAddressFieldMode.DISABLED,\n postal_code=polar_sdk.BillingAddressFieldMode.DISABLED,\n line1=polar_sdk.BillingAddressFieldMode.DISABLED,\n line2=polar_sdk.BillingAddressFieldMode.DISABLED,\n ),\n metadata={\n\n },\n external_customer_id=\"\",\n customer_external_id=\"\",\n products=[],\n product=polar_sdk.CheckoutProduct(\n created_at=parse_datetime(\"2024-09-25T08:09:25.820Z\"),\n modified_at=parse_datetime(\"2025-04-15T15:50:37.647Z\"),\n id=\"\",\n name=\"\",\n description=\"gee noisily mouser tentacle\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n is_recurring=False,\n is_archived=False,\n organization_id=\"\",\n prices=[],\n benefits=[],\n medias=[],\n ),\n product_price=polar_sdk.LegacyRecurringProductPriceFree(\n created_at=parse_datetime(\"2023-10-02T03:50:07.919Z\"),\n modified_at=parse_datetime(\"2025-06-07T12:37:50.969Z\"),\n id=\"\",\n is_archived=True,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n ),\n discount=polar_sdk.CheckoutDiscountFixedOnceForeverDuration(\n duration=polar_sdk.DiscountDuration.ONCE,\n type=polar_sdk.DiscountType.FIXED,\n amount=168537,\n currency=\"Tala\",\n id=\"\",\n name=\"\",\n code=\"\",\n ),\n subscription_id=\"\",\n attached_custom_fields=[],\n customer_metadata={\n \"key\": True,\n },\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcheckout_created_post(request=polar_sdk.WebhookCheckoutCreatedPayload(\n timestamp=parse_datetime(\"2023-02-15T15:44:21.478Z\"),\n data=polar_sdk.Checkout(\n created_at=parse_datetime(\"2025-09-12T19:48:15.814Z\"),\n modified_at=parse_datetime(\"2023-09-14T02:01:27.394Z\"),\n id=\"\",\n payment_processor=polar_sdk.PaymentProcessor.STRIPE,\n status=polar_sdk.CheckoutStatus.EXPIRED,\n client_secret=\"\",\n url=\"https://agreeable-reboot.biz\",\n expires_at=parse_datetime(\"2024-05-02T18:25:33.974Z\"),\n success_url=\"https://rural-outrun.org\",\n embed_origin=\"\",\n amount=323773,\n discount_amount=115799,\n net_amount=436964,\n tax_amount=None,\n total_amount=859980,\n currency=\"Fiji Dollar\",\n product_id=\"\",\n product_price_id=\"\",\n discount_id=None,\n allow_discount_codes=True,\n require_billing_address=True,\n is_discount_applicable=True,\n is_free_product_price=True,\n is_payment_required=True,\n is_payment_setup_required=True,\n is_payment_form_required=True,\n customer_id=\"\",\n is_business_customer=False,\n customer_name=\"\",\n customer_email=None,\n customer_ip_address=None,\n customer_billing_name=\"\",\n customer_billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n customer_tax_id=\"\",\n payment_processor_metadata={\n \"key\": \"\",\n \"key1\": \"\",\n \"key2\": \"\",\n },\n billing_address_fields=polar_sdk.CheckoutBillingAddressFields(\n country=polar_sdk.BillingAddressFieldMode.DISABLED,\n state=polar_sdk.BillingAddressFieldMode.DISABLED,\n city=polar_sdk.BillingAddressFieldMode.DISABLED,\n postal_code=polar_sdk.BillingAddressFieldMode.DISABLED,\n line1=polar_sdk.BillingAddressFieldMode.DISABLED,\n line2=polar_sdk.BillingAddressFieldMode.DISABLED,\n ),\n metadata={\n\n },\n external_customer_id=\"\",\n customer_external_id=\"\",\n products=[],\n product=polar_sdk.CheckoutProduct(\n created_at=parse_datetime(\"2024-09-25T08:09:25.820Z\"),\n modified_at=parse_datetime(\"2025-04-15T15:50:37.647Z\"),\n id=\"\",\n name=\"\",\n description=\"gee noisily mouser tentacle\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n is_recurring=False,\n is_archived=False,\n organization_id=\"\",\n prices=[],\n benefits=[],\n medias=[],\n ),\n product_price=polar_sdk.LegacyRecurringProductPriceFree(\n created_at=parse_datetime(\"2023-10-02T03:50:07.919Z\"),\n modified_at=parse_datetime(\"2025-06-07T12:37:50.969Z\"),\n id=\"\",\n is_archived=True,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n ),\n discount=polar_sdk.CheckoutDiscountFixedOnceForeverDuration(\n duration=polar_sdk.DiscountDuration.ONCE,\n type=polar_sdk.DiscountType.FIXED,\n amount=168537,\n currency=\"Tala\",\n id=\"\",\n name=\"\",\n code=\"\",\n ),\n subscription_id=\"\",\n attached_custom_fields=[],\n customer_metadata={\n \"key\": True,\n },\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["checkout.updated"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcheckout_updated_post(request=polar_sdk.WebhookCheckoutUpdatedPayload(\n data=polar_sdk.Checkout(\n created_at=parse_datetime(\"2023-03-19T05:40:46.816Z\"),\n modified_at=parse_datetime(\"2025-01-17T21:45:54.449Z\"),\n id=\"\",\n payment_processor=polar_sdk.PaymentProcessor.STRIPE,\n status=polar_sdk.CheckoutStatus.SUCCEEDED,\n client_secret=\"\",\n url=\"https://wasteful-kinase.net/\",\n expires_at=parse_datetime(\"2024-07-13T07:40:45.762Z\"),\n success_url=\"https://unwieldy-lift.name\",\n embed_origin=\"\",\n amount=328864,\n discount_amount=67168,\n net_amount=710560,\n tax_amount=164230,\n total_amount=754328,\n currency=\"New Taiwan Dollar\",\n product_id=\"\",\n product_price_id=\"\",\n discount_id=\"\",\n allow_discount_codes=True,\n require_billing_address=True,\n is_discount_applicable=True,\n is_free_product_price=True,\n is_payment_required=True,\n is_payment_setup_required=False,\n is_payment_form_required=True,\n customer_id=None,\n is_business_customer=False,\n customer_name=\"\",\n customer_email=\"\",\n customer_ip_address=\"\",\n customer_billing_name=\"\",\n customer_billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n customer_tax_id=\"\",\n payment_processor_metadata={\n\n },\n billing_address_fields=polar_sdk.CheckoutBillingAddressFields(\n country=polar_sdk.BillingAddressFieldMode.DISABLED,\n state=polar_sdk.BillingAddressFieldMode.DISABLED,\n city=polar_sdk.BillingAddressFieldMode.DISABLED,\n postal_code=polar_sdk.BillingAddressFieldMode.REQUIRED,\n line1=polar_sdk.BillingAddressFieldMode.OPTIONAL,\n line2=polar_sdk.BillingAddressFieldMode.REQUIRED,\n ),\n metadata={\n \"key\": True,\n },\n external_customer_id=\"\",\n customer_external_id=\"\",\n products=[],\n product=polar_sdk.CheckoutProduct(\n created_at=parse_datetime(\"2024-06-16T19:55:05.566Z\"),\n modified_at=parse_datetime(\"2025-10-23T11:11:52.082Z\"),\n id=\"\",\n name=\"\",\n description=\"under past upside-down tempting by or hippodrome mountain\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n is_recurring=True,\n is_archived=False,\n organization_id=\"\",\n prices=[],\n benefits=[\n polar_sdk.BenefitPublic(\n id=\"\",\n created_at=parse_datetime(\"2025-06-02T16:08:47.056Z\"),\n modified_at=parse_datetime(\"2024-07-14T16:21:23.700Z\"),\n type=polar_sdk.BenefitType.GITHUB_REPOSITORY,\n description=\"mid stained mmm splendid\",\n selectable=True,\n deletable=True,\n organization_id=\"\",\n ),\n ],\n medias=[],\n ),\n product_price=polar_sdk.LegacyRecurringProductPriceFixed(\n created_at=parse_datetime(\"2025-12-11T13:44:40.797Z\"),\n modified_at=parse_datetime(\"2024-04-10T22:07:41.629Z\"),\n id=\"\",\n is_archived=True,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n price_currency=\"\",\n price_amount=351578,\n ),\n discount=polar_sdk.CheckoutDiscountPercentageOnceForeverDuration(\n duration=polar_sdk.DiscountDuration.ONCE,\n type=polar_sdk.DiscountType.FIXED,\n basis_points=237002,\n id=\"\",\n name=\"\",\n code=\"\",\n ),\n subscription_id=\"\",\n attached_custom_fields=[\n polar_sdk.AttachedCustomField(\n custom_field_id=\"\",\n custom_field=polar_sdk.CustomFieldSelect(\n created_at=parse_datetime(\"2024-08-12T14:24:20.342Z\"),\n modified_at=parse_datetime(\"2023-08-01T03:55:09.650Z\"),\n id=\"\",\n metadata={\n \"key\": 6493.42,\n },\n slug=\"\",\n name=\"\",\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n properties=polar_sdk.CustomFieldSelectProperties(\n options=[],\n ),\n ),\n order=519931,\n required=True,\n ),\n ],\n customer_metadata={\n\n },\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcheckout_updated_post(request=polar_sdk.WebhookCheckoutUpdatedPayload(\n timestamp=parse_datetime(\"2023-03-19T05:40:46.816Z\"),\n data=polar_sdk.Checkout(\n created_at=parse_datetime(\"2024-09-17T13:52:37.257Z\"),\n modified_at=parse_datetime(\"2024-11-07T08:23:01.152Z\"),\n id=\"\",\n payment_processor=polar_sdk.PaymentProcessor.STRIPE,\n status=polar_sdk.CheckoutStatus.EXPIRED,\n client_secret=\"\",\n url=\"https://male-punctuation.name\",\n expires_at=parse_datetime(\"2025-03-26T06:13:51.386Z\"),\n success_url=\"https://monumental-mathematics.info\",\n embed_origin=\"\",\n amount=67168,\n discount_amount=710560,\n net_amount=954738,\n tax_amount=754328,\n total_amount=867510,\n currency=\"Kuwaiti Dinar\",\n product_id=\"\",\n product_price_id=\"\",\n discount_id=\"\",\n allow_discount_codes=True,\n require_billing_address=True,\n is_discount_applicable=True,\n is_free_product_price=True,\n is_payment_required=False,\n is_payment_setup_required=True,\n is_payment_form_required=True,\n customer_id=\"\",\n is_business_customer=False,\n customer_name=\"\",\n customer_email=\"\",\n customer_ip_address=\"\",\n customer_billing_name=\"\",\n customer_billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n customer_tax_id=\"\",\n payment_processor_metadata={\n \"key\": \"\",\n \"key1\": \"\",\n \"key2\": \"\",\n },\n billing_address_fields=polar_sdk.CheckoutBillingAddressFields(\n country=polar_sdk.BillingAddressFieldMode.DISABLED,\n state=polar_sdk.BillingAddressFieldMode.DISABLED,\n city=polar_sdk.BillingAddressFieldMode.REQUIRED,\n postal_code=polar_sdk.BillingAddressFieldMode.OPTIONAL,\n line1=polar_sdk.BillingAddressFieldMode.REQUIRED,\n line2=polar_sdk.BillingAddressFieldMode.DISABLED,\n ),\n metadata={\n \"key\": 795829,\n },\n external_customer_id=\"\",\n customer_external_id=\"\",\n products=[],\n product=polar_sdk.CheckoutProduct(\n created_at=parse_datetime(\"2025-11-27T17:16:31.119Z\"),\n modified_at=parse_datetime(\"2025-06-04T15:43:18.802Z\"),\n id=\"\",\n name=\"\",\n description=\"own obtrude spew cloudy rapidly ugh\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.MONTH,\n is_recurring=False,\n is_archived=True,\n organization_id=\"\",\n prices=[],\n benefits=[],\n medias=[\n polar_sdk.ProductMediaFileRead(\n id=\"\",\n organization_id=\"\",\n name=\"\",\n path=\"/home\",\n mime_type=\"\",\n size=727381,\n storage_version=\"\",\n checksum_etag=\"\",\n checksum_sha256_base64=\"\",\n checksum_sha256_hex=\"\",\n last_modified_at=parse_datetime(\"2025-12-05T19:37:31.286Z\"),\n version=\"\",\n is_uploaded=False,\n created_at=parse_datetime(\"2024-05-01T10:03:11.361Z\"),\n size_readable=\"\",\n public_url=\"https://strict-encouragement.name\",\n ),\n ],\n ),\n product_price=polar_sdk.LegacyRecurringProductPriceCustom(\n created_at=parse_datetime(\"2023-04-04T12:37:13.536Z\"),\n modified_at=parse_datetime(\"2024-07-15T17:22:02.691Z\"),\n id=\"\",\n is_archived=True,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n price_currency=\"\",\n minimum_amount=557949,\n maximum_amount=600909,\n preset_amount=637755,\n ),\n discount=polar_sdk.CheckoutDiscountPercentageOnceForeverDuration(\n duration=polar_sdk.DiscountDuration.REPEATING,\n type=polar_sdk.DiscountType.PERCENTAGE,\n basis_points=340460,\n id=\"\",\n name=\"\",\n code=\"\",\n ),\n subscription_id=\"\",\n attached_custom_fields=[],\n customer_metadata={\n \"key\": True,\n },\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["customer.created"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "from polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcustomer_created_post(request={\n \"type\": \"customer.created\",\n \"data\": {\n \"id\": \"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n \"created_at\": parse_datetime(\"2025-10-24T17:37:29.711Z\"),\n \"modified_at\": parse_datetime(\"2025-07-16T19:46:09.413Z\"),\n \"metadata\": {\n \"key\": \"\",\n },\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"email_verified\": True,\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": \"US\",\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"deleted_at\": parse_datetime(\"2023-03-24T20:28:46.681Z\"),\n \"avatar_url\": \"https://www.gravatar.com/avatar/xxx?d=404\",\n },\n })\n\n # Handle response\n print(res)" + "source": "from polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcustomer_created_post(request={\n \"type\": \"customer.created\",\n \"timestamp\": parse_datetime(\"2025-10-24T17:37:29.711Z\"),\n \"data\": {\n \"id\": \"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n \"created_at\": parse_datetime(\"2025-03-08T02:57:16.205Z\"),\n \"modified_at\": parse_datetime(\"2024-10-31T06:26:45.555Z\"),\n \"metadata\": {\n\n },\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"email_verified\": True,\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": \"US\",\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"deleted_at\": parse_datetime(\"2023-03-24T20:28:46.681Z\"),\n \"avatar_url\": \"https://www.gravatar.com/avatar/xxx?d=404\",\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["customer.deleted"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "from polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcustomer_deleted_post(request={\n \"type\": \"customer.deleted\",\n \"data\": {\n \"id\": \"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n \"created_at\": parse_datetime(\"2023-07-12T21:40:34.752Z\"),\n \"modified_at\": parse_datetime(\"2025-02-26T09:36:28.870Z\"),\n \"metadata\": {\n\n },\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"email_verified\": True,\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": \"US\",\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"deleted_at\": parse_datetime(\"2023-07-08T00:32:27.730Z\"),\n \"avatar_url\": \"https://www.gravatar.com/avatar/xxx?d=404\",\n },\n })\n\n # Handle response\n print(res)" + "source": "from polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcustomer_deleted_post(request={\n \"type\": \"customer.deleted\",\n \"timestamp\": parse_datetime(\"2023-07-12T21:40:34.752Z\"),\n \"data\": {\n \"id\": \"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n \"created_at\": parse_datetime(\"2025-12-23T11:32:42.100Z\"),\n \"modified_at\": parse_datetime(\"2023-07-09T17:16:24.833Z\"),\n \"metadata\": {\n\n },\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"email_verified\": True,\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": \"US\",\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"deleted_at\": parse_datetime(\"2023-09-30T09:04:17.770Z\"),\n \"avatar_url\": \"https://www.gravatar.com/avatar/xxx?d=404\",\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["customer.state_changed"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcustomer_state_changed_post(request={\n \"type\": \"customer.state_changed\",\n \"data\": {\n \"id\": \"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n \"created_at\": parse_datetime(\"2025-05-22T16:03:32.369Z\"),\n \"modified_at\": parse_datetime(\"2023-04-17T22:11:17.879Z\"),\n \"metadata\": {\n\n },\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"email_verified\": True,\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": \"US\",\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"deleted_at\": parse_datetime(\"2025-09-08T18:19:10.187Z\"),\n \"active_subscriptions\": [],\n \"granted_benefits\": [\n {\n \"id\": \"d322132c-a9d0-4e0d-b8d3-d81ad021a3a9\",\n \"created_at\": parse_datetime(\"2025-09-01T02:21:29.525Z\"),\n \"modified_at\": parse_datetime(\"2023-11-12T17:51:37.646Z\"),\n \"granted_at\": parse_datetime(\"2025-01-03T13:37:00Z\"),\n \"benefit_id\": \"397a17aa-15cf-4cb4-9333-18040203cf98\",\n \"benefit_type\": polar_sdk.BenefitType.METER_CREDIT,\n \"benefit_metadata\": {\n \"key\": \"value\",\n },\n \"properties\": {},\n },\n ],\n \"active_meters\": [\n {\n \"id\": \"\",\n \"created_at\": parse_datetime(\"2023-08-10T12:57:32.427Z\"),\n \"modified_at\": parse_datetime(\"2024-11-09T02:09:01.550Z\"),\n \"meter_id\": \"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n \"consumed_units\": 25,\n \"credited_units\": 100,\n \"balance\": 75,\n },\n ],\n \"avatar_url\": \"https://www.gravatar.com/avatar/xxx?d=404\",\n },\n })\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcustomer_state_changed_post(request={\n \"type\": \"customer.state_changed\",\n \"timestamp\": parse_datetime(\"2025-05-22T16:03:32.369Z\"),\n \"data\": {\n \"id\": \"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n \"created_at\": parse_datetime(\"2023-07-25T20:57:42.542Z\"),\n \"modified_at\": None,\n \"metadata\": {\n\n },\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"email_verified\": True,\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": \"US\",\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"deleted_at\": parse_datetime(\"2025-09-08T18:19:10.187Z\"),\n \"active_subscriptions\": [],\n \"granted_benefits\": [\n {\n \"id\": \"d322132c-a9d0-4e0d-b8d3-d81ad021a3a9\",\n \"created_at\": parse_datetime(\"2025-09-01T02:21:29.525Z\"),\n \"modified_at\": parse_datetime(\"2023-11-12T17:51:37.646Z\"),\n \"granted_at\": parse_datetime(\"2025-01-03T13:37:00Z\"),\n \"benefit_id\": \"397a17aa-15cf-4cb4-9333-18040203cf98\",\n \"benefit_type\": polar_sdk.BenefitType.METER_CREDIT,\n \"benefit_metadata\": {\n \"key\": \"value\",\n },\n \"properties\": {},\n },\n ],\n \"active_meters\": [\n {\n \"id\": \"\",\n \"created_at\": parse_datetime(\"2023-08-10T12:57:32.427Z\"),\n \"modified_at\": parse_datetime(\"2024-11-09T02:09:01.550Z\"),\n \"meter_id\": \"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n \"consumed_units\": 25,\n \"credited_units\": 100,\n \"balance\": 75,\n },\n ],\n \"avatar_url\": \"https://www.gravatar.com/avatar/xxx?d=404\",\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["customer.updated"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "from polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcustomer_updated_post(request={\n \"type\": \"customer.updated\",\n \"data\": {\n \"id\": \"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n \"created_at\": parse_datetime(\"2023-07-09T20:22:33.716Z\"),\n \"modified_at\": parse_datetime(\"2024-10-16T21:39:43.150Z\"),\n \"metadata\": {\n\n },\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"email_verified\": True,\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": \"US\",\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"deleted_at\": parse_datetime(\"2025-12-14T00:37:03.564Z\"),\n \"avatar_url\": \"https://www.gravatar.com/avatar/xxx?d=404\",\n },\n })\n\n # Handle response\n print(res)" + "source": "from polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointcustomer_updated_post(request={\n \"type\": \"customer.updated\",\n \"timestamp\": parse_datetime(\"2023-07-09T20:22:33.716Z\"),\n \"data\": {\n \"id\": \"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n \"created_at\": parse_datetime(\"2024-07-18T23:25:12.977Z\"),\n \"modified_at\": parse_datetime(\"2023-04-07T04:58:11.725Z\"),\n \"metadata\": {\n \"key\": 983601,\n },\n \"external_id\": \"usr_1337\",\n \"email\": \"customer@example.com\",\n \"email_verified\": True,\n \"name\": \"John Doe\",\n \"billing_address\": {\n \"country\": \"US\",\n },\n \"tax_id\": [\n \"911144442\",\n \"us_ein\",\n ],\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"deleted_at\": parse_datetime(\"2025-01-11T12:43:11.694Z\"),\n \"avatar_url\": \"https://www.gravatar.com/avatar/xxx?d=404\",\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["order.created"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorder_created_post(request=polar_sdk.WebhookOrderCreatedPayload(\n data=polar_sdk.Order(\n id=\"\",\n created_at=parse_datetime(\"2024-08-21T06:55:49.348Z\"),\n modified_at=None,\n status=polar_sdk.OrderStatus.REFUNDED,\n paid=True,\n subtotal_amount=952546,\n discount_amount=47294,\n net_amount=220865,\n tax_amount=835005,\n total_amount=913636,\n refunded_amount=727987,\n refunded_tax_amount=597376,\n currency=\"New Taiwan Dollar\",\n billing_reason=polar_sdk.OrderBillingReason.SUBSCRIPTION_CREATE,\n billing_name=\"\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n is_invoice_generated=True,\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n subscription_id=\"\",\n checkout_id=\"\",\n metadata={\n \"key\": 701529,\n },\n customer=polar_sdk.OrderCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2023-08-28T08:49:40.562Z\"),\n modified_at=None,\n metadata={\n \"key\": 807321,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2024-07-30T20:36:36.637Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n user_id=\"\",\n product=polar_sdk.OrderProduct(\n metadata={\n\n },\n created_at=parse_datetime(\"2023-10-18T19:16:06.791Z\"),\n modified_at=parse_datetime(\"2023-07-25T14:06:55.496Z\"),\n id=\"\",\n name=\"\",\n description=\"hence hoof amid nimble\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.MONTH,\n is_recurring=False,\n is_archived=False,\n organization_id=\"\",\n ),\n discount=polar_sdk.DiscountPercentageOnceForeverDurationBase(\n duration=polar_sdk.DiscountDuration.REPEATING,\n type=polar_sdk.DiscountType.FIXED,\n basis_points=765577,\n created_at=parse_datetime(\"2025-12-27T11:04:16.188Z\"),\n modified_at=parse_datetime(\"2023-07-01T09:05:58.012Z\"),\n id=\"\",\n metadata={\n \"key\": 736909,\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2024-11-14T21:15:37.421Z\"),\n ends_at=parse_datetime(\"2023-03-07T03:56:36.953Z\"),\n max_redemptions=28675,\n redemptions_count=967708,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n subscription=polar_sdk.OrderSubscription(\n metadata={\n\n },\n created_at=parse_datetime(\"2023-01-24T21:36:11.677Z\"),\n modified_at=parse_datetime(\"2025-12-03T03:30:23.797Z\"),\n id=\"\",\n amount=298671,\n currency=\"Boliviano boliviano\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n status=polar_sdk.SubscriptionStatus.INCOMPLETE_EXPIRED,\n current_period_start=parse_datetime(\"2023-07-06T04:28:24.973Z\"),\n current_period_end=parse_datetime(\"2024-04-03T16:38:36.332Z\"),\n cancel_at_period_end=True,\n canceled_at=parse_datetime(\"2025-08-06T13:46:26.730Z\"),\n started_at=parse_datetime(\"2023-08-04T14:24:05.390Z\"),\n ends_at=parse_datetime(\"2023-01-25T10:47:26.689Z\"),\n ended_at=None,\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=None,\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.MISSING_FEATURES,\n customer_cancellation_comment=\"\",\n ),\n items=[],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorder_created_post(request=polar_sdk.WebhookOrderCreatedPayload(\n timestamp=parse_datetime(\"2024-08-21T06:55:49.348Z\"),\n data=polar_sdk.Order(\n id=\"\",\n created_at=parse_datetime(\"2023-01-02T23:31:01.991Z\"),\n modified_at=parse_datetime(\"2025-11-09T23:45:36.352Z\"),\n status=polar_sdk.OrderStatus.PENDING,\n paid=True,\n subtotal_amount=220865,\n discount_amount=835005,\n net_amount=913636,\n tax_amount=727987,\n total_amount=597376,\n refunded_amount=864844,\n refunded_tax_amount=493180,\n currency=\"Malaysian Ringgit\",\n billing_reason=polar_sdk.OrderBillingReason.SUBSCRIPTION_CYCLE,\n billing_name=\"\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n is_invoice_generated=False,\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n subscription_id=\"\",\n checkout_id=\"\",\n metadata={\n \"key\": \"\",\n },\n customer=polar_sdk.OrderCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2023-03-27T11:03:51.570Z\"),\n modified_at=parse_datetime(\"2024-06-30T16:49:49.935Z\"),\n metadata={\n \"key\": 268152,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2023-10-18T19:16:06.791Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n user_id=\"\",\n product=polar_sdk.OrderProduct(\n metadata={\n\n },\n created_at=parse_datetime(\"2023-07-25T14:06:55.496Z\"),\n modified_at=parse_datetime(\"2023-08-23T12:17:55.172Z\"),\n id=\"\",\n name=\"\",\n description=None,\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.MONTH,\n is_recurring=True,\n is_archived=True,\n organization_id=\"\",\n ),\n discount=polar_sdk.DiscountFixedOnceForeverDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n type=polar_sdk.DiscountType.FIXED,\n amount=89700,\n currency=\"Somali Shilling\",\n created_at=parse_datetime(\"2024-06-03T22:49:40.494Z\"),\n modified_at=parse_datetime(\"2024-04-12T09:11:00.490Z\"),\n id=\"\",\n metadata={\n \"key\": \"\",\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2023-08-12T07:51:56.436Z\"),\n ends_at=parse_datetime(\"2023-05-06T17:33:16.103Z\"),\n max_redemptions=254706,\n redemptions_count=852483,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n subscription=polar_sdk.OrderSubscription(\n metadata={\n \"key\": 5558.24,\n },\n created_at=parse_datetime(\"2024-05-10T05:33:12.990Z\"),\n modified_at=parse_datetime(\"2024-10-27T02:55:38.822Z\"),\n id=\"\",\n amount=515872,\n currency=\"Jamaican Dollar\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.MONTH,\n status=polar_sdk.SubscriptionStatus.CANCELED,\n current_period_start=parse_datetime(\"2023-01-30T13:01:14.788Z\"),\n current_period_end=parse_datetime(\"2025-12-27T11:04:16.188Z\"),\n cancel_at_period_end=True,\n canceled_at=parse_datetime(\"2024-10-16T20:18:34.908Z\"),\n started_at=parse_datetime(\"2025-03-18T15:38:59.923Z\"),\n ends_at=parse_datetime(\"2024-11-16T22:02:37.250Z\"),\n ended_at=parse_datetime(\"2024-09-10T19:42:40.294Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=None,\n checkout_id=\"\",\n customer_cancellation_reason=None,\n customer_cancellation_comment=\"\",\n ),\n items=[],\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["order.paid"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorder_paid_post(request=polar_sdk.WebhookOrderPaidPayload(\n data=polar_sdk.Order(\n id=\"\",\n created_at=parse_datetime(\"2025-12-05T07:44:21.172Z\"),\n modified_at=parse_datetime(\"2024-12-11T22:14:44.762Z\"),\n status=polar_sdk.OrderStatus.REFUNDED,\n paid=True,\n subtotal_amount=806442,\n discount_amount=990825,\n net_amount=746396,\n tax_amount=341385,\n total_amount=486648,\n refunded_amount=562504,\n refunded_tax_amount=314047,\n currency=\"Ouguiya\",\n billing_reason=polar_sdk.OrderBillingReason.SUBSCRIPTION_CYCLE,\n billing_name=\"\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n is_invoice_generated=True,\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n subscription_id=\"\",\n checkout_id=None,\n metadata={\n\n },\n customer=polar_sdk.OrderCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-10-27T20:31:30.562Z\"),\n modified_at=parse_datetime(\"2025-04-26T07:56:18.616Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-08-01T03:33:20.782Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n user_id=\"\",\n product=polar_sdk.OrderProduct(\n metadata={\n \"key\": 179185,\n },\n created_at=parse_datetime(\"2023-05-18T09:50:39.456Z\"),\n modified_at=parse_datetime(\"2025-07-31T08:10:01.120Z\"),\n id=\"\",\n name=\"\",\n description=\"though rigidly gradient pure whimsical ew personalise exalt scorn gee\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.MONTH,\n is_recurring=True,\n is_archived=False,\n organization_id=\"\",\n ),\n discount=polar_sdk.DiscountFixedRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n duration_in_months=871130,\n type=polar_sdk.DiscountType.PERCENTAGE,\n amount=727805,\n currency=\"Kwacha\",\n created_at=parse_datetime(\"2024-09-10T07:58:34.888Z\"),\n modified_at=parse_datetime(\"2025-07-17T03:39:23.964Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2024-07-29T13:43:57.010Z\"),\n ends_at=parse_datetime(\"2025-06-10T20:57:22.896Z\"),\n max_redemptions=None,\n redemptions_count=499443,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n subscription=polar_sdk.OrderSubscription(\n metadata={\n \"key\": 165283,\n },\n created_at=parse_datetime(\"2025-08-05T06:11:40.745Z\"),\n modified_at=parse_datetime(\"2023-12-05T06:32:48.307Z\"),\n id=\"\",\n amount=18384,\n currency=\"Tanzanian Shilling\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n status=polar_sdk.SubscriptionStatus.INCOMPLETE_EXPIRED,\n current_period_start=parse_datetime(\"2024-06-19T05:54:14.128Z\"),\n current_period_end=parse_datetime(\"2025-08-28T12:32:52.795Z\"),\n cancel_at_period_end=False,\n canceled_at=parse_datetime(\"2023-08-04T10:17:52.706Z\"),\n started_at=parse_datetime(\"2025-08-27T04:13:10.004Z\"),\n ends_at=None,\n ended_at=parse_datetime(\"2024-06-22T19:17:00.470Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.TOO_COMPLEX,\n customer_cancellation_comment=\"\",\n ),\n items=[\n polar_sdk.OrderItemSchema(\n created_at=parse_datetime(\"2024-07-19T20:12:40.543Z\"),\n modified_at=None,\n id=\"\",\n label=\"\",\n amount=116439,\n tax_amount=200966,\n proration=True,\n product_price_id=\"\",\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorder_paid_post(request=polar_sdk.WebhookOrderPaidPayload(\n timestamp=parse_datetime(\"2025-12-05T07:44:21.172Z\"),\n data=polar_sdk.Order(\n id=\"\",\n created_at=parse_datetime(\"2025-07-27T09:45:49.517Z\"),\n modified_at=parse_datetime(\"2024-12-13T20:55:19.644Z\"),\n status=polar_sdk.OrderStatus.PARTIALLY_REFUNDED,\n paid=True,\n subtotal_amount=990825,\n discount_amount=746396,\n net_amount=341385,\n tax_amount=486648,\n total_amount=562504,\n refunded_amount=314047,\n refunded_tax_amount=570780,\n currency=\"Norwegian Krone\",\n billing_reason=polar_sdk.OrderBillingReason.SUBSCRIPTION_CREATE,\n billing_name=\"\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n is_invoice_generated=False,\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n subscription_id=None,\n checkout_id=\"\",\n metadata={\n \"key\": False,\n },\n customer=polar_sdk.OrderCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-06-20T08:16:19.561Z\"),\n modified_at=parse_datetime(\"2025-11-18T04:42:58.995Z\"),\n metadata={\n \"key\": True,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2024-06-08T00:11:47.056Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n user_id=\"\",\n product=polar_sdk.OrderProduct(\n metadata={\n \"key\": \"\",\n },\n created_at=parse_datetime(\"2025-10-14T16:14:37.497Z\"),\n modified_at=parse_datetime(\"2024-07-05T21:05:22.131Z\"),\n id=\"\",\n name=\"\",\n description=\"unlike hutch nor table reproachfully eulogise\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n is_recurring=False,\n is_archived=True,\n organization_id=\"\",\n ),\n discount=polar_sdk.DiscountPercentageRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.FOREVER,\n duration_in_months=678845,\n type=polar_sdk.DiscountType.FIXED,\n basis_points=307762,\n created_at=parse_datetime(\"2024-04-10T18:11:00.918Z\"),\n modified_at=parse_datetime(\"2024-12-20T04:35:24.232Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2025-05-13T02:34:59.052Z\"),\n ends_at=parse_datetime(\"2024-05-17T02:38:00.485Z\"),\n max_redemptions=400985,\n redemptions_count=973205,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n subscription=polar_sdk.OrderSubscription(\n metadata={\n \"key\": 568756,\n },\n created_at=parse_datetime(\"2024-05-24T21:01:40.292Z\"),\n modified_at=parse_datetime(\"2024-05-25T21:22:06.978Z\"),\n id=\"\",\n amount=299042,\n currency=\"Pound Sterling\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n status=polar_sdk.SubscriptionStatus.ACTIVE,\n current_period_start=parse_datetime(\"2025-03-08T16:10:05.952Z\"),\n current_period_end=parse_datetime(\"2024-09-10T07:58:34.888Z\"),\n cancel_at_period_end=True,\n canceled_at=parse_datetime(\"2023-09-16T09:43:57.152Z\"),\n started_at=parse_datetime(\"2024-08-15T07:25:23.875Z\"),\n ends_at=parse_datetime(\"2025-02-12T23:41:13.290Z\"),\n ended_at=parse_datetime(\"2023-02-24T15:15:22.018Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.MISSING_FEATURES,\n customer_cancellation_comment=\"\",\n ),\n items=[\n polar_sdk.OrderItemSchema(\n created_at=parse_datetime(\"2024-09-21T14:56:16.106Z\"),\n modified_at=parse_datetime(\"2023-01-21T03:35:38.158Z\"),\n id=\"\",\n label=\"\",\n amount=870773,\n tax_amount=305914,\n proration=True,\n product_price_id=\"\",\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["order.refunded"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorder_refunded_post(request=polar_sdk.WebhookOrderRefundedPayload(\n data=polar_sdk.Order(\n id=\"\",\n created_at=parse_datetime(\"2024-07-23T18:00:11.615Z\"),\n modified_at=parse_datetime(\"2024-08-23T03:13:11.383Z\"),\n status=polar_sdk.OrderStatus.REFUNDED,\n paid=True,\n subtotal_amount=678552,\n discount_amount=294178,\n net_amount=721778,\n tax_amount=913001,\n total_amount=518308,\n refunded_amount=820663,\n refunded_tax_amount=472431,\n currency=\"Hryvnia\",\n billing_reason=polar_sdk.OrderBillingReason.SUBSCRIPTION_CREATE,\n billing_name=\"\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n is_invoice_generated=False,\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n subscription_id=\"\",\n checkout_id=\"\",\n metadata={\n \"key\": 537174,\n },\n customer=polar_sdk.OrderCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-08-19T02:54:30.835Z\"),\n modified_at=None,\n metadata={\n \"key\": 97027,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2023-01-26T21:26:48.872Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n user_id=\"\",\n product=polar_sdk.OrderProduct(\n metadata={\n\n },\n created_at=parse_datetime(\"2023-01-16T07:26:04.196Z\"),\n modified_at=parse_datetime(\"2025-01-18T16:58:42.976Z\"),\n id=\"\",\n name=\"\",\n description=\"anxiously notwithstanding softly wilderness drat helpless conservation ew\",\n recurring_interval=None,\n is_recurring=False,\n is_archived=False,\n organization_id=\"\",\n ),\n discount=polar_sdk.DiscountPercentageRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.FOREVER,\n duration_in_months=177173,\n type=polar_sdk.DiscountType.PERCENTAGE,\n basis_points=175227,\n created_at=parse_datetime(\"2024-06-23T22:24:00.212Z\"),\n modified_at=parse_datetime(\"2025-09-20T03:04:20.355Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2024-09-22T11:17:00.498Z\"),\n ends_at=parse_datetime(\"2023-01-04T20:02:20.162Z\"),\n max_redemptions=477690,\n redemptions_count=429180,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n subscription=polar_sdk.OrderSubscription(\n metadata={\n \"key\": True,\n },\n created_at=parse_datetime(\"2023-12-28T02:40:16.151Z\"),\n modified_at=None,\n id=\"\",\n amount=801440,\n currency=\"Kwanza\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n status=polar_sdk.SubscriptionStatus.UNPAID,\n current_period_start=parse_datetime(\"2025-12-13T00:18:40.316Z\"),\n current_period_end=parse_datetime(\"2025-09-10T16:01:49.333Z\"),\n cancel_at_period_end=False,\n canceled_at=parse_datetime(\"2023-11-12T03:39:13.416Z\"),\n started_at=parse_datetime(\"2024-11-06T04:39:52.000Z\"),\n ends_at=parse_datetime(\"2024-06-22T23:44:00.447Z\"),\n ended_at=parse_datetime(\"2024-11-02T04:41:56.340Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.MISSING_FEATURES,\n customer_cancellation_comment=\"\",\n ),\n items=[\n polar_sdk.OrderItemSchema(\n created_at=parse_datetime(\"2024-06-01T22:10:54.514Z\"),\n modified_at=None,\n id=\"\",\n label=\"\",\n amount=584605,\n tax_amount=493789,\n proration=True,\n product_price_id=\"\",\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorder_refunded_post(request=polar_sdk.WebhookOrderRefundedPayload(\n timestamp=parse_datetime(\"2024-07-23T18:00:11.615Z\"),\n data=polar_sdk.Order(\n id=\"\",\n created_at=parse_datetime(\"2025-03-19T11:53:59.744Z\"),\n modified_at=parse_datetime(\"2024-12-01T04:03:14.906Z\"),\n status=polar_sdk.OrderStatus.REFUNDED,\n paid=True,\n subtotal_amount=294178,\n discount_amount=721778,\n net_amount=913001,\n tax_amount=518308,\n total_amount=820663,\n refunded_amount=472431,\n refunded_tax_amount=879331,\n currency=\"Hong Kong Dollar\",\n billing_reason=polar_sdk.OrderBillingReason.SUBSCRIPTION_CREATE,\n billing_name=\"\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n is_invoice_generated=False,\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n subscription_id=\"\",\n checkout_id=\"\",\n metadata={\n\n },\n customer=polar_sdk.OrderCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-08-11T17:50:11.031Z\"),\n modified_at=parse_datetime(\"2023-02-24T05:25:29.794Z\"),\n metadata={\n \"key\": 97027,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2023-01-26T21:26:48.872Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n user_id=\"\",\n product=polar_sdk.OrderProduct(\n metadata={\n\n },\n created_at=parse_datetime(\"2023-01-16T07:26:04.196Z\"),\n modified_at=parse_datetime(\"2025-01-18T16:58:42.976Z\"),\n id=\"\",\n name=\"\",\n description=\"anxiously notwithstanding softly wilderness drat helpless conservation ew\",\n recurring_interval=None,\n is_recurring=False,\n is_archived=False,\n organization_id=\"\",\n ),\n discount=polar_sdk.DiscountPercentageRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.FOREVER,\n duration_in_months=177173,\n type=polar_sdk.DiscountType.PERCENTAGE,\n basis_points=175227,\n created_at=parse_datetime(\"2024-06-23T22:24:00.212Z\"),\n modified_at=parse_datetime(\"2025-09-20T03:04:20.355Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2024-09-22T11:17:00.498Z\"),\n ends_at=parse_datetime(\"2023-01-04T20:02:20.162Z\"),\n max_redemptions=477690,\n redemptions_count=429180,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n subscription=polar_sdk.OrderSubscription(\n metadata={\n \"key\": True,\n },\n created_at=parse_datetime(\"2023-12-28T02:40:16.151Z\"),\n modified_at=None,\n id=\"\",\n amount=801440,\n currency=\"Kwanza\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n status=polar_sdk.SubscriptionStatus.UNPAID,\n current_period_start=parse_datetime(\"2025-12-13T00:18:40.316Z\"),\n current_period_end=parse_datetime(\"2025-09-10T16:01:49.333Z\"),\n cancel_at_period_end=False,\n canceled_at=parse_datetime(\"2023-11-12T03:39:13.416Z\"),\n started_at=parse_datetime(\"2024-11-06T04:39:52.000Z\"),\n ends_at=parse_datetime(\"2024-06-22T23:44:00.447Z\"),\n ended_at=parse_datetime(\"2024-11-02T04:41:56.340Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.MISSING_FEATURES,\n customer_cancellation_comment=\"\",\n ),\n items=[\n polar_sdk.OrderItemSchema(\n created_at=parse_datetime(\"2024-06-01T22:10:54.514Z\"),\n modified_at=None,\n id=\"\",\n label=\"\",\n amount=584605,\n tax_amount=493789,\n proration=True,\n product_price_id=\"\",\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["order.updated"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorder_updated_post(request=polar_sdk.WebhookOrderUpdatedPayload(\n data=polar_sdk.Order(\n id=\"\",\n created_at=parse_datetime(\"2023-10-25T00:08:50.290Z\"),\n modified_at=parse_datetime(\"2024-01-08T20:00:47.692Z\"),\n status=polar_sdk.OrderStatus.PARTIALLY_REFUNDED,\n paid=True,\n subtotal_amount=198772,\n discount_amount=338283,\n net_amount=321919,\n tax_amount=827864,\n total_amount=380359,\n refunded_amount=596980,\n refunded_tax_amount=404069,\n currency=\"Russian Ruble\",\n billing_reason=polar_sdk.OrderBillingReason.SUBSCRIPTION_CYCLE,\n billing_name=\"\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n is_invoice_generated=False,\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n subscription_id=\"\",\n checkout_id=\"\",\n metadata={\n \"key\": 4784.54,\n },\n customer=polar_sdk.OrderCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2023-07-25T12:14:47.758Z\"),\n modified_at=parse_datetime(\"2023-10-28T19:38:51.490Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=None,\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=None,\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n user_id=\"\",\n product=polar_sdk.OrderProduct(\n metadata={\n \"key\": \"\",\n },\n created_at=parse_datetime(\"2023-09-09T23:29:46.282Z\"),\n modified_at=parse_datetime(\"2023-12-07T14:52:42.853Z\"),\n id=\"\",\n name=\"\",\n description=\"uniform waver pish coliseum consign absent drat cap including oof\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.MONTH,\n is_recurring=False,\n is_archived=False,\n organization_id=\"\",\n ),\n discount=polar_sdk.DiscountPercentageRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.FOREVER,\n duration_in_months=860052,\n type=polar_sdk.DiscountType.FIXED,\n basis_points=650798,\n created_at=parse_datetime(\"2024-02-06T09:06:51.703Z\"),\n modified_at=None,\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2023-11-03T05:13:30.202Z\"),\n ends_at=parse_datetime(\"2024-03-03T03:52:46.888Z\"),\n max_redemptions=858600,\n redemptions_count=637128,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n subscription=None,\n items=[\n polar_sdk.OrderItemSchema(\n created_at=parse_datetime(\"2024-02-19T19:25:59.986Z\"),\n modified_at=parse_datetime(\"2025-07-23T06:42:36.223Z\"),\n id=\"\",\n label=\"\",\n amount=669405,\n tax_amount=12321,\n proration=False,\n product_price_id=None,\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorder_updated_post(request=polar_sdk.WebhookOrderUpdatedPayload(\n timestamp=parse_datetime(\"2023-10-25T00:08:50.290Z\"),\n data=polar_sdk.Order(\n id=\"\",\n created_at=parse_datetime(\"2024-04-30T23:35:35.375Z\"),\n modified_at=parse_datetime(\"2025-06-01T02:02:46.580Z\"),\n status=polar_sdk.OrderStatus.PENDING,\n paid=True,\n subtotal_amount=338283,\n discount_amount=321919,\n net_amount=827864,\n tax_amount=380359,\n total_amount=596980,\n refunded_amount=404069,\n refunded_tax_amount=718668,\n currency=\"Nuevo Sol\",\n billing_reason=polar_sdk.OrderBillingReason.SUBSCRIPTION_CREATE,\n billing_name=\"\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n is_invoice_generated=True,\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n subscription_id=\"\",\n checkout_id=\"\",\n metadata={\n \"key\": 187509,\n },\n customer=polar_sdk.OrderCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-12-03T05:16:11.415Z\"),\n modified_at=parse_datetime(\"2023-03-11T05:58:05.184Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=None,\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2023-06-26T15:51:37.068Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n user_id=\"\",\n product=polar_sdk.OrderProduct(\n metadata={\n\n },\n created_at=parse_datetime(\"2024-07-10T12:45:44.731Z\"),\n modified_at=parse_datetime(\"2024-09-19T13:13:25.785Z\"),\n id=\"\",\n name=\"\",\n description=\"bossy direct reservation quaintly atop interestingly\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n is_recurring=True,\n is_archived=False,\n organization_id=\"\",\n ),\n discount=polar_sdk.DiscountFixedRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n duration_in_months=227959,\n type=polar_sdk.DiscountType.FIXED,\n amount=785594,\n currency=\"Barbados Dollar\",\n created_at=parse_datetime(\"2025-08-02T14:17:04.679Z\"),\n modified_at=parse_datetime(\"2023-04-10T21:27:35.876Z\"),\n id=\"\",\n metadata={\n \"key\": \"\",\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2023-05-20T13:29:26.710Z\"),\n ends_at=parse_datetime(\"2023-09-01T14:56:03.459Z\"),\n max_redemptions=583107,\n redemptions_count=378993,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n subscription=polar_sdk.OrderSubscription(\n metadata={\n\n },\n created_at=parse_datetime(\"2025-11-15T17:24:36.671Z\"),\n modified_at=parse_datetime(\"2024-10-31T22:22:01.280Z\"),\n id=\"\",\n amount=531188,\n currency=\"Leone\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n status=polar_sdk.SubscriptionStatus.CANCELED,\n current_period_start=parse_datetime(\"2024-03-12T02:07:55.904Z\"),\n current_period_end=parse_datetime(\"2023-08-26T12:56:24.423Z\"),\n cancel_at_period_end=False,\n canceled_at=parse_datetime(\"2023-02-18T06:04:41.480Z\"),\n started_at=parse_datetime(\"2024-03-28T15:10:13.508Z\"),\n ends_at=parse_datetime(\"2023-11-03T05:13:30.202Z\"),\n ended_at=parse_datetime(\"2024-03-03T03:52:46.888Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.CUSTOMER_SERVICE,\n customer_cancellation_comment=\"\",\n ),\n items=[],\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["organization.updated"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorganization_updated_post(request={\n \"type\": \"organization.updated\",\n \"data\": {\n \"created_at\": parse_datetime(\"2025-08-19T15:02:44.139Z\"),\n \"modified_at\": parse_datetime(\"2025-08-23T00:45:50.780Z\"),\n \"id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"name\": \"\",\n \"slug\": \"\",\n \"avatar_url\": None,\n \"email\": \"Lemuel44@gmail.com\",\n \"website\": \"\",\n \"socials\": [\n {\n \"platform\": polar_sdk.OrganizationSocialPlatforms.TIKTOK,\n \"url\": \"https://grizzled-patroller.info/\",\n },\n ],\n \"status\": polar_sdk.Status.CREATED,\n \"details_submitted_at\": parse_datetime(\"2024-05-05T12:48:25.627Z\"),\n \"feature_settings\": {},\n \"subscription_settings\": {\n \"allow_multiple_subscriptions\": True,\n \"allow_customer_updates\": False,\n \"proration_behavior\": polar_sdk.SubscriptionProrationBehavior.PRORATE,\n },\n \"notification_settings\": {\n \"new_order\": True,\n \"new_subscription\": True,\n },\n },\n })\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointorganization_updated_post(request={\n \"type\": \"organization.updated\",\n \"timestamp\": parse_datetime(\"2025-08-19T15:02:44.139Z\"),\n \"data\": {\n \"created_at\": parse_datetime(\"2025-05-07T21:24:48.059Z\"),\n \"modified_at\": parse_datetime(\"2023-04-16T23:18:12.986Z\"),\n \"id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"name\": \"\",\n \"slug\": \"\",\n \"avatar_url\": \"https://pessimistic-going.name/\",\n \"email\": \"Stefan_Pagac@yahoo.com\",\n \"website\": \"\",\n \"socials\": [],\n \"status\": polar_sdk.Status.CREATED,\n \"details_submitted_at\": parse_datetime(\"2024-05-05T12:48:25.627Z\"),\n \"feature_settings\": {},\n \"subscription_settings\": {\n \"allow_multiple_subscriptions\": True,\n \"allow_customer_updates\": False,\n \"proration_behavior\": polar_sdk.SubscriptionProrationBehavior.PRORATE,\n },\n \"notification_settings\": {\n \"new_order\": True,\n \"new_subscription\": True,\n },\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["product.created"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointproduct_created_post(request={\n \"type\": \"product.created\",\n \"data\": {\n \"created_at\": parse_datetime(\"2023-10-13T02:47:55.082Z\"),\n \"modified_at\": None,\n \"id\": \"\",\n \"name\": \"\",\n \"description\": \"till that ew put\",\n \"recurring_interval\": polar_sdk.SubscriptionRecurringInterval.WEEK,\n \"is_recurring\": False,\n \"is_archived\": True,\n \"organization_id\": \"\",\n \"metadata\": {\n \"key\": 785881,\n },\n \"prices\": [\n {\n \"created_at\": parse_datetime(\"2025-01-03T22:29:57.701Z\"),\n \"modified_at\": parse_datetime(\"2023-04-17T15:58:24.892Z\"),\n \"id\": \"\",\n \"amount_type\": \"metered_unit\",\n \"is_archived\": True,\n \"product_id\": \"\",\n \"type\": polar_sdk.ProductPriceType.RECURRING,\n \"recurring_interval\": polar_sdk.SubscriptionRecurringInterval.DAY,\n \"price_currency\": \"\",\n \"unit_amount\": \"\",\n \"cap_amount\": 348450,\n \"meter_id\": \"\",\n \"meter\": {\n \"id\": \"\",\n \"name\": \"\",\n },\n },\n ],\n \"benefits\": [],\n \"medias\": [],\n \"attached_custom_fields\": [\n {\n \"custom_field_id\": \"\",\n \"custom_field\": {\n \"created_at\": parse_datetime(\"2025-11-01T01:55:57.043Z\"),\n \"modified_at\": parse_datetime(\"2024-03-29T03:32:13.399Z\"),\n \"id\": \"\",\n \"metadata\": {\n\n },\n \"type\": \"number\",\n \"slug\": \"\",\n \"name\": \"\",\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"properties\": {},\n },\n \"order\": 253980,\n \"required\": False,\n },\n ],\n },\n })\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointproduct_created_post(request={\n \"type\": \"product.created\",\n \"timestamp\": parse_datetime(\"2023-10-13T02:47:55.082Z\"),\n \"data\": {\n \"created_at\": parse_datetime(\"2023-01-15T03:15:59.062Z\"),\n \"modified_at\": parse_datetime(\"2023-07-04T11:33:29.001Z\"),\n \"id\": \"\",\n \"name\": \"\",\n \"description\": \"times immaculate minus\",\n \"recurring_interval\": polar_sdk.SubscriptionRecurringInterval.YEAR,\n \"is_recurring\": False,\n \"is_archived\": True,\n \"organization_id\": \"\",\n \"metadata\": {\n \"key\": 489697,\n },\n \"prices\": [\n {\n \"created_at\": parse_datetime(\"2023-10-22T03:18:14.058Z\"),\n \"modified_at\": parse_datetime(\"2025-12-25T12:42:41.486Z\"),\n \"id\": \"\",\n \"amount_type\": \"free\",\n \"is_archived\": False,\n \"product_id\": \"\",\n \"type\": \"recurring\",\n \"recurring_interval\": polar_sdk.SubscriptionRecurringInterval.YEAR,\n \"legacy\": True,\n },\n ],\n \"benefits\": [\n {\n \"id\": \"\",\n \"created_at\": parse_datetime(\"2023-04-17T15:58:24.892Z\"),\n \"modified_at\": parse_datetime(\"2025-05-26T08:28:21.025Z\"),\n \"type\": \"meter_credit\",\n \"description\": \"likewise emergent yippee embody ick gadzooks\",\n \"selectable\": True,\n \"deletable\": True,\n \"organization_id\": \"\",\n \"metadata\": {\n \"key\": 487853,\n },\n \"properties\": {\n \"units\": 418012,\n \"rollover\": False,\n \"meter_id\": \"\",\n },\n },\n ],\n \"medias\": [\n {\n \"id\": \"\",\n \"organization_id\": \"\",\n \"name\": \"\",\n \"path\": \"/mnt\",\n \"mime_type\": \"\",\n \"size\": 974093,\n \"storage_version\": \"\",\n \"checksum_etag\": \"\",\n \"checksum_sha256_base64\": \"\",\n \"checksum_sha256_hex\": \"\",\n \"last_modified_at\": parse_datetime(\"2024-09-28T09:54:43.061Z\"),\n \"version\": \"\",\n \"service\": \"product_media\",\n \"is_uploaded\": True,\n \"created_at\": parse_datetime(\"2025-10-13T07:25:06.957Z\"),\n \"size_readable\": \"\",\n \"public_url\": \"https://usable-bowling.net\",\n },\n ],\n \"attached_custom_fields\": [\n {\n \"custom_field_id\": \"\",\n \"custom_field\": {\n \"created_at\": parse_datetime(\"2023-04-11T22:11:51.564Z\"),\n \"modified_at\": parse_datetime(\"2024-07-17T21:59:33.594Z\"),\n \"id\": \"\",\n \"metadata\": {\n\n },\n \"type\": \"text\",\n \"slug\": \"\",\n \"name\": \"\",\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"properties\": {},\n },\n \"order\": 495299,\n \"required\": False,\n },\n ],\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["product.updated"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointproduct_updated_post(request={\n \"type\": \"product.updated\",\n \"data\": {\n \"created_at\": parse_datetime(\"2024-08-25T02:00:54.049Z\"),\n \"modified_at\": parse_datetime(\"2023-07-21T03:22:42.071Z\"),\n \"id\": \"\",\n \"name\": \"\",\n \"description\": \"fooey optimistic beyond dress helpfully whispered structure heartfelt consequently\",\n \"recurring_interval\": polar_sdk.SubscriptionRecurringInterval.MONTH,\n \"is_recurring\": False,\n \"is_archived\": False,\n \"organization_id\": \"\",\n \"metadata\": {\n \"key\": 495401,\n },\n \"prices\": [\n {\n \"created_at\": parse_datetime(\"2023-07-01T18:10:48.406Z\"),\n \"modified_at\": None,\n \"id\": \"\",\n \"amount_type\": \"free\",\n \"is_archived\": True,\n \"product_id\": \"\",\n \"type\": \"recurring\",\n \"recurring_interval\": polar_sdk.SubscriptionRecurringInterval.WEEK,\n \"legacy\": True,\n },\n ],\n \"benefits\": [],\n \"medias\": [],\n \"attached_custom_fields\": [\n {\n \"custom_field_id\": \"\",\n \"custom_field\": {\n \"created_at\": parse_datetime(\"2023-06-25T21:47:16.070Z\"),\n \"modified_at\": parse_datetime(\"2023-12-26T19:54:07.292Z\"),\n \"id\": \"\",\n \"metadata\": {\n\n },\n \"type\": \"number\",\n \"slug\": \"\",\n \"name\": \"\",\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"properties\": {},\n },\n \"order\": 910988,\n \"required\": True,\n },\n ],\n },\n })\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointproduct_updated_post(request={\n \"type\": \"product.updated\",\n \"timestamp\": parse_datetime(\"2024-08-25T02:00:54.049Z\"),\n \"data\": {\n \"created_at\": parse_datetime(\"2025-02-11T18:19:05.372Z\"),\n \"modified_at\": parse_datetime(\"2025-07-31T19:14:23.351Z\"),\n \"id\": \"\",\n \"name\": \"\",\n \"description\": \"thyme careless stump transplant quickly remarkable including mmm dependency softly\",\n \"recurring_interval\": polar_sdk.SubscriptionRecurringInterval.YEAR,\n \"is_recurring\": True,\n \"is_archived\": True,\n \"organization_id\": \"\",\n \"metadata\": {\n\n },\n \"prices\": [],\n \"benefits\": [],\n \"medias\": [],\n \"attached_custom_fields\": [\n {\n \"custom_field_id\": \"\",\n \"custom_field\": {\n \"created_at\": parse_datetime(\"2023-06-25T21:47:16.070Z\"),\n \"modified_at\": parse_datetime(\"2023-12-26T19:54:07.292Z\"),\n \"id\": \"\",\n \"metadata\": {\n\n },\n \"type\": \"number\",\n \"slug\": \"\",\n \"name\": \"\",\n \"organization_id\": \"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n \"properties\": {},\n },\n \"order\": 910988,\n \"required\": True,\n },\n ],\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["refund.created"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointrefund_created_post(request={\n \"type\": \"refund.created\",\n \"data\": {\n \"created_at\": parse_datetime(\"2025-02-15T13:46:01.700Z\"),\n \"modified_at\": parse_datetime(\"2024-07-08T10:47:55.917Z\"),\n \"id\": \"\",\n \"metadata\": {\n \"key\": 1671.19,\n },\n \"status\": polar_sdk.RefundStatus.PENDING,\n \"reason\": polar_sdk.RefundReason.OTHER,\n \"amount\": 104569,\n \"tax_amount\": 295454,\n \"currency\": \"Solomon Islands Dollar\",\n \"organization_id\": \"\",\n \"order_id\": \"\",\n \"subscription_id\": \"\",\n \"customer_id\": \"\",\n \"revoke_benefits\": False,\n },\n })\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointrefund_created_post(request={\n \"type\": \"refund.created\",\n \"timestamp\": parse_datetime(\"2025-02-15T13:46:01.700Z\"),\n \"data\": {\n \"created_at\": parse_datetime(\"2023-12-02T00:48:24.931Z\"),\n \"modified_at\": parse_datetime(\"2025-08-16T15:26:20.191Z\"),\n \"id\": \"\",\n \"metadata\": {\n \"key\": \"\",\n },\n \"status\": polar_sdk.RefundStatus.PENDING,\n \"reason\": polar_sdk.RefundReason.OTHER,\n \"amount\": 104569,\n \"tax_amount\": 295454,\n \"currency\": \"Solomon Islands Dollar\",\n \"organization_id\": \"\",\n \"order_id\": \"\",\n \"subscription_id\": \"\",\n \"customer_id\": \"\",\n \"revoke_benefits\": False,\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["refund.updated"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointrefund_updated_post(request={\n \"type\": \"refund.updated\",\n \"data\": {\n \"created_at\": parse_datetime(\"2023-01-08T20:35:39.672Z\"),\n \"modified_at\": parse_datetime(\"2025-09-12T22:02:00.691Z\"),\n \"id\": \"\",\n \"metadata\": {\n \"key\": \"\",\n },\n \"status\": polar_sdk.RefundStatus.CANCELED,\n \"reason\": polar_sdk.RefundReason.SERVICE_DISRUPTION,\n \"amount\": 986698,\n \"tax_amount\": 785012,\n \"currency\": \"Congolese Franc\",\n \"organization_id\": \"\",\n \"order_id\": \"\",\n \"subscription_id\": \"\",\n \"customer_id\": \"\",\n \"revoke_benefits\": False,\n },\n })\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointrefund_updated_post(request={\n \"type\": \"refund.updated\",\n \"timestamp\": parse_datetime(\"2023-01-08T20:35:39.672Z\"),\n \"data\": {\n \"created_at\": parse_datetime(\"2025-03-28T13:42:04.506Z\"),\n \"modified_at\": parse_datetime(\"2024-08-07T08:31:25.154Z\"),\n \"id\": \"\",\n \"metadata\": {\n\n },\n \"status\": polar_sdk.RefundStatus.CANCELED,\n \"reason\": polar_sdk.RefundReason.SERVICE_DISRUPTION,\n \"amount\": 986698,\n \"tax_amount\": 785012,\n \"currency\": \"Congolese Franc\",\n \"organization_id\": \"\",\n \"order_id\": \"\",\n \"subscription_id\": \"\",\n \"customer_id\": \"\",\n \"revoke_benefits\": False,\n },\n })\n\n # Handle response\n print(res)" - target: $["paths"]["subscription.active"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_active_post(request=polar_sdk.WebhookSubscriptionActivePayload(\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2023-08-13T01:28:21.362Z\"),\n modified_at=parse_datetime(\"2024-06-25T00:41:05.678Z\"),\n id=\"\",\n amount=320436,\n currency=\"Peso Uruguayo\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n status=polar_sdk.SubscriptionStatus.PAST_DUE,\n current_period_start=parse_datetime(\"2023-06-09T14:14:48.363Z\"),\n current_period_end=None,\n cancel_at_period_end=True,\n canceled_at=None,\n started_at=parse_datetime(\"2023-07-21T07:29:31.409Z\"),\n ends_at=parse_datetime(\"2025-08-05T11:38:46.213Z\"),\n ended_at=parse_datetime(\"2024-09-05T04:27:23.768Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.TOO_COMPLEX,\n customer_cancellation_comment=\"\",\n metadata={\n\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-04-15T00:36:48.299Z\"),\n modified_at=parse_datetime(\"2024-08-17T18:35:42.212Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-01-01T03:00:09.282Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2025-03-11T11:17:02.540Z\"),\n modified_at=parse_datetime(\"2025-05-22T16:11:00.138Z\"),\n id=\"\",\n name=\"\",\n description=\"per indeed punctually\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n is_recurring=False,\n is_archived=False,\n organization_id=\"\",\n metadata={\n \"key\": \"\",\n },\n prices=[\n polar_sdk.LegacyRecurringProductPriceFixed(\n created_at=parse_datetime(\"2023-06-22T15:04:43.558Z\"),\n modified_at=parse_datetime(\"2023-02-05T17:39:30.893Z\"),\n id=\"\",\n is_archived=False,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n price_currency=\"\",\n price_amount=924076,\n ),\n ],\n benefits=[],\n medias=[\n polar_sdk.ProductMediaFileRead(\n id=\"\",\n organization_id=\"\",\n name=\"\",\n path=\"/home\",\n mime_type=\"\",\n size=462010,\n storage_version=\"\",\n checksum_etag=\"\",\n checksum_sha256_base64=\"\",\n checksum_sha256_hex=None,\n last_modified_at=parse_datetime(\"2024-12-02T20:32:47.578Z\"),\n version=\"\",\n is_uploaded=True,\n created_at=parse_datetime(\"2024-02-08T05:56:24.956Z\"),\n size_readable=\"\",\n public_url=\"https://regular-scratch.org/\",\n ),\n ],\n attached_custom_fields=[\n polar_sdk.AttachedCustomField(\n custom_field_id=\"\",\n custom_field=polar_sdk.CustomFieldDate(\n created_at=parse_datetime(\"2023-06-04T23:55:53.252Z\"),\n modified_at=parse_datetime(\"2024-08-20T09:23:26.342Z\"),\n id=\"\",\n metadata={\n \"key\": True,\n },\n slug=\"\",\n name=\"\",\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n properties=polar_sdk.CustomFieldDateProperties(),\n ),\n order=612157,\n required=True,\n ),\n ],\n ),\n discount=polar_sdk.DiscountPercentageRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n duration_in_months=829362,\n type=polar_sdk.DiscountType.PERCENTAGE,\n basis_points=431070,\n created_at=parse_datetime(\"2024-04-05T11:10:16.533Z\"),\n modified_at=parse_datetime(\"2023-02-12T06:44:11.052Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2023-03-15T20:22:59.077Z\"),\n ends_at=parse_datetime(\"2025-04-04T17:29:43.877Z\"),\n max_redemptions=90287,\n redemptions_count=180745,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n prices=[],\n meters=[],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_active_post(request=polar_sdk.WebhookSubscriptionActivePayload(\n timestamp=parse_datetime(\"2023-08-13T01:28:21.362Z\"),\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2023-10-12T10:17:29.274Z\"),\n modified_at=parse_datetime(\"2023-12-18T04:45:55.702Z\"),\n id=\"\",\n amount=898742,\n currency=\"Pound Sterling\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.MONTH,\n status=polar_sdk.SubscriptionStatus.INCOMPLETE_EXPIRED,\n current_period_start=parse_datetime(\"2023-04-09T09:06:19.384Z\"),\n current_period_end=None,\n cancel_at_period_end=True,\n canceled_at=parse_datetime(\"2023-07-21T07:29:31.409Z\"),\n started_at=parse_datetime(\"2025-08-05T11:38:46.213Z\"),\n ends_at=parse_datetime(\"2024-09-05T04:27:23.768Z\"),\n ended_at=parse_datetime(\"2024-06-17T20:38:09.011Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.MISSING_FEATURES,\n customer_cancellation_comment=\"\",\n metadata={\n \"key\": 4786.4,\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-01-01T23:32:39.659Z\"),\n modified_at=parse_datetime(\"2025-01-01T03:00:09.282Z\"),\n metadata={\n \"key\": 796236,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=None,\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2025-11-05T10:18:40.300Z\"),\n modified_at=parse_datetime(\"2024-04-23T18:24:43.408Z\"),\n id=\"\",\n name=\"\",\n description=\"athwart fail wound oh nor boohoo reasoning against since\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n is_recurring=False,\n is_archived=True,\n organization_id=\"\",\n metadata={\n\n },\n prices=[],\n benefits=[\n polar_sdk.BenefitCustom(\n id=\"\",\n created_at=parse_datetime(\"2025-12-07T07:01:30.650Z\"),\n modified_at=parse_datetime(\"2025-05-21T10:49:13.924Z\"),\n description=\"effector as upbeat\",\n selectable=False,\n deletable=False,\n organization_id=\"\",\n metadata={\n\n },\n properties=polar_sdk.BenefitCustomProperties(\n note=\"\",\n ),\n ),\n ],\n medias=[\n polar_sdk.ProductMediaFileRead(\n id=\"\",\n organization_id=\"\",\n name=\"\",\n path=\"/net\",\n mime_type=\"\",\n size=11881,\n storage_version=\"\",\n checksum_etag=\"\",\n checksum_sha256_base64=\"\",\n checksum_sha256_hex=None,\n last_modified_at=parse_datetime(\"2023-11-14T06:50:49.907Z\"),\n version=None,\n is_uploaded=False,\n created_at=parse_datetime(\"2025-10-14T21:02:51.234Z\"),\n size_readable=\"\",\n public_url=\"https://precious-passport.com\",\n ),\n ],\n attached_custom_fields=[],\n ),\n discount=None,\n prices=[],\n meters=[\n polar_sdk.SubscriptionMeter(\n created_at=parse_datetime(\"2023-10-17T15:57:30.746Z\"),\n modified_at=parse_datetime(\"2023-01-26T13:42:22.194Z\"),\n id=\"\",\n consumed_units=25,\n credited_units=100,\n amount=0,\n meter_id=\"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n meter=polar_sdk.Meter(\n metadata={\n\n },\n created_at=parse_datetime(\"2025-10-16T02:50:36.102Z\"),\n modified_at=parse_datetime(\"2024-11-23T13:29:39.753Z\"),\n id=\"\",\n name=\"\",\n filter_=polar_sdk.Filter(\n conjunction=polar_sdk.FilterConjunction.AND,\n clauses=[],\n ),\n aggregation=polar_sdk.PropertyAggregation(\n func=polar_sdk.Func.AVG,\n property=\"\",\n ),\n organization_id=\"\",\n ),\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["subscription.canceled"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_canceled_post(request=polar_sdk.WebhookSubscriptionCanceledPayload(\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2025-02-09T04:39:02.332Z\"),\n modified_at=parse_datetime(\"2023-04-18T10:38:03.481Z\"),\n id=\"\",\n amount=137392,\n currency=\"New Taiwan Dollar\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n status=polar_sdk.SubscriptionStatus.ACTIVE,\n current_period_start=parse_datetime(\"2023-06-17T04:15:56.819Z\"),\n current_period_end=parse_datetime(\"2023-06-02T15:48:16.857Z\"),\n cancel_at_period_end=False,\n canceled_at=parse_datetime(\"2024-01-07T18:54:45.602Z\"),\n started_at=parse_datetime(\"2025-02-23T12:23:49.579Z\"),\n ends_at=parse_datetime(\"2023-11-16T08:24:59.166Z\"),\n ended_at=parse_datetime(\"2023-07-21T16:25:14.433Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=None,\n checkout_id=None,\n customer_cancellation_reason=None,\n customer_cancellation_comment=\"\",\n metadata={\n\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2023-10-25T05:52:42.846Z\"),\n modified_at=parse_datetime(\"2023-09-20T10:20:50.540Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-04-15T00:52:17.297Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2024-10-18T00:58:28.923Z\"),\n modified_at=parse_datetime(\"2025-06-11T17:21:10.206Z\"),\n id=\"\",\n name=\"\",\n description=\"rekindle very whoever happily provision pfft outrun surface\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n is_recurring=False,\n is_archived=True,\n organization_id=\"\",\n metadata={\n \"key\": True,\n },\n prices=[],\n benefits=[\n polar_sdk.BenefitLicenseKeys(\n id=\"\",\n created_at=parse_datetime(\"2024-10-21T11:59:45.315Z\"),\n modified_at=parse_datetime(\"2025-06-11T03:26:05.845Z\"),\n description=\"yippee broadcast er yowza\",\n selectable=True,\n deletable=True,\n organization_id=\"\",\n metadata={\n\n },\n properties=polar_sdk.BenefitLicenseKeysProperties(\n prefix=\"\",\n expires=polar_sdk.BenefitLicenseKeyExpirationProperties(\n ttl=156565,\n timeframe=polar_sdk.Timeframe.YEAR,\n ),\n activations=polar_sdk.BenefitLicenseKeyActivationProperties(\n limit=676095,\n enable_customer_admin=False,\n ),\n limit_usage=637284,\n ),\n ),\n ],\n medias=[],\n attached_custom_fields=[\n polar_sdk.AttachedCustomField(\n custom_field_id=\"\",\n custom_field=polar_sdk.CustomFieldText(\n created_at=parse_datetime(\"2023-03-07T15:42:46.324Z\"),\n modified_at=parse_datetime(\"2024-09-08T21:12:01.583Z\"),\n id=\"\",\n metadata={\n\n },\n slug=\"\",\n name=\"\",\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n properties=polar_sdk.CustomFieldTextProperties(),\n ),\n order=147849,\n required=False,\n ),\n ],\n ),\n discount=polar_sdk.DiscountFixedRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n duration_in_months=162086,\n type=polar_sdk.DiscountType.PERCENTAGE,\n amount=280213,\n currency=\"Mexican Peso\",\n created_at=parse_datetime(\"2024-09-21T23:00:18.902Z\"),\n modified_at=parse_datetime(\"2024-06-12T08:11:27.558Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2024-04-30T07:29:19.925Z\"),\n ends_at=parse_datetime(\"2025-12-08T04:46:29.428Z\"),\n max_redemptions=264852,\n redemptions_count=579638,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n prices=[\n polar_sdk.LegacyRecurringProductPriceFixed(\n created_at=parse_datetime(\"2024-05-17T23:59:28.786Z\"),\n modified_at=parse_datetime(\"2024-05-31T09:51:13.446Z\"),\n id=\"\",\n is_archived=True,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n price_currency=\"\",\n price_amount=57753,\n ),\n ],\n meters=[\n polar_sdk.SubscriptionMeter(\n created_at=parse_datetime(\"2023-04-20T13:22:47.883Z\"),\n modified_at=parse_datetime(\"2024-05-07T04:06:16.229Z\"),\n id=\"\",\n consumed_units=25,\n credited_units=100,\n amount=0,\n meter_id=\"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n meter=polar_sdk.Meter(\n metadata={\n \"key\": False,\n },\n created_at=parse_datetime(\"2024-05-08T15:55:55.133Z\"),\n modified_at=parse_datetime(\"2024-02-15T18:41:28.030Z\"),\n id=\"\",\n name=\"\",\n filter_=polar_sdk.Filter(\n conjunction=polar_sdk.FilterConjunction.AND,\n clauses=[],\n ),\n aggregation=polar_sdk.CountAggregation(),\n organization_id=\"\",\n ),\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_canceled_post(request=polar_sdk.WebhookSubscriptionCanceledPayload(\n timestamp=parse_datetime(\"2025-02-09T04:39:02.332Z\"),\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2025-04-09T17:46:08.645Z\"),\n modified_at=None,\n id=\"\",\n amount=137392,\n currency=\"New Taiwan Dollar\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n status=polar_sdk.SubscriptionStatus.ACTIVE,\n current_period_start=parse_datetime(\"2023-06-17T04:15:56.819Z\"),\n current_period_end=parse_datetime(\"2023-06-02T15:48:16.857Z\"),\n cancel_at_period_end=False,\n canceled_at=parse_datetime(\"2024-01-07T18:54:45.602Z\"),\n started_at=parse_datetime(\"2025-02-23T12:23:49.579Z\"),\n ends_at=parse_datetime(\"2023-11-16T08:24:59.166Z\"),\n ended_at=parse_datetime(\"2023-07-21T16:25:14.433Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=None,\n checkout_id=None,\n customer_cancellation_reason=None,\n customer_cancellation_comment=\"\",\n metadata={\n\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2023-10-25T05:52:42.846Z\"),\n modified_at=parse_datetime(\"2023-09-20T10:20:50.540Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-04-15T00:52:17.297Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2024-10-18T00:58:28.923Z\"),\n modified_at=parse_datetime(\"2025-06-11T17:21:10.206Z\"),\n id=\"\",\n name=\"\",\n description=\"rekindle very whoever happily provision pfft outrun surface\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n is_recurring=False,\n is_archived=True,\n organization_id=\"\",\n metadata={\n \"key\": True,\n },\n prices=[],\n benefits=[\n polar_sdk.BenefitLicenseKeys(\n id=\"\",\n created_at=parse_datetime(\"2024-10-21T11:59:45.315Z\"),\n modified_at=parse_datetime(\"2025-06-11T03:26:05.845Z\"),\n description=\"yippee broadcast er yowza\",\n selectable=True,\n deletable=True,\n organization_id=\"\",\n metadata={\n\n },\n properties=polar_sdk.BenefitLicenseKeysProperties(\n prefix=\"\",\n expires=polar_sdk.BenefitLicenseKeyExpirationProperties(\n ttl=156565,\n timeframe=polar_sdk.Timeframe.YEAR,\n ),\n activations=polar_sdk.BenefitLicenseKeyActivationProperties(\n limit=676095,\n enable_customer_admin=False,\n ),\n limit_usage=637284,\n ),\n ),\n ],\n medias=[],\n attached_custom_fields=[\n polar_sdk.AttachedCustomField(\n custom_field_id=\"\",\n custom_field=polar_sdk.CustomFieldText(\n created_at=parse_datetime(\"2023-03-07T15:42:46.324Z\"),\n modified_at=parse_datetime(\"2024-09-08T21:12:01.583Z\"),\n id=\"\",\n metadata={\n\n },\n slug=\"\",\n name=\"\",\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n properties=polar_sdk.CustomFieldTextProperties(),\n ),\n order=147849,\n required=False,\n ),\n ],\n ),\n discount=polar_sdk.DiscountFixedRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n duration_in_months=162086,\n type=polar_sdk.DiscountType.PERCENTAGE,\n amount=280213,\n currency=\"Mexican Peso\",\n created_at=parse_datetime(\"2024-09-21T23:00:18.902Z\"),\n modified_at=parse_datetime(\"2024-06-12T08:11:27.558Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2024-04-30T07:29:19.925Z\"),\n ends_at=parse_datetime(\"2025-12-08T04:46:29.428Z\"),\n max_redemptions=264852,\n redemptions_count=579638,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n prices=[\n polar_sdk.LegacyRecurringProductPriceFixed(\n created_at=parse_datetime(\"2024-05-17T23:59:28.786Z\"),\n modified_at=parse_datetime(\"2024-05-31T09:51:13.446Z\"),\n id=\"\",\n is_archived=True,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n price_currency=\"\",\n price_amount=57753,\n ),\n ],\n meters=[\n polar_sdk.SubscriptionMeter(\n created_at=parse_datetime(\"2023-04-20T13:22:47.883Z\"),\n modified_at=parse_datetime(\"2024-05-07T04:06:16.229Z\"),\n id=\"\",\n consumed_units=25,\n credited_units=100,\n amount=0,\n meter_id=\"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n meter=polar_sdk.Meter(\n metadata={\n \"key\": False,\n },\n created_at=parse_datetime(\"2024-05-08T15:55:55.133Z\"),\n modified_at=parse_datetime(\"2024-02-15T18:41:28.030Z\"),\n id=\"\",\n name=\"\",\n filter_=polar_sdk.Filter(\n conjunction=polar_sdk.FilterConjunction.AND,\n clauses=[],\n ),\n aggregation=polar_sdk.CountAggregation(),\n organization_id=\"\",\n ),\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["subscription.created"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_created_post(request=polar_sdk.WebhookSubscriptionCreatedPayload(\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2024-05-03T11:46:21.459Z\"),\n modified_at=parse_datetime(\"2025-01-12T06:30:14.360Z\"),\n id=\"\",\n amount=469182,\n currency=\"Boliviano boliviano\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n status=polar_sdk.SubscriptionStatus.INCOMPLETE,\n current_period_start=parse_datetime(\"2024-01-07T06:33:36.381Z\"),\n current_period_end=parse_datetime(\"2024-07-30T16:54:44.427Z\"),\n cancel_at_period_end=True,\n canceled_at=parse_datetime(\"2023-09-10T18:39:16.136Z\"),\n started_at=parse_datetime(\"2025-08-30T21:29:16.432Z\"),\n ends_at=parse_datetime(\"2024-06-27T22:01:23.333Z\"),\n ended_at=parse_datetime(\"2024-07-24T19:43:04.879Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=None,\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.MISSING_FEATURES,\n customer_cancellation_comment=\"\",\n metadata={\n\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-04-17T21:09:13.571Z\"),\n modified_at=parse_datetime(\"2023-05-18T22:55:50.482Z\"),\n metadata={\n \"key\": 5036.67,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-11-15T13:52:57.820Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2025-09-26T04:05:17.473Z\"),\n modified_at=parse_datetime(\"2025-06-26T21:09:46.234Z\"),\n id=\"\",\n name=\"\",\n description=\"mysteriously platypus scrape adventurously which cautiously\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n is_recurring=False,\n is_archived=True,\n organization_id=\"\",\n metadata={\n \"key\": 7184.85,\n },\n prices=[],\n benefits=[],\n medias=[],\n attached_custom_fields=[],\n ),\n discount=polar_sdk.DiscountPercentageOnceForeverDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n type=polar_sdk.DiscountType.PERCENTAGE,\n basis_points=784251,\n created_at=parse_datetime(\"2025-10-28T15:34:36.012Z\"),\n modified_at=parse_datetime(\"2024-10-10T17:21:09.309Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2023-03-14T14:26:18.378Z\"),\n ends_at=parse_datetime(\"2023-02-06T08:50:56.809Z\"),\n max_redemptions=897788,\n redemptions_count=877303,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n prices=[],\n meters=[\n polar_sdk.SubscriptionMeter(\n created_at=parse_datetime(\"2025-09-05T16:45:03.444Z\"),\n modified_at=parse_datetime(\"2025-01-22T02:13:03.697Z\"),\n id=\"\",\n consumed_units=25,\n credited_units=100,\n amount=0,\n meter_id=\"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n meter=polar_sdk.Meter(\n metadata={\n\n },\n created_at=parse_datetime(\"2024-02-18T16:04:27.179Z\"),\n modified_at=parse_datetime(\"2023-02-18T11:12:06.291Z\"),\n id=\"\",\n name=\"\",\n filter_=polar_sdk.Filter(\n conjunction=polar_sdk.FilterConjunction.OR,\n clauses=[],\n ),\n aggregation=polar_sdk.UniqueAggregation(\n property=\"\",\n ),\n organization_id=\"\",\n ),\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_created_post(request=polar_sdk.WebhookSubscriptionCreatedPayload(\n timestamp=parse_datetime(\"2024-05-03T11:46:21.459Z\"),\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2023-12-03T10:52:23.880Z\"),\n modified_at=parse_datetime(\"2024-05-29T05:21:44.072Z\"),\n id=\"\",\n amount=119240,\n currency=\"Zambian Kwacha\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n status=polar_sdk.SubscriptionStatus.TRIALING,\n current_period_start=parse_datetime(\"2024-02-03T21:22:53.116Z\"),\n current_period_end=parse_datetime(\"2023-10-20T18:48:25.568Z\"),\n cancel_at_period_end=False,\n canceled_at=parse_datetime(\"2023-09-10T12:12:44.499Z\"),\n started_at=parse_datetime(\"2024-09-02T19:02:23.015Z\"),\n ends_at=parse_datetime(\"2023-08-19T21:45:43.735Z\"),\n ended_at=parse_datetime(\"2023-03-15T19:14:53.866Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.TOO_EXPENSIVE,\n customer_cancellation_comment=\"\",\n metadata={\n \"key\": 1258.71,\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-09-10T08:59:46.091Z\"),\n modified_at=parse_datetime(\"2024-07-06T00:27:46.272Z\"),\n metadata={\n \"key\": 9576.45,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2025-06-26T21:09:46.234Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2023-05-15T22:05:41.858Z\"),\n modified_at=parse_datetime(\"2024-01-31T16:35:38.441Z\"),\n id=\"\",\n name=\"\",\n description=\"around disposer scholarship zowie chow pish afore typify harvest\",\n recurring_interval=None,\n is_recurring=False,\n is_archived=False,\n organization_id=\"\",\n metadata={\n \"key\": 751680,\n },\n prices=[\n polar_sdk.LegacyRecurringProductPriceFree(\n created_at=parse_datetime(\"2023-06-14T06:12:12.351Z\"),\n modified_at=parse_datetime(\"2025-12-04T13:50:03.874Z\"),\n id=\"\",\n is_archived=True,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.YEAR,\n ),\n ],\n benefits=[],\n medias=[\n polar_sdk.ProductMediaFileRead(\n id=\"\",\n organization_id=\"\",\n name=\"\",\n path=\"/etc/namedb\",\n mime_type=\"\",\n size=377784,\n storage_version=\"\",\n checksum_etag=\"\",\n checksum_sha256_base64=\"\",\n checksum_sha256_hex=\"\",\n last_modified_at=parse_datetime(\"2025-01-27T12:39:41.519Z\"),\n version=\"\",\n is_uploaded=False,\n created_at=parse_datetime(\"2025-11-29T13:54:30.761Z\"),\n size_readable=\"\",\n public_url=\"https://tangible-maintainer.name/\",\n ),\n ],\n attached_custom_fields=[],\n ),\n discount=polar_sdk.DiscountPercentageOnceForeverDurationBase(\n duration=polar_sdk.DiscountDuration.REPEATING,\n type=polar_sdk.DiscountType.FIXED,\n basis_points=728623,\n created_at=parse_datetime(\"2025-12-01T13:59:05.249Z\"),\n modified_at=parse_datetime(\"2023-05-31T15:26:51.884Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2025-12-18T04:49:27.384Z\"),\n ends_at=parse_datetime(\"2024-07-25T11:55:55.184Z\"),\n max_redemptions=166124,\n redemptions_count=123839,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n prices=[],\n meters=[\n polar_sdk.SubscriptionMeter(\n created_at=parse_datetime(\"2025-12-26T01:33:27.412Z\"),\n modified_at=parse_datetime(\"2025-01-02T18:50:53.887Z\"),\n id=\"\",\n consumed_units=25,\n credited_units=100,\n amount=0,\n meter_id=\"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n meter=polar_sdk.Meter(\n metadata={\n\n },\n created_at=parse_datetime(\"2025-09-23T22:50:26.075Z\"),\n modified_at=None,\n id=\"\",\n name=\"\",\n filter_=polar_sdk.Filter(\n conjunction=polar_sdk.FilterConjunction.OR,\n clauses=[\n polar_sdk.FilterClause(\n property=\"\",\n operator=polar_sdk.FilterOperator.NE,\n value=\"\",\n ),\n ],\n ),\n aggregation=polar_sdk.PropertyAggregation(\n func=polar_sdk.Func.MAX,\n property=\"\",\n ),\n organization_id=\"\",\n ),\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["subscription.revoked"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_revoked_post(request=polar_sdk.WebhookSubscriptionRevokedPayload(\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2024-01-02T06:40:50.860Z\"),\n modified_at=None,\n id=\"\",\n amount=357630,\n currency=\"Fiji Dollar\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n status=polar_sdk.SubscriptionStatus.CANCELED,\n current_period_start=parse_datetime(\"2024-04-30T10:39:59.432Z\"),\n current_period_end=parse_datetime(\"2025-03-19T11:29:47.842Z\"),\n cancel_at_period_end=True,\n canceled_at=parse_datetime(\"2023-02-17T04:59:11.584Z\"),\n started_at=parse_datetime(\"2024-02-14T23:20:57.498Z\"),\n ends_at=parse_datetime(\"2025-04-28T23:19:31.379Z\"),\n ended_at=parse_datetime(\"2023-04-29T06:37:50.213Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.CUSTOMER_SERVICE,\n customer_cancellation_comment=\"\",\n metadata={\n\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2023-11-24T13:14:03.962Z\"),\n modified_at=parse_datetime(\"2025-03-17T11:47:03.932Z\"),\n metadata={\n \"key\": False,\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2023-10-16T13:32:15.169Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2025-01-19T04:39:36.127Z\"),\n modified_at=parse_datetime(\"2023-07-14T08:43:45.509Z\"),\n id=\"\",\n name=\"\",\n description=\"longingly apparatus since acidly anti canter dimly fatherly as\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n is_recurring=True,\n is_archived=False,\n organization_id=\"\",\n metadata={\n\n },\n prices=[],\n benefits=[],\n medias=[],\n attached_custom_fields=[],\n ),\n discount=None,\n prices=[\n polar_sdk.LegacyRecurringProductPriceFixed(\n created_at=parse_datetime(\"2025-11-28T05:50:39.876Z\"),\n modified_at=parse_datetime(\"2023-01-18T23:12:00.000Z\"),\n id=\"\",\n is_archived=True,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n price_currency=\"\",\n price_amount=60934,\n ),\n ],\n meters=[\n polar_sdk.SubscriptionMeter(\n created_at=parse_datetime(\"2023-01-12T15:01:17.401Z\"),\n modified_at=parse_datetime(\"2024-03-19T23:35:08.612Z\"),\n id=\"\",\n consumed_units=25,\n credited_units=100,\n amount=0,\n meter_id=\"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n meter=polar_sdk.Meter(\n metadata={\n \"key\": 463129,\n },\n created_at=parse_datetime(\"2023-11-24T08:24:04.782Z\"),\n modified_at=parse_datetime(\"2025-06-04T07:43:03.654Z\"),\n id=\"\",\n name=\"\",\n filter_=polar_sdk.Filter(\n conjunction=polar_sdk.FilterConjunction.AND,\n clauses=[\n polar_sdk.FilterClause(\n property=\"\",\n operator=polar_sdk.FilterOperator.GTE,\n value=True,\n ),\n ],\n ),\n aggregation=polar_sdk.UniqueAggregation(\n property=\"\",\n ),\n organization_id=\"\",\n ),\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_revoked_post(request=polar_sdk.WebhookSubscriptionRevokedPayload(\n timestamp=parse_datetime(\"2024-01-02T06:40:50.860Z\"),\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2023-03-16T08:42:29.566Z\"),\n modified_at=parse_datetime(\"2023-10-28T01:20:21.930Z\"),\n id=\"\",\n amount=88813,\n currency=\"Syrian Pound\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n status=polar_sdk.SubscriptionStatus.INCOMPLETE,\n current_period_start=parse_datetime(\"2025-03-19T11:29:47.842Z\"),\n current_period_end=parse_datetime(\"2023-11-20T08:24:19.529Z\"),\n cancel_at_period_end=True,\n canceled_at=parse_datetime(\"2024-02-14T23:20:57.498Z\"),\n started_at=parse_datetime(\"2025-04-28T23:19:31.379Z\"),\n ends_at=parse_datetime(\"2023-04-29T06:37:50.213Z\"),\n ended_at=parse_datetime(\"2024-02-16T22:20:38.685Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.SWITCHED_SERVICE,\n customer_cancellation_comment=\"\",\n metadata={\n \"key\": 8599.31,\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-12-12T02:48:12.123Z\"),\n modified_at=parse_datetime(\"2025-08-13T10:16:30.587Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2023-12-02T01:39:05.956Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2023-07-14T08:43:45.509Z\"),\n modified_at=parse_datetime(\"2025-05-31T05:10:14.997Z\"),\n id=\"\",\n name=\"\",\n description=\"inside overburden quarrelsome outrun phew whose\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n is_recurring=True,\n is_archived=True,\n organization_id=\"\",\n metadata={\n\n },\n prices=[],\n benefits=[],\n medias=[],\n attached_custom_fields=[\n polar_sdk.AttachedCustomField(\n custom_field_id=\"\",\n custom_field=polar_sdk.CustomFieldSelect(\n created_at=parse_datetime(\"2024-11-20T10:35:27.268Z\"),\n modified_at=parse_datetime(\"2024-12-28T11:50:23.357Z\"),\n id=\"\",\n metadata={\n \"key\": 939457,\n },\n slug=\"\",\n name=\"\",\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n properties=polar_sdk.CustomFieldSelectProperties(\n options=[],\n ),\n ),\n order=518934,\n required=True,\n ),\n ],\n ),\n discount=polar_sdk.DiscountFixedRepeatDurationBase(\n duration=polar_sdk.DiscountDuration.FOREVER,\n duration_in_months=956675,\n type=polar_sdk.DiscountType.FIXED,\n amount=318678,\n currency=\"Won\",\n created_at=parse_datetime(\"2024-06-28T04:33:55.419Z\"),\n modified_at=parse_datetime(\"2023-04-08T23:58:31.520Z\"),\n id=\"\",\n metadata={\n \"key\": True,\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2023-01-18T23:12:00.000Z\"),\n ends_at=None,\n max_redemptions=841467,\n redemptions_count=431905,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n prices=[],\n meters=[\n polar_sdk.SubscriptionMeter(\n created_at=parse_datetime(\"2023-01-12T15:01:17.401Z\"),\n modified_at=parse_datetime(\"2024-03-19T23:35:08.612Z\"),\n id=\"\",\n consumed_units=25,\n credited_units=100,\n amount=0,\n meter_id=\"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n meter=polar_sdk.Meter(\n metadata={\n \"key\": 463129,\n },\n created_at=parse_datetime(\"2023-11-24T08:24:04.782Z\"),\n modified_at=parse_datetime(\"2025-06-04T07:43:03.654Z\"),\n id=\"\",\n name=\"\",\n filter_=polar_sdk.Filter(\n conjunction=polar_sdk.FilterConjunction.AND,\n clauses=[\n polar_sdk.FilterClause(\n property=\"\",\n operator=polar_sdk.FilterOperator.GTE,\n value=True,\n ),\n ],\n ),\n aggregation=polar_sdk.UniqueAggregation(\n property=\"\",\n ),\n organization_id=\"\",\n ),\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["subscription.uncanceled"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_uncanceled_post(request=polar_sdk.WebhookSubscriptionUncanceledPayload(\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2023-02-06T17:25:10.106Z\"),\n modified_at=parse_datetime(\"2023-01-25T07:20:02.381Z\"),\n id=\"\",\n amount=755736,\n currency=\"Iceland Krona\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n status=polar_sdk.SubscriptionStatus.CANCELED,\n current_period_start=parse_datetime(\"2024-04-11T19:08:16.655Z\"),\n current_period_end=parse_datetime(\"2023-08-23T01:03:59.107Z\"),\n cancel_at_period_end=True,\n canceled_at=parse_datetime(\"2024-11-16T02:01:16.824Z\"),\n started_at=None,\n ends_at=parse_datetime(\"2023-12-23T04:50:00.016Z\"),\n ended_at=parse_datetime(\"2024-10-18T16:25:47.209Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=None,\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.LOW_QUALITY,\n customer_cancellation_comment=\"\",\n metadata={\n\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-10-01T20:42:25.530Z\"),\n modified_at=parse_datetime(\"2024-07-04T17:30:56.477Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2024-12-20T09:31:52.259Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2024-03-26T06:19:23.237Z\"),\n modified_at=parse_datetime(\"2024-05-11T18:08:21.251Z\"),\n id=\"\",\n name=\"\",\n description=\"questioningly proliferate yet vanish mooch yowza hopeful\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n is_recurring=True,\n is_archived=True,\n organization_id=\"\",\n metadata={\n\n },\n prices=[],\n benefits=[],\n medias=[\n polar_sdk.ProductMediaFileRead(\n id=\"\",\n organization_id=\"\",\n name=\"\",\n path=\"/usr/local/src\",\n mime_type=\"\",\n size=930595,\n storage_version=\"\",\n checksum_etag=\"\",\n checksum_sha256_base64=\"\",\n checksum_sha256_hex=\"\",\n last_modified_at=parse_datetime(\"2024-07-09T11:35:46.121Z\"),\n version=\"\",\n is_uploaded=False,\n created_at=parse_datetime(\"2023-01-04T05:09:14.269Z\"),\n size_readable=\"\",\n public_url=\"https://distant-fen.org/\",\n ),\n ],\n attached_custom_fields=[],\n ),\n discount=polar_sdk.DiscountFixedOnceForeverDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n type=polar_sdk.DiscountType.PERCENTAGE,\n amount=930,\n currency=\"Armenian Dram\",\n created_at=parse_datetime(\"2024-08-04T07:10:18.397Z\"),\n modified_at=parse_datetime(\"2024-03-24T21:29:58.344Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2025-01-07T18:49:53.331Z\"),\n ends_at=parse_datetime(\"2023-11-21T17:11:26.125Z\"),\n max_redemptions=None,\n redemptions_count=198129,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n prices=[\n polar_sdk.LegacyRecurringProductPriceFixed(\n created_at=parse_datetime(\"2024-08-25T04:34:39.417Z\"),\n modified_at=parse_datetime(\"2024-09-10T10:32:32.710Z\"),\n id=\"\",\n is_archived=False,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n price_currency=\"\",\n price_amount=456635,\n ),\n ],\n meters=[],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_uncanceled_post(request=polar_sdk.WebhookSubscriptionUncanceledPayload(\n timestamp=parse_datetime(\"2023-02-06T17:25:10.106Z\"),\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2023-05-13T11:53:26.507Z\"),\n modified_at=None,\n id=\"\",\n amount=755736,\n currency=\"Iceland Krona\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n status=polar_sdk.SubscriptionStatus.CANCELED,\n current_period_start=parse_datetime(\"2024-04-11T19:08:16.655Z\"),\n current_period_end=parse_datetime(\"2023-08-23T01:03:59.107Z\"),\n cancel_at_period_end=True,\n canceled_at=parse_datetime(\"2024-11-16T02:01:16.824Z\"),\n started_at=None,\n ends_at=parse_datetime(\"2023-12-23T04:50:00.016Z\"),\n ended_at=parse_datetime(\"2024-10-18T16:25:47.209Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=None,\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.LOW_QUALITY,\n customer_cancellation_comment=\"\",\n metadata={\n\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-10-01T20:42:25.530Z\"),\n modified_at=parse_datetime(\"2024-07-04T17:30:56.477Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2024-12-20T09:31:52.259Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2024-03-26T06:19:23.237Z\"),\n modified_at=parse_datetime(\"2024-05-11T18:08:21.251Z\"),\n id=\"\",\n name=\"\",\n description=\"questioningly proliferate yet vanish mooch yowza hopeful\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n is_recurring=True,\n is_archived=True,\n organization_id=\"\",\n metadata={\n\n },\n prices=[],\n benefits=[],\n medias=[\n polar_sdk.ProductMediaFileRead(\n id=\"\",\n organization_id=\"\",\n name=\"\",\n path=\"/usr/local/src\",\n mime_type=\"\",\n size=930595,\n storage_version=\"\",\n checksum_etag=\"\",\n checksum_sha256_base64=\"\",\n checksum_sha256_hex=\"\",\n last_modified_at=parse_datetime(\"2024-07-09T11:35:46.121Z\"),\n version=\"\",\n is_uploaded=False,\n created_at=parse_datetime(\"2023-01-04T05:09:14.269Z\"),\n size_readable=\"\",\n public_url=\"https://distant-fen.org/\",\n ),\n ],\n attached_custom_fields=[],\n ),\n discount=polar_sdk.DiscountFixedOnceForeverDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n type=polar_sdk.DiscountType.PERCENTAGE,\n amount=930,\n currency=\"Armenian Dram\",\n created_at=parse_datetime(\"2024-08-04T07:10:18.397Z\"),\n modified_at=parse_datetime(\"2024-03-24T21:29:58.344Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2025-01-07T18:49:53.331Z\"),\n ends_at=parse_datetime(\"2023-11-21T17:11:26.125Z\"),\n max_redemptions=None,\n redemptions_count=198129,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n prices=[\n polar_sdk.LegacyRecurringProductPriceFixed(\n created_at=parse_datetime(\"2024-08-25T04:34:39.417Z\"),\n modified_at=parse_datetime(\"2024-09-10T10:32:32.710Z\"),\n id=\"\",\n is_archived=False,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n price_currency=\"\",\n price_amount=456635,\n ),\n ],\n meters=[],\n ),\n ))\n\n # Handle response\n print(res)" - target: $["paths"]["subscription.updated"]["post"] update: "x-codeSamples": - "lang": "python" "label": "Python (SDK)" - "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_updated_post(request=polar_sdk.WebhookSubscriptionUpdatedPayload(\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2023-06-24T13:26:25.969Z\"),\n modified_at=parse_datetime(\"2024-10-16T16:24:20.274Z\"),\n id=\"\",\n amount=505562,\n currency=\"Guyana Dollar\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n status=polar_sdk.SubscriptionStatus.CANCELED,\n current_period_start=parse_datetime(\"2024-06-19T12:29:28.503Z\"),\n current_period_end=parse_datetime(\"2023-08-24T22:14:10.131Z\"),\n cancel_at_period_end=False,\n canceled_at=parse_datetime(\"2025-08-31T06:08:08.476Z\"),\n started_at=parse_datetime(\"2023-06-01T08:01:27.951Z\"),\n ends_at=parse_datetime(\"2025-01-23T22:07:32.693Z\"),\n ended_at=parse_datetime(\"2025-05-14T13:55:44.367Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.LOW_QUALITY,\n customer_cancellation_comment=\"\",\n metadata={\n \"key\": 477870,\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2025-10-16T06:48:13.474Z\"),\n modified_at=parse_datetime(\"2024-02-26T04:35:08.698Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2024-01-24T02:08:13.039Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2024-07-19T12:18:25.544Z\"),\n modified_at=parse_datetime(\"2023-05-10T07:26:17.258Z\"),\n id=\"\",\n name=\"\",\n description=\"fooey disbar athwart permafrost happy sun successfully steak ew\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.DAY,\n is_recurring=True,\n is_archived=True,\n organization_id=\"\",\n metadata={\n \"key\": 2229.58,\n },\n prices=[\n polar_sdk.LegacyRecurringProductPriceCustom(\n created_at=parse_datetime(\"2024-10-24T03:47:20.035Z\"),\n modified_at=parse_datetime(\"2023-07-28T10:52:24.280Z\"),\n id=\"\",\n is_archived=True,\n product_id=\"\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n price_currency=\"\",\n minimum_amount=588876,\n maximum_amount=280866,\n preset_amount=942797,\n ),\n ],\n benefits=[],\n medias=[],\n attached_custom_fields=[],\n ),\n discount=polar_sdk.DiscountFixedOnceForeverDurationBase(\n duration=polar_sdk.DiscountDuration.ONCE,\n type=polar_sdk.DiscountType.PERCENTAGE,\n amount=960746,\n currency=\"Tunisian Dinar\",\n created_at=parse_datetime(\"2024-05-31T09:53:13.946Z\"),\n modified_at=parse_datetime(\"2025-09-04T19:30:54.013Z\"),\n id=\"\",\n metadata={\n\n },\n name=\"\",\n code=\"\",\n starts_at=parse_datetime(\"2023-06-09T06:11:59.062Z\"),\n ends_at=parse_datetime(\"2024-09-28T05:16:48.757Z\"),\n max_redemptions=359864,\n redemptions_count=962223,\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n ),\n prices=[],\n meters=[\n polar_sdk.SubscriptionMeter(\n created_at=parse_datetime(\"2024-02-19T12:40:10.475Z\"),\n modified_at=parse_datetime(\"2023-04-12T20:54:06.410Z\"),\n id=\"\",\n consumed_units=25,\n credited_units=100,\n amount=0,\n meter_id=\"d498a884-e2cd-4d3e-8002-f536468a8b22\",\n meter=polar_sdk.Meter(\n metadata={\n \"key\": 2623.94,\n },\n created_at=parse_datetime(\"2025-07-23T17:13:45.998Z\"),\n modified_at=parse_datetime(\"2023-02-28T06:14:05.829Z\"),\n id=\"\",\n name=\"\",\n filter_=polar_sdk.Filter(\n conjunction=polar_sdk.FilterConjunction.OR,\n clauses=[\n polar_sdk.FilterClause(\n property=\"\",\n operator=polar_sdk.FilterOperator.GT,\n value=True,\n ),\n ],\n ),\n aggregation=polar_sdk.PropertyAggregation(\n func=polar_sdk.Func.AVG,\n property=\"\",\n ),\n organization_id=\"\",\n ),\n ),\n ],\n ),\n ))\n\n # Handle response\n print(res)" + "source": "import polar_sdk\nfrom polar_sdk import Polar\nfrom polar_sdk.utils import parse_datetime\n\n\nwith Polar() as polar:\n\n res = polar.endpointsubscription_updated_post(request=polar_sdk.WebhookSubscriptionUpdatedPayload(\n timestamp=parse_datetime(\"2023-06-24T13:26:25.969Z\"),\n data=polar_sdk.Subscription(\n created_at=parse_datetime(\"2024-05-25T12:11:24.717Z\"),\n modified_at=parse_datetime(\"2024-07-08T02:17:23.799Z\"),\n id=\"\",\n amount=337528,\n currency=\"Kip\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.MONTH,\n status=polar_sdk.SubscriptionStatus.ACTIVE,\n current_period_start=parse_datetime(\"2023-06-14T15:07:05.619Z\"),\n current_period_end=parse_datetime(\"2025-04-17T18:51:57.213Z\"),\n cancel_at_period_end=False,\n canceled_at=parse_datetime(\"2025-12-29T02:13:52.269Z\"),\n started_at=parse_datetime(\"2024-10-12T01:39:46.850Z\"),\n ends_at=parse_datetime(\"2024-08-23T08:17:41.246Z\"),\n ended_at=parse_datetime(\"2025-04-28T14:07:35.212Z\"),\n customer_id=\"\",\n product_id=\"\",\n discount_id=\"\",\n checkout_id=\"\",\n customer_cancellation_reason=polar_sdk.CustomerCancellationReason.TOO_COMPLEX,\n customer_cancellation_comment=\"\",\n metadata={\n\n },\n customer=polar_sdk.SubscriptionCustomer(\n id=\"992fae2a-2a17-4b7a-8d9e-e287cf90131b\",\n created_at=parse_datetime(\"2024-06-07T17:53:19.130Z\"),\n modified_at=parse_datetime(\"2024-03-22T08:08:02.561Z\"),\n metadata={\n\n },\n external_id=\"usr_1337\",\n email=\"customer@example.com\",\n email_verified=True,\n name=\"John Doe\",\n billing_address=polar_sdk.Address(\n country=\"US\",\n ),\n tax_id=[\n \"911144442\",\n \"us_ein\",\n ],\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n deleted_at=parse_datetime(\"2024-03-20T00:06:47.924Z\"),\n avatar_url=\"https://www.gravatar.com/avatar/xxx?d=404\",\n ),\n product=polar_sdk.Product(\n created_at=parse_datetime(\"2024-01-24T02:08:13.039Z\"),\n modified_at=parse_datetime(\"2024-04-21T20:23:52.355Z\"),\n id=\"\",\n name=\"\",\n description=\"what swelter when besides utter phew knottily\",\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n is_recurring=True,\n is_archived=False,\n organization_id=\"\",\n metadata={\n\n },\n prices=[\n polar_sdk.ProductPriceMeteredUnit(\n created_at=parse_datetime(\"2025-11-03T01:17:12.036Z\"),\n modified_at=parse_datetime(\"2025-08-26T21:48:44.664Z\"),\n id=\"\",\n is_archived=False,\n product_id=\"\",\n type=polar_sdk.ProductPriceType.ONE_TIME,\n recurring_interval=polar_sdk.SubscriptionRecurringInterval.WEEK,\n price_currency=\"\",\n unit_amount=\"\",\n cap_amount=71731,\n meter_id=\"\",\n meter=polar_sdk.ProductPriceMeter(\n id=\"\",\n name=\"\",\n ),\n ),\n ],\n benefits=[],\n medias=[],\n attached_custom_fields=[\n polar_sdk.AttachedCustomField(\n custom_field_id=\"\",\n custom_field=polar_sdk.CustomFieldSelect(\n created_at=parse_datetime(\"2023-09-02T08:42:27.221Z\"),\n modified_at=parse_datetime(\"2024-10-15T08:38:18.868Z\"),\n id=\"\",\n metadata={\n\n },\n slug=\"\",\n name=\"\",\n organization_id=\"1dbfc517-0bbf-4301-9ba8-555ca42b9737\",\n properties=polar_sdk.CustomFieldSelectProperties(\n options=[\n polar_sdk.CustomFieldSelectOption(\n value=\"\",\n label=\"\",\n ),\n ],\n ),\n ),\n order=132406,\n required=True,\n ),\n ],\n ),\n discount=None,\n prices=[],\n meters=[],\n ),\n ))\n\n # Handle response\n print(res)" diff --git a/docs/models/benefitgrantcustomwebhook.md b/docs/models/benefitgrantcustomwebhook.md new file mode 100644 index 00000000..fcd7c58b --- /dev/null +++ b/docs/models/benefitgrantcustomwebhook.md @@ -0,0 +1,23 @@ +# BenefitGrantCustomWebhook + + +## 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 grant. | +| `granted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | +| `is_granted` | *bool* | :heavy_check_mark: | Whether the benefit is granted. | +| `revoked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | +| `is_revoked` | *bool* | :heavy_check_mark: | Whether the benefit is revoked. | +| `subscription_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the subscription that granted this benefit. | +| `order_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the order that granted this benefit. | +| `customer_id` | *str* | :heavy_check_mark: | The ID of the customer concerned by this grant. | +| `benefit_id` | *str* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | +| `error` | [OptionalNullable[models.BenefitGrantError]](../models/benefitgranterror.md) | :heavy_minus_sign: | The error information if the benefit grant failed with an unrecoverable error. | +| `customer` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | +| `benefit` | [models.BenefitCustom](../models/benefitcustom.md) | :heavy_check_mark: | A benefit of type `custom`.

Use it to grant any kind of benefit that doesn't fit in the other types. | +| `properties` | [models.BenefitGrantCustomProperties](../models/benefitgrantcustomproperties.md) | :heavy_check_mark: | N/A | +| `previous_properties` | [OptionalNullable[models.BenefitGrantCustomProperties]](../models/benefitgrantcustomproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/benefitgrantdiscordwebhook.md b/docs/models/benefitgrantdiscordwebhook.md new file mode 100644 index 00000000..7c2dedf4 --- /dev/null +++ b/docs/models/benefitgrantdiscordwebhook.md @@ -0,0 +1,23 @@ +# BenefitGrantDiscordWebhook + + +## 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 grant. | +| `granted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | +| `is_granted` | *bool* | :heavy_check_mark: | Whether the benefit is granted. | +| `revoked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | +| `is_revoked` | *bool* | :heavy_check_mark: | Whether the benefit is revoked. | +| `subscription_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the subscription that granted this benefit. | +| `order_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the order that granted this benefit. | +| `customer_id` | *str* | :heavy_check_mark: | The ID of the customer concerned by this grant. | +| `benefit_id` | *str* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | +| `error` | [OptionalNullable[models.BenefitGrantError]](../models/benefitgranterror.md) | :heavy_minus_sign: | The error information if the benefit grant failed with an unrecoverable error. | +| `customer` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | +| `benefit` | [models.BenefitDiscord](../models/benefitdiscord.md) | :heavy_check_mark: | A benefit of type `discord`.

Use it to automatically invite your backers to a Discord server. | +| `properties` | [models.BenefitGrantDiscordProperties](../models/benefitgrantdiscordproperties.md) | :heavy_check_mark: | N/A | +| `previous_properties` | [OptionalNullable[models.BenefitGrantDiscordProperties]](../models/benefitgrantdiscordproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/benefitgrantdownloadableswebhook.md b/docs/models/benefitgrantdownloadableswebhook.md new file mode 100644 index 00000000..b3e2838d --- /dev/null +++ b/docs/models/benefitgrantdownloadableswebhook.md @@ -0,0 +1,23 @@ +# BenefitGrantDownloadablesWebhook + + +## 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 grant. | +| `granted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | +| `is_granted` | *bool* | :heavy_check_mark: | Whether the benefit is granted. | +| `revoked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | +| `is_revoked` | *bool* | :heavy_check_mark: | Whether the benefit is revoked. | +| `subscription_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the subscription that granted this benefit. | +| `order_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the order that granted this benefit. | +| `customer_id` | *str* | :heavy_check_mark: | The ID of the customer concerned by this grant. | +| `benefit_id` | *str* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | +| `error` | [OptionalNullable[models.BenefitGrantError]](../models/benefitgranterror.md) | :heavy_minus_sign: | The error information if the benefit grant failed with an unrecoverable error. | +| `customer` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | +| `benefit` | [models.BenefitDownloadables](../models/benefitdownloadables.md) | :heavy_check_mark: | N/A | +| `properties` | [models.BenefitGrantDownloadablesProperties](../models/benefitgrantdownloadablesproperties.md) | :heavy_check_mark: | N/A | +| `previous_properties` | [OptionalNullable[models.BenefitGrantDownloadablesProperties]](../models/benefitgrantdownloadablesproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/benefitgrantgithubrepositorywebhook.md b/docs/models/benefitgrantgithubrepositorywebhook.md new file mode 100644 index 00000000..4534336c --- /dev/null +++ b/docs/models/benefitgrantgithubrepositorywebhook.md @@ -0,0 +1,23 @@ +# BenefitGrantGitHubRepositoryWebhook + + +## 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 grant. | +| `granted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | +| `is_granted` | *bool* | :heavy_check_mark: | Whether the benefit is granted. | +| `revoked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | +| `is_revoked` | *bool* | :heavy_check_mark: | Whether the benefit is revoked. | +| `subscription_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the subscription that granted this benefit. | +| `order_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the order that granted this benefit. | +| `customer_id` | *str* | :heavy_check_mark: | The ID of the customer concerned by this grant. | +| `benefit_id` | *str* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | +| `error` | [OptionalNullable[models.BenefitGrantError]](../models/benefitgranterror.md) | :heavy_minus_sign: | The error information if the benefit grant failed with an unrecoverable error. | +| `customer` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | +| `benefit` | [models.BenefitGitHubRepository](../models/benefitgithubrepository.md) | :heavy_check_mark: | A benefit of type `github_repository`.

Use it to automatically invite your backers to a private GitHub repository. | +| `properties` | [models.BenefitGrantGitHubRepositoryProperties](../models/benefitgrantgithubrepositoryproperties.md) | :heavy_check_mark: | N/A | +| `previous_properties` | [OptionalNullable[models.BenefitGrantGitHubRepositoryProperties]](../models/benefitgrantgithubrepositoryproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/benefitgrantlicensekeyswebhook.md b/docs/models/benefitgrantlicensekeyswebhook.md new file mode 100644 index 00000000..5aee6b97 --- /dev/null +++ b/docs/models/benefitgrantlicensekeyswebhook.md @@ -0,0 +1,23 @@ +# BenefitGrantLicenseKeysWebhook + + +## 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 grant. | +| `granted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | +| `is_granted` | *bool* | :heavy_check_mark: | Whether the benefit is granted. | +| `revoked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | +| `is_revoked` | *bool* | :heavy_check_mark: | Whether the benefit is revoked. | +| `subscription_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the subscription that granted this benefit. | +| `order_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the order that granted this benefit. | +| `customer_id` | *str* | :heavy_check_mark: | The ID of the customer concerned by this grant. | +| `benefit_id` | *str* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | +| `error` | [OptionalNullable[models.BenefitGrantError]](../models/benefitgranterror.md) | :heavy_minus_sign: | The error information if the benefit grant failed with an unrecoverable error. | +| `customer` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | +| `benefit` | [models.BenefitLicenseKeys](../models/benefitlicensekeys.md) | :heavy_check_mark: | N/A | +| `properties` | [models.BenefitGrantLicenseKeysProperties](../models/benefitgrantlicensekeysproperties.md) | :heavy_check_mark: | N/A | +| `previous_properties` | [OptionalNullable[models.BenefitGrantLicenseKeysProperties]](../models/benefitgrantlicensekeysproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/benefitgrantmetercreditproperties.md b/docs/models/benefitgrantmetercreditproperties.md index 70e4a574..9b219f7d 100644 --- a/docs/models/benefitgrantmetercreditproperties.md +++ b/docs/models/benefitgrantmetercreditproperties.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `last_credited_meter_id` | *str* | :heavy_check_mark: | N/A | -| `last_credited_units` | *int* | :heavy_check_mark: | N/A | -| `last_credited_at` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| `last_credited_meter_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `last_credited_units` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `last_credited_at` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/benefitgrantmetercreditwebhook.md b/docs/models/benefitgrantmetercreditwebhook.md new file mode 100644 index 00000000..667dbb9e --- /dev/null +++ b/docs/models/benefitgrantmetercreditwebhook.md @@ -0,0 +1,23 @@ +# BenefitGrantMeterCreditWebhook + + +## 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 grant. | +| `granted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | +| `is_granted` | *bool* | :heavy_check_mark: | Whether the benefit is granted. | +| `revoked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | +| `is_revoked` | *bool* | :heavy_check_mark: | Whether the benefit is revoked. | +| `subscription_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the subscription that granted this benefit. | +| `order_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the order that granted this benefit. | +| `customer_id` | *str* | :heavy_check_mark: | The ID of the customer concerned by this grant. | +| `benefit_id` | *str* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | +| `error` | [OptionalNullable[models.BenefitGrantError]](../models/benefitgranterror.md) | :heavy_minus_sign: | The error information if the benefit grant failed with an unrecoverable error. | +| `customer` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | +| `benefit` | [models.BenefitMeterCredit](../models/benefitmetercredit.md) | :heavy_check_mark: | A benefit of type `meter_unit`.

Use it to grant a number of units on a specific meter. | +| `properties` | [models.BenefitGrantMeterCreditProperties](../models/benefitgrantmetercreditproperties.md) | :heavy_check_mark: | N/A | +| `previous_properties` | [OptionalNullable[models.BenefitGrantMeterCreditProperties]](../models/benefitgrantmetercreditproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/benefitgrantwebhook.md b/docs/models/benefitgrantwebhook.md index 2a230a49..a5f84df1 100644 --- a/docs/models/benefitgrantwebhook.md +++ b/docs/models/benefitgrantwebhook.md @@ -1,23 +1,41 @@ # BenefitGrantWebhook -## 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 grant. | -| `granted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | -| `is_granted` | *bool* | :heavy_check_mark: | Whether the benefit is granted. | -| `revoked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | -| `is_revoked` | *bool* | :heavy_check_mark: | Whether the benefit is revoked. | -| `subscription_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the subscription that granted this benefit. | -| `order_id` | *Nullable[str]* | :heavy_check_mark: | The ID of the order that granted this benefit. | -| `customer_id` | *str* | :heavy_check_mark: | The ID of the customer concerned by this grant. | -| `benefit_id` | *str* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | -| `error` | [OptionalNullable[models.BenefitGrantError]](../models/benefitgranterror.md) | :heavy_minus_sign: | The error information if the benefit grant failed with an unrecoverable error. | -| `customer` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | -| `properties` | [models.BenefitGrantWebhookProperties](../models/benefitgrantwebhookproperties.md) | :heavy_check_mark: | N/A | -| `benefit` | [models.Benefit](../models/benefit.md) | :heavy_check_mark: | N/A | -| `previous_properties` | [OptionalNullable[models.PreviousProperties]](../models/previousproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +## Supported Types + +### `models.BenefitGrantDiscordWebhook` + +```python +value: models.BenefitGrantDiscordWebhook = /* values here */ +``` + +### `models.BenefitGrantCustomWebhook` + +```python +value: models.BenefitGrantCustomWebhook = /* values here */ +``` + +### `models.BenefitGrantGitHubRepositoryWebhook` + +```python +value: models.BenefitGrantGitHubRepositoryWebhook = /* values here */ +``` + +### `models.BenefitGrantDownloadablesWebhook` + +```python +value: models.BenefitGrantDownloadablesWebhook = /* values here */ +``` + +### `models.BenefitGrantLicenseKeysWebhook` + +```python +value: models.BenefitGrantLicenseKeysWebhook = /* values here */ +``` + +### `models.BenefitGrantMeterCreditWebhook` + +```python +value: models.BenefitGrantMeterCreditWebhook = /* values here */ +``` + diff --git a/docs/models/benefitgrantwebhookproperties.md b/docs/models/benefitgrantwebhookproperties.md deleted file mode 100644 index 00cdae6b..00000000 --- a/docs/models/benefitgrantwebhookproperties.md +++ /dev/null @@ -1,35 +0,0 @@ -# BenefitGrantWebhookProperties - - -## Supported Types - -### `models.BenefitGrantDiscordProperties` - -```python -value: models.BenefitGrantDiscordProperties = /* values here */ -``` - -### `models.BenefitGrantGitHubRepositoryProperties` - -```python -value: models.BenefitGrantGitHubRepositoryProperties = /* values here */ -``` - -### `models.BenefitGrantDownloadablesProperties` - -```python -value: models.BenefitGrantDownloadablesProperties = /* values here */ -``` - -### `models.BenefitGrantLicenseKeysProperties` - -```python -value: models.BenefitGrantLicenseKeysProperties = /* values here */ -``` - -### `models.BenefitGrantCustomProperties` - -```python -value: models.BenefitGrantCustomProperties = /* values here */ -``` - diff --git a/docs/models/benefitsortproperty.md b/docs/models/benefitsortproperty.md index 84de907c..7e38d817 100644 --- a/docs/models/benefitsortproperty.md +++ b/docs/models/benefitsortproperty.md @@ -8,4 +8,6 @@ | `CREATED_AT` | created_at | | `MINUS_CREATED_AT` | -created_at | | `DESCRIPTION` | description | -| `MINUS_DESCRIPTION` | -description | \ No newline at end of file +| `MINUS_DESCRIPTION` | -description | +| `TYPE` | type | +| `MINUS_TYPE` | -type | \ No newline at end of file diff --git a/docs/models/checkoutlinkscreatecheckoutlinkcreate.md b/docs/models/checkoutlinkcreate.md similarity index 90% rename from docs/models/checkoutlinkscreatecheckoutlinkcreate.md rename to docs/models/checkoutlinkcreate.md index cd7a3b35..76d3d2d0 100644 --- a/docs/models/checkoutlinkscreatecheckoutlinkcreate.md +++ b/docs/models/checkoutlinkcreate.md @@ -1,4 +1,4 @@ -# CheckoutLinksCreateCheckoutLinkCreate +# CheckoutLinkCreate ## Supported Types diff --git a/docs/models/previousproperties.md b/docs/models/previousproperties.md deleted file mode 100644 index e09307ac..00000000 --- a/docs/models/previousproperties.md +++ /dev/null @@ -1,35 +0,0 @@ -# PreviousProperties - - -## Supported Types - -### `models.BenefitGrantDiscordProperties` - -```python -value: models.BenefitGrantDiscordProperties = /* values here */ -``` - -### `models.BenefitGrantGitHubRepositoryProperties` - -```python -value: models.BenefitGrantGitHubRepositoryProperties = /* values here */ -``` - -### `models.BenefitGrantDownloadablesProperties` - -```python -value: models.BenefitGrantDownloadablesProperties = /* values here */ -``` - -### `models.BenefitGrantLicenseKeysProperties` - -```python -value: models.BenefitGrantLicenseKeysProperties = /* values here */ -``` - -### `models.BenefitGrantCustomProperties` - -```python -value: models.BenefitGrantCustomProperties = /* values here */ -``` - diff --git a/docs/models/webhookbenefitcreatedpayload.md b/docs/models/webhookbenefitcreatedpayload.md index d37054a5..5fb81912 100644 --- a/docs/models/webhookbenefitcreatedpayload.md +++ b/docs/models/webhookbenefitcreatedpayload.md @@ -7,7 +7,8 @@ Sent when a new benefit is created. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `type` | *Literal["benefit.created"]* | :heavy_check_mark: | N/A | benefit.created | -| `data` | [models.Benefit](../models/benefit.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["benefit.created"]* | :heavy_check_mark: | N/A | benefit.created | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Benefit](../models/benefit.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookbenefitgrantcreatedpayload.md b/docs/models/webhookbenefitgrantcreatedpayload.md index 20b81c6e..3ae157ac 100644 --- a/docs/models/webhookbenefitgrantcreatedpayload.md +++ b/docs/models/webhookbenefitgrantcreatedpayload.md @@ -7,7 +7,8 @@ Sent when a new benefit grant is created. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `type` | *Literal["benefit_grant.created"]* | :heavy_check_mark: | N/A | benefit_grant.created | -| `data` | [models.BenefitGrantWebhook](../models/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["benefit_grant.created"]* | :heavy_check_mark: | N/A | benefit_grant.created | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.BenefitGrantWebhook](../models/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookbenefitgrantcycledpayload.md b/docs/models/webhookbenefitgrantcycledpayload.md index 37841ddb..8fa914dc 100644 --- a/docs/models/webhookbenefitgrantcycledpayload.md +++ b/docs/models/webhookbenefitgrantcycledpayload.md @@ -8,7 +8,8 @@ meaning the related subscription has been renewed for another period. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `type` | *Literal["benefit_grant.cycled"]* | :heavy_check_mark: | N/A | benefit_grant.cycled | -| `data` | [models.BenefitGrantWebhook](../models/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["benefit_grant.cycled"]* | :heavy_check_mark: | N/A | benefit_grant.cycled | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.BenefitGrantWebhook](../models/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookbenefitgrantrevokedpayload.md b/docs/models/webhookbenefitgrantrevokedpayload.md index 70919e7a..84f32fe1 100644 --- a/docs/models/webhookbenefitgrantrevokedpayload.md +++ b/docs/models/webhookbenefitgrantrevokedpayload.md @@ -7,7 +7,8 @@ Sent when a benefit grant is revoked. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `type` | *Literal["benefit_grant.revoked"]* | :heavy_check_mark: | N/A | benefit_grant.revoked | -| `data` | [models.BenefitGrantWebhook](../models/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["benefit_grant.revoked"]* | :heavy_check_mark: | N/A | benefit_grant.revoked | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.BenefitGrantWebhook](../models/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookbenefitgrantupdatedpayload.md b/docs/models/webhookbenefitgrantupdatedpayload.md index 0ffca8c3..898db7ee 100644 --- a/docs/models/webhookbenefitgrantupdatedpayload.md +++ b/docs/models/webhookbenefitgrantupdatedpayload.md @@ -7,7 +7,8 @@ Sent when a benefit grant is updated. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `type` | *Literal["benefit_grant.updated"]* | :heavy_check_mark: | N/A | benefit_grant.updated | -| `data` | [models.BenefitGrantWebhook](../models/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["benefit_grant.updated"]* | :heavy_check_mark: | N/A | benefit_grant.updated | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.BenefitGrantWebhook](../models/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookbenefitupdatedpayload.md b/docs/models/webhookbenefitupdatedpayload.md index 04e7a066..ff4856c5 100644 --- a/docs/models/webhookbenefitupdatedpayload.md +++ b/docs/models/webhookbenefitupdatedpayload.md @@ -7,7 +7,8 @@ Sent when a benefit is updated. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `type` | *Literal["benefit.updated"]* | :heavy_check_mark: | N/A | benefit.updated | -| `data` | [models.Benefit](../models/benefit.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["benefit.updated"]* | :heavy_check_mark: | N/A | benefit.updated | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Benefit](../models/benefit.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookcheckoutcreatedpayload.md b/docs/models/webhookcheckoutcreatedpayload.md index 5dafbbee..66eba375 100644 --- a/docs/models/webhookcheckoutcreatedpayload.md +++ b/docs/models/webhookcheckoutcreatedpayload.md @@ -7,7 +7,8 @@ Sent when a new checkout is created. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `type` | *Literal["checkout.created"]* | :heavy_check_mark: | N/A | checkout.created | -| `data` | [models.Checkout](../models/checkout.md) | :heavy_check_mark: | Checkout session data retrieved using an access token. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["checkout.created"]* | :heavy_check_mark: | N/A | checkout.created | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Checkout](../models/checkout.md) | :heavy_check_mark: | Checkout session data retrieved using an access token. | | \ No newline at end of file diff --git a/docs/models/webhookcheckoutupdatedpayload.md b/docs/models/webhookcheckoutupdatedpayload.md index e15e9add..681213e8 100644 --- a/docs/models/webhookcheckoutupdatedpayload.md +++ b/docs/models/webhookcheckoutupdatedpayload.md @@ -7,7 +7,8 @@ Sent when a checkout is updated. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `type` | *Literal["checkout.updated"]* | :heavy_check_mark: | N/A | checkout.updated | -| `data` | [models.Checkout](../models/checkout.md) | :heavy_check_mark: | Checkout session data retrieved using an access token. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["checkout.updated"]* | :heavy_check_mark: | N/A | checkout.updated | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Checkout](../models/checkout.md) | :heavy_check_mark: | Checkout session data retrieved using an access token. | | \ No newline at end of file diff --git a/docs/models/webhookcustomercreatedpayload.md b/docs/models/webhookcustomercreatedpayload.md index 93cd4e5b..ce3d766b 100644 --- a/docs/models/webhookcustomercreatedpayload.md +++ b/docs/models/webhookcustomercreatedpayload.md @@ -12,7 +12,8 @@ A customer can be created: ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `type` | *Literal["customer.created"]* | :heavy_check_mark: | N/A | customer.created | -| `data` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["customer.created"]* | :heavy_check_mark: | N/A | customer.created | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | | \ No newline at end of file diff --git a/docs/models/webhookcustomerdeletedpayload.md b/docs/models/webhookcustomerdeletedpayload.md index e8ce9596..19663fe4 100644 --- a/docs/models/webhookcustomerdeletedpayload.md +++ b/docs/models/webhookcustomerdeletedpayload.md @@ -7,7 +7,8 @@ Sent when a customer is deleted. ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `type` | *Literal["customer.deleted"]* | :heavy_check_mark: | N/A | customer.deleted | -| `data` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["customer.deleted"]* | :heavy_check_mark: | N/A | customer.deleted | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | | \ No newline at end of file diff --git a/docs/models/webhookcustomerstatechangedpayload.md b/docs/models/webhookcustomerstatechangedpayload.md index fb899730..d884493e 100644 --- a/docs/models/webhookcustomerstatechangedpayload.md +++ b/docs/models/webhookcustomerstatechangedpayload.md @@ -16,4 +16,5 @@ It's triggered when: | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | `type` | *Literal["customer.state_changed"]* | :heavy_check_mark: | N/A | customer.state_changed | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | | `data` | [models.CustomerState](../models/customerstate.md) | :heavy_check_mark: | A customer along with additional state information:

* Active subscriptions
* Granted benefits
* Active meters | | \ No newline at end of file diff --git a/docs/models/webhookcustomerupdatedpayload.md b/docs/models/webhookcustomerupdatedpayload.md index beeab1bf..b148b95d 100644 --- a/docs/models/webhookcustomerupdatedpayload.md +++ b/docs/models/webhookcustomerupdatedpayload.md @@ -11,7 +11,8 @@ If you want to be notified when a customer subscription or benefit state changes ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `type` | *Literal["customer.updated"]* | :heavy_check_mark: | N/A | customer.updated | -| `data` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["customer.updated"]* | :heavy_check_mark: | N/A | customer.updated | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Customer](../models/customer.md) | :heavy_check_mark: | A customer in an organization. | | \ No newline at end of file diff --git a/docs/models/webhookdelivery.md b/docs/models/webhookdelivery.md index ee1ff67b..f7e33f61 100644 --- a/docs/models/webhookdelivery.md +++ b/docs/models/webhookdelivery.md @@ -10,6 +10,7 @@ A webhook delivery for a webhook event. | `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. | -| `http_code` | *OptionalNullable[int]* | :heavy_minus_sign: | The HTTP code returned by the URL. `null` if the endpoint was unreachable. | | `succeeded` | *bool* | :heavy_check_mark: | Whether the delivery was successful. | +| `http_code` | *Nullable[int]* | :heavy_check_mark: | The HTTP code returned by the URL. `null` if the endpoint was unreachable. | +| `response` | *Nullable[str]* | :heavy_check_mark: | The response body returned by the URL, or the error message if the endpoint was unreachable. | | `webhook_event` | [models.WebhookEvent](../models/webhookevent.md) | :heavy_check_mark: | A webhook event.

An event represent something that happened in the system
that should be sent to the webhook endpoint.

It can be delivered multiple times until it's marked as succeeded,
each one creating a new delivery. | \ No newline at end of file diff --git a/docs/models/webhookevent.md b/docs/models/webhookevent.md index ba8379fd..520f5451 100644 --- a/docs/models/webhookevent.md +++ b/docs/models/webhookevent.md @@ -18,4 +18,6 @@ each one creating a new delivery. | `id` | *str* | :heavy_check_mark: | The ID of the object. | | `last_http_code` | *OptionalNullable[int]* | :heavy_minus_sign: | Last HTTP code returned by the URL. `null` if no delviery has been attempted or if the endpoint was unreachable. | | `succeeded` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether this event was successfully delivered. `null` if no delivery has been attempted. | -| `payload` | *str* | :heavy_check_mark: | The payload of the webhook event. | \ No newline at end of file +| `payload` | *Nullable[str]* | :heavy_check_mark: | The payload of the webhook event. | +| `type` | [models.WebhookEventType](../models/webhookeventtype.md) | :heavy_check_mark: | N/A | +| `is_archived` | *bool* | :heavy_check_mark: | Whether this event is archived. Archived events can't be redelivered, and the payload is not accessible anymore. | \ No newline at end of file diff --git a/docs/models/webhookordercreatedpayload.md b/docs/models/webhookordercreatedpayload.md index f517c2cc..86eee8b6 100644 --- a/docs/models/webhookordercreatedpayload.md +++ b/docs/models/webhookordercreatedpayload.md @@ -16,7 +16,8 @@ A new order is created when: ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `type` | *Literal["order.created"]* | :heavy_check_mark: | N/A | order.created | -| `data` | [models.Order](../models/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["order.created"]* | :heavy_check_mark: | N/A | order.created | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Order](../models/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookorderpaidpayload.md b/docs/models/webhookorderpaidpayload.md index 3f7fc499..cef6d84c 100644 --- a/docs/models/webhookorderpaidpayload.md +++ b/docs/models/webhookorderpaidpayload.md @@ -9,7 +9,8 @@ When you receive this event, the order is fully processed and payment has been r ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `type` | *Literal["order.paid"]* | :heavy_check_mark: | N/A | order.paid | -| `data` | [models.Order](../models/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["order.paid"]* | :heavy_check_mark: | N/A | order.paid | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Order](../models/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookorderrefundedpayload.md b/docs/models/webhookorderrefundedpayload.md index 41d8d872..8da90e01 100644 --- a/docs/models/webhookorderrefundedpayload.md +++ b/docs/models/webhookorderrefundedpayload.md @@ -7,7 +7,8 @@ Sent when an order is fully or partially refunded. ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `type` | *Literal["order.refunded"]* | :heavy_check_mark: | N/A | order.refunded | -| `data` | [models.Order](../models/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["order.refunded"]* | :heavy_check_mark: | N/A | order.refunded | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Order](../models/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookorderupdatedpayload.md b/docs/models/webhookorderupdatedpayload.md index 5527143a..8487718f 100644 --- a/docs/models/webhookorderupdatedpayload.md +++ b/docs/models/webhookorderupdatedpayload.md @@ -12,7 +12,8 @@ An order is updated when: ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `type` | *Literal["order.updated"]* | :heavy_check_mark: | N/A | order.updated | -| `data` | [models.Order](../models/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["order.updated"]* | :heavy_check_mark: | N/A | order.updated | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Order](../models/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookorganizationupdatedpayload.md b/docs/models/webhookorganizationupdatedpayload.md index ebd8ee08..403b2597 100644 --- a/docs/models/webhookorganizationupdatedpayload.md +++ b/docs/models/webhookorganizationupdatedpayload.md @@ -7,7 +7,8 @@ Sent when a organization is updated. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `type` | *Literal["organization.updated"]* | :heavy_check_mark: | N/A | organization.updated | -| `data` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["organization.updated"]* | :heavy_check_mark: | N/A | organization.updated | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Organization](../models/organization.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookproductcreatedpayload.md b/docs/models/webhookproductcreatedpayload.md index a58f4a46..22ad797c 100644 --- a/docs/models/webhookproductcreatedpayload.md +++ b/docs/models/webhookproductcreatedpayload.md @@ -7,7 +7,8 @@ Sent when a new product is created. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `type` | *Literal["product.created"]* | :heavy_check_mark: | N/A | product.created | -| `data` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["product.created"]* | :heavy_check_mark: | N/A | product.created | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | | \ No newline at end of file diff --git a/docs/models/webhookproductupdatedpayload.md b/docs/models/webhookproductupdatedpayload.md index d1f37dbd..ebf7a9a6 100644 --- a/docs/models/webhookproductupdatedpayload.md +++ b/docs/models/webhookproductupdatedpayload.md @@ -7,7 +7,8 @@ Sent when a product is updated. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `type` | *Literal["product.updated"]* | :heavy_check_mark: | N/A | product.updated | -| `data` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["product.updated"]* | :heavy_check_mark: | N/A | product.updated | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Product](../models/product.md) | :heavy_check_mark: | A product. | | \ No newline at end of file diff --git a/docs/models/webhookrefundcreatedpayload.md b/docs/models/webhookrefundcreatedpayload.md index c83c47df..80cb9190 100644 --- a/docs/models/webhookrefundcreatedpayload.md +++ b/docs/models/webhookrefundcreatedpayload.md @@ -7,7 +7,8 @@ Sent when a refund is created regardless of status. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `type` | *Literal["refund.created"]* | :heavy_check_mark: | N/A | refund.created | -| `data` | [models.Refund](../models/refund.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["refund.created"]* | :heavy_check_mark: | N/A | refund.created | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Refund](../models/refund.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhookrefundupdatedpayload.md b/docs/models/webhookrefundupdatedpayload.md index 929629e2..909b2aa5 100644 --- a/docs/models/webhookrefundupdatedpayload.md +++ b/docs/models/webhookrefundupdatedpayload.md @@ -7,7 +7,8 @@ Sent when a refund is updated. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `type` | *Literal["refund.updated"]* | :heavy_check_mark: | N/A | refund.updated | -| `data` | [models.Refund](../models/refund.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["refund.updated"]* | :heavy_check_mark: | N/A | refund.updated | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Refund](../models/refund.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhooksubscriptionactivepayload.md b/docs/models/webhooksubscriptionactivepayload.md index e5ead75f..ca35f683 100644 --- a/docs/models/webhooksubscriptionactivepayload.md +++ b/docs/models/webhooksubscriptionactivepayload.md @@ -8,7 +8,8 @@ whether because it's a new paid subscription or because payment was recovered. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `type` | *Literal["subscription.active"]* | :heavy_check_mark: | N/A | subscription.active | -| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["subscription.active"]* | :heavy_check_mark: | N/A | subscription.active | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhooksubscriptioncanceledpayload.md b/docs/models/webhooksubscriptioncanceledpayload.md index e8d05812..b53b33a3 100644 --- a/docs/models/webhooksubscriptioncanceledpayload.md +++ b/docs/models/webhooksubscriptioncanceledpayload.md @@ -8,7 +8,8 @@ Customers might still have access until the end of the current period. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `type` | *Literal["subscription.canceled"]* | :heavy_check_mark: | N/A | subscription.canceled | -| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["subscription.canceled"]* | :heavy_check_mark: | N/A | subscription.canceled | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhooksubscriptioncreatedpayload.md b/docs/models/webhooksubscriptioncreatedpayload.md index 06c10d6d..c56bcce2 100644 --- a/docs/models/webhooksubscriptioncreatedpayload.md +++ b/docs/models/webhooksubscriptioncreatedpayload.md @@ -9,7 +9,8 @@ When this event occurs, the subscription `status` might not be `active` yet, as ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `type` | *Literal["subscription.created"]* | :heavy_check_mark: | N/A | subscription.created | -| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["subscription.created"]* | :heavy_check_mark: | N/A | subscription.created | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhooksubscriptionrevokedpayload.md b/docs/models/webhooksubscriptionrevokedpayload.md index 7fc3bd1e..675d1951 100644 --- a/docs/models/webhooksubscriptionrevokedpayload.md +++ b/docs/models/webhooksubscriptionrevokedpayload.md @@ -8,7 +8,8 @@ Happens when the subscription is canceled, or payment is past due. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `type` | *Literal["subscription.revoked"]* | :heavy_check_mark: | N/A | subscription.revoked | -| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["subscription.revoked"]* | :heavy_check_mark: | N/A | subscription.revoked | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhooksubscriptionuncanceledpayload.md b/docs/models/webhooksubscriptionuncanceledpayload.md index b8bf7fd9..f8b86444 100644 --- a/docs/models/webhooksubscriptionuncanceledpayload.md +++ b/docs/models/webhooksubscriptionuncanceledpayload.md @@ -7,7 +7,8 @@ Sent when a subscription is uncanceled. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `type` | *Literal["subscription.uncanceled"]* | :heavy_check_mark: | N/A | subscription.uncanceled | -| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["subscription.uncanceled"]* | :heavy_check_mark: | N/A | subscription.uncanceled | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhooksubscriptionupdatedpayload.md b/docs/models/webhooksubscriptionupdatedpayload.md index cf638a3d..770de059 100644 --- a/docs/models/webhooksubscriptionupdatedpayload.md +++ b/docs/models/webhooksubscriptionupdatedpayload.md @@ -11,7 +11,8 @@ To listen specifically for renewals, you can listen to `order.created` events an ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `type` | *Literal["subscription.updated"]* | :heavy_check_mark: | N/A | subscription.updated | -| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["subscription.updated"]* | :heavy_check_mark: | N/A | subscription.updated | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | +| `data` | [models.Subscription](../models/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdks/checkoutlinks/README.md b/docs/sdks/checkoutlinks/README.md index 022ca3b8..342f8ae4 100644 --- a/docs/sdks/checkoutlinks/README.md +++ b/docs/sdks/checkoutlinks/README.md @@ -90,10 +90,10 @@ with Polar( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `request` | [models.CheckoutLinksCreateCheckoutLinkCreate](../../models/checkoutlinkscreatecheckoutlinkcreate.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. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [models.CheckoutLinkCreate](../../models/checkoutlinkcreate.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 diff --git a/pyproject.toml b/pyproject.toml index 9b5c8c64..2860e82b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "polar-sdk" -version = "0.23.0" +version = "0.23.1" description = "Polar SDK for Python" authors = [{ name = "Polar" },] readme = "README-PYPI.md" diff --git a/src/polar_sdk/_version.py b/src/polar_sdk/_version.py index b638768c..595b1b8e 100644 --- a/src/polar_sdk/_version.py +++ b/src/polar_sdk/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "polar-sdk" -__version__: str = "0.23.0" +__version__: str = "0.23.1" __openapi_doc_version__: str = "0.1.0" -__gen_version__: str = "2.692.0" -__user_agent__: str = "speakeasy-sdk/python 0.23.0 2.692.0 0.1.0 polar-sdk" +__gen_version__: str = "2.698.4" +__user_agent__: str = "speakeasy-sdk/python 0.23.1 2.698.4 0.1.0 polar-sdk" try: if __package__ is not None: diff --git a/src/polar_sdk/checkout_links.py b/src/polar_sdk/checkout_links.py index 109cddca..4db328c7 100644 --- a/src/polar_sdk/checkout_links.py +++ b/src/polar_sdk/checkout_links.py @@ -299,10 +299,7 @@ def next_func() -> Optional[models.CheckoutLinksListResponse]: def create( self, *, - request: Union[ - models.CheckoutLinksCreateCheckoutLinkCreate, - models.CheckoutLinksCreateCheckoutLinkCreateTypedDict, - ], + request: Union[models.CheckoutLinkCreate, models.CheckoutLinkCreateTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -331,10 +328,8 @@ def create( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal( - request, models.CheckoutLinksCreateCheckoutLinkCreate - ) - request = cast(models.CheckoutLinksCreateCheckoutLinkCreate, request) + request = utils.unmarshal(request, models.CheckoutLinkCreate) + request = cast(models.CheckoutLinkCreate, request) req = self._build_request( method="POST", @@ -350,11 +345,7 @@ def create( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, - False, - False, - "json", - models.CheckoutLinksCreateCheckoutLinkCreate, + request, False, False, "json", models.CheckoutLinkCreate ), timeout_ms=timeout_ms, ) @@ -400,10 +391,7 @@ def create( async def create_async( self, *, - request: Union[ - models.CheckoutLinksCreateCheckoutLinkCreate, - models.CheckoutLinksCreateCheckoutLinkCreateTypedDict, - ], + request: Union[models.CheckoutLinkCreate, models.CheckoutLinkCreateTypedDict], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -432,10 +420,8 @@ async def create_async( base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): - request = utils.unmarshal( - request, models.CheckoutLinksCreateCheckoutLinkCreate - ) - request = cast(models.CheckoutLinksCreateCheckoutLinkCreate, request) + request = utils.unmarshal(request, models.CheckoutLinkCreate) + request = cast(models.CheckoutLinkCreate, request) req = self._build_request_async( method="POST", @@ -451,11 +437,7 @@ async def create_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, - False, - False, - "json", - models.CheckoutLinksCreateCheckoutLinkCreate, + request, False, False, "json", models.CheckoutLinkCreate ), timeout_ms=timeout_ms, ) diff --git a/src/polar_sdk/models/__init__.py b/src/polar_sdk/models/__init__.py index c94a096a..bcfb3f7a 100644 --- a/src/polar_sdk/models/__init__.py +++ b/src/polar_sdk/models/__init__.py @@ -198,14 +198,26 @@ BenefitGrantCustomProperties, BenefitGrantCustomPropertiesTypedDict, ) + from .benefitgrantcustomwebhook import ( + BenefitGrantCustomWebhook, + BenefitGrantCustomWebhookTypedDict, + ) from .benefitgrantdiscordproperties import ( BenefitGrantDiscordProperties, BenefitGrantDiscordPropertiesTypedDict, ) + from .benefitgrantdiscordwebhook import ( + BenefitGrantDiscordWebhook, + BenefitGrantDiscordWebhookTypedDict, + ) from .benefitgrantdownloadablesproperties import ( BenefitGrantDownloadablesProperties, BenefitGrantDownloadablesPropertiesTypedDict, ) + from .benefitgrantdownloadableswebhook import ( + BenefitGrantDownloadablesWebhook, + BenefitGrantDownloadablesWebhookTypedDict, + ) from .benefitgrantedevent import BenefitGrantedEvent, BenefitGrantedEventTypedDict from .benefitgranterror import BenefitGrantError, BenefitGrantErrorTypedDict from .benefitgrantgithubrepositoryproperties import ( @@ -213,10 +225,18 @@ BenefitGrantGitHubRepositoryPropertiesPermission, BenefitGrantGitHubRepositoryPropertiesTypedDict, ) + from .benefitgrantgithubrepositorywebhook import ( + BenefitGrantGitHubRepositoryWebhook, + BenefitGrantGitHubRepositoryWebhookTypedDict, + ) from .benefitgrantlicensekeysproperties import ( BenefitGrantLicenseKeysProperties, BenefitGrantLicenseKeysPropertiesTypedDict, ) + from .benefitgrantlicensekeyswebhook import ( + BenefitGrantLicenseKeysWebhook, + BenefitGrantLicenseKeysWebhookTypedDict, + ) from .benefitgrantmetadata import ( BenefitGrantMetadata, BenefitGrantMetadataTypedDict, @@ -225,14 +245,11 @@ BenefitGrantMeterCreditProperties, BenefitGrantMeterCreditPropertiesTypedDict, ) - from .benefitgrantwebhook import ( - BenefitGrantWebhook, - BenefitGrantWebhookProperties, - BenefitGrantWebhookPropertiesTypedDict, - BenefitGrantWebhookTypedDict, - PreviousProperties, - PreviousPropertiesTypedDict, + from .benefitgrantmetercreditwebhook import ( + BenefitGrantMeterCreditWebhook, + BenefitGrantMeterCreditWebhookTypedDict, ) + from .benefitgrantwebhook import BenefitGrantWebhook, BenefitGrantWebhookTypedDict from .benefitlicensekeyactivationcreateproperties import ( BenefitLicenseKeyActivationCreateProperties, BenefitLicenseKeyActivationCreatePropertiesTypedDict, @@ -356,10 +373,6 @@ CustomerMetadata, CustomerMetadataTypedDict, ) - from .checkout_links_createop import ( - CheckoutLinksCreateCheckoutLinkCreate, - CheckoutLinksCreateCheckoutLinkCreateTypedDict, - ) from .checkout_links_deleteop import ( CheckoutLinksDeleteRequest, CheckoutLinksDeleteRequestTypedDict, @@ -430,6 +443,7 @@ CheckoutLinkMetadataTypedDict, CheckoutLinkTypedDict, ) + from .checkoutlinkcreate import CheckoutLinkCreate, CheckoutLinkCreateTypedDict from .checkoutlinkcreateproduct import ( CheckoutLinkCreateProduct, CheckoutLinkCreateProductMetadata, @@ -2465,25 +2479,35 @@ "BenefitGrant", "BenefitGrantCustomProperties", "BenefitGrantCustomPropertiesTypedDict", + "BenefitGrantCustomWebhook", + "BenefitGrantCustomWebhookTypedDict", "BenefitGrantDiscordProperties", "BenefitGrantDiscordPropertiesTypedDict", + "BenefitGrantDiscordWebhook", + "BenefitGrantDiscordWebhookTypedDict", "BenefitGrantDownloadablesProperties", "BenefitGrantDownloadablesPropertiesTypedDict", + "BenefitGrantDownloadablesWebhook", + "BenefitGrantDownloadablesWebhookTypedDict", "BenefitGrantError", "BenefitGrantErrorTypedDict", "BenefitGrantGitHubRepositoryProperties", "BenefitGrantGitHubRepositoryPropertiesPermission", "BenefitGrantGitHubRepositoryPropertiesTypedDict", + "BenefitGrantGitHubRepositoryWebhook", + "BenefitGrantGitHubRepositoryWebhookTypedDict", "BenefitGrantLicenseKeysProperties", "BenefitGrantLicenseKeysPropertiesTypedDict", + "BenefitGrantLicenseKeysWebhook", + "BenefitGrantLicenseKeysWebhookTypedDict", "BenefitGrantMetadata", "BenefitGrantMetadataTypedDict", "BenefitGrantMeterCreditProperties", "BenefitGrantMeterCreditPropertiesTypedDict", + "BenefitGrantMeterCreditWebhook", + "BenefitGrantMeterCreditWebhookTypedDict", "BenefitGrantTypedDict", "BenefitGrantWebhook", - "BenefitGrantWebhookProperties", - "BenefitGrantWebhookPropertiesTypedDict", "BenefitGrantWebhookTypedDict", "BenefitGrantedEvent", "BenefitGrantedEventTypedDict", @@ -2605,6 +2629,7 @@ "CheckoutIDFilter", "CheckoutIDFilterTypedDict", "CheckoutLink", + "CheckoutLinkCreate", "CheckoutLinkCreateProduct", "CheckoutLinkCreateProductMetadata", "CheckoutLinkCreateProductMetadataTypedDict", @@ -2617,6 +2642,7 @@ "CheckoutLinkCreateProductsMetadata", "CheckoutLinkCreateProductsMetadataTypedDict", "CheckoutLinkCreateProductsTypedDict", + "CheckoutLinkCreateTypedDict", "CheckoutLinkDiscount", "CheckoutLinkDiscountTypedDict", "CheckoutLinkMetadata", @@ -2633,8 +2659,6 @@ "CheckoutLinkUpdateMetadata", "CheckoutLinkUpdateMetadataTypedDict", "CheckoutLinkUpdateTypedDict", - "CheckoutLinksCreateCheckoutLinkCreate", - "CheckoutLinksCreateCheckoutLinkCreateTypedDict", "CheckoutLinksDeleteRequest", "CheckoutLinksDeleteRequestTypedDict", "CheckoutLinksGetRequest", @@ -3714,8 +3738,6 @@ "PaymentsListResponseTypedDict", "Permission", "PolarError", - "PreviousProperties", - "PreviousPropertiesTypedDict", "Prices", "PricesTypedDict", "Product", @@ -4174,10 +4196,16 @@ "PropertiesTypedDict": ".benefitgrant", "BenefitGrantCustomProperties": ".benefitgrantcustomproperties", "BenefitGrantCustomPropertiesTypedDict": ".benefitgrantcustomproperties", + "BenefitGrantCustomWebhook": ".benefitgrantcustomwebhook", + "BenefitGrantCustomWebhookTypedDict": ".benefitgrantcustomwebhook", "BenefitGrantDiscordProperties": ".benefitgrantdiscordproperties", "BenefitGrantDiscordPropertiesTypedDict": ".benefitgrantdiscordproperties", + "BenefitGrantDiscordWebhook": ".benefitgrantdiscordwebhook", + "BenefitGrantDiscordWebhookTypedDict": ".benefitgrantdiscordwebhook", "BenefitGrantDownloadablesProperties": ".benefitgrantdownloadablesproperties", "BenefitGrantDownloadablesPropertiesTypedDict": ".benefitgrantdownloadablesproperties", + "BenefitGrantDownloadablesWebhook": ".benefitgrantdownloadableswebhook", + "BenefitGrantDownloadablesWebhookTypedDict": ".benefitgrantdownloadableswebhook", "BenefitGrantedEvent": ".benefitgrantedevent", "BenefitGrantedEventTypedDict": ".benefitgrantedevent", "BenefitGrantError": ".benefitgranterror", @@ -4185,18 +4213,20 @@ "BenefitGrantGitHubRepositoryProperties": ".benefitgrantgithubrepositoryproperties", "BenefitGrantGitHubRepositoryPropertiesPermission": ".benefitgrantgithubrepositoryproperties", "BenefitGrantGitHubRepositoryPropertiesTypedDict": ".benefitgrantgithubrepositoryproperties", + "BenefitGrantGitHubRepositoryWebhook": ".benefitgrantgithubrepositorywebhook", + "BenefitGrantGitHubRepositoryWebhookTypedDict": ".benefitgrantgithubrepositorywebhook", "BenefitGrantLicenseKeysProperties": ".benefitgrantlicensekeysproperties", "BenefitGrantLicenseKeysPropertiesTypedDict": ".benefitgrantlicensekeysproperties", + "BenefitGrantLicenseKeysWebhook": ".benefitgrantlicensekeyswebhook", + "BenefitGrantLicenseKeysWebhookTypedDict": ".benefitgrantlicensekeyswebhook", "BenefitGrantMetadata": ".benefitgrantmetadata", "BenefitGrantMetadataTypedDict": ".benefitgrantmetadata", "BenefitGrantMeterCreditProperties": ".benefitgrantmetercreditproperties", "BenefitGrantMeterCreditPropertiesTypedDict": ".benefitgrantmetercreditproperties", + "BenefitGrantMeterCreditWebhook": ".benefitgrantmetercreditwebhook", + "BenefitGrantMeterCreditWebhookTypedDict": ".benefitgrantmetercreditwebhook", "BenefitGrantWebhook": ".benefitgrantwebhook", - "BenefitGrantWebhookProperties": ".benefitgrantwebhook", - "BenefitGrantWebhookPropertiesTypedDict": ".benefitgrantwebhook", "BenefitGrantWebhookTypedDict": ".benefitgrantwebhook", - "PreviousProperties": ".benefitgrantwebhook", - "PreviousPropertiesTypedDict": ".benefitgrantwebhook", "BenefitLicenseKeyActivationCreateProperties": ".benefitlicensekeyactivationcreateproperties", "BenefitLicenseKeyActivationCreatePropertiesTypedDict": ".benefitlicensekeyactivationcreateproperties", "BenefitLicenseKeyActivationProperties": ".benefitlicensekeyactivationproperties", @@ -4287,8 +4317,6 @@ "CheckoutTypedDict": ".checkout", "CustomerMetadata": ".checkout", "CustomerMetadataTypedDict": ".checkout", - "CheckoutLinksCreateCheckoutLinkCreate": ".checkout_links_createop", - "CheckoutLinksCreateCheckoutLinkCreateTypedDict": ".checkout_links_createop", "CheckoutLinksDeleteRequest": ".checkout_links_deleteop", "CheckoutLinksDeleteRequestTypedDict": ".checkout_links_deleteop", "CheckoutLinksGetRequest": ".checkout_links_getop", @@ -4333,6 +4361,8 @@ "CheckoutLinkMetadata": ".checkoutlink", "CheckoutLinkMetadataTypedDict": ".checkoutlink", "CheckoutLinkTypedDict": ".checkoutlink", + "CheckoutLinkCreate": ".checkoutlinkcreate", + "CheckoutLinkCreateTypedDict": ".checkoutlinkcreate", "CheckoutLinkCreateProduct": ".checkoutlinkcreateproduct", "CheckoutLinkCreateProductMetadata": ".checkoutlinkcreateproduct", "CheckoutLinkCreateProductMetadataTypedDict": ".checkoutlinkcreateproduct", diff --git a/src/polar_sdk/models/alreadyactivesubscriptionerror.py b/src/polar_sdk/models/alreadyactivesubscriptionerror.py index af22489e..875eb46a 100644 --- a/src/polar_sdk/models/alreadyactivesubscriptionerror.py +++ b/src/polar_sdk/models/alreadyactivesubscriptionerror.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class AlreadyActiveSubscriptionErrorData(BaseModel): ] = "AlreadyActiveSubscriptionError" +@dataclass(frozen=True) class AlreadyActiveSubscriptionError(PolarError): - data: AlreadyActiveSubscriptionErrorData + data: AlreadyActiveSubscriptionErrorData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/alreadycanceledsubscription.py b/src/polar_sdk/models/alreadycanceledsubscription.py index 3b7fa62e..f833a5c4 100644 --- a/src/polar_sdk/models/alreadycanceledsubscription.py +++ b/src/polar_sdk/models/alreadycanceledsubscription.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class AlreadyCanceledSubscriptionData(BaseModel): ] = "AlreadyCanceledSubscription" +@dataclass(frozen=True) class AlreadyCanceledSubscription(PolarError): - data: AlreadyCanceledSubscriptionData + data: AlreadyCanceledSubscriptionData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/benefitgrantcustomwebhook.py b/src/polar_sdk/models/benefitgrantcustomwebhook.py new file mode 100644 index 00000000..5e933b1a --- /dev/null +++ b/src/polar_sdk/models/benefitgrantcustomwebhook.py @@ -0,0 +1,139 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .benefitcustom import BenefitCustom, BenefitCustomTypedDict +from .benefitgrantcustomproperties import ( + BenefitGrantCustomProperties, + BenefitGrantCustomPropertiesTypedDict, +) +from .benefitgranterror import BenefitGrantError, BenefitGrantErrorTypedDict +from .customer import Customer, CustomerTypedDict +from datetime import datetime +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class BenefitGrantCustomWebhookTypedDict(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 grant.""" + is_granted: bool + r"""Whether the benefit is granted.""" + is_revoked: bool + r"""Whether the benefit is revoked.""" + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + customer_id: str + r"""The ID of the customer concerned by this grant.""" + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + customer: CustomerTypedDict + r"""A customer in an organization.""" + benefit: BenefitCustomTypedDict + r"""A benefit of type `custom`. + + Use it to grant any kind of benefit that doesn't fit in the other types. + """ + properties: BenefitGrantCustomPropertiesTypedDict + granted_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + revoked_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + error: NotRequired[Nullable[BenefitGrantErrorTypedDict]] + r"""The error information if the benefit grant failed with an unrecoverable error.""" + previous_properties: NotRequired[Nullable[BenefitGrantCustomPropertiesTypedDict]] + + +class BenefitGrantCustomWebhook(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 grant.""" + + is_granted: bool + r"""Whether the benefit is granted.""" + + is_revoked: bool + r"""Whether the benefit is revoked.""" + + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + + customer_id: str + r"""The ID of the customer concerned by this grant.""" + + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + + customer: Customer + r"""A customer in an organization.""" + + benefit: BenefitCustom + r"""A benefit of type `custom`. + + Use it to grant any kind of benefit that doesn't fit in the other types. + """ + + properties: BenefitGrantCustomProperties + + granted_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + + revoked_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + + error: OptionalNullable[BenefitGrantError] = UNSET + r"""The error information if the benefit grant failed with an unrecoverable error.""" + + previous_properties: OptionalNullable[BenefitGrantCustomProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["granted_at", "revoked_at", "error", "previous_properties"] + nullable_fields = [ + "modified_at", + "granted_at", + "revoked_at", + "subscription_id", + "order_id", + "error", + "previous_properties", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(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/benefitgrantdiscordwebhook.py b/src/polar_sdk/models/benefitgrantdiscordwebhook.py new file mode 100644 index 00000000..616dcceb --- /dev/null +++ b/src/polar_sdk/models/benefitgrantdiscordwebhook.py @@ -0,0 +1,139 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .benefitdiscord import BenefitDiscord, BenefitDiscordTypedDict +from .benefitgrantdiscordproperties import ( + BenefitGrantDiscordProperties, + BenefitGrantDiscordPropertiesTypedDict, +) +from .benefitgranterror import BenefitGrantError, BenefitGrantErrorTypedDict +from .customer import Customer, CustomerTypedDict +from datetime import datetime +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class BenefitGrantDiscordWebhookTypedDict(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 grant.""" + is_granted: bool + r"""Whether the benefit is granted.""" + is_revoked: bool + r"""Whether the benefit is revoked.""" + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + customer_id: str + r"""The ID of the customer concerned by this grant.""" + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + customer: CustomerTypedDict + r"""A customer in an organization.""" + benefit: BenefitDiscordTypedDict + r"""A benefit of type `discord`. + + Use it to automatically invite your backers to a Discord server. + """ + properties: BenefitGrantDiscordPropertiesTypedDict + granted_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + revoked_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + error: NotRequired[Nullable[BenefitGrantErrorTypedDict]] + r"""The error information if the benefit grant failed with an unrecoverable error.""" + previous_properties: NotRequired[Nullable[BenefitGrantDiscordPropertiesTypedDict]] + + +class BenefitGrantDiscordWebhook(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 grant.""" + + is_granted: bool + r"""Whether the benefit is granted.""" + + is_revoked: bool + r"""Whether the benefit is revoked.""" + + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + + customer_id: str + r"""The ID of the customer concerned by this grant.""" + + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + + customer: Customer + r"""A customer in an organization.""" + + benefit: BenefitDiscord + r"""A benefit of type `discord`. + + Use it to automatically invite your backers to a Discord server. + """ + + properties: BenefitGrantDiscordProperties + + granted_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + + revoked_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + + error: OptionalNullable[BenefitGrantError] = UNSET + r"""The error information if the benefit grant failed with an unrecoverable error.""" + + previous_properties: OptionalNullable[BenefitGrantDiscordProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["granted_at", "revoked_at", "error", "previous_properties"] + nullable_fields = [ + "modified_at", + "granted_at", + "revoked_at", + "subscription_id", + "order_id", + "error", + "previous_properties", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(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/benefitgrantdownloadableswebhook.py b/src/polar_sdk/models/benefitgrantdownloadableswebhook.py new file mode 100644 index 00000000..4c109486 --- /dev/null +++ b/src/polar_sdk/models/benefitgrantdownloadableswebhook.py @@ -0,0 +1,133 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict +from .benefitgrantdownloadablesproperties import ( + BenefitGrantDownloadablesProperties, + BenefitGrantDownloadablesPropertiesTypedDict, +) +from .benefitgranterror import BenefitGrantError, BenefitGrantErrorTypedDict +from .customer import Customer, CustomerTypedDict +from datetime import datetime +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class BenefitGrantDownloadablesWebhookTypedDict(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 grant.""" + is_granted: bool + r"""Whether the benefit is granted.""" + is_revoked: bool + r"""Whether the benefit is revoked.""" + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + customer_id: str + r"""The ID of the customer concerned by this grant.""" + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + customer: CustomerTypedDict + r"""A customer in an organization.""" + benefit: BenefitDownloadablesTypedDict + properties: BenefitGrantDownloadablesPropertiesTypedDict + granted_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + revoked_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + error: NotRequired[Nullable[BenefitGrantErrorTypedDict]] + r"""The error information if the benefit grant failed with an unrecoverable error.""" + previous_properties: NotRequired[ + Nullable[BenefitGrantDownloadablesPropertiesTypedDict] + ] + + +class BenefitGrantDownloadablesWebhook(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 grant.""" + + is_granted: bool + r"""Whether the benefit is granted.""" + + is_revoked: bool + r"""Whether the benefit is revoked.""" + + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + + customer_id: str + r"""The ID of the customer concerned by this grant.""" + + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + + customer: Customer + r"""A customer in an organization.""" + + benefit: BenefitDownloadables + + properties: BenefitGrantDownloadablesProperties + + granted_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + + revoked_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + + error: OptionalNullable[BenefitGrantError] = UNSET + r"""The error information if the benefit grant failed with an unrecoverable error.""" + + previous_properties: OptionalNullable[BenefitGrantDownloadablesProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["granted_at", "revoked_at", "error", "previous_properties"] + nullable_fields = [ + "modified_at", + "granted_at", + "revoked_at", + "subscription_id", + "order_id", + "error", + "previous_properties", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(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/benefitgrantgithubrepositorywebhook.py b/src/polar_sdk/models/benefitgrantgithubrepositorywebhook.py new file mode 100644 index 00000000..6cee72cb --- /dev/null +++ b/src/polar_sdk/models/benefitgrantgithubrepositorywebhook.py @@ -0,0 +1,146 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .benefitgithubrepository import ( + BenefitGitHubRepository, + BenefitGitHubRepositoryTypedDict, +) +from .benefitgranterror import BenefitGrantError, BenefitGrantErrorTypedDict +from .benefitgrantgithubrepositoryproperties import ( + BenefitGrantGitHubRepositoryProperties, + BenefitGrantGitHubRepositoryPropertiesTypedDict, +) +from .customer import Customer, CustomerTypedDict +from datetime import datetime +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class BenefitGrantGitHubRepositoryWebhookTypedDict(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 grant.""" + is_granted: bool + r"""Whether the benefit is granted.""" + is_revoked: bool + r"""Whether the benefit is revoked.""" + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + customer_id: str + r"""The ID of the customer concerned by this grant.""" + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + customer: CustomerTypedDict + r"""A customer in an organization.""" + benefit: BenefitGitHubRepositoryTypedDict + r"""A benefit of type `github_repository`. + + Use it to automatically invite your backers to a private GitHub repository. + """ + properties: BenefitGrantGitHubRepositoryPropertiesTypedDict + granted_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + revoked_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + error: NotRequired[Nullable[BenefitGrantErrorTypedDict]] + r"""The error information if the benefit grant failed with an unrecoverable error.""" + previous_properties: NotRequired[ + Nullable[BenefitGrantGitHubRepositoryPropertiesTypedDict] + ] + + +class BenefitGrantGitHubRepositoryWebhook(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 grant.""" + + is_granted: bool + r"""Whether the benefit is granted.""" + + is_revoked: bool + r"""Whether the benefit is revoked.""" + + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + + customer_id: str + r"""The ID of the customer concerned by this grant.""" + + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + + customer: Customer + r"""A customer in an organization.""" + + benefit: BenefitGitHubRepository + r"""A benefit of type `github_repository`. + + Use it to automatically invite your backers to a private GitHub repository. + """ + + properties: BenefitGrantGitHubRepositoryProperties + + granted_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + + revoked_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + + error: OptionalNullable[BenefitGrantError] = UNSET + r"""The error information if the benefit grant failed with an unrecoverable error.""" + + previous_properties: OptionalNullable[BenefitGrantGitHubRepositoryProperties] = ( + UNSET + ) + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["granted_at", "revoked_at", "error", "previous_properties"] + nullable_fields = [ + "modified_at", + "granted_at", + "revoked_at", + "subscription_id", + "order_id", + "error", + "previous_properties", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(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/benefitgrantlicensekeyswebhook.py b/src/polar_sdk/models/benefitgrantlicensekeyswebhook.py new file mode 100644 index 00000000..2e5ade54 --- /dev/null +++ b/src/polar_sdk/models/benefitgrantlicensekeyswebhook.py @@ -0,0 +1,133 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .benefitgranterror import BenefitGrantError, BenefitGrantErrorTypedDict +from .benefitgrantlicensekeysproperties import ( + BenefitGrantLicenseKeysProperties, + BenefitGrantLicenseKeysPropertiesTypedDict, +) +from .benefitlicensekeys import BenefitLicenseKeys, BenefitLicenseKeysTypedDict +from .customer import Customer, CustomerTypedDict +from datetime import datetime +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class BenefitGrantLicenseKeysWebhookTypedDict(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 grant.""" + is_granted: bool + r"""Whether the benefit is granted.""" + is_revoked: bool + r"""Whether the benefit is revoked.""" + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + customer_id: str + r"""The ID of the customer concerned by this grant.""" + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + customer: CustomerTypedDict + r"""A customer in an organization.""" + benefit: BenefitLicenseKeysTypedDict + properties: BenefitGrantLicenseKeysPropertiesTypedDict + granted_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + revoked_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + error: NotRequired[Nullable[BenefitGrantErrorTypedDict]] + r"""The error information if the benefit grant failed with an unrecoverable error.""" + previous_properties: NotRequired[ + Nullable[BenefitGrantLicenseKeysPropertiesTypedDict] + ] + + +class BenefitGrantLicenseKeysWebhook(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 grant.""" + + is_granted: bool + r"""Whether the benefit is granted.""" + + is_revoked: bool + r"""Whether the benefit is revoked.""" + + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + + customer_id: str + r"""The ID of the customer concerned by this grant.""" + + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + + customer: Customer + r"""A customer in an organization.""" + + benefit: BenefitLicenseKeys + + properties: BenefitGrantLicenseKeysProperties + + granted_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + + revoked_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + + error: OptionalNullable[BenefitGrantError] = UNSET + r"""The error information if the benefit grant failed with an unrecoverable error.""" + + previous_properties: OptionalNullable[BenefitGrantLicenseKeysProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["granted_at", "revoked_at", "error", "previous_properties"] + nullable_fields = [ + "modified_at", + "granted_at", + "revoked_at", + "subscription_id", + "order_id", + "error", + "previous_properties", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(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/benefitgrantmetercreditproperties.py b/src/polar_sdk/models/benefitgrantmetercreditproperties.py index a3de6ddc..d631200c 100644 --- a/src/polar_sdk/models/benefitgrantmetercreditproperties.py +++ b/src/polar_sdk/models/benefitgrantmetercreditproperties.py @@ -2,18 +2,19 @@ from __future__ import annotations from polar_sdk.types import BaseModel -from typing_extensions import TypedDict +from typing import Optional +from typing_extensions import NotRequired, TypedDict class BenefitGrantMeterCreditPropertiesTypedDict(TypedDict): - last_credited_meter_id: str - last_credited_units: int - last_credited_at: str + last_credited_meter_id: NotRequired[str] + last_credited_units: NotRequired[int] + last_credited_at: NotRequired[str] class BenefitGrantMeterCreditProperties(BaseModel): - last_credited_meter_id: str + last_credited_meter_id: Optional[str] = None - last_credited_units: int + last_credited_units: Optional[int] = None - last_credited_at: str + last_credited_at: Optional[str] = None diff --git a/src/polar_sdk/models/benefitgrantmetercreditwebhook.py b/src/polar_sdk/models/benefitgrantmetercreditwebhook.py new file mode 100644 index 00000000..545eebd1 --- /dev/null +++ b/src/polar_sdk/models/benefitgrantmetercreditwebhook.py @@ -0,0 +1,141 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .benefitgranterror import BenefitGrantError, BenefitGrantErrorTypedDict +from .benefitgrantmetercreditproperties import ( + BenefitGrantMeterCreditProperties, + BenefitGrantMeterCreditPropertiesTypedDict, +) +from .benefitmetercredit import BenefitMeterCredit, BenefitMeterCreditTypedDict +from .customer import Customer, CustomerTypedDict +from datetime import datetime +from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class BenefitGrantMeterCreditWebhookTypedDict(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 grant.""" + is_granted: bool + r"""Whether the benefit is granted.""" + is_revoked: bool + r"""Whether the benefit is revoked.""" + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + customer_id: str + r"""The ID of the customer concerned by this grant.""" + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + customer: CustomerTypedDict + r"""A customer in an organization.""" + benefit: BenefitMeterCreditTypedDict + r"""A benefit of type `meter_unit`. + + Use it to grant a number of units on a specific meter. + """ + properties: BenefitGrantMeterCreditPropertiesTypedDict + granted_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + revoked_at: NotRequired[Nullable[datetime]] + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + error: NotRequired[Nullable[BenefitGrantErrorTypedDict]] + r"""The error information if the benefit grant failed with an unrecoverable error.""" + previous_properties: NotRequired[ + Nullable[BenefitGrantMeterCreditPropertiesTypedDict] + ] + + +class BenefitGrantMeterCreditWebhook(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 grant.""" + + is_granted: bool + r"""Whether the benefit is granted.""" + + is_revoked: bool + r"""Whether the benefit is revoked.""" + + subscription_id: Nullable[str] + r"""The ID of the subscription that granted this benefit.""" + + order_id: Nullable[str] + r"""The ID of the order that granted this benefit.""" + + customer_id: str + r"""The ID of the customer concerned by this grant.""" + + benefit_id: str + r"""The ID of the benefit concerned by this grant.""" + + customer: Customer + r"""A customer in an organization.""" + + benefit: BenefitMeterCredit + r"""A benefit of type `meter_unit`. + + Use it to grant a number of units on a specific meter. + """ + + properties: BenefitGrantMeterCreditProperties + + granted_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" + + revoked_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" + + error: OptionalNullable[BenefitGrantError] = UNSET + r"""The error information if the benefit grant failed with an unrecoverable error.""" + + previous_properties: OptionalNullable[BenefitGrantMeterCreditProperties] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["granted_at", "revoked_at", "error", "previous_properties"] + nullable_fields = [ + "modified_at", + "granted_at", + "revoked_at", + "subscription_id", + "order_id", + "error", + "previous_properties", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(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/benefitgrantwebhook.py b/src/polar_sdk/models/benefitgrantwebhook.py index a356fd19..f54c6625 100644 --- a/src/polar_sdk/models/benefitgrantwebhook.py +++ b/src/polar_sdk/models/benefitgrantwebhook.py @@ -1,196 +1,55 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .benefit import Benefit, BenefitTypedDict -from .benefitgrantcustomproperties import ( - BenefitGrantCustomProperties, - BenefitGrantCustomPropertiesTypedDict, +from .benefitgrantcustomwebhook import ( + BenefitGrantCustomWebhook, + BenefitGrantCustomWebhookTypedDict, ) -from .benefitgrantdiscordproperties import ( - BenefitGrantDiscordProperties, - BenefitGrantDiscordPropertiesTypedDict, +from .benefitgrantdiscordwebhook import ( + BenefitGrantDiscordWebhook, + BenefitGrantDiscordWebhookTypedDict, ) -from .benefitgrantdownloadablesproperties import ( - BenefitGrantDownloadablesProperties, - BenefitGrantDownloadablesPropertiesTypedDict, +from .benefitgrantdownloadableswebhook import ( + BenefitGrantDownloadablesWebhook, + BenefitGrantDownloadablesWebhookTypedDict, ) -from .benefitgranterror import BenefitGrantError, BenefitGrantErrorTypedDict -from .benefitgrantgithubrepositoryproperties import ( - BenefitGrantGitHubRepositoryProperties, - BenefitGrantGitHubRepositoryPropertiesTypedDict, +from .benefitgrantgithubrepositorywebhook import ( + BenefitGrantGitHubRepositoryWebhook, + BenefitGrantGitHubRepositoryWebhookTypedDict, ) -from .benefitgrantlicensekeysproperties import ( - BenefitGrantLicenseKeysProperties, - BenefitGrantLicenseKeysPropertiesTypedDict, +from .benefitgrantlicensekeyswebhook import ( + BenefitGrantLicenseKeysWebhook, + BenefitGrantLicenseKeysWebhookTypedDict, ) -from .customer import Customer, CustomerTypedDict -from datetime import datetime -from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict - - -BenefitGrantWebhookPropertiesTypedDict = TypeAliasType( - "BenefitGrantWebhookPropertiesTypedDict", - Union[ - BenefitGrantCustomPropertiesTypedDict, - BenefitGrantDownloadablesPropertiesTypedDict, - BenefitGrantLicenseKeysPropertiesTypedDict, - BenefitGrantDiscordPropertiesTypedDict, - BenefitGrantGitHubRepositoryPropertiesTypedDict, - ], -) - - -BenefitGrantWebhookProperties = TypeAliasType( - "BenefitGrantWebhookProperties", - Union[ - BenefitGrantCustomProperties, - BenefitGrantDownloadablesProperties, - BenefitGrantLicenseKeysProperties, - BenefitGrantDiscordProperties, - BenefitGrantGitHubRepositoryProperties, - ], +from .benefitgrantmetercreditwebhook import ( + BenefitGrantMeterCreditWebhook, + BenefitGrantMeterCreditWebhookTypedDict, ) +from typing import Union +from typing_extensions import TypeAliasType -PreviousPropertiesTypedDict = TypeAliasType( - "PreviousPropertiesTypedDict", +BenefitGrantWebhookTypedDict = TypeAliasType( + "BenefitGrantWebhookTypedDict", Union[ - BenefitGrantCustomPropertiesTypedDict, - BenefitGrantDownloadablesPropertiesTypedDict, - BenefitGrantLicenseKeysPropertiesTypedDict, - BenefitGrantDiscordPropertiesTypedDict, - BenefitGrantGitHubRepositoryPropertiesTypedDict, + BenefitGrantDiscordWebhookTypedDict, + BenefitGrantCustomWebhookTypedDict, + BenefitGrantGitHubRepositoryWebhookTypedDict, + BenefitGrantDownloadablesWebhookTypedDict, + BenefitGrantLicenseKeysWebhookTypedDict, + BenefitGrantMeterCreditWebhookTypedDict, ], ) -PreviousProperties = TypeAliasType( - "PreviousProperties", +BenefitGrantWebhook = TypeAliasType( + "BenefitGrantWebhook", Union[ - BenefitGrantCustomProperties, - BenefitGrantDownloadablesProperties, - BenefitGrantLicenseKeysProperties, - BenefitGrantDiscordProperties, - BenefitGrantGitHubRepositoryProperties, + BenefitGrantDiscordWebhook, + BenefitGrantCustomWebhook, + BenefitGrantGitHubRepositoryWebhook, + BenefitGrantDownloadablesWebhook, + BenefitGrantLicenseKeysWebhook, + BenefitGrantMeterCreditWebhook, ], ) - - -class BenefitGrantWebhookTypedDict(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 grant.""" - is_granted: bool - r"""Whether the benefit is granted.""" - is_revoked: bool - r"""Whether the benefit is revoked.""" - subscription_id: Nullable[str] - r"""The ID of the subscription that granted this benefit.""" - order_id: Nullable[str] - r"""The ID of the order that granted this benefit.""" - customer_id: str - r"""The ID of the customer concerned by this grant.""" - benefit_id: str - r"""The ID of the benefit concerned by this grant.""" - customer: CustomerTypedDict - r"""A customer in an organization.""" - properties: BenefitGrantWebhookPropertiesTypedDict - benefit: BenefitTypedDict - granted_at: NotRequired[Nullable[datetime]] - r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" - revoked_at: NotRequired[Nullable[datetime]] - r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" - error: NotRequired[Nullable[BenefitGrantErrorTypedDict]] - r"""The error information if the benefit grant failed with an unrecoverable error.""" - previous_properties: NotRequired[Nullable[PreviousPropertiesTypedDict]] - - -class BenefitGrantWebhook(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 grant.""" - - is_granted: bool - r"""Whether the benefit is granted.""" - - is_revoked: bool - r"""Whether the benefit is revoked.""" - - subscription_id: Nullable[str] - r"""The ID of the subscription that granted this benefit.""" - - order_id: Nullable[str] - r"""The ID of the order that granted this benefit.""" - - customer_id: str - r"""The ID of the customer concerned by this grant.""" - - benefit_id: str - r"""The ID of the benefit concerned by this grant.""" - - customer: Customer - r"""A customer in an organization.""" - - properties: BenefitGrantWebhookProperties - - benefit: Benefit - - granted_at: OptionalNullable[datetime] = UNSET - r"""The timestamp when the benefit was granted. If `None`, the benefit is not granted.""" - - revoked_at: OptionalNullable[datetime] = UNSET - r"""The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.""" - - error: OptionalNullable[BenefitGrantError] = UNSET - r"""The error information if the benefit grant failed with an unrecoverable error.""" - - previous_properties: OptionalNullable[PreviousProperties] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["granted_at", "revoked_at", "error", "previous_properties"] - nullable_fields = [ - "modified_at", - "granted_at", - "revoked_at", - "subscription_id", - "order_id", - "error", - "previous_properties", - ] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(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/benefitsortproperty.py b/src/polar_sdk/models/benefitsortproperty.py index 4553d110..32c4e367 100644 --- a/src/polar_sdk/models/benefitsortproperty.py +++ b/src/polar_sdk/models/benefitsortproperty.py @@ -9,3 +9,5 @@ class BenefitSortProperty(str, Enum): MINUS_CREATED_AT = "-created_at" DESCRIPTION = "description" MINUS_DESCRIPTION = "-description" + TYPE = "type" + MINUS_TYPE = "-type" diff --git a/src/polar_sdk/models/checkoutforbiddenerror.py b/src/polar_sdk/models/checkoutforbiddenerror.py index ac0903ee..09d1374d 100644 --- a/src/polar_sdk/models/checkoutforbiddenerror.py +++ b/src/polar_sdk/models/checkoutforbiddenerror.py @@ -4,6 +4,7 @@ from .alreadyactivesubscriptionerror import AlreadyActiveSubscriptionErrorData from .notopencheckout import NotOpenCheckoutData from .paymentnotready import PaymentNotReadyData +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from typing import Optional, Union @@ -16,8 +17,9 @@ ) +@dataclass(frozen=True) class CheckoutForbiddenError(PolarError): - data: CheckoutForbiddenErrorUnion + data: CheckoutForbiddenErrorUnion = field(hash=False) def __init__( self, @@ -27,4 +29,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/checkout_links_createop.py b/src/polar_sdk/models/checkoutlinkcreate.py similarity index 79% rename from src/polar_sdk/models/checkout_links_createop.py rename to src/polar_sdk/models/checkoutlinkcreate.py index eed15d84..46ae252f 100644 --- a/src/polar_sdk/models/checkout_links_createop.py +++ b/src/polar_sdk/models/checkoutlinkcreate.py @@ -17,8 +17,8 @@ from typing_extensions import TypeAliasType -CheckoutLinksCreateCheckoutLinkCreateTypedDict = TypeAliasType( - "CheckoutLinksCreateCheckoutLinkCreateTypedDict", +CheckoutLinkCreateTypedDict = TypeAliasType( + "CheckoutLinkCreateTypedDict", Union[ CheckoutLinkCreateProductPriceTypedDict, CheckoutLinkCreateProductTypedDict, @@ -27,8 +27,8 @@ ) -CheckoutLinksCreateCheckoutLinkCreate = TypeAliasType( - "CheckoutLinksCreateCheckoutLinkCreate", +CheckoutLinkCreate = TypeAliasType( + "CheckoutLinkCreate", Union[ CheckoutLinkCreateProductPrice, CheckoutLinkCreateProduct, diff --git a/src/polar_sdk/models/customer_portal_orders_generate_invoiceop.py b/src/polar_sdk/models/customer_portal_orders_generate_invoiceop.py index 2e925122..05580ceb 100644 --- a/src/polar_sdk/models/customer_portal_orders_generate_invoiceop.py +++ b/src/polar_sdk/models/customer_portal_orders_generate_invoiceop.py @@ -3,6 +3,7 @@ from __future__ import annotations from .missinginvoicebillingdetails import MissingInvoiceBillingDetailsData from .notpaidorder import NotPaidOrderData +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -48,12 +49,15 @@ class CustomerPortalOrdersGenerateInvoiceRequest(BaseModel): r"""Order is not paid or is missing billing name or address.""" +@dataclass(frozen=True) class CustomerPortalOrdersGenerateInvoiceResponse422CustomerPortalOrdersGenerateInvoice( PolarError ): r"""Order is not paid or is missing billing name or address.""" - data: CustomerPortalOrdersGenerateInvoiceResponse422CustomerPortalOrdersGenerateInvoiceUnion + data: CustomerPortalOrdersGenerateInvoiceResponse422CustomerPortalOrdersGenerateInvoiceUnion = field( + hash=False + ) def __init__( self, @@ -63,4 +67,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/expiredcheckouterror.py b/src/polar_sdk/models/expiredcheckouterror.py index 60538025..85eacc06 100644 --- a/src/polar_sdk/models/expiredcheckouterror.py +++ b/src/polar_sdk/models/expiredcheckouterror.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class ExpiredCheckoutErrorData(BaseModel): ] = "ExpiredCheckoutError" +@dataclass(frozen=True) class ExpiredCheckoutError(PolarError): - data: ExpiredCheckoutErrorData + data: ExpiredCheckoutErrorData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/httpvalidationerror.py b/src/polar_sdk/models/httpvalidationerror.py index fc6204b6..3637e50e 100644 --- a/src/polar_sdk/models/httpvalidationerror.py +++ b/src/polar_sdk/models/httpvalidationerror.py @@ -2,6 +2,7 @@ from __future__ import annotations from .validationerror import ValidationError +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -12,8 +13,9 @@ class HTTPValidationErrorData(BaseModel): detail: Optional[List[ValidationError]] = None +@dataclass(frozen=True) class HTTPValidationError(PolarError): - data: HTTPValidationErrorData + data: HTTPValidationErrorData = field(hash=False) def __init__( self, @@ -23,4 +25,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/invoicealreadyexists.py b/src/polar_sdk/models/invoicealreadyexists.py index efd84f66..61d71244 100644 --- a/src/polar_sdk/models/invoicealreadyexists.py +++ b/src/polar_sdk/models/invoicealreadyexists.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class InvoiceAlreadyExistsData(BaseModel): ] = "InvoiceAlreadyExists" +@dataclass(frozen=True) class InvoiceAlreadyExists(PolarError): - data: InvoiceAlreadyExistsData + data: InvoiceAlreadyExistsData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/missinginvoicebillingdetails.py b/src/polar_sdk/models/missinginvoicebillingdetails.py index 81907546..6256518e 100644 --- a/src/polar_sdk/models/missinginvoicebillingdetails.py +++ b/src/polar_sdk/models/missinginvoicebillingdetails.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class MissingInvoiceBillingDetailsData(BaseModel): ] = "MissingInvoiceBillingDetails" +@dataclass(frozen=True) class MissingInvoiceBillingDetails(PolarError): - data: MissingInvoiceBillingDetailsData + data: MissingInvoiceBillingDetailsData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/no_response_error.py b/src/polar_sdk/models/no_response_error.py index f98beea2..b710ea2b 100644 --- a/src/polar_sdk/models/no_response_error.py +++ b/src/polar_sdk/models/no_response_error.py @@ -1,12 +1,16 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from dataclasses import dataclass + + +@dataclass(frozen=True) class NoResponseError(Exception): """Error raised when no HTTP response is received from the server.""" message: str def __init__(self, message: str = "No response received"): - self.message = message + object.__setattr__(self, "message", message) super().__init__(message) def __str__(self): diff --git a/src/polar_sdk/models/notopencheckout.py b/src/polar_sdk/models/notopencheckout.py index 74024810..4032a85d 100644 --- a/src/polar_sdk/models/notopencheckout.py +++ b/src/polar_sdk/models/notopencheckout.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class NotOpenCheckoutData(BaseModel): ] = "NotOpenCheckout" +@dataclass(frozen=True) class NotOpenCheckout(PolarError): - data: NotOpenCheckoutData + data: NotOpenCheckoutData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/notpaidorder.py b/src/polar_sdk/models/notpaidorder.py index 98ce6ac5..4e889e6a 100644 --- a/src/polar_sdk/models/notpaidorder.py +++ b/src/polar_sdk/models/notpaidorder.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -22,8 +23,9 @@ class NotPaidOrderData(BaseModel): ] = "NotPaidOrder" +@dataclass(frozen=True) class NotPaidOrder(PolarError): - data: NotPaidOrderData + data: NotPaidOrderData = field(hash=False) def __init__( self, @@ -33,4 +35,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/notpermitted.py b/src/polar_sdk/models/notpermitted.py index 61710cc8..9f3c30f4 100644 --- a/src/polar_sdk/models/notpermitted.py +++ b/src/polar_sdk/models/notpermitted.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -22,8 +23,9 @@ class NotPermittedData(BaseModel): ] = "NotPermitted" +@dataclass(frozen=True) class NotPermitted(PolarError): - data: NotPermittedData + data: NotPermittedData = field(hash=False) def __init__( self, @@ -33,4 +35,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/ordernoteligibleforretry.py b/src/polar_sdk/models/ordernoteligibleforretry.py index b8e33762..df0fccd2 100644 --- a/src/polar_sdk/models/ordernoteligibleforretry.py +++ b/src/polar_sdk/models/ordernoteligibleforretry.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class OrderNotEligibleForRetryData(BaseModel): ] = "OrderNotEligibleForRetry" +@dataclass(frozen=True) class OrderNotEligibleForRetry(PolarError): - data: OrderNotEligibleForRetryData + data: OrderNotEligibleForRetryData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/orders_generate_invoiceop.py b/src/polar_sdk/models/orders_generate_invoiceop.py index 4fd008e6..da0618a6 100644 --- a/src/polar_sdk/models/orders_generate_invoiceop.py +++ b/src/polar_sdk/models/orders_generate_invoiceop.py @@ -3,6 +3,7 @@ from __future__ import annotations from .missinginvoicebillingdetails import MissingInvoiceBillingDetailsData from .notpaidorder import NotPaidOrderData +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -30,10 +31,11 @@ class OrdersGenerateInvoiceRequest(BaseModel): r"""Order is not paid or is missing billing name or address.""" +@dataclass(frozen=True) class OrdersGenerateInvoiceResponse422OrdersGenerateInvoice(PolarError): r"""Order is not paid or is missing billing name or address.""" - data: OrdersGenerateInvoiceResponse422OrdersGenerateInvoiceUnion + data: OrdersGenerateInvoiceResponse422OrdersGenerateInvoiceUnion = field(hash=False) def __init__( self, @@ -43,4 +45,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/paymentalreadyinprogress.py b/src/polar_sdk/models/paymentalreadyinprogress.py index cd12bcde..99abc6e1 100644 --- a/src/polar_sdk/models/paymentalreadyinprogress.py +++ b/src/polar_sdk/models/paymentalreadyinprogress.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class PaymentAlreadyInProgressData(BaseModel): ] = "PaymentAlreadyInProgress" +@dataclass(frozen=True) class PaymentAlreadyInProgress(PolarError): - data: PaymentAlreadyInProgressData + data: PaymentAlreadyInProgressData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/paymenterror.py b/src/polar_sdk/models/paymenterror.py index cd9cce42..d7c9fa14 100644 --- a/src/polar_sdk/models/paymenterror.py +++ b/src/polar_sdk/models/paymenterror.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -22,8 +23,9 @@ class PaymentErrorData(BaseModel): ] = "PaymentError" +@dataclass(frozen=True) class PaymentError(PolarError): - data: PaymentErrorData + data: PaymentErrorData = field(hash=False) def __init__( self, @@ -33,4 +35,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/paymentmethodinusebyactivesubscription.py b/src/polar_sdk/models/paymentmethodinusebyactivesubscription.py index 617ace22..b8dc91d5 100644 --- a/src/polar_sdk/models/paymentmethodinusebyactivesubscription.py +++ b/src/polar_sdk/models/paymentmethodinusebyactivesubscription.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class PaymentMethodInUseByActiveSubscriptionData(BaseModel): ] = "PaymentMethodInUseByActiveSubscription" +@dataclass(frozen=True) class PaymentMethodInUseByActiveSubscription(PolarError): - data: PaymentMethodInUseByActiveSubscriptionData + data: PaymentMethodInUseByActiveSubscriptionData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/paymentnotready.py b/src/polar_sdk/models/paymentnotready.py index 81d6b850..1e34a621 100644 --- a/src/polar_sdk/models/paymentnotready.py +++ b/src/polar_sdk/models/paymentnotready.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class PaymentNotReadyData(BaseModel): ] = "PaymentNotReady" +@dataclass(frozen=True) class PaymentNotReady(PolarError): - data: PaymentNotReadyData + data: PaymentNotReadyData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/polarerror.py b/src/polar_sdk/models/polarerror.py index 9dbc08ac..9156a52b 100644 --- a/src/polar_sdk/models/polarerror.py +++ b/src/polar_sdk/models/polarerror.py @@ -2,25 +2,29 @@ import httpx from typing import Optional +from dataclasses import dataclass, field +@dataclass(frozen=True) class PolarError(Exception): """The base class for all HTTP error responses.""" message: str status_code: int body: str - headers: httpx.Headers - raw_response: httpx.Response + headers: httpx.Headers = field(hash=False) + raw_response: httpx.Response = field(hash=False) def __init__( self, message: str, raw_response: httpx.Response, body: Optional[str] = None ): - self.message = message - self.status_code = raw_response.status_code - self.body = body if body is not None else raw_response.text - self.headers = raw_response.headers - self.raw_response = raw_response + object.__setattr__(self, "message", message) + object.__setattr__(self, "status_code", raw_response.status_code) + object.__setattr__( + self, "body", body if body is not None else raw_response.text + ) + object.__setattr__(self, "headers", raw_response.headers) + object.__setattr__(self, "raw_response", raw_response) def __str__(self): return self.message diff --git a/src/polar_sdk/models/refundamounttoohigh.py b/src/polar_sdk/models/refundamounttoohigh.py index a52e034a..415ee04b 100644 --- a/src/polar_sdk/models/refundamounttoohigh.py +++ b/src/polar_sdk/models/refundamounttoohigh.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class RefundAmountTooHighData(BaseModel): ] = "RefundAmountTooHigh" +@dataclass(frozen=True) class RefundAmountTooHigh(PolarError): - data: RefundAmountTooHighData + data: RefundAmountTooHighData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/refundedalready.py b/src/polar_sdk/models/refundedalready.py index 955d78ab..545b007c 100644 --- a/src/polar_sdk/models/refundedalready.py +++ b/src/polar_sdk/models/refundedalready.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class RefundedAlreadyData(BaseModel): ] = "RefundedAlready" +@dataclass(frozen=True) class RefundedAlready(PolarError): - data: RefundedAlreadyData + data: RefundedAlreadyData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/resourcenotfound.py b/src/polar_sdk/models/resourcenotfound.py index 276fd5be..cbb6821f 100644 --- a/src/polar_sdk/models/resourcenotfound.py +++ b/src/polar_sdk/models/resourcenotfound.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class ResourceNotFoundData(BaseModel): ] = "ResourceNotFound" +@dataclass(frozen=True) class ResourceNotFound(PolarError): - data: ResourceNotFoundData + data: ResourceNotFoundData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/responsevalidationerror.py b/src/polar_sdk/models/responsevalidationerror.py index 10021c95..04a56661 100644 --- a/src/polar_sdk/models/responsevalidationerror.py +++ b/src/polar_sdk/models/responsevalidationerror.py @@ -2,10 +2,12 @@ import httpx from typing import Optional +from dataclasses import dataclass from polar_sdk.models import PolarError +@dataclass(frozen=True) class ResponseValidationError(PolarError): """Error raised when there is a type mismatch between the response data and the expected Pydantic model.""" diff --git a/src/polar_sdk/models/sdkerror.py b/src/polar_sdk/models/sdkerror.py index 0912749b..a6c1e4e7 100644 --- a/src/polar_sdk/models/sdkerror.py +++ b/src/polar_sdk/models/sdkerror.py @@ -2,12 +2,14 @@ import httpx from typing import Optional +from dataclasses import dataclass from polar_sdk.models import PolarError MAX_MESSAGE_LEN = 10_000 +@dataclass(frozen=True) class SDKError(PolarError): """The fallback error class if no more specific error class is matched.""" diff --git a/src/polar_sdk/models/subscriptionlocked.py b/src/polar_sdk/models/subscriptionlocked.py index 4725e6cc..7590be59 100644 --- a/src/polar_sdk/models/subscriptionlocked.py +++ b/src/polar_sdk/models/subscriptionlocked.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -23,8 +24,9 @@ class SubscriptionLockedData(BaseModel): ] = "SubscriptionLocked" +@dataclass(frozen=True) class SubscriptionLocked(PolarError): - data: SubscriptionLockedData + data: SubscriptionLockedData = field(hash=False) def __init__( self, @@ -34,4 +36,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/unauthorized.py b/src/polar_sdk/models/unauthorized.py index 05b5ab39..7d33a981 100644 --- a/src/polar_sdk/models/unauthorized.py +++ b/src/polar_sdk/models/unauthorized.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from dataclasses import dataclass, field import httpx from polar_sdk.models import PolarError from polar_sdk.types import BaseModel @@ -22,8 +23,9 @@ class UnauthorizedData(BaseModel): ] = "Unauthorized" +@dataclass(frozen=True) class Unauthorized(PolarError): - data: UnauthorizedData + data: UnauthorizedData = field(hash=False) def __init__( self, @@ -33,4 +35,4 @@ def __init__( ): message = body or raw_response.text super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/polar_sdk/models/webhookbenefitcreatedpayload.py b/src/polar_sdk/models/webhookbenefitcreatedpayload.py index 4028acec..e89213da 100644 --- a/src/polar_sdk/models/webhookbenefitcreatedpayload.py +++ b/src/polar_sdk/models/webhookbenefitcreatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .benefit import Benefit, BenefitTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookBenefitCreatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: BenefitTypedDict type: Literal["benefit.created"] @@ -26,6 +28,8 @@ class WebhookBenefitCreatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Benefit TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookbenefitgrantcreatedpayload.py b/src/polar_sdk/models/webhookbenefitgrantcreatedpayload.py index 47538221..f94b24cc 100644 --- a/src/polar_sdk/models/webhookbenefitgrantcreatedpayload.py +++ b/src/polar_sdk/models/webhookbenefitgrantcreatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .benefitgrantwebhook import BenefitGrantWebhook, BenefitGrantWebhookTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookBenefitGrantCreatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: BenefitGrantWebhookTypedDict type: Literal["benefit_grant.created"] @@ -26,6 +28,8 @@ class WebhookBenefitGrantCreatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: BenefitGrantWebhook TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookbenefitgrantcycledpayload.py b/src/polar_sdk/models/webhookbenefitgrantcycledpayload.py index 39c0bde5..19a655a7 100644 --- a/src/polar_sdk/models/webhookbenefitgrantcycledpayload.py +++ b/src/polar_sdk/models/webhookbenefitgrantcycledpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .benefitgrantwebhook import BenefitGrantWebhook, BenefitGrantWebhookTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -17,6 +18,7 @@ class WebhookBenefitGrantCycledPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: BenefitGrantWebhookTypedDict type: Literal["benefit_grant.cycled"] @@ -28,6 +30,8 @@ class WebhookBenefitGrantCycledPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: BenefitGrantWebhook TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookbenefitgrantrevokedpayload.py b/src/polar_sdk/models/webhookbenefitgrantrevokedpayload.py index d45e87d4..f3f3903b 100644 --- a/src/polar_sdk/models/webhookbenefitgrantrevokedpayload.py +++ b/src/polar_sdk/models/webhookbenefitgrantrevokedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .benefitgrantwebhook import BenefitGrantWebhook, BenefitGrantWebhookTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookBenefitGrantRevokedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: BenefitGrantWebhookTypedDict type: Literal["benefit_grant.revoked"] @@ -26,6 +28,8 @@ class WebhookBenefitGrantRevokedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: BenefitGrantWebhook TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookbenefitgrantupdatedpayload.py b/src/polar_sdk/models/webhookbenefitgrantupdatedpayload.py index b55bdc9c..06412c6c 100644 --- a/src/polar_sdk/models/webhookbenefitgrantupdatedpayload.py +++ b/src/polar_sdk/models/webhookbenefitgrantupdatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .benefitgrantwebhook import BenefitGrantWebhook, BenefitGrantWebhookTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookBenefitGrantUpdatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: BenefitGrantWebhookTypedDict type: Literal["benefit_grant.updated"] @@ -26,6 +28,8 @@ class WebhookBenefitGrantUpdatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: BenefitGrantWebhook TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookbenefitupdatedpayload.py b/src/polar_sdk/models/webhookbenefitupdatedpayload.py index 17071279..be8ba535 100644 --- a/src/polar_sdk/models/webhookbenefitupdatedpayload.py +++ b/src/polar_sdk/models/webhookbenefitupdatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .benefit import Benefit, BenefitTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookBenefitUpdatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: BenefitTypedDict type: Literal["benefit.updated"] @@ -26,6 +28,8 @@ class WebhookBenefitUpdatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Benefit TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookcheckoutcreatedpayload.py b/src/polar_sdk/models/webhookcheckoutcreatedpayload.py index 4d74b6e5..ae5ffe4f 100644 --- a/src/polar_sdk/models/webhookcheckoutcreatedpayload.py +++ b/src/polar_sdk/models/webhookcheckoutcreatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .checkout import Checkout, CheckoutTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookCheckoutCreatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: CheckoutTypedDict r"""Checkout session data retrieved using an access token.""" type: Literal["checkout.created"] @@ -27,6 +29,8 @@ class WebhookCheckoutCreatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Checkout r"""Checkout session data retrieved using an access token.""" diff --git a/src/polar_sdk/models/webhookcheckoutupdatedpayload.py b/src/polar_sdk/models/webhookcheckoutupdatedpayload.py index b52fbd10..cdf80ff2 100644 --- a/src/polar_sdk/models/webhookcheckoutupdatedpayload.py +++ b/src/polar_sdk/models/webhookcheckoutupdatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .checkout import Checkout, CheckoutTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookCheckoutUpdatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: CheckoutTypedDict r"""Checkout session data retrieved using an access token.""" type: Literal["checkout.updated"] @@ -27,6 +29,8 @@ class WebhookCheckoutUpdatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Checkout r"""Checkout session data retrieved using an access token.""" diff --git a/src/polar_sdk/models/webhookcustomercreatedpayload.py b/src/polar_sdk/models/webhookcustomercreatedpayload.py index 974aa259..077486b7 100644 --- a/src/polar_sdk/models/webhookcustomercreatedpayload.py +++ b/src/polar_sdk/models/webhookcustomercreatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .customer import Customer, CustomerTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -21,6 +22,7 @@ class WebhookCustomerCreatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: CustomerTypedDict r"""A customer in an organization.""" type: Literal["customer.created"] @@ -37,6 +39,8 @@ class WebhookCustomerCreatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Customer r"""A customer in an organization.""" diff --git a/src/polar_sdk/models/webhookcustomerdeletedpayload.py b/src/polar_sdk/models/webhookcustomerdeletedpayload.py index c2e13d33..49fe772c 100644 --- a/src/polar_sdk/models/webhookcustomerdeletedpayload.py +++ b/src/polar_sdk/models/webhookcustomerdeletedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .customer import Customer, CustomerTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookCustomerDeletedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: CustomerTypedDict r"""A customer in an organization.""" type: Literal["customer.deleted"] @@ -27,6 +29,8 @@ class WebhookCustomerDeletedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Customer r"""A customer in an organization.""" diff --git a/src/polar_sdk/models/webhookcustomerstatechangedpayload.py b/src/polar_sdk/models/webhookcustomerstatechangedpayload.py index 1885d1c1..4800c629 100644 --- a/src/polar_sdk/models/webhookcustomerstatechangedpayload.py +++ b/src/polar_sdk/models/webhookcustomerstatechangedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .customerstate import CustomerState, CustomerStateTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -22,6 +23,7 @@ class WebhookCustomerStateChangedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: CustomerStateTypedDict r"""A customer along with additional state information: @@ -44,6 +46,8 @@ class WebhookCustomerStateChangedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: CustomerState r"""A customer along with additional state information: diff --git a/src/polar_sdk/models/webhookcustomerupdatedpayload.py b/src/polar_sdk/models/webhookcustomerupdatedpayload.py index 648d3159..c82ac93a 100644 --- a/src/polar_sdk/models/webhookcustomerupdatedpayload.py +++ b/src/polar_sdk/models/webhookcustomerupdatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .customer import Customer, CustomerTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -20,6 +21,7 @@ class WebhookCustomerUpdatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: CustomerTypedDict r"""A customer in an organization.""" type: Literal["customer.updated"] @@ -35,6 +37,8 @@ class WebhookCustomerUpdatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Customer r"""A customer in an organization.""" diff --git a/src/polar_sdk/models/webhookdelivery.py b/src/polar_sdk/models/webhookdelivery.py index 8f7ede7e..039d4fa1 100644 --- a/src/polar_sdk/models/webhookdelivery.py +++ b/src/polar_sdk/models/webhookdelivery.py @@ -3,9 +3,9 @@ from __future__ import annotations from .webhookevent import WebhookEvent, WebhookEventTypedDict from datetime import datetime -from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL +from polar_sdk.types import BaseModel, Nullable, UNSET_SENTINEL from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TypedDict class WebhookDeliveryTypedDict(TypedDict): @@ -19,6 +19,10 @@ class WebhookDeliveryTypedDict(TypedDict): r"""The ID of the object.""" succeeded: bool r"""Whether the delivery was successful.""" + http_code: Nullable[int] + r"""The HTTP code returned by the URL. `null` if the endpoint was unreachable.""" + response: Nullable[str] + r"""The response body returned by the URL, or the error message if the endpoint was unreachable.""" webhook_event: WebhookEventTypedDict r"""A webhook event. @@ -28,8 +32,6 @@ class WebhookDeliveryTypedDict(TypedDict): It can be delivered multiple times until it's marked as succeeded, each one creating a new delivery. """ - http_code: NotRequired[Nullable[int]] - r"""The HTTP code returned by the URL. `null` if the endpoint was unreachable.""" class WebhookDelivery(BaseModel): @@ -47,6 +49,12 @@ class WebhookDelivery(BaseModel): succeeded: bool r"""Whether the delivery was successful.""" + http_code: Nullable[int] + r"""The HTTP code returned by the URL. `null` if the endpoint was unreachable.""" + + response: Nullable[str] + r"""The response body returned by the URL, or the error message if the endpoint was unreachable.""" + webhook_event: WebhookEvent r"""A webhook event. @@ -57,13 +65,10 @@ class WebhookDelivery(BaseModel): each one creating a new delivery. """ - http_code: OptionalNullable[int] = UNSET - r"""The HTTP code returned by the URL. `null` if the endpoint was unreachable.""" - @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["http_code"] - nullable_fields = ["modified_at", "http_code"] + optional_fields = [] + nullable_fields = ["modified_at", "http_code", "response"] null_default_fields = [] serialized = handler(self) diff --git a/src/polar_sdk/models/webhookevent.py b/src/polar_sdk/models/webhookevent.py index 55deeff7..8cb94f34 100644 --- a/src/polar_sdk/models/webhookevent.py +++ b/src/polar_sdk/models/webhookevent.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .webhookeventtype import WebhookEventType from datetime import datetime from polar_sdk.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from pydantic import model_serializer @@ -23,8 +24,11 @@ class WebhookEventTypedDict(TypedDict): r"""Last modification timestamp of the object.""" id: str r"""The ID of the object.""" - payload: str + payload: Nullable[str] r"""The payload of the webhook event.""" + type: WebhookEventType + is_archived: bool + r"""Whether this event is archived. Archived events can't be redelivered, and the payload is not accessible anymore.""" last_http_code: NotRequired[Nullable[int]] r"""Last HTTP code returned by the URL. `null` if no delviery has been attempted or if the endpoint was unreachable.""" succeeded: NotRequired[Nullable[bool]] @@ -50,9 +54,14 @@ class WebhookEvent(BaseModel): id: str r"""The ID of the object.""" - payload: str + payload: Nullable[str] r"""The payload of the webhook event.""" + type: WebhookEventType + + is_archived: bool + r"""Whether this event is archived. Archived events can't be redelivered, and the payload is not accessible anymore.""" + last_http_code: OptionalNullable[int] = UNSET r"""Last HTTP code returned by the URL. `null` if no delviery has been attempted or if the endpoint was unreachable.""" @@ -62,7 +71,7 @@ class WebhookEvent(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = ["last_http_code", "succeeded"] - nullable_fields = ["modified_at", "last_http_code", "succeeded"] + nullable_fields = ["modified_at", "last_http_code", "succeeded", "payload"] null_default_fields = [] serialized = handler(self) diff --git a/src/polar_sdk/models/webhookordercreatedpayload.py b/src/polar_sdk/models/webhookordercreatedpayload.py index e849474d..8070c054 100644 --- a/src/polar_sdk/models/webhookordercreatedpayload.py +++ b/src/polar_sdk/models/webhookordercreatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .order import Order, OrderTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -25,6 +26,7 @@ class WebhookOrderCreatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: OrderTypedDict type: Literal["order.created"] @@ -44,6 +46,8 @@ class WebhookOrderCreatedPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Order TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookorderpaidpayload.py b/src/polar_sdk/models/webhookorderpaidpayload.py index 04fb9549..48a87dad 100644 --- a/src/polar_sdk/models/webhookorderpaidpayload.py +++ b/src/polar_sdk/models/webhookorderpaidpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .order import Order, OrderTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -18,6 +19,7 @@ class WebhookOrderPaidPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: OrderTypedDict type: Literal["order.paid"] @@ -30,6 +32,8 @@ class WebhookOrderPaidPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Order TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookorderrefundedpayload.py b/src/polar_sdk/models/webhookorderrefundedpayload.py index c30490dc..48d225ac 100644 --- a/src/polar_sdk/models/webhookorderrefundedpayload.py +++ b/src/polar_sdk/models/webhookorderrefundedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .order import Order, OrderTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookOrderRefundedPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: OrderTypedDict type: Literal["order.refunded"] @@ -26,6 +28,8 @@ class WebhookOrderRefundedPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Order TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookorderupdatedpayload.py b/src/polar_sdk/models/webhookorderupdatedpayload.py index 2f7f4b15..abf764b8 100644 --- a/src/polar_sdk/models/webhookorderupdatedpayload.py +++ b/src/polar_sdk/models/webhookorderupdatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .order import Order, OrderTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -21,6 +22,7 @@ class WebhookOrderUpdatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: OrderTypedDict type: Literal["order.updated"] @@ -36,6 +38,8 @@ class WebhookOrderUpdatedPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Order TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookorganizationupdatedpayload.py b/src/polar_sdk/models/webhookorganizationupdatedpayload.py index 1046addc..8120fb6b 100644 --- a/src/polar_sdk/models/webhookorganizationupdatedpayload.py +++ b/src/polar_sdk/models/webhookorganizationupdatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .organization import Organization, OrganizationTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookOrganizationUpdatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: OrganizationTypedDict type: Literal["organization.updated"] @@ -26,6 +28,8 @@ class WebhookOrganizationUpdatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Organization TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookproductcreatedpayload.py b/src/polar_sdk/models/webhookproductcreatedpayload.py index d030f0fd..3c178e69 100644 --- a/src/polar_sdk/models/webhookproductcreatedpayload.py +++ b/src/polar_sdk/models/webhookproductcreatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .product import Product, ProductTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookProductCreatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: ProductTypedDict r"""A product.""" type: Literal["product.created"] @@ -27,6 +29,8 @@ class WebhookProductCreatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Product r"""A product.""" diff --git a/src/polar_sdk/models/webhookproductupdatedpayload.py b/src/polar_sdk/models/webhookproductupdatedpayload.py index 9438890b..8642039f 100644 --- a/src/polar_sdk/models/webhookproductupdatedpayload.py +++ b/src/polar_sdk/models/webhookproductupdatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .product import Product, ProductTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookProductUpdatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Basic """ + timestamp: datetime data: ProductTypedDict r"""A product.""" type: Literal["product.updated"] @@ -27,6 +29,8 @@ class WebhookProductUpdatedPayload(BaseModel): **Discord & Slack support:** Basic """ + timestamp: datetime + data: Product r"""A product.""" diff --git a/src/polar_sdk/models/webhookrefundcreatedpayload.py b/src/polar_sdk/models/webhookrefundcreatedpayload.py index 6e679529..bca22387 100644 --- a/src/polar_sdk/models/webhookrefundcreatedpayload.py +++ b/src/polar_sdk/models/webhookrefundcreatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .refund import Refund, RefundTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookRefundCreatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: RefundTypedDict type: Literal["refund.created"] @@ -26,6 +28,8 @@ class WebhookRefundCreatedPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Refund TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhookrefundupdatedpayload.py b/src/polar_sdk/models/webhookrefundupdatedpayload.py index fb464257..012fda76 100644 --- a/src/polar_sdk/models/webhookrefundupdatedpayload.py +++ b/src/polar_sdk/models/webhookrefundupdatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .refund import Refund, RefundTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookRefundUpdatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: RefundTypedDict type: Literal["refund.updated"] @@ -26,6 +28,8 @@ class WebhookRefundUpdatedPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Refund TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhooksubscriptionactivepayload.py b/src/polar_sdk/models/webhooksubscriptionactivepayload.py index 23119e14..5e0ce368 100644 --- a/src/polar_sdk/models/webhooksubscriptionactivepayload.py +++ b/src/polar_sdk/models/webhooksubscriptionactivepayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .subscription import Subscription, SubscriptionTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -17,6 +18,7 @@ class WebhookSubscriptionActivePayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: SubscriptionTypedDict type: Literal["subscription.active"] @@ -28,6 +30,8 @@ class WebhookSubscriptionActivePayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Subscription TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py b/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py index a3ed6d7d..bfc6827b 100644 --- a/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py +++ b/src/polar_sdk/models/webhooksubscriptioncanceledpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .subscription import Subscription, SubscriptionTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -17,6 +18,7 @@ class WebhookSubscriptionCanceledPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: SubscriptionTypedDict type: Literal["subscription.canceled"] @@ -28,6 +30,8 @@ class WebhookSubscriptionCanceledPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Subscription TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhooksubscriptioncreatedpayload.py b/src/polar_sdk/models/webhooksubscriptioncreatedpayload.py index c39fb0fa..c26f9f30 100644 --- a/src/polar_sdk/models/webhooksubscriptioncreatedpayload.py +++ b/src/polar_sdk/models/webhooksubscriptioncreatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .subscription import Subscription, SubscriptionTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -18,6 +19,7 @@ class WebhookSubscriptionCreatedPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: SubscriptionTypedDict type: Literal["subscription.created"] @@ -30,6 +32,8 @@ class WebhookSubscriptionCreatedPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Subscription TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py b/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py index ba2048e5..fe1fd3f1 100644 --- a/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py +++ b/src/polar_sdk/models/webhooksubscriptionrevokedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .subscription import Subscription, SubscriptionTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -17,6 +18,7 @@ class WebhookSubscriptionRevokedPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: SubscriptionTypedDict type: Literal["subscription.revoked"] @@ -28,6 +30,8 @@ class WebhookSubscriptionRevokedPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Subscription TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhooksubscriptionuncanceledpayload.py b/src/polar_sdk/models/webhooksubscriptionuncanceledpayload.py index 4b143526..5cd763d5 100644 --- a/src/polar_sdk/models/webhooksubscriptionuncanceledpayload.py +++ b/src/polar_sdk/models/webhooksubscriptionuncanceledpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .subscription import Subscription, SubscriptionTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -16,6 +17,7 @@ class WebhookSubscriptionUncanceledPayloadTypedDict(TypedDict): **Discord & Slack support:** Full """ + timestamp: datetime data: SubscriptionTypedDict type: Literal["subscription.uncanceled"] @@ -26,6 +28,8 @@ class WebhookSubscriptionUncanceledPayload(BaseModel): **Discord & Slack support:** Full """ + timestamp: datetime + data: Subscription TYPE: Annotated[ diff --git a/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py b/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py index 88035e64..a3a00461 100644 --- a/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py +++ b/src/polar_sdk/models/webhooksubscriptionupdatedpayload.py @@ -2,6 +2,7 @@ from __future__ import annotations from .subscription import Subscription, SubscriptionTypedDict +from datetime import datetime from polar_sdk.types import BaseModel from polar_sdk.utils import validate_const import pydantic @@ -20,6 +21,7 @@ class WebhookSubscriptionUpdatedPayloadTypedDict(TypedDict): **Discord & Slack support:** On cancellation and revocation. Renewals are skipped. """ + timestamp: datetime data: SubscriptionTypedDict type: Literal["subscription.updated"] @@ -34,6 +36,8 @@ class WebhookSubscriptionUpdatedPayload(BaseModel): **Discord & Slack support:** On cancellation and revocation. Renewals are skipped. """ + timestamp: datetime + data: Subscription TYPE: Annotated[