diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..da4313a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.rb linguist-generated=false \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d15134 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.gem +.rbenv-gemsets +.DS_Store +**/.speakeasy/temp/ +**/.speakeasy/logs/ diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..589ab03 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,80 @@ +plugins: + - rubocop-minitest + +AllCops: + Exclude: + - Rakefile + TargetRubyVersion: "3.2" +Metrics: + Enabled: false +Style/IfInsideElse: + Enabled: false +# Temporary until Ruby deals with empty responses correctly +Style/EmptyElse: + Enabled: false +Style/GuardClause: + Enabled: false +Style/ConditionalAssignment: + Enabled: false +Style/Documentation: + Enabled: false +Style/NegatedIf: + Enabled: false +Style/SoleNestedConditional: + Enabled: false +Style/AccessorGrouping: + Enabled: false +Layout/EndAlignment: + EnforcedStyleAlignWith: start_of_line + Enabled: false +Layout/LineLength: + Enabled: false +Lint/EmptyConditionalBody: + Enabled: false +Lint/MissingSuper: + Enabled: false +Style/CaseLikeIf: + Enabled: false +#To eventually re-enable: +Layout/EmptyLines: + Enabled: false +Layout/EmptyLinesAroundMethodBody: + Enabled: false +Layout/EmptyLineBetweenDefs: + Enabled: false +Layout/EmptyLineAfterGuardClause: + Enabled: false +Layout/EmptyLinesAroundModuleBody: + Enabled: false +Layout/MultilineBlockLayout: + Enabled: false +Lint/UnusedMethodArgument: + Enabled: false +Layout/TrailingWhitespace: + Enabled: false +Style/IfUnlessModifier: + Enabled: false +Naming/AccessorMethodName: + Enabled: false +Naming/MethodParameterName: + Enabled: false +Layout/SpaceInsideHashLiteralBraces: + Enabled: false +Layout/FirstHashElementIndentation: + Enabled: false +Style/TrailingCommaInHashLiteral: + Enabled: false +Style/TrailingCommaInArrayLiteral: + Enabled: false +Layout/EmptyLinesAroundClassBody: + Enabled: false +Style/WordArray: + Enabled: false +Style/RedundantReturn: # https://github.com/rubocop/rubocop/issues/12394 + Enabled: false +Style/RedundantAssignment: + Enabled: false +Lint/LiteralAsCondition: + Enabled: false +Naming/VariableNumber: + Enabled: false diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock new file mode 100644 index 0000000..e4a4ff7 --- /dev/null +++ b/.speakeasy/gen.lock @@ -0,0 +1,3318 @@ +lockVersion: 2.0.0 +id: d2478a86-fb86-4074-8de4-0bca135bde3e +management: + docChecksum: d6278ac22a6b5f59b6dc31cdc6622eaf + docVersion: 0.1.0 + speakeasyVersion: 1.541.2 + generationVersion: 2.595.4 + releaseVersion: 0.0.1 + configChecksum: f24d774bcfbc81e3694628494398f6d9 +features: + ruby: + core: 3.8.0 + deprecations: 2.81.2 + flattening: 2.81.1 + globalSecurity: 2.81.8 + globalSecurityFlattening: 0.1.0 + globalServerURLs: 2.82.3 + groups: 2.81.2 + methodSecurity: 2.82.2 + nameOverrides: 2.81.2 + responseFormat: 0.1.0 + serverIDs: 2.81.1 + unions: 0.1.0 + webhooks: 1.0.0 +generatedFiles: + - .gitattributes + - .rubocop.yml + - Gemfile + - Gemfile.lock + - Rakefile + - USAGE.md + - docs/models/errors/alreadycanceledsubscription.md + - docs/models/errors/expiredcheckouterror.md + - docs/models/errors/httpvalidationerror.md + - docs/models/errors/notpermitted.md + - docs/models/errors/refundamounttoohigh.md + - docs/models/errors/refundedalready.md + - docs/models/errors/resourcenotfound.md + - docs/models/errors/unauthorized.md + - docs/models/operations/benefitidfilter.md + - docs/models/operations/benefitscreateresponse.md + - docs/models/operations/benefitsdeleterequest.md + - docs/models/operations/benefitsdeleteresponse.md + - docs/models/operations/benefitsgetrequest.md + - docs/models/operations/benefitsgetresponse.md + - docs/models/operations/benefitsgrantsrequest.md + - docs/models/operations/benefitsgrantsresponse.md + - docs/models/operations/benefitslistrequest.md + - docs/models/operations/benefitslistresponse.md + - docs/models/operations/benefitsupdatebenefitupdate.md + - docs/models/operations/benefitsupdaterequest.md + - docs/models/operations/benefitsupdateresponse.md + - docs/models/operations/benefittypefilter.md + - docs/models/operations/checkoutidfilter.md + - docs/models/operations/checkoutlinkscreatecheckoutlinkcreate.md + - docs/models/operations/checkoutlinkscreateresponse.md + - docs/models/operations/checkoutlinksdeleterequest.md + - docs/models/operations/checkoutlinksdeleteresponse.md + - docs/models/operations/checkoutlinksgetrequest.md + - docs/models/operations/checkoutlinksgetresponse.md + - docs/models/operations/checkoutlinkslistqueryparamorganizationidfilter.md + - docs/models/operations/checkoutlinkslistqueryparamproductidfilter.md + - docs/models/operations/checkoutlinkslistrequest.md + - docs/models/operations/checkoutlinkslistresponse.md + - docs/models/operations/checkoutlinksupdaterequest.md + - docs/models/operations/checkoutlinksupdateresponse.md + - docs/models/operations/checkoutsclientgetrequest.md + - docs/models/operations/checkoutsclientgetresponse.md + - docs/models/operations/checkoutscreateresponse.md + - docs/models/operations/checkoutsgetrequest.md + - docs/models/operations/checkoutsgetresponse.md + - docs/models/operations/checkoutslistqueryparamorganizationidfilter.md + - docs/models/operations/checkoutslistqueryparamproductidfilter.md + - docs/models/operations/checkoutslistrequest.md + - docs/models/operations/checkoutslistresponse.md + - docs/models/operations/customeridfilter.md + - docs/models/operations/customermetersgetrequest.md + - docs/models/operations/customermetersgetresponse.md + - docs/models/operations/customermeterslistqueryparamcustomeridfilter.md + - docs/models/operations/customermeterslistqueryparamexternalcustomeridfilter.md + - docs/models/operations/customermeterslistqueryparamorganizationidfilter.md + - docs/models/operations/customermeterslistrequest.md + - docs/models/operations/customermeterslistresponse.md + - docs/models/operations/customerportalbenefitgrantsgetrequest.md + - docs/models/operations/customerportalbenefitgrantsgetresponse.md + - docs/models/operations/customerportalbenefitgrantsgetsecurity.md + - docs/models/operations/customerportalbenefitgrantslistqueryparambenefitidfilter.md + - docs/models/operations/customerportalbenefitgrantslistqueryparamorganizationidfilter.md + - docs/models/operations/customerportalbenefitgrantslistrequest.md + - docs/models/operations/customerportalbenefitgrantslistresponse.md + - docs/models/operations/customerportalbenefitgrantslistsecurity.md + - docs/models/operations/customerportalbenefitgrantsupdaterequest.md + - docs/models/operations/customerportalbenefitgrantsupdateresponse.md + - docs/models/operations/customerportalbenefitgrantsupdatesecurity.md + - docs/models/operations/customerportalcustomermetersgetrequest.md + - docs/models/operations/customerportalcustomermetersgetresponse.md + - docs/models/operations/customerportalcustomermetersgetsecurity.md + - docs/models/operations/customerportalcustomermeterslistrequest.md + - docs/models/operations/customerportalcustomermeterslistresponse.md + - docs/models/operations/customerportalcustomermeterslistsecurity.md + - docs/models/operations/customerportalcustomersaddpaymentmethodresponse.md + - docs/models/operations/customerportalcustomersaddpaymentmethodresponsecustomerportalcustomersaddpaymentmethod.md + - docs/models/operations/customerportalcustomersaddpaymentmethodsecurity.md + - docs/models/operations/customerportalcustomersdeletepaymentmethodrequest.md + - docs/models/operations/customerportalcustomersdeletepaymentmethodresponse.md + - docs/models/operations/customerportalcustomersdeletepaymentmethodsecurity.md + - docs/models/operations/customerportalcustomersgetpaymentmethodsrequest.md + - docs/models/operations/customerportalcustomersgetpaymentmethodsresponse.md + - docs/models/operations/customerportalcustomersgetpaymentmethodssecurity.md + - docs/models/operations/customerportalcustomersgetresponse.md + - docs/models/operations/customerportalcustomersgetsecurity.md + - docs/models/operations/customerportalcustomersupdateresponse.md + - docs/models/operations/customerportalcustomersupdatesecurity.md + - docs/models/operations/customerportaldownloadablescustomerportaldownloadablesgetrequest.md + - docs/models/operations/customerportaldownloadablescustomerportaldownloadablesgetresponse.md + - docs/models/operations/customerportaldownloadableslistqueryparambenefitidfilter.md + - docs/models/operations/customerportaldownloadableslistqueryparamorganizationidfilter.md + - docs/models/operations/customerportaldownloadableslistrequest.md + - docs/models/operations/customerportaldownloadableslistresponse.md + - docs/models/operations/customerportaldownloadableslistsecurity.md + - docs/models/operations/customerportallicensekeysactivateresponse.md + - docs/models/operations/customerportallicensekeysdeactivateresponse.md + - docs/models/operations/customerportallicensekeysgetrequest.md + - docs/models/operations/customerportallicensekeysgetresponse.md + - docs/models/operations/customerportallicensekeysgetsecurity.md + - docs/models/operations/customerportallicensekeyslistqueryparamorganizationidfilter.md + - docs/models/operations/customerportallicensekeyslistrequest.md + - docs/models/operations/customerportallicensekeyslistresponse.md + - docs/models/operations/customerportallicensekeyslistsecurity.md + - docs/models/operations/customerportallicensekeysvalidateresponse.md + - docs/models/operations/customerportalordersgetrequest.md + - docs/models/operations/customerportalordersgetresponse.md + - docs/models/operations/customerportalordersgetsecurity.md + - docs/models/operations/customerportalordersinvoicerequest.md + - docs/models/operations/customerportalordersinvoiceresponse.md + - docs/models/operations/customerportalordersinvoicesecurity.md + - docs/models/operations/customerportalorderslistqueryparamorganizationidfilter.md + - docs/models/operations/customerportalorderslistqueryparamproductbillingtypefilter.md + - docs/models/operations/customerportalorderslistqueryparamproductidfilter.md + - docs/models/operations/customerportalorderslistqueryparamsubscriptionidfilter.md + - docs/models/operations/customerportalorderslistrequest.md + - docs/models/operations/customerportalorderslistresponse.md + - docs/models/operations/customerportalorderslistsecurity.md + - docs/models/operations/customerportalorganizationsgetrequest.md + - docs/models/operations/customerportalorganizationsgetresponse.md + - docs/models/operations/customerportalsubscriptionscancelrequest.md + - docs/models/operations/customerportalsubscriptionscancelresponse.md + - docs/models/operations/customerportalsubscriptionscancelsecurity.md + - docs/models/operations/customerportalsubscriptionsgetrequest.md + - docs/models/operations/customerportalsubscriptionsgetresponse.md + - docs/models/operations/customerportalsubscriptionsgetsecurity.md + - docs/models/operations/customerportalsubscriptionslistqueryparamorganizationidfilter.md + - docs/models/operations/customerportalsubscriptionslistqueryparamproductidfilter.md + - docs/models/operations/customerportalsubscriptionslistrequest.md + - docs/models/operations/customerportalsubscriptionslistresponse.md + - docs/models/operations/customerportalsubscriptionslistsecurity.md + - docs/models/operations/customerportalsubscriptionsupdaterequest.md + - docs/models/operations/customerportalsubscriptionsupdateresponse.md + - docs/models/operations/customerportalsubscriptionsupdatesecurity.md + - docs/models/operations/customerscreateresponse.md + - docs/models/operations/customersdeleteexternalrequest.md + - docs/models/operations/customersdeleteexternalresponse.md + - docs/models/operations/customersdeleterequest.md + - docs/models/operations/customersdeleteresponse.md + - docs/models/operations/customersessionscreatecustomersessioncreate.md + - docs/models/operations/customersessionscreateresponse.md + - docs/models/operations/customersgetexternalrequest.md + - docs/models/operations/customersgetexternalresponse.md + - docs/models/operations/customersgetrequest.md + - docs/models/operations/customersgetresponse.md + - docs/models/operations/customersgetstateexternalrequest.md + - docs/models/operations/customersgetstateexternalresponse.md + - docs/models/operations/customersgetstaterequest.md + - docs/models/operations/customersgetstateresponse.md + - docs/models/operations/customerslistqueryparamorganizationidfilter.md + - docs/models/operations/customerslistrequest.md + - docs/models/operations/customerslistresponse.md + - docs/models/operations/customersupdateexternalrequest.md + - docs/models/operations/customersupdateexternalresponse.md + - docs/models/operations/customersupdaterequest.md + - docs/models/operations/customersupdateresponse.md + - docs/models/operations/customfieldscreateresponse.md + - docs/models/operations/customfieldsdeleterequest.md + - docs/models/operations/customfieldsdeleteresponse.md + - docs/models/operations/customfieldsgetrequest.md + - docs/models/operations/customfieldsgetresponse.md + - docs/models/operations/customfieldslistqueryparamorganizationidfilter.md + - docs/models/operations/customfieldslistrequest.md + - docs/models/operations/customfieldslistresponse.md + - docs/models/operations/customfieldsupdaterequest.md + - docs/models/operations/customfieldsupdateresponse.md + - docs/models/operations/customfieldtypefilter.md + - docs/models/operations/discountidfilter.md + - docs/models/operations/discountscreateresponse.md + - docs/models/operations/discountsdeleterequest.md + - docs/models/operations/discountsdeleteresponse.md + - docs/models/operations/discountsgetrequest.md + - docs/models/operations/discountsgetresponse.md + - docs/models/operations/discountslistqueryparamorganizationidfilter.md + - docs/models/operations/discountslistrequest.md + - docs/models/operations/discountslistresponse.md + - docs/models/operations/discountsupdaterequest.md + - docs/models/operations/discountsupdateresponse.md + - docs/models/operations/eventsgetrequest.md + - docs/models/operations/eventsgetresponse.md + - docs/models/operations/eventsingestresponse.md + - docs/models/operations/eventslistnamesqueryparamcustomeridfilter.md + - docs/models/operations/eventslistnamesqueryparamorganizationidfilter.md + - docs/models/operations/eventslistnamesrequest.md + - docs/models/operations/eventslistnamesresponse.md + - docs/models/operations/eventslistqueryparamcustomeridfilter.md + - docs/models/operations/eventslistqueryparamorganizationidfilter.md + - docs/models/operations/eventslistrequest.md + - docs/models/operations/eventslistresponse.md + - docs/models/operations/externalcustomeridfilter.md + - docs/models/operations/filescreateresponse.md + - docs/models/operations/filesdeleterequest.md + - docs/models/operations/filesdeleteresponse.md + - docs/models/operations/fileslistrequest.md + - docs/models/operations/fileslistresponse.md + - docs/models/operations/filesupdaterequest.md + - docs/models/operations/filesupdateresponse.md + - docs/models/operations/filesupdateresponsefilesupdate.md + - docs/models/operations/filesuploadedrequest.md + - docs/models/operations/filesuploadedresponse.md + - docs/models/operations/filesuploadedresponsefilesuploaded.md + - docs/models/operations/licensekeysgetactivationrequest.md + - docs/models/operations/licensekeysgetactivationresponse.md + - docs/models/operations/licensekeysgetrequest.md + - docs/models/operations/licensekeysgetresponse.md + - docs/models/operations/licensekeyslistqueryparamorganizationidfilter.md + - docs/models/operations/licensekeyslistrequest.md + - docs/models/operations/licensekeyslistresponse.md + - docs/models/operations/licensekeysupdaterequest.md + - docs/models/operations/licensekeysupdateresponse.md + - docs/models/operations/meteridfilter.md + - docs/models/operations/meterscreateresponse.md + - docs/models/operations/metersgetrequest.md + - docs/models/operations/metersgetresponse.md + - docs/models/operations/meterslistqueryparamorganizationidfilter.md + - docs/models/operations/meterslistrequest.md + - docs/models/operations/meterslistresponse.md + - docs/models/operations/metersquantitiesqueryparamcustomeridfilter.md + - docs/models/operations/metersquantitiesqueryparamexternalcustomeridfilter.md + - docs/models/operations/metersquantitiesrequest.md + - docs/models/operations/metersquantitiesresponse.md + - docs/models/operations/metersupdaterequest.md + - docs/models/operations/metersupdateresponse.md + - docs/models/operations/metricsgetqueryparamcustomeridfilter.md + - docs/models/operations/metricsgetqueryparamorganizationidfilter.md + - docs/models/operations/metricsgetqueryparamproductidfilter.md + - docs/models/operations/metricsgetrequest.md + - docs/models/operations/metricsgetresponse.md + - docs/models/operations/metricslimitsresponse.md + - docs/models/operations/namefilter.md + - docs/models/operations/oauth2authorizeresponse.md + - docs/models/operations/oauth2authorizeresponseoauth2authorize.md + - docs/models/operations/oauth2clientslistrequest.md + - docs/models/operations/oauth2clientslistresponse.md + - docs/models/operations/oauth2clientsoauth2createclientresponse.md + - docs/models/operations/oauth2clientsoauth2deleteclientrequest.md + - docs/models/operations/oauth2clientsoauth2deleteclientresponse.md + - docs/models/operations/oauth2clientsoauth2getclientrequest.md + - docs/models/operations/oauth2clientsoauth2getclientresponse.md + - docs/models/operations/oauth2clientsoauth2updateclientrequest.md + - docs/models/operations/oauth2clientsoauth2updateclientresponse.md + - docs/models/operations/oauth2introspecttokenresponse.md + - docs/models/operations/oauth2requesttokenrequestbody.md + - docs/models/operations/oauth2requesttokenresponse.md + - docs/models/operations/oauth2revoketokenresponse.md + - docs/models/operations/oauth2userinforesponse.md + - docs/models/operations/oauth2userinforesponseoauth2userinfo.md + - docs/models/operations/orderidfilter.md + - docs/models/operations/ordersgetrequest.md + - docs/models/operations/ordersgetresponse.md + - docs/models/operations/ordersinvoicerequest.md + - docs/models/operations/ordersinvoiceresponse.md + - docs/models/operations/orderslistqueryparamcustomeridfilter.md + - docs/models/operations/orderslistqueryparamorganizationidfilter.md + - docs/models/operations/orderslistqueryparamproductidfilter.md + - docs/models/operations/orderslistrequest.md + - docs/models/operations/orderslistresponse.md + - docs/models/operations/organizationid.md + - docs/models/operations/organizationidfilter.md + - docs/models/operations/organizationscreateresponse.md + - docs/models/operations/organizationsgetrequest.md + - docs/models/operations/organizationsgetresponse.md + - docs/models/operations/organizationslistrequest.md + - docs/models/operations/organizationslistresponse.md + - docs/models/operations/organizationsupdaterequest.md + - docs/models/operations/organizationsupdateresponse.md + - docs/models/operations/productbillingtypefilter.md + - docs/models/operations/productidfilter.md + - docs/models/operations/productscreateresponse.md + - docs/models/operations/productsgetrequest.md + - docs/models/operations/productsgetresponse.md + - docs/models/operations/productslistqueryparamorganizationidfilter.md + - docs/models/operations/productslistrequest.md + - docs/models/operations/productslistresponse.md + - docs/models/operations/productsupdatebenefitsrequest.md + - docs/models/operations/productsupdatebenefitsresponse.md + - docs/models/operations/productsupdaterequest.md + - docs/models/operations/productsupdateresponse.md + - docs/models/operations/queryparambenefitidfilter.md + - docs/models/operations/queryparambenefittypefilter.md + - docs/models/operations/queryparamcheckoutidfilter.md + - docs/models/operations/queryparamcustomeridfilter.md + - docs/models/operations/queryparamdiscountidfilter.md + - docs/models/operations/queryparamexternalcustomeridfilter.md + - docs/models/operations/queryparammeteridfilter.md + - docs/models/operations/queryparamorderidfilter.md + - docs/models/operations/queryparamorganizationidfilter.md + - docs/models/operations/queryparamproductbillingtypefilter.md + - docs/models/operations/queryparamproductidfilter.md + - docs/models/operations/queryparamsourcefilter.md + - docs/models/operations/queryparamsubscriptionidfilter.md + - docs/models/operations/refundidfilter.md + - docs/models/operations/refundscreateresponse.md + - docs/models/operations/refundslistqueryparamcustomeridfilter.md + - docs/models/operations/refundslistqueryparamorganizationidfilter.md + - docs/models/operations/refundslistrequest.md + - docs/models/operations/refundslistresponse.md + - docs/models/operations/sourcefilter.md + - docs/models/operations/subscriptionidfilter.md + - docs/models/operations/subscriptionsexportrequest.md + - docs/models/operations/subscriptionsexportresponse.md + - docs/models/operations/subscriptionsgetrequest.md + - docs/models/operations/subscriptionsgetresponse.md + - docs/models/operations/subscriptionslistrequest.md + - docs/models/operations/subscriptionslistresponse.md + - docs/models/operations/subscriptionsrevokerequest.md + - docs/models/operations/subscriptionsrevokeresponse.md + - docs/models/operations/subscriptionsupdaterequest.md + - docs/models/operations/subscriptionsupdateresponse.md + - docs/models/shared/address.md + - docs/models/shared/aggregation.md + - docs/models/shared/attachedcustomfield.md + - docs/models/shared/attachedcustomfieldcreate.md + - docs/models/shared/authorizationcodetokenrequest.md + - docs/models/shared/authorizeorganization.md + - docs/models/shared/authorizeresponseorganization.md + - docs/models/shared/authorizeresponseuser.md + - docs/models/shared/authorizeuser.md + - docs/models/shared/benefit.md + - docs/models/shared/benefitcreate.md + - docs/models/shared/benefitcustom.md + - docs/models/shared/benefitcustomcreate.md + - docs/models/shared/benefitcustomcreatemetadata.md + - docs/models/shared/benefitcustomcreateproperties.md + - docs/models/shared/benefitcustommetadata.md + - docs/models/shared/benefitcustomproperties.md + - docs/models/shared/benefitcustomsubscriber.md + - docs/models/shared/benefitcustomsubscribermetadata.md + - docs/models/shared/benefitcustomsubscriberproperties.md + - docs/models/shared/benefitcustomupdate.md + - docs/models/shared/benefitcustomupdatemetadata.md + - docs/models/shared/benefitdiscord.md + - docs/models/shared/benefitdiscordcreate.md + - docs/models/shared/benefitdiscordcreatemetadata.md + - docs/models/shared/benefitdiscordcreateproperties.md + - docs/models/shared/benefitdiscordmetadata.md + - docs/models/shared/benefitdiscordproperties.md + - docs/models/shared/benefitdiscordsubscriber.md + - docs/models/shared/benefitdiscordsubscribermetadata.md + - docs/models/shared/benefitdiscordsubscriberproperties.md + - docs/models/shared/benefitdiscordupdate.md + - docs/models/shared/benefitdiscordupdatemetadata.md + - docs/models/shared/benefitdownloadables.md + - docs/models/shared/benefitdownloadablescreate.md + - docs/models/shared/benefitdownloadablescreatemetadata.md + - docs/models/shared/benefitdownloadablescreateproperties.md + - docs/models/shared/benefitdownloadablesmetadata.md + - docs/models/shared/benefitdownloadablesproperties.md + - docs/models/shared/benefitdownloadablessubscriber.md + - docs/models/shared/benefitdownloadablessubscribermetadata.md + - docs/models/shared/benefitdownloadablessubscriberproperties.md + - docs/models/shared/benefitdownloadablesupdate.md + - docs/models/shared/benefitdownloadablesupdatemetadata.md + - docs/models/shared/benefitgithubrepository.md + - docs/models/shared/benefitgithubrepositorycreate.md + - docs/models/shared/benefitgithubrepositorycreatemetadata.md + - docs/models/shared/benefitgithubrepositorycreateproperties.md + - docs/models/shared/benefitgithubrepositorycreatepropertiespermission.md + - docs/models/shared/benefitgithubrepositorymetadata.md + - docs/models/shared/benefitgithubrepositoryproperties.md + - docs/models/shared/benefitgithubrepositorysubscriber.md + - docs/models/shared/benefitgithubrepositorysubscribermetadata.md + - docs/models/shared/benefitgithubrepositorysubscriberproperties.md + - docs/models/shared/benefitgithubrepositoryupdate.md + - docs/models/shared/benefitgithubrepositoryupdatemetadata.md + - docs/models/shared/benefitgrant.md + - docs/models/shared/benefitgrantcustomproperties.md + - docs/models/shared/benefitgrantdiscordproperties.md + - docs/models/shared/benefitgrantdownloadablesproperties.md + - docs/models/shared/benefitgrantgithubrepositoryproperties.md + - docs/models/shared/benefitgrantgithubrepositorypropertiespermission.md + - docs/models/shared/benefitgrantlicensekeysproperties.md + - docs/models/shared/benefitgrantmetercreditproperties.md + - docs/models/shared/benefitgrantwebhook.md + - docs/models/shared/benefitgrantwebhookproperties.md + - docs/models/shared/benefitlicensekeyactivationcreateproperties.md + - docs/models/shared/benefitlicensekeyactivationproperties.md + - docs/models/shared/benefitlicensekeyexpirationproperties.md + - docs/models/shared/benefitlicensekeys.md + - docs/models/shared/benefitlicensekeyscreate.md + - docs/models/shared/benefitlicensekeyscreatemetadata.md + - docs/models/shared/benefitlicensekeyscreateproperties.md + - docs/models/shared/benefitlicensekeysmetadata.md + - docs/models/shared/benefitlicensekeysproperties.md + - docs/models/shared/benefitlicensekeyssubscriber.md + - docs/models/shared/benefitlicensekeyssubscribermetadata.md + - docs/models/shared/benefitlicensekeyssubscriberproperties.md + - docs/models/shared/benefitlicensekeysupdate.md + - docs/models/shared/benefitlicensekeysupdatemetadata.md + - docs/models/shared/benefitmetercredit.md + - docs/models/shared/benefitmetercreditcreate.md + - docs/models/shared/benefitmetercreditcreatemetadata.md + - docs/models/shared/benefitmetercreditcreateproperties.md + - docs/models/shared/benefitmetercreditmetadata.md + - docs/models/shared/benefitmetercreditproperties.md + - docs/models/shared/benefitmetercreditsubscriber.md + - docs/models/shared/benefitmetercreditsubscribermetadata.md + - docs/models/shared/benefitmetercreditsubscriberproperties.md + - docs/models/shared/benefitmetercreditupdate.md + - docs/models/shared/benefitmetercreditupdatemetadata.md + - docs/models/shared/benefitpublic.md + - docs/models/shared/benefitsortproperty.md + - docs/models/shared/benefittype.md + - docs/models/shared/checkout.md + - docs/models/shared/checkoutcreate.md + - docs/models/shared/checkoutcreatecustomermetadata.md + - docs/models/shared/checkoutcreatecustomfielddata.md + - docs/models/shared/checkoutcreatemetadata.md + - docs/models/shared/checkoutcustomerbillingaddressfields.md + - docs/models/shared/checkoutcustomfielddata.md + - docs/models/shared/checkoutdiscount.md + - docs/models/shared/checkoutdiscountfixedonceforeverduration.md + - docs/models/shared/checkoutdiscountfixedrepeatduration.md + - docs/models/shared/checkoutdiscountpercentageonceforeverduration.md + - docs/models/shared/checkoutdiscountpercentagerepeatduration.md + - docs/models/shared/checkoutlink.md + - docs/models/shared/checkoutlinkcreateproduct.md + - docs/models/shared/checkoutlinkcreateproductmetadata.md + - docs/models/shared/checkoutlinkcreateproductprice.md + - docs/models/shared/checkoutlinkcreateproductpricemetadata.md + - docs/models/shared/checkoutlinkcreateproducts.md + - docs/models/shared/checkoutlinkcreateproductsmetadata.md + - docs/models/shared/checkoutlinkdiscount.md + - docs/models/shared/checkoutlinkmetadata.md + - docs/models/shared/checkoutlinkproduct.md + - docs/models/shared/checkoutlinkproductmetadata.md + - docs/models/shared/checkoutlinkproductprices.md + - docs/models/shared/checkoutlinksortproperty.md + - docs/models/shared/checkoutlinkupdate.md + - docs/models/shared/checkoutlinkupdatemetadata.md + - docs/models/shared/checkoutmetadata.md + - docs/models/shared/checkoutproduct.md + - docs/models/shared/checkoutproductprice.md + - docs/models/shared/checkoutproductprices.md + - docs/models/shared/checkoutpublic.md + - docs/models/shared/checkoutpubliccustomfielddata.md + - docs/models/shared/checkoutpublicdiscount.md + - docs/models/shared/checkoutpublicproductprice.md + - docs/models/shared/checkoutsortproperty.md + - docs/models/shared/checkoutstatus.md + - docs/models/shared/clauses.md + - docs/models/shared/conditions.md + - docs/models/shared/countaggregation.md + - docs/models/shared/customer.md + - docs/models/shared/customerbenefitgrant.md + - docs/models/shared/customerbenefitgrantcustom.md + - docs/models/shared/customerbenefitgrantcustomupdate.md + - docs/models/shared/customerbenefitgrantdiscord.md + - docs/models/shared/customerbenefitgrantdiscordpropertiesupdate.md + - docs/models/shared/customerbenefitgrantdiscordupdate.md + - docs/models/shared/customerbenefitgrantdownloadables.md + - docs/models/shared/customerbenefitgrantdownloadablesupdate.md + - docs/models/shared/customerbenefitgrantgithubrepository.md + - docs/models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.md + - docs/models/shared/customerbenefitgrantgithubrepositoryupdate.md + - docs/models/shared/customerbenefitgrantlicensekeys.md + - docs/models/shared/customerbenefitgrantlicensekeysupdate.md + - docs/models/shared/customerbenefitgrantmetercredit.md + - docs/models/shared/customerbenefitgrantmetercreditupdate.md + - docs/models/shared/customerbenefitgrantsortproperty.md + - docs/models/shared/customerbenefitgrantupdate.md + - docs/models/shared/customercancellationreason.md + - docs/models/shared/customercreate.md + - docs/models/shared/customercreatemetadata.md + - docs/models/shared/customercreatetaxid.md + - docs/models/shared/customercustomermeter.md + - docs/models/shared/customercustomermetermeter.md + - docs/models/shared/customercustomermetersortproperty.md + - docs/models/shared/customermetadata.md + - docs/models/shared/customermetadata1.md + - docs/models/shared/customermeter.md + - docs/models/shared/customermetersortproperty.md + - docs/models/shared/customerorder.md + - docs/models/shared/customerorderinvoice.md + - docs/models/shared/customerorderproduct.md + - docs/models/shared/customerorderproductprices.md + - docs/models/shared/customerordersortproperty.md + - docs/models/shared/customerordersubscription.md + - docs/models/shared/customerorganization.md + - docs/models/shared/customerpaymentmethodcreate.md + - docs/models/shared/customerportalcustomer.md + - docs/models/shared/customerportalcustomertaxid.md + - docs/models/shared/customerportalcustomerupdate.md + - docs/models/shared/customerportaloauthaccount.md + - docs/models/shared/customerproduct.md + - docs/models/shared/customerproductprices.md + - docs/models/shared/customersession.md + - docs/models/shared/customersessioncustomerexternalidcreate.md + - docs/models/shared/customersessioncustomeridcreate.md + - docs/models/shared/customersortproperty.md + - docs/models/shared/customerstate.md + - docs/models/shared/customerstatebenefitgrant.md + - docs/models/shared/customerstatebenefitgrantproperties.md + - docs/models/shared/customerstatemetadata.md + - docs/models/shared/customerstatemeter.md + - docs/models/shared/customerstatesubscription.md + - docs/models/shared/customerstatesubscriptioncustomfielddata.md + - docs/models/shared/customerstatesubscriptionmetadata.md + - docs/models/shared/customerstatesubscriptionmeter.md + - docs/models/shared/customerstatetaxid.md + - docs/models/shared/customersubscription.md + - docs/models/shared/customersubscriptioncancel.md + - docs/models/shared/customersubscriptionmeter.md + - docs/models/shared/customersubscriptionmetermeter.md + - docs/models/shared/customersubscriptionprices.md + - docs/models/shared/customersubscriptionproduct.md + - docs/models/shared/customersubscriptionproductprices.md + - docs/models/shared/customersubscriptionsortproperty.md + - docs/models/shared/customersubscriptionupdate.md + - docs/models/shared/customersubscriptionupdateproduct.md + - docs/models/shared/customertaxid.md + - docs/models/shared/customerupdate.md + - docs/models/shared/customerupdateexternalid.md + - docs/models/shared/customerupdateexternalidmetadata.md + - docs/models/shared/customerupdateexternalidtaxid.md + - docs/models/shared/customerupdatemetadata.md + - docs/models/shared/customerupdatetaxid.md + - docs/models/shared/customfield.md + - docs/models/shared/customfieldcheckbox.md + - docs/models/shared/customfieldcheckboxmetadata.md + - docs/models/shared/customfieldcheckboxproperties.md + - docs/models/shared/customfieldcreate.md + - docs/models/shared/customfieldcreatecheckbox.md + - docs/models/shared/customfieldcreatecheckboxmetadata.md + - docs/models/shared/customfieldcreatedate.md + - docs/models/shared/customfieldcreatedatemetadata.md + - docs/models/shared/customfieldcreatenumber.md + - docs/models/shared/customfieldcreatenumbermetadata.md + - docs/models/shared/customfieldcreateselect.md + - docs/models/shared/customfieldcreateselectmetadata.md + - docs/models/shared/customfieldcreatetext.md + - docs/models/shared/customfieldcreatetextmetadata.md + - docs/models/shared/customfielddata.md + - docs/models/shared/customfielddate.md + - docs/models/shared/customfielddatemetadata.md + - docs/models/shared/customfielddateproperties.md + - docs/models/shared/customfieldnumber.md + - docs/models/shared/customfieldnumbermetadata.md + - docs/models/shared/customfieldnumberproperties.md + - docs/models/shared/customfieldselect.md + - docs/models/shared/customfieldselectmetadata.md + - docs/models/shared/customfieldselectoption.md + - docs/models/shared/customfieldselectproperties.md + - docs/models/shared/customfieldsortproperty.md + - docs/models/shared/customfieldtext.md + - docs/models/shared/customfieldtextmetadata.md + - docs/models/shared/customfieldtextproperties.md + - docs/models/shared/customfieldtype.md + - docs/models/shared/customfieldupdate.md + - docs/models/shared/customfieldupdatecheckbox.md + - docs/models/shared/customfieldupdatecheckboxmetadata.md + - docs/models/shared/customfieldupdatedate.md + - docs/models/shared/customfieldupdatedatemetadata.md + - docs/models/shared/customfieldupdatenumber.md + - docs/models/shared/customfieldupdatenumbermetadata.md + - docs/models/shared/customfieldupdateselect.md + - docs/models/shared/customfieldupdateselectmetadata.md + - docs/models/shared/customfieldupdatetext.md + - docs/models/shared/customfieldupdatetextmetadata.md + - docs/models/shared/discount.md + - docs/models/shared/discountcreate.md + - docs/models/shared/discountduration.md + - docs/models/shared/discountfixedonceforeverduration.md + - docs/models/shared/discountfixedonceforeverdurationbase.md + - docs/models/shared/discountfixedonceforeverdurationbasemetadata.md + - docs/models/shared/discountfixedonceforeverdurationcreate.md + - docs/models/shared/discountfixedonceforeverdurationcreatemetadata.md + - docs/models/shared/discountfixedonceforeverdurationmetadata.md + - docs/models/shared/discountfixedrepeatduration.md + - docs/models/shared/discountfixedrepeatdurationbase.md + - docs/models/shared/discountfixedrepeatdurationbasemetadata.md + - docs/models/shared/discountfixedrepeatdurationcreate.md + - docs/models/shared/discountfixedrepeatdurationcreatemetadata.md + - docs/models/shared/discountfixedrepeatdurationmetadata.md + - docs/models/shared/discountpercentageonceforeverduration.md + - docs/models/shared/discountpercentageonceforeverdurationbase.md + - docs/models/shared/discountpercentageonceforeverdurationbasemetadata.md + - docs/models/shared/discountpercentageonceforeverdurationcreate.md + - docs/models/shared/discountpercentageonceforeverdurationcreatemetadata.md + - docs/models/shared/discountpercentageonceforeverdurationmetadata.md + - docs/models/shared/discountpercentagerepeatduration.md + - docs/models/shared/discountpercentagerepeatdurationbase.md + - docs/models/shared/discountpercentagerepeatdurationbasemetadata.md + - docs/models/shared/discountpercentagerepeatdurationcreate.md + - docs/models/shared/discountpercentagerepeatdurationcreatemetadata.md + - docs/models/shared/discountpercentagerepeatdurationmetadata.md + - docs/models/shared/discountproduct.md + - docs/models/shared/discountproductmetadata.md + - docs/models/shared/discountsortproperty.md + - docs/models/shared/discounttype.md + - docs/models/shared/discountupdate.md + - docs/models/shared/discountupdatemetadata.md + - docs/models/shared/downloadablefilecreate.md + - docs/models/shared/downloadablefileread.md + - docs/models/shared/downloadableread.md + - docs/models/shared/event.md + - docs/models/shared/eventcreatecustomer.md + - docs/models/shared/eventcreatecustomermetadata.md + - docs/models/shared/eventcreateexternalcustomer.md + - docs/models/shared/eventcreateexternalcustomermetadata.md + - docs/models/shared/eventmetadata.md + - docs/models/shared/eventname.md + - docs/models/shared/eventnamessortproperty.md + - docs/models/shared/events.md + - docs/models/shared/eventsingest.md + - docs/models/shared/eventsingestresponse.md + - docs/models/shared/eventsortproperty.md + - docs/models/shared/eventsource.md + - docs/models/shared/existingproductprice.md + - docs/models/shared/filecreate.md + - docs/models/shared/filedownload.md + - docs/models/shared/filepatch.md + - docs/models/shared/fileread.md + - docs/models/shared/fileservicetypes.md + - docs/models/shared/fileupload.md + - docs/models/shared/fileuploadcompleted.md + - docs/models/shared/filter.md + - docs/models/shared/filterclause.md + - docs/models/shared/filterconjunction.md + - docs/models/shared/filteroperator.md + - docs/models/shared/func.md + - docs/models/shared/granttypes.md + - docs/models/shared/introspecttokenrequest.md + - docs/models/shared/introspecttokenrequesttokentypehint.md + - docs/models/shared/introspecttokenresponse.md + - docs/models/shared/items.md + - docs/models/shared/legacyrecurringproductprice.md + - docs/models/shared/legacyrecurringproductpricecustom.md + - docs/models/shared/legacyrecurringproductpricefixed.md + - docs/models/shared/legacyrecurringproductpricefree.md + - docs/models/shared/licensekeyactivate.md + - docs/models/shared/licensekeyactivateconditions.md + - docs/models/shared/licensekeyactivatemeta.md + - docs/models/shared/licensekeyactivationbase.md + - docs/models/shared/licensekeyactivationread.md + - docs/models/shared/licensekeyactivationreadmeta.md + - docs/models/shared/licensekeycustomer.md + - docs/models/shared/licensekeycustomermetadata.md + - docs/models/shared/licensekeycustomertaxid.md + - docs/models/shared/licensekeydeactivate.md + - docs/models/shared/licensekeyread.md + - docs/models/shared/licensekeystatus.md + - docs/models/shared/licensekeyupdate.md + - docs/models/shared/licensekeyvalidate.md + - docs/models/shared/licensekeywithactivations.md + - docs/models/shared/listresourcebenefit.md + - docs/models/shared/listresourcebenefitgrant.md + - docs/models/shared/listresourcecheckout.md + - docs/models/shared/listresourcecheckoutlink.md + - docs/models/shared/listresourcecustomer.md + - docs/models/shared/listresourcecustomerbenefitgrant.md + - docs/models/shared/listresourcecustomercustomermeter.md + - docs/models/shared/listresourcecustomermeter.md + - docs/models/shared/listresourcecustomerorder.md + - docs/models/shared/listresourcecustomersubscription.md + - docs/models/shared/listresourcecustomfield.md + - docs/models/shared/listresourcediscount.md + - docs/models/shared/listresourcedownloadableread.md + - docs/models/shared/listresourceevent.md + - docs/models/shared/listresourceeventname.md + - docs/models/shared/listresourcefileread.md + - docs/models/shared/listresourcelicensekeyread.md + - docs/models/shared/listresourcemeter.md + - docs/models/shared/listresourceoauth2client.md + - docs/models/shared/listresourceorder.md + - docs/models/shared/listresourceorganization.md + - docs/models/shared/listresourceproduct.md + - docs/models/shared/listresourcerefund.md + - docs/models/shared/listresourcesubscription.md + - docs/models/shared/listresourceunionpaymentmethodcardpaymentmethodgeneric.md + - docs/models/shared/loc.md + - docs/models/shared/meta.md + - docs/models/shared/metadata.md + - docs/models/shared/metadataquery.md + - docs/models/shared/meter.md + - docs/models/shared/meteraggregation.md + - docs/models/shared/metercreate.md + - docs/models/shared/metercreateaggregation.md + - docs/models/shared/metercreatemetadata.md + - docs/models/shared/metermetadata.md + - docs/models/shared/meterquantities.md + - docs/models/shared/meterquantity.md + - docs/models/shared/metersortproperty.md + - docs/models/shared/meterupdate.md + - docs/models/shared/meterupdatemetadata.md + - docs/models/shared/metric.md + - docs/models/shared/metricperiod.md + - docs/models/shared/metrics.md + - docs/models/shared/metricsintervallimit.md + - docs/models/shared/metricsintervalslimits.md + - docs/models/shared/metricslimits.md + - docs/models/shared/metricsresponse.md + - docs/models/shared/metrictype.md + - docs/models/shared/oauth2client.md + - docs/models/shared/oauth2clientconfiguration.md + - docs/models/shared/oauth2clientconfigurationgranttypes.md + - docs/models/shared/oauth2clientconfigurationtokenendpointauthmethod.md + - docs/models/shared/oauth2clientconfigurationupdate.md + - docs/models/shared/oauth2clientconfigurationupdategranttypes.md + - docs/models/shared/oauth2clientconfigurationupdatetokenendpointauthmethod.md + - docs/models/shared/oauth2clientpublic.md + - docs/models/shared/order.md + - docs/models/shared/orderbillingreason.md + - docs/models/shared/ordercustomer.md + - docs/models/shared/ordercustomermetadata.md + - docs/models/shared/ordercustomertaxid.md + - docs/models/shared/ordercustomfielddata.md + - docs/models/shared/orderdiscount.md + - docs/models/shared/orderinvoice.md + - docs/models/shared/orderitemschema.md + - docs/models/shared/ordermetadata.md + - docs/models/shared/orderproduct.md + - docs/models/shared/orderproductmetadata.md + - docs/models/shared/ordersortproperty.md + - docs/models/shared/orderstatus.md + - docs/models/shared/ordersubscription.md + - docs/models/shared/ordersubscriptionmetadata.md + - docs/models/shared/organization.md + - docs/models/shared/organizationavatarfilecreate.md + - docs/models/shared/organizationavatarfileread.md + - docs/models/shared/organizationcreate.md + - docs/models/shared/organizationdetails.md + - docs/models/shared/organizationfeaturesettings.md + - docs/models/shared/organizationsociallink.md + - docs/models/shared/organizationsocialplatforms.md + - docs/models/shared/organizationsortproperty.md + - docs/models/shared/organizationsubscriptionsettings.md + - docs/models/shared/organizationupdate.md + - docs/models/shared/pagination.md + - docs/models/shared/paymentmethodcard.md + - docs/models/shared/paymentmethodcarddata.md + - docs/models/shared/paymentmethodgeneric.md + - docs/models/shared/paymentprocessor.md + - docs/models/shared/permission.md + - docs/models/shared/previousproperties.md + - docs/models/shared/prices.md + - docs/models/shared/product.md + - docs/models/shared/productbenefitsupdate.md + - docs/models/shared/productbillingtype.md + - docs/models/shared/productcreate.md + - docs/models/shared/productcreatemetadata.md + - docs/models/shared/productcreateprices.md + - docs/models/shared/productmediafilecreate.md + - docs/models/shared/productmediafileread.md + - docs/models/shared/productmetadata.md + - docs/models/shared/productprice.md + - docs/models/shared/productpricecustom.md + - docs/models/shared/productpricecustomcreate.md + - docs/models/shared/productpricefixed.md + - docs/models/shared/productpricefixedcreate.md + - docs/models/shared/productpricefree.md + - docs/models/shared/productpricefreecreate.md + - docs/models/shared/productpricemeter.md + - docs/models/shared/productpricemeteredunit.md + - docs/models/shared/productpricemeteredunitcreate.md + - docs/models/shared/productpricetype.md + - docs/models/shared/productsortproperty.md + - docs/models/shared/productupdate.md + - docs/models/shared/productupdatemetadata.md + - docs/models/shared/productupdateprices.md + - docs/models/shared/properties.md + - docs/models/shared/propertyaggregation.md + - docs/models/shared/refreshtokenrequest.md + - docs/models/shared/refund.md + - docs/models/shared/refundcreate.md + - docs/models/shared/refundcreatemetadata.md + - docs/models/shared/refundmetadata.md + - docs/models/shared/refundreason.md + - docs/models/shared/refundsortproperty.md + - docs/models/shared/refundstatus.md + - docs/models/shared/revoketokenrequest.md + - docs/models/shared/revoketokenresponse.md + - docs/models/shared/s3downloadurl.md + - docs/models/shared/s3filecreatemultipart.md + - docs/models/shared/s3filecreatepart.md + - docs/models/shared/s3fileuploadcompletedpart.md + - docs/models/shared/s3fileuploadmultipart.md + - docs/models/shared/s3fileuploadpart.md + - docs/models/shared/scope.md + - docs/models/shared/security.md + - docs/models/shared/subscription.md + - docs/models/shared/subscriptioncancel.md + - docs/models/shared/subscriptioncustomer.md + - docs/models/shared/subscriptioncustomermetadata.md + - docs/models/shared/subscriptiondiscount.md + - docs/models/shared/subscriptionmeter.md + - docs/models/shared/subscriptionprices.md + - docs/models/shared/subscriptionprorationbehavior.md + - docs/models/shared/subscriptionrecurringinterval.md + - docs/models/shared/subscriptionrevoke.md + - docs/models/shared/subscriptionsortproperty.md + - docs/models/shared/subscriptionstatus.md + - docs/models/shared/subscriptionupdate.md + - docs/models/shared/subscriptionupdateproduct.md + - docs/models/shared/subtype.md + - docs/models/shared/switchingfrom.md + - docs/models/shared/taxid.md + - docs/models/shared/taxidformat.md + - docs/models/shared/timeframe.md + - docs/models/shared/timeinterval.md + - docs/models/shared/tokenendpointauthmethod.md + - docs/models/shared/tokenresponse.md + - docs/models/shared/tokentype.md + - docs/models/shared/tokentypehint.md + - docs/models/shared/unitamount.md + - docs/models/shared/userinfoorganization.md + - docs/models/shared/userinfouser.md + - docs/models/shared/validatedlicensekey.md + - docs/models/shared/validationerror.md + - docs/models/shared/value.md + - docs/models/shared/webhookbenefitcreatedpayload.md + - docs/models/shared/webhookbenefitgrantcreatedpayload.md + - docs/models/shared/webhookbenefitgrantcycledpayload.md + - docs/models/shared/webhookbenefitgrantrevokedpayload.md + - docs/models/shared/webhookbenefitgrantupdatedpayload.md + - docs/models/shared/webhookbenefitupdatedpayload.md + - docs/models/shared/webhookcheckoutcreatedpayload.md + - docs/models/shared/webhookcheckoutupdatedpayload.md + - docs/models/shared/webhookcustomercreatedpayload.md + - docs/models/shared/webhookcustomerdeletedpayload.md + - docs/models/shared/webhookcustomerstatechangedpayload.md + - docs/models/shared/webhookcustomerupdatedpayload.md + - docs/models/shared/webhookordercreatedpayload.md + - docs/models/shared/webhookorderpaidpayload.md + - docs/models/shared/webhookorderrefundedpayload.md + - docs/models/shared/webhookorderupdatedpayload.md + - docs/models/shared/webhookorganizationupdatedpayload.md + - docs/models/shared/webhookproductcreatedpayload.md + - docs/models/shared/webhookproductupdatedpayload.md + - docs/models/shared/webhookrefundcreatedpayload.md + - docs/models/shared/webhookrefundupdatedpayload.md + - docs/models/shared/webhooksubscriptionactivepayload.md + - docs/models/shared/webhooksubscriptioncanceledpayload.md + - docs/models/shared/webhooksubscriptioncreatedpayload.md + - docs/models/shared/webhooksubscriptionrevokedpayload.md + - docs/models/shared/webhooksubscriptionuncanceledpayload.md + - docs/models/shared/webhooksubscriptionupdatedpayload.md + - docs/models/webhooks/endpointbenefitcreatedpostresponse.md + - docs/models/webhooks/endpointbenefitgrantcreatedpostresponse.md + - docs/models/webhooks/endpointbenefitgrantcycledpostresponse.md + - docs/models/webhooks/endpointbenefitgrantrevokedpostresponse.md + - docs/models/webhooks/endpointbenefitgrantupdatedpostresponse.md + - docs/models/webhooks/endpointbenefitupdatedpostresponse.md + - docs/models/webhooks/endpointcheckoutcreatedpostresponse.md + - docs/models/webhooks/endpointcheckoutupdatedpostresponse.md + - docs/models/webhooks/endpointcustomercreatedpostresponse.md + - docs/models/webhooks/endpointcustomerdeletedpostresponse.md + - docs/models/webhooks/endpointcustomerstatechangedpostresponse.md + - docs/models/webhooks/endpointcustomerupdatedpostresponse.md + - docs/models/webhooks/endpointordercreatedpostresponse.md + - docs/models/webhooks/endpointorderpaidpostresponse.md + - docs/models/webhooks/endpointorderrefundedpostresponse.md + - docs/models/webhooks/endpointorderupdatedpostresponse.md + - docs/models/webhooks/endpointorganizationupdatedpostresponse.md + - docs/models/webhooks/endpointproductcreatedpostresponse.md + - docs/models/webhooks/endpointproductupdatedpostresponse.md + - docs/models/webhooks/endpointrefundcreatedpostresponse.md + - docs/models/webhooks/endpointrefundupdatedpostresponse.md + - docs/models/webhooks/endpointsubscriptionactivepostresponse.md + - docs/models/webhooks/endpointsubscriptioncanceledpostresponse.md + - docs/models/webhooks/endpointsubscriptioncreatedpostresponse.md + - docs/models/webhooks/endpointsubscriptionrevokedpostresponse.md + - docs/models/webhooks/endpointsubscriptionuncanceledpostresponse.md + - docs/models/webhooks/endpointsubscriptionupdatedpostresponse.md + - docs/sdks/benefits/README.md + - docs/sdks/checkoutlinks/README.md + - docs/sdks/checkouts/README.md + - docs/sdks/customermeters/README.md + - docs/sdks/customerportalbenefitgrants/README.md + - docs/sdks/customerportalcustomermeters/README.md + - docs/sdks/customerportalcustomers/README.md + - docs/sdks/customerportaldownloadables/README.md + - docs/sdks/customerportallicensekeys/README.md + - docs/sdks/customerportalorders/README.md + - docs/sdks/customerportalorganizations/README.md + - docs/sdks/customerportalsubscriptions/README.md + - docs/sdks/customers/README.md + - docs/sdks/customersessions/README.md + - docs/sdks/customfields/README.md + - docs/sdks/discounts/README.md + - docs/sdks/events/README.md + - docs/sdks/files/README.md + - docs/sdks/licensekeys/README.md + - docs/sdks/meters/README.md + - docs/sdks/metrics/README.md + - docs/sdks/oauth2/README.md + - docs/sdks/oauth2clients/README.md + - docs/sdks/orders/README.md + - docs/sdks/organizations/README.md + - docs/sdks/polar/README.md + - docs/sdks/products/README.md + - docs/sdks/refunds/README.md + - docs/sdks/subscriptions/README.md + - lib/crystalline.rb + - lib/crystalline/metadata_fields.rb + - lib/crystalline/t.rb + - lib/crystalline/utils.rb + - lib/open_api_sdk/benefits.rb + - lib/open_api_sdk/checkout_links.rb + - lib/open_api_sdk/checkouts.rb + - lib/open_api_sdk/custom_fields.rb + - lib/open_api_sdk/customer_meters.rb + - lib/open_api_sdk/customer_portal_benefit_grants.rb + - lib/open_api_sdk/customer_portal_customer_meters.rb + - lib/open_api_sdk/customer_portal_customers.rb + - lib/open_api_sdk/customer_portal_downloadables.rb + - lib/open_api_sdk/customer_portal_license_keys.rb + - lib/open_api_sdk/customer_portal_orders.rb + - lib/open_api_sdk/customer_portal_organizations.rb + - lib/open_api_sdk/customer_portal_subscriptions.rb + - lib/open_api_sdk/customer_sessions.rb + - lib/open_api_sdk/customers.rb + - lib/open_api_sdk/discounts.rb + - lib/open_api_sdk/events.rb + - lib/open_api_sdk/files.rb + - lib/open_api_sdk/license_keys.rb + - lib/open_api_sdk/meters.rb + - lib/open_api_sdk/metrics.rb + - lib/open_api_sdk/models/errors.rb + - lib/open_api_sdk/models/errors/alreadycanceledsubscription.rb + - lib/open_api_sdk/models/errors/apierror.rb + - lib/open_api_sdk/models/errors/expiredcheckouterror.rb + - lib/open_api_sdk/models/errors/httpvalidationerror.rb + - lib/open_api_sdk/models/errors/notpermitted.rb + - lib/open_api_sdk/models/errors/refundamounttoohigh.rb + - lib/open_api_sdk/models/errors/refundedalready.rb + - lib/open_api_sdk/models/errors/resourcenotfound.rb + - lib/open_api_sdk/models/errors/unauthorized.rb + - lib/open_api_sdk/models/operations.rb + - lib/open_api_sdk/models/operations/benefitid_filter.rb + - lib/open_api_sdk/models/operations/benefits_create_response.rb + - lib/open_api_sdk/models/operations/benefits_delete_request.rb + - lib/open_api_sdk/models/operations/benefits_delete_response.rb + - lib/open_api_sdk/models/operations/benefits_get_request.rb + - lib/open_api_sdk/models/operations/benefits_get_response.rb + - lib/open_api_sdk/models/operations/benefits_grants_request.rb + - lib/open_api_sdk/models/operations/benefits_grants_response.rb + - lib/open_api_sdk/models/operations/benefits_list_request.rb + - lib/open_api_sdk/models/operations/benefits_list_response.rb + - lib/open_api_sdk/models/operations/benefits_update_benefit_update.rb + - lib/open_api_sdk/models/operations/benefits_update_request.rb + - lib/open_api_sdk/models/operations/benefits_update_response.rb + - lib/open_api_sdk/models/operations/benefittype_filter.rb + - lib/open_api_sdk/models/operations/checkout_links_create_checkout_link_create.rb + - lib/open_api_sdk/models/operations/checkout_links_create_response.rb + - lib/open_api_sdk/models/operations/checkout_links_delete_request.rb + - lib/open_api_sdk/models/operations/checkout_links_delete_response.rb + - lib/open_api_sdk/models/operations/checkout_links_get_request.rb + - lib/open_api_sdk/models/operations/checkout_links_get_response.rb + - lib/open_api_sdk/models/operations/checkout_links_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/checkout_links_list_queryparam_productid_filter.rb + - lib/open_api_sdk/models/operations/checkout_links_list_request.rb + - lib/open_api_sdk/models/operations/checkout_links_list_response.rb + - lib/open_api_sdk/models/operations/checkout_links_update_request.rb + - lib/open_api_sdk/models/operations/checkout_links_update_response.rb + - lib/open_api_sdk/models/operations/checkoutid_filter.rb + - lib/open_api_sdk/models/operations/checkouts_client_get_request.rb + - lib/open_api_sdk/models/operations/checkouts_client_get_response.rb + - lib/open_api_sdk/models/operations/checkouts_create_response.rb + - lib/open_api_sdk/models/operations/checkouts_get_request.rb + - lib/open_api_sdk/models/operations/checkouts_get_response.rb + - lib/open_api_sdk/models/operations/checkouts_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/checkouts_list_queryparam_productid_filter.rb + - lib/open_api_sdk/models/operations/checkouts_list_request.rb + - lib/open_api_sdk/models/operations/checkouts_list_response.rb + - lib/open_api_sdk/models/operations/custom_fields_create_response.rb + - lib/open_api_sdk/models/operations/custom_fields_delete_request.rb + - lib/open_api_sdk/models/operations/custom_fields_delete_response.rb + - lib/open_api_sdk/models/operations/custom_fields_get_request.rb + - lib/open_api_sdk/models/operations/custom_fields_get_response.rb + - lib/open_api_sdk/models/operations/custom_fields_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/custom_fields_list_request.rb + - lib/open_api_sdk/models/operations/custom_fields_list_response.rb + - lib/open_api_sdk/models/operations/custom_fields_update_request.rb + - lib/open_api_sdk/models/operations/custom_fields_update_response.rb + - lib/open_api_sdk/models/operations/customer_meters_get_request.rb + - lib/open_api_sdk/models/operations/customer_meters_get_response.rb + - lib/open_api_sdk/models/operations/customer_meters_list_queryparam_customerid_filter.rb + - lib/open_api_sdk/models/operations/customer_meters_list_queryparam_externalcustomerid_filter.rb + - lib/open_api_sdk/models/operations/customer_meters_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/customer_meters_list_request.rb + - lib/open_api_sdk/models/operations/customer_meters_list_response.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_request.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_response.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_security.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_benefitid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_request.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_response.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_security.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_request.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_response.rb + - lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_security.rb + - lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_request.rb + - lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_response.rb + - lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_security.rb + - lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_request.rb + - lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_response.rb + - lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_security.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response_customer_portal_customers_add_payment_method.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_security.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_request.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_response.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_security.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_request.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_response.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_security.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_get_response.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_get_security.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_update_response.rb + - lib/open_api_sdk/models/operations/customer_portal_customers_update_security.rb + - lib/open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_request.rb + - lib/open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_response.rb + - lib/open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_benefitid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_downloadables_list_request.rb + - lib/open_api_sdk/models/operations/customer_portal_downloadables_list_response.rb + - lib/open_api_sdk/models/operations/customer_portal_downloadables_list_security.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_activate_response.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_deactivate_response.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_get_request.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_get_response.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_get_security.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_list_request.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_list_response.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_list_security.rb + - lib/open_api_sdk/models/operations/customer_portal_license_keys_validate_response.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_get_request.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_get_response.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_get_security.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_invoice_request.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_invoice_response.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_invoice_security.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productbillingtype_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_subscriptionid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_list_request.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_list_response.rb + - lib/open_api_sdk/models/operations/customer_portal_orders_list_security.rb + - lib/open_api_sdk/models/operations/customer_portal_organizations_get_request.rb + - lib/open_api_sdk/models/operations/customer_portal_organizations_get_response.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_request.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_response.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_security.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_request.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_response.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_security.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_productid_filter.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_request.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_response.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_security.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_request.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_response.rb + - lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_security.rb + - lib/open_api_sdk/models/operations/customer_sessions_create_customer_session_create.rb + - lib/open_api_sdk/models/operations/customer_sessions_create_response.rb + - lib/open_api_sdk/models/operations/customerid_filter.rb + - lib/open_api_sdk/models/operations/customers_create_response.rb + - lib/open_api_sdk/models/operations/customers_delete_external_request.rb + - lib/open_api_sdk/models/operations/customers_delete_external_response.rb + - lib/open_api_sdk/models/operations/customers_delete_request.rb + - lib/open_api_sdk/models/operations/customers_delete_response.rb + - lib/open_api_sdk/models/operations/customers_get_external_request.rb + - lib/open_api_sdk/models/operations/customers_get_external_response.rb + - lib/open_api_sdk/models/operations/customers_get_request.rb + - lib/open_api_sdk/models/operations/customers_get_response.rb + - lib/open_api_sdk/models/operations/customers_get_state_external_request.rb + - lib/open_api_sdk/models/operations/customers_get_state_external_response.rb + - lib/open_api_sdk/models/operations/customers_get_state_request.rb + - lib/open_api_sdk/models/operations/customers_get_state_response.rb + - lib/open_api_sdk/models/operations/customers_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/customers_list_request.rb + - lib/open_api_sdk/models/operations/customers_list_response.rb + - lib/open_api_sdk/models/operations/customers_update_external_request.rb + - lib/open_api_sdk/models/operations/customers_update_external_response.rb + - lib/open_api_sdk/models/operations/customers_update_request.rb + - lib/open_api_sdk/models/operations/customers_update_response.rb + - lib/open_api_sdk/models/operations/customfieldtype_filter.rb + - lib/open_api_sdk/models/operations/discountid_filter.rb + - lib/open_api_sdk/models/operations/discounts_create_response.rb + - lib/open_api_sdk/models/operations/discounts_delete_request.rb + - lib/open_api_sdk/models/operations/discounts_delete_response.rb + - lib/open_api_sdk/models/operations/discounts_get_request.rb + - lib/open_api_sdk/models/operations/discounts_get_response.rb + - lib/open_api_sdk/models/operations/discounts_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/discounts_list_request.rb + - lib/open_api_sdk/models/operations/discounts_list_response.rb + - lib/open_api_sdk/models/operations/discounts_update_request.rb + - lib/open_api_sdk/models/operations/discounts_update_response.rb + - lib/open_api_sdk/models/operations/events_get_request.rb + - lib/open_api_sdk/models/operations/events_get_response.rb + - lib/open_api_sdk/models/operations/events_ingest_response.rb + - lib/open_api_sdk/models/operations/events_list_names_queryparam_customerid_filter.rb + - lib/open_api_sdk/models/operations/events_list_names_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/events_list_names_request.rb + - lib/open_api_sdk/models/operations/events_list_names_response.rb + - lib/open_api_sdk/models/operations/events_list_queryparam_customerid_filter.rb + - lib/open_api_sdk/models/operations/events_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/events_list_request.rb + - lib/open_api_sdk/models/operations/events_list_response.rb + - lib/open_api_sdk/models/operations/externalcustomerid_filter.rb + - lib/open_api_sdk/models/operations/files_create_response.rb + - lib/open_api_sdk/models/operations/files_delete_request.rb + - lib/open_api_sdk/models/operations/files_delete_response.rb + - lib/open_api_sdk/models/operations/files_list_request.rb + - lib/open_api_sdk/models/operations/files_list_response.rb + - lib/open_api_sdk/models/operations/files_update_request.rb + - lib/open_api_sdk/models/operations/files_update_response.rb + - lib/open_api_sdk/models/operations/files_update_response_files_update.rb + - lib/open_api_sdk/models/operations/files_uploaded_request.rb + - lib/open_api_sdk/models/operations/files_uploaded_response.rb + - lib/open_api_sdk/models/operations/files_uploaded_response_files_uploaded.rb + - lib/open_api_sdk/models/operations/license_keys_get_activation_request.rb + - lib/open_api_sdk/models/operations/license_keys_get_activation_response.rb + - lib/open_api_sdk/models/operations/license_keys_get_request.rb + - lib/open_api_sdk/models/operations/license_keys_get_response.rb + - lib/open_api_sdk/models/operations/license_keys_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/license_keys_list_request.rb + - lib/open_api_sdk/models/operations/license_keys_list_response.rb + - lib/open_api_sdk/models/operations/license_keys_update_request.rb + - lib/open_api_sdk/models/operations/license_keys_update_response.rb + - lib/open_api_sdk/models/operations/meterid_filter.rb + - lib/open_api_sdk/models/operations/meters_create_response.rb + - lib/open_api_sdk/models/operations/meters_get_request.rb + - lib/open_api_sdk/models/operations/meters_get_response.rb + - lib/open_api_sdk/models/operations/meters_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/meters_list_request.rb + - lib/open_api_sdk/models/operations/meters_list_response.rb + - lib/open_api_sdk/models/operations/meters_quantities_queryparam_customerid_filter.rb + - lib/open_api_sdk/models/operations/meters_quantities_queryparam_externalcustomerid_filter.rb + - lib/open_api_sdk/models/operations/meters_quantities_request.rb + - lib/open_api_sdk/models/operations/meters_quantities_response.rb + - lib/open_api_sdk/models/operations/meters_update_request.rb + - lib/open_api_sdk/models/operations/meters_update_response.rb + - lib/open_api_sdk/models/operations/metrics_get_queryparam_customerid_filter.rb + - lib/open_api_sdk/models/operations/metrics_get_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/metrics_get_queryparam_productid_filter.rb + - lib/open_api_sdk/models/operations/metrics_get_request.rb + - lib/open_api_sdk/models/operations/metrics_get_response.rb + - lib/open_api_sdk/models/operations/metrics_limits_response.rb + - lib/open_api_sdk/models/operations/name_filter.rb + - lib/open_api_sdk/models/operations/oauth2_authorize_response.rb + - lib/open_api_sdk/models/operations/oauth2_authorize_response_oauth2_authorize.rb + - lib/open_api_sdk/models/operations/oauth2_clients_list_request.rb + - lib/open_api_sdk/models/operations/oauth2_clients_list_response.rb + - lib/open_api_sdk/models/operations/oauth2_clients_oauth2_create_client_response.rb + - lib/open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_request.rb + - lib/open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_response.rb + - lib/open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_request.rb + - lib/open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_response.rb + - lib/open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_request.rb + - lib/open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_response.rb + - lib/open_api_sdk/models/operations/oauth2_introspect_token_response.rb + - lib/open_api_sdk/models/operations/oauth2_request_token_requestbody.rb + - lib/open_api_sdk/models/operations/oauth2_request_token_response.rb + - lib/open_api_sdk/models/operations/oauth2_revoke_token_response.rb + - lib/open_api_sdk/models/operations/oauth2_userinfo_response.rb + - lib/open_api_sdk/models/operations/oauth2_userinfo_response_oauth2_userinfo.rb + - lib/open_api_sdk/models/operations/orderid_filter.rb + - lib/open_api_sdk/models/operations/orders_get_request.rb + - lib/open_api_sdk/models/operations/orders_get_response.rb + - lib/open_api_sdk/models/operations/orders_invoice_request.rb + - lib/open_api_sdk/models/operations/orders_invoice_response.rb + - lib/open_api_sdk/models/operations/orders_list_queryparam_customerid_filter.rb + - lib/open_api_sdk/models/operations/orders_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/orders_list_queryparam_productid_filter.rb + - lib/open_api_sdk/models/operations/orders_list_request.rb + - lib/open_api_sdk/models/operations/orders_list_response.rb + - lib/open_api_sdk/models/operations/organization_id.rb + - lib/open_api_sdk/models/operations/organizationid_filter.rb + - lib/open_api_sdk/models/operations/organizations_create_response.rb + - lib/open_api_sdk/models/operations/organizations_get_request.rb + - lib/open_api_sdk/models/operations/organizations_get_response.rb + - lib/open_api_sdk/models/operations/organizations_list_request.rb + - lib/open_api_sdk/models/operations/organizations_list_response.rb + - lib/open_api_sdk/models/operations/organizations_update_request.rb + - lib/open_api_sdk/models/operations/organizations_update_response.rb + - lib/open_api_sdk/models/operations/productbillingtype_filter.rb + - lib/open_api_sdk/models/operations/productid_filter.rb + - lib/open_api_sdk/models/operations/products_create_response.rb + - lib/open_api_sdk/models/operations/products_get_request.rb + - lib/open_api_sdk/models/operations/products_get_response.rb + - lib/open_api_sdk/models/operations/products_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/products_list_request.rb + - lib/open_api_sdk/models/operations/products_list_response.rb + - lib/open_api_sdk/models/operations/products_update_benefits_request.rb + - lib/open_api_sdk/models/operations/products_update_benefits_response.rb + - lib/open_api_sdk/models/operations/products_update_request.rb + - lib/open_api_sdk/models/operations/products_update_response.rb + - lib/open_api_sdk/models/operations/queryparam_benefitid_filter.rb + - lib/open_api_sdk/models/operations/queryparam_benefittype_filter.rb + - lib/open_api_sdk/models/operations/queryparam_checkoutid_filter.rb + - lib/open_api_sdk/models/operations/queryparam_customerid_filter.rb + - lib/open_api_sdk/models/operations/queryparam_discountid_filter.rb + - lib/open_api_sdk/models/operations/queryparam_externalcustomerid_filter.rb + - lib/open_api_sdk/models/operations/queryparam_meterid_filter.rb + - lib/open_api_sdk/models/operations/queryparam_orderid_filter.rb + - lib/open_api_sdk/models/operations/queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/queryparam_productbillingtype_filter.rb + - lib/open_api_sdk/models/operations/queryparam_productid_filter.rb + - lib/open_api_sdk/models/operations/queryparam_source_filter.rb + - lib/open_api_sdk/models/operations/queryparam_subscriptionid_filter.rb + - lib/open_api_sdk/models/operations/refundid_filter.rb + - lib/open_api_sdk/models/operations/refunds_create_response.rb + - lib/open_api_sdk/models/operations/refunds_list_queryparam_customerid_filter.rb + - lib/open_api_sdk/models/operations/refunds_list_queryparam_organizationid_filter.rb + - lib/open_api_sdk/models/operations/refunds_list_request.rb + - lib/open_api_sdk/models/operations/refunds_list_response.rb + - lib/open_api_sdk/models/operations/source_filter.rb + - lib/open_api_sdk/models/operations/subscriptionid_filter.rb + - lib/open_api_sdk/models/operations/subscriptions_export_request.rb + - lib/open_api_sdk/models/operations/subscriptions_export_response.rb + - lib/open_api_sdk/models/operations/subscriptions_get_request.rb + - lib/open_api_sdk/models/operations/subscriptions_get_response.rb + - lib/open_api_sdk/models/operations/subscriptions_list_request.rb + - lib/open_api_sdk/models/operations/subscriptions_list_response.rb + - lib/open_api_sdk/models/operations/subscriptions_revoke_request.rb + - lib/open_api_sdk/models/operations/subscriptions_revoke_response.rb + - lib/open_api_sdk/models/operations/subscriptions_update_request.rb + - lib/open_api_sdk/models/operations/subscriptions_update_response.rb + - lib/open_api_sdk/models/shared.rb + - lib/open_api_sdk/models/shared/address.rb + - lib/open_api_sdk/models/shared/aggregation.rb + - lib/open_api_sdk/models/shared/attachedcustomfield.rb + - lib/open_api_sdk/models/shared/attachedcustomfieldcreate.rb + - lib/open_api_sdk/models/shared/authorizationcodetokenrequest.rb + - lib/open_api_sdk/models/shared/authorizeorganization.rb + - lib/open_api_sdk/models/shared/authorizeresponseorganization.rb + - lib/open_api_sdk/models/shared/authorizeresponseuser.rb + - lib/open_api_sdk/models/shared/authorizeuser.rb + - lib/open_api_sdk/models/shared/benefit.rb + - lib/open_api_sdk/models/shared/benefitcreate.rb + - lib/open_api_sdk/models/shared/benefitcustom.rb + - lib/open_api_sdk/models/shared/benefitcustom_metadata.rb + - lib/open_api_sdk/models/shared/benefitcustomcreate.rb + - lib/open_api_sdk/models/shared/benefitcustomcreate_metadata.rb + - lib/open_api_sdk/models/shared/benefitcustomcreateproperties.rb + - lib/open_api_sdk/models/shared/benefitcustomproperties.rb + - lib/open_api_sdk/models/shared/benefitcustomsubscriber.rb + - lib/open_api_sdk/models/shared/benefitcustomsubscriber_metadata.rb + - lib/open_api_sdk/models/shared/benefitcustomsubscriberproperties.rb + - lib/open_api_sdk/models/shared/benefitcustomupdate.rb + - lib/open_api_sdk/models/shared/benefitcustomupdate_metadata.rb + - lib/open_api_sdk/models/shared/benefitdiscord.rb + - lib/open_api_sdk/models/shared/benefitdiscord_metadata.rb + - lib/open_api_sdk/models/shared/benefitdiscordcreate.rb + - lib/open_api_sdk/models/shared/benefitdiscordcreate_metadata.rb + - lib/open_api_sdk/models/shared/benefitdiscordcreateproperties.rb + - lib/open_api_sdk/models/shared/benefitdiscordproperties.rb + - lib/open_api_sdk/models/shared/benefitdiscordsubscriber.rb + - lib/open_api_sdk/models/shared/benefitdiscordsubscriber_metadata.rb + - lib/open_api_sdk/models/shared/benefitdiscordsubscriberproperties.rb + - lib/open_api_sdk/models/shared/benefitdiscordupdate.rb + - lib/open_api_sdk/models/shared/benefitdiscordupdate_metadata.rb + - lib/open_api_sdk/models/shared/benefitdownloadables.rb + - lib/open_api_sdk/models/shared/benefitdownloadables_metadata.rb + - lib/open_api_sdk/models/shared/benefitdownloadablescreate.rb + - lib/open_api_sdk/models/shared/benefitdownloadablescreate_metadata.rb + - lib/open_api_sdk/models/shared/benefitdownloadablescreateproperties.rb + - lib/open_api_sdk/models/shared/benefitdownloadablesproperties.rb + - lib/open_api_sdk/models/shared/benefitdownloadablessubscriber.rb + - lib/open_api_sdk/models/shared/benefitdownloadablessubscriber_metadata.rb + - lib/open_api_sdk/models/shared/benefitdownloadablessubscriberproperties.rb + - lib/open_api_sdk/models/shared/benefitdownloadablesupdate.rb + - lib/open_api_sdk/models/shared/benefitdownloadablesupdate_metadata.rb + - lib/open_api_sdk/models/shared/benefitgithubrepository.rb + - lib/open_api_sdk/models/shared/benefitgithubrepository_metadata.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositorycreate.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositorycreate_metadata.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositorycreateproperties.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositorycreateproperties_permission.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositoryproperties.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriber.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriber_metadata.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriberproperties.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositoryupdate.rb + - lib/open_api_sdk/models/shared/benefitgithubrepositoryupdate_metadata.rb + - lib/open_api_sdk/models/shared/benefitgrant.rb + - lib/open_api_sdk/models/shared/benefitgrantcustomproperties.rb + - lib/open_api_sdk/models/shared/benefitgrantdiscordproperties.rb + - lib/open_api_sdk/models/shared/benefitgrantdownloadablesproperties.rb + - lib/open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties.rb + - lib/open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties_permission.rb + - lib/open_api_sdk/models/shared/benefitgrantlicensekeysproperties.rb + - lib/open_api_sdk/models/shared/benefitgrantmetercreditproperties.rb + - lib/open_api_sdk/models/shared/benefitgrantwebhook.rb + - lib/open_api_sdk/models/shared/benefitgrantwebhook_properties.rb + - lib/open_api_sdk/models/shared/benefitlicensekeyactivationcreateproperties.rb + - lib/open_api_sdk/models/shared/benefitlicensekeyactivationproperties.rb + - lib/open_api_sdk/models/shared/benefitlicensekeyexpirationproperties.rb + - lib/open_api_sdk/models/shared/benefitlicensekeys.rb + - lib/open_api_sdk/models/shared/benefitlicensekeys_metadata.rb + - lib/open_api_sdk/models/shared/benefitlicensekeyscreate.rb + - lib/open_api_sdk/models/shared/benefitlicensekeyscreate_metadata.rb + - lib/open_api_sdk/models/shared/benefitlicensekeyscreateproperties.rb + - lib/open_api_sdk/models/shared/benefitlicensekeysproperties.rb + - lib/open_api_sdk/models/shared/benefitlicensekeyssubscriber.rb + - lib/open_api_sdk/models/shared/benefitlicensekeyssubscriber_metadata.rb + - lib/open_api_sdk/models/shared/benefitlicensekeyssubscriberproperties.rb + - lib/open_api_sdk/models/shared/benefitlicensekeysupdate.rb + - lib/open_api_sdk/models/shared/benefitlicensekeysupdate_metadata.rb + - lib/open_api_sdk/models/shared/benefitmetercredit.rb + - lib/open_api_sdk/models/shared/benefitmetercredit_metadata.rb + - lib/open_api_sdk/models/shared/benefitmetercreditcreate.rb + - lib/open_api_sdk/models/shared/benefitmetercreditcreate_metadata.rb + - lib/open_api_sdk/models/shared/benefitmetercreditcreateproperties.rb + - lib/open_api_sdk/models/shared/benefitmetercreditproperties.rb + - lib/open_api_sdk/models/shared/benefitmetercreditsubscriber.rb + - lib/open_api_sdk/models/shared/benefitmetercreditsubscriber_metadata.rb + - lib/open_api_sdk/models/shared/benefitmetercreditsubscriberproperties.rb + - lib/open_api_sdk/models/shared/benefitmetercreditupdate.rb + - lib/open_api_sdk/models/shared/benefitmetercreditupdate_metadata.rb + - lib/open_api_sdk/models/shared/benefitpublic.rb + - lib/open_api_sdk/models/shared/benefitsortproperty.rb + - lib/open_api_sdk/models/shared/benefittype.rb + - lib/open_api_sdk/models/shared/checkout.rb + - lib/open_api_sdk/models/shared/checkout_custom_field_data.rb + - lib/open_api_sdk/models/shared/checkout_discount.rb + - lib/open_api_sdk/models/shared/checkout_metadata.rb + - lib/open_api_sdk/models/shared/checkout_product_price.rb + - lib/open_api_sdk/models/shared/checkoutcreate.rb + - lib/open_api_sdk/models/shared/checkoutcreate_custom_field_data.rb + - lib/open_api_sdk/models/shared/checkoutcreate_customer_metadata.rb + - lib/open_api_sdk/models/shared/checkoutcreate_metadata.rb + - lib/open_api_sdk/models/shared/checkoutcustomerbillingaddressfields.rb + - lib/open_api_sdk/models/shared/checkoutdiscountfixedonceforeverduration.rb + - lib/open_api_sdk/models/shared/checkoutdiscountfixedrepeatduration.rb + - lib/open_api_sdk/models/shared/checkoutdiscountpercentageonceforeverduration.rb + - lib/open_api_sdk/models/shared/checkoutdiscountpercentagerepeatduration.rb + - lib/open_api_sdk/models/shared/checkoutlink.rb + - lib/open_api_sdk/models/shared/checkoutlink_metadata.rb + - lib/open_api_sdk/models/shared/checkoutlinkcreateproduct.rb + - lib/open_api_sdk/models/shared/checkoutlinkcreateproduct_metadata.rb + - lib/open_api_sdk/models/shared/checkoutlinkcreateproductprice.rb + - lib/open_api_sdk/models/shared/checkoutlinkcreateproductprice_metadata.rb + - lib/open_api_sdk/models/shared/checkoutlinkcreateproducts.rb + - lib/open_api_sdk/models/shared/checkoutlinkcreateproducts_metadata.rb + - lib/open_api_sdk/models/shared/checkoutlinkdiscount.rb + - lib/open_api_sdk/models/shared/checkoutlinkproduct.rb + - lib/open_api_sdk/models/shared/checkoutlinkproduct_metadata.rb + - lib/open_api_sdk/models/shared/checkoutlinkproduct_prices.rb + - lib/open_api_sdk/models/shared/checkoutlinksortproperty.rb + - lib/open_api_sdk/models/shared/checkoutlinkupdate.rb + - lib/open_api_sdk/models/shared/checkoutlinkupdate_metadata.rb + - lib/open_api_sdk/models/shared/checkoutproduct.rb + - lib/open_api_sdk/models/shared/checkoutproduct_prices.rb + - lib/open_api_sdk/models/shared/checkoutpublic.rb + - lib/open_api_sdk/models/shared/checkoutpublic_custom_field_data.rb + - lib/open_api_sdk/models/shared/checkoutpublic_discount.rb + - lib/open_api_sdk/models/shared/checkoutpublic_product_price.rb + - lib/open_api_sdk/models/shared/checkoutsortproperty.rb + - lib/open_api_sdk/models/shared/checkoutstatus.rb + - lib/open_api_sdk/models/shared/clauses.rb + - lib/open_api_sdk/models/shared/conditions.rb + - lib/open_api_sdk/models/shared/countaggregation.rb + - lib/open_api_sdk/models/shared/custom_field_data.rb + - lib/open_api_sdk/models/shared/customer.rb + - lib/open_api_sdk/models/shared/customer_metadata.rb + - lib/open_api_sdk/models/shared/customer_metadata1.rb + - lib/open_api_sdk/models/shared/customer_tax_id.rb + - lib/open_api_sdk/models/shared/customerbenefitgrant.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantcustom.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantcustomupdate.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantdiscord.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantdiscordpropertiesupdate.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantdiscordupdate.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantdownloadables.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantdownloadablesupdate.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepository.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepositoryupdate.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantlicensekeys.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantlicensekeysupdate.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantmetercredit.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantmetercreditupdate.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantsortproperty.rb + - lib/open_api_sdk/models/shared/customerbenefitgrantupdate.rb + - lib/open_api_sdk/models/shared/customercancellationreason.rb + - lib/open_api_sdk/models/shared/customercreate.rb + - lib/open_api_sdk/models/shared/customercreate_metadata.rb + - lib/open_api_sdk/models/shared/customercreate_tax_id.rb + - lib/open_api_sdk/models/shared/customercustomermeter.rb + - lib/open_api_sdk/models/shared/customercustomermetermeter.rb + - lib/open_api_sdk/models/shared/customercustomermetersortproperty.rb + - lib/open_api_sdk/models/shared/customermeter.rb + - lib/open_api_sdk/models/shared/customermetersortproperty.rb + - lib/open_api_sdk/models/shared/customerorder.rb + - lib/open_api_sdk/models/shared/customerorderinvoice.rb + - lib/open_api_sdk/models/shared/customerorderproduct.rb + - lib/open_api_sdk/models/shared/customerorderproduct_prices.rb + - lib/open_api_sdk/models/shared/customerordersortproperty.rb + - lib/open_api_sdk/models/shared/customerordersubscription.rb + - lib/open_api_sdk/models/shared/customerorganization.rb + - lib/open_api_sdk/models/shared/customerpaymentmethodcreate.rb + - lib/open_api_sdk/models/shared/customerportalcustomer.rb + - lib/open_api_sdk/models/shared/customerportalcustomer_tax_id.rb + - lib/open_api_sdk/models/shared/customerportalcustomerupdate.rb + - lib/open_api_sdk/models/shared/customerportaloauthaccount.rb + - lib/open_api_sdk/models/shared/customerproduct.rb + - lib/open_api_sdk/models/shared/customerproduct_prices.rb + - lib/open_api_sdk/models/shared/customersession.rb + - lib/open_api_sdk/models/shared/customersessioncustomerexternalidcreate.rb + - lib/open_api_sdk/models/shared/customersessioncustomeridcreate.rb + - lib/open_api_sdk/models/shared/customersortproperty.rb + - lib/open_api_sdk/models/shared/customerstate.rb + - lib/open_api_sdk/models/shared/customerstate_metadata.rb + - lib/open_api_sdk/models/shared/customerstate_tax_id.rb + - lib/open_api_sdk/models/shared/customerstatebenefitgrant.rb + - lib/open_api_sdk/models/shared/customerstatebenefitgrant_properties.rb + - lib/open_api_sdk/models/shared/customerstatemeter.rb + - lib/open_api_sdk/models/shared/customerstatesubscription.rb + - lib/open_api_sdk/models/shared/customerstatesubscription_custom_field_data.rb + - lib/open_api_sdk/models/shared/customerstatesubscription_metadata.rb + - lib/open_api_sdk/models/shared/customerstatesubscriptionmeter.rb + - lib/open_api_sdk/models/shared/customersubscription.rb + - lib/open_api_sdk/models/shared/customersubscription_prices.rb + - lib/open_api_sdk/models/shared/customersubscriptioncancel.rb + - lib/open_api_sdk/models/shared/customersubscriptionmeter.rb + - lib/open_api_sdk/models/shared/customersubscriptionmetermeter.rb + - lib/open_api_sdk/models/shared/customersubscriptionproduct.rb + - lib/open_api_sdk/models/shared/customersubscriptionproduct_prices.rb + - lib/open_api_sdk/models/shared/customersubscriptionsortproperty.rb + - lib/open_api_sdk/models/shared/customersubscriptionupdate.rb + - lib/open_api_sdk/models/shared/customersubscriptionupdateproduct.rb + - lib/open_api_sdk/models/shared/customerupdate.rb + - lib/open_api_sdk/models/shared/customerupdate_metadata.rb + - lib/open_api_sdk/models/shared/customerupdate_tax_id.rb + - lib/open_api_sdk/models/shared/customerupdateexternalid.rb + - lib/open_api_sdk/models/shared/customerupdateexternalid_metadata.rb + - lib/open_api_sdk/models/shared/customerupdateexternalid_tax_id.rb + - lib/open_api_sdk/models/shared/customfield.rb + - lib/open_api_sdk/models/shared/customfieldcheckbox.rb + - lib/open_api_sdk/models/shared/customfieldcheckbox_metadata.rb + - lib/open_api_sdk/models/shared/customfieldcheckboxproperties.rb + - lib/open_api_sdk/models/shared/customfieldcreate.rb + - lib/open_api_sdk/models/shared/customfieldcreatecheckbox.rb + - lib/open_api_sdk/models/shared/customfieldcreatecheckbox_metadata.rb + - lib/open_api_sdk/models/shared/customfieldcreatedate.rb + - lib/open_api_sdk/models/shared/customfieldcreatedate_metadata.rb + - lib/open_api_sdk/models/shared/customfieldcreatenumber.rb + - lib/open_api_sdk/models/shared/customfieldcreatenumber_metadata.rb + - lib/open_api_sdk/models/shared/customfieldcreateselect.rb + - lib/open_api_sdk/models/shared/customfieldcreateselect_metadata.rb + - lib/open_api_sdk/models/shared/customfieldcreatetext.rb + - lib/open_api_sdk/models/shared/customfieldcreatetext_metadata.rb + - lib/open_api_sdk/models/shared/customfielddate.rb + - lib/open_api_sdk/models/shared/customfielddate_metadata.rb + - lib/open_api_sdk/models/shared/customfielddateproperties.rb + - lib/open_api_sdk/models/shared/customfieldnumber.rb + - lib/open_api_sdk/models/shared/customfieldnumber_metadata.rb + - lib/open_api_sdk/models/shared/customfieldnumberproperties.rb + - lib/open_api_sdk/models/shared/customfieldselect.rb + - lib/open_api_sdk/models/shared/customfieldselect_metadata.rb + - lib/open_api_sdk/models/shared/customfieldselectoption.rb + - lib/open_api_sdk/models/shared/customfieldselectproperties.rb + - lib/open_api_sdk/models/shared/customfieldsortproperty.rb + - lib/open_api_sdk/models/shared/customfieldtext.rb + - lib/open_api_sdk/models/shared/customfieldtext_metadata.rb + - lib/open_api_sdk/models/shared/customfieldtextproperties.rb + - lib/open_api_sdk/models/shared/customfieldtype.rb + - lib/open_api_sdk/models/shared/customfieldupdate.rb + - lib/open_api_sdk/models/shared/customfieldupdatecheckbox.rb + - lib/open_api_sdk/models/shared/customfieldupdatecheckbox_metadata.rb + - lib/open_api_sdk/models/shared/customfieldupdatedate.rb + - lib/open_api_sdk/models/shared/customfieldupdatedate_metadata.rb + - lib/open_api_sdk/models/shared/customfieldupdatenumber.rb + - lib/open_api_sdk/models/shared/customfieldupdatenumber_metadata.rb + - lib/open_api_sdk/models/shared/customfieldupdateselect.rb + - lib/open_api_sdk/models/shared/customfieldupdateselect_metadata.rb + - lib/open_api_sdk/models/shared/customfieldupdatetext.rb + - lib/open_api_sdk/models/shared/customfieldupdatetext_metadata.rb + - lib/open_api_sdk/models/shared/discount.rb + - lib/open_api_sdk/models/shared/discountcreate.rb + - lib/open_api_sdk/models/shared/discountduration.rb + - lib/open_api_sdk/models/shared/discountfixedonceforeverduration.rb + - lib/open_api_sdk/models/shared/discountfixedonceforeverduration_metadata.rb + - lib/open_api_sdk/models/shared/discountfixedonceforeverdurationbase.rb + - lib/open_api_sdk/models/shared/discountfixedonceforeverdurationbase_metadata.rb + - lib/open_api_sdk/models/shared/discountfixedonceforeverdurationcreate.rb + - lib/open_api_sdk/models/shared/discountfixedonceforeverdurationcreate_metadata.rb + - lib/open_api_sdk/models/shared/discountfixedrepeatduration.rb + - lib/open_api_sdk/models/shared/discountfixedrepeatduration_metadata.rb + - lib/open_api_sdk/models/shared/discountfixedrepeatdurationbase.rb + - lib/open_api_sdk/models/shared/discountfixedrepeatdurationbase_metadata.rb + - lib/open_api_sdk/models/shared/discountfixedrepeatdurationcreate.rb + - lib/open_api_sdk/models/shared/discountfixedrepeatdurationcreate_metadata.rb + - lib/open_api_sdk/models/shared/discountpercentageonceforeverduration.rb + - lib/open_api_sdk/models/shared/discountpercentageonceforeverduration_metadata.rb + - lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationbase.rb + - lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationbase_metadata.rb + - lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate.rb + - lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate_metadata.rb + - lib/open_api_sdk/models/shared/discountpercentagerepeatduration.rb + - lib/open_api_sdk/models/shared/discountpercentagerepeatduration_metadata.rb + - lib/open_api_sdk/models/shared/discountpercentagerepeatdurationbase.rb + - lib/open_api_sdk/models/shared/discountpercentagerepeatdurationbase_metadata.rb + - lib/open_api_sdk/models/shared/discountpercentagerepeatdurationcreate.rb + - lib/open_api_sdk/models/shared/discountpercentagerepeatdurationcreate_metadata.rb + - lib/open_api_sdk/models/shared/discountproduct.rb + - lib/open_api_sdk/models/shared/discountproduct_metadata.rb + - lib/open_api_sdk/models/shared/discountsortproperty.rb + - lib/open_api_sdk/models/shared/discounttype.rb + - lib/open_api_sdk/models/shared/discountupdate.rb + - lib/open_api_sdk/models/shared/discountupdate_metadata.rb + - lib/open_api_sdk/models/shared/downloadablefilecreate.rb + - lib/open_api_sdk/models/shared/downloadablefileread.rb + - lib/open_api_sdk/models/shared/downloadableread.rb + - lib/open_api_sdk/models/shared/event.rb + - lib/open_api_sdk/models/shared/event_metadata.rb + - lib/open_api_sdk/models/shared/eventcreatecustomer.rb + - lib/open_api_sdk/models/shared/eventcreatecustomer_metadata.rb + - lib/open_api_sdk/models/shared/eventcreateexternalcustomer.rb + - lib/open_api_sdk/models/shared/eventcreateexternalcustomer_metadata.rb + - lib/open_api_sdk/models/shared/eventname.rb + - lib/open_api_sdk/models/shared/eventnamessortproperty.rb + - lib/open_api_sdk/models/shared/events.rb + - lib/open_api_sdk/models/shared/eventsingest.rb + - lib/open_api_sdk/models/shared/eventsingestresponse.rb + - lib/open_api_sdk/models/shared/eventsortproperty.rb + - lib/open_api_sdk/models/shared/eventsource.rb + - lib/open_api_sdk/models/shared/existingproductprice.rb + - lib/open_api_sdk/models/shared/filecreate.rb + - lib/open_api_sdk/models/shared/filedownload.rb + - lib/open_api_sdk/models/shared/filepatch.rb + - lib/open_api_sdk/models/shared/fileread.rb + - lib/open_api_sdk/models/shared/fileservicetypes.rb + - lib/open_api_sdk/models/shared/fileupload.rb + - lib/open_api_sdk/models/shared/fileuploadcompleted.rb + - lib/open_api_sdk/models/shared/filter.rb + - lib/open_api_sdk/models/shared/filterclause.rb + - lib/open_api_sdk/models/shared/filterconjunction.rb + - lib/open_api_sdk/models/shared/filteroperator.rb + - lib/open_api_sdk/models/shared/func.rb + - lib/open_api_sdk/models/shared/grant_types.rb + - lib/open_api_sdk/models/shared/introspecttokenrequest.rb + - lib/open_api_sdk/models/shared/introspecttokenrequest_token_type_hint.rb + - lib/open_api_sdk/models/shared/introspecttokenresponse.rb + - lib/open_api_sdk/models/shared/items.rb + - lib/open_api_sdk/models/shared/legacyrecurringproductprice.rb + - lib/open_api_sdk/models/shared/legacyrecurringproductpricecustom.rb + - lib/open_api_sdk/models/shared/legacyrecurringproductpricefixed.rb + - lib/open_api_sdk/models/shared/legacyrecurringproductpricefree.rb + - lib/open_api_sdk/models/shared/licensekeyactivate.rb + - lib/open_api_sdk/models/shared/licensekeyactivate_conditions.rb + - lib/open_api_sdk/models/shared/licensekeyactivate_meta.rb + - lib/open_api_sdk/models/shared/licensekeyactivationbase.rb + - lib/open_api_sdk/models/shared/licensekeyactivationread.rb + - lib/open_api_sdk/models/shared/licensekeyactivationread_meta.rb + - lib/open_api_sdk/models/shared/licensekeycustomer.rb + - lib/open_api_sdk/models/shared/licensekeycustomer_metadata.rb + - lib/open_api_sdk/models/shared/licensekeycustomer_tax_id.rb + - lib/open_api_sdk/models/shared/licensekeydeactivate.rb + - lib/open_api_sdk/models/shared/licensekeyread.rb + - lib/open_api_sdk/models/shared/licensekeystatus.rb + - lib/open_api_sdk/models/shared/licensekeyupdate.rb + - lib/open_api_sdk/models/shared/licensekeyvalidate.rb + - lib/open_api_sdk/models/shared/licensekeywithactivations.rb + - lib/open_api_sdk/models/shared/listresource_benefit_.rb + - lib/open_api_sdk/models/shared/listresource_benefitgrant_.rb + - lib/open_api_sdk/models/shared/listresource_checkout_.rb + - lib/open_api_sdk/models/shared/listresource_checkoutlink_.rb + - lib/open_api_sdk/models/shared/listresource_customer_.rb + - lib/open_api_sdk/models/shared/listresource_customerbenefitgrant_.rb + - lib/open_api_sdk/models/shared/listresource_customercustomermeter_.rb + - lib/open_api_sdk/models/shared/listresource_customermeter_.rb + - lib/open_api_sdk/models/shared/listresource_customerorder_.rb + - lib/open_api_sdk/models/shared/listresource_customersubscription_.rb + - lib/open_api_sdk/models/shared/listresource_customfield_.rb + - lib/open_api_sdk/models/shared/listresource_discount_.rb + - lib/open_api_sdk/models/shared/listresource_downloadableread_.rb + - lib/open_api_sdk/models/shared/listresource_event_.rb + - lib/open_api_sdk/models/shared/listresource_eventname_.rb + - lib/open_api_sdk/models/shared/listresource_fileread_.rb + - lib/open_api_sdk/models/shared/listresource_licensekeyread_.rb + - lib/open_api_sdk/models/shared/listresource_meter_.rb + - lib/open_api_sdk/models/shared/listresource_oauth2client_.rb + - lib/open_api_sdk/models/shared/listresource_order_.rb + - lib/open_api_sdk/models/shared/listresource_organization_.rb + - lib/open_api_sdk/models/shared/listresource_product_.rb + - lib/open_api_sdk/models/shared/listresource_refund_.rb + - lib/open_api_sdk/models/shared/listresource_subscription_.rb + - lib/open_api_sdk/models/shared/listresource_union_paymentmethodcard_paymentmethodgeneric_.rb + - lib/open_api_sdk/models/shared/loc.rb + - lib/open_api_sdk/models/shared/meta.rb + - lib/open_api_sdk/models/shared/metadata.rb + - lib/open_api_sdk/models/shared/metadataquery.rb + - lib/open_api_sdk/models/shared/meter.rb + - lib/open_api_sdk/models/shared/meter_aggregation.rb + - lib/open_api_sdk/models/shared/meter_metadata.rb + - lib/open_api_sdk/models/shared/metercreate.rb + - lib/open_api_sdk/models/shared/metercreate_aggregation.rb + - lib/open_api_sdk/models/shared/metercreate_metadata.rb + - lib/open_api_sdk/models/shared/meterquantities.rb + - lib/open_api_sdk/models/shared/meterquantity.rb + - lib/open_api_sdk/models/shared/metersortproperty.rb + - lib/open_api_sdk/models/shared/meterupdate.rb + - lib/open_api_sdk/models/shared/meterupdate_metadata.rb + - lib/open_api_sdk/models/shared/metric.rb + - lib/open_api_sdk/models/shared/metricperiod.rb + - lib/open_api_sdk/models/shared/metrics.rb + - lib/open_api_sdk/models/shared/metricsintervallimit.rb + - lib/open_api_sdk/models/shared/metricsintervalslimits.rb + - lib/open_api_sdk/models/shared/metricslimits.rb + - lib/open_api_sdk/models/shared/metricsresponse.rb + - lib/open_api_sdk/models/shared/metrictype.rb + - lib/open_api_sdk/models/shared/oauth2client.rb + - lib/open_api_sdk/models/shared/oauth2clientconfiguration.rb + - lib/open_api_sdk/models/shared/oauth2clientconfiguration_grant_types.rb + - lib/open_api_sdk/models/shared/oauth2clientconfiguration_token_endpoint_auth_method.rb + - lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate.rb + - lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate_grant_types.rb + - lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate_token_endpoint_auth_method.rb + - lib/open_api_sdk/models/shared/oauth2clientpublic.rb + - lib/open_api_sdk/models/shared/order.rb + - lib/open_api_sdk/models/shared/order_custom_field_data.rb + - lib/open_api_sdk/models/shared/order_metadata.rb + - lib/open_api_sdk/models/shared/orderbillingreason.rb + - lib/open_api_sdk/models/shared/ordercustomer.rb + - lib/open_api_sdk/models/shared/ordercustomer_metadata.rb + - lib/open_api_sdk/models/shared/ordercustomer_tax_id.rb + - lib/open_api_sdk/models/shared/orderdiscount.rb + - lib/open_api_sdk/models/shared/orderinvoice.rb + - lib/open_api_sdk/models/shared/orderitemschema.rb + - lib/open_api_sdk/models/shared/orderproduct.rb + - lib/open_api_sdk/models/shared/orderproduct_metadata.rb + - lib/open_api_sdk/models/shared/ordersortproperty.rb + - lib/open_api_sdk/models/shared/orderstatus.rb + - lib/open_api_sdk/models/shared/ordersubscription.rb + - lib/open_api_sdk/models/shared/ordersubscription_metadata.rb + - lib/open_api_sdk/models/shared/organization.rb + - lib/open_api_sdk/models/shared/organizationavatarfilecreate.rb + - lib/open_api_sdk/models/shared/organizationavatarfileread.rb + - lib/open_api_sdk/models/shared/organizationcreate.rb + - lib/open_api_sdk/models/shared/organizationdetails.rb + - lib/open_api_sdk/models/shared/organizationfeaturesettings.rb + - lib/open_api_sdk/models/shared/organizationsociallink.rb + - lib/open_api_sdk/models/shared/organizationsocialplatforms.rb + - lib/open_api_sdk/models/shared/organizationsortproperty.rb + - lib/open_api_sdk/models/shared/organizationsubscriptionsettings.rb + - lib/open_api_sdk/models/shared/organizationupdate.rb + - lib/open_api_sdk/models/shared/pagination.rb + - lib/open_api_sdk/models/shared/paymentmethodcard.rb + - lib/open_api_sdk/models/shared/paymentmethodcarddata.rb + - lib/open_api_sdk/models/shared/paymentmethodgeneric.rb + - lib/open_api_sdk/models/shared/paymentprocessor.rb + - lib/open_api_sdk/models/shared/permission.rb + - lib/open_api_sdk/models/shared/previous_properties.rb + - lib/open_api_sdk/models/shared/prices.rb + - lib/open_api_sdk/models/shared/product.rb + - lib/open_api_sdk/models/shared/product_metadata.rb + - lib/open_api_sdk/models/shared/productbenefitsupdate.rb + - lib/open_api_sdk/models/shared/productbillingtype.rb + - lib/open_api_sdk/models/shared/productcreate.rb + - lib/open_api_sdk/models/shared/productcreate_metadata.rb + - lib/open_api_sdk/models/shared/productcreate_prices.rb + - lib/open_api_sdk/models/shared/productmediafilecreate.rb + - lib/open_api_sdk/models/shared/productmediafileread.rb + - lib/open_api_sdk/models/shared/productprice.rb + - lib/open_api_sdk/models/shared/productpricecustom.rb + - lib/open_api_sdk/models/shared/productpricecustomcreate.rb + - lib/open_api_sdk/models/shared/productpricefixed.rb + - lib/open_api_sdk/models/shared/productpricefixedcreate.rb + - lib/open_api_sdk/models/shared/productpricefree.rb + - lib/open_api_sdk/models/shared/productpricefreecreate.rb + - lib/open_api_sdk/models/shared/productpricemeter.rb + - lib/open_api_sdk/models/shared/productpricemeteredunit.rb + - lib/open_api_sdk/models/shared/productpricemeteredunitcreate.rb + - lib/open_api_sdk/models/shared/productpricetype.rb + - lib/open_api_sdk/models/shared/productsortproperty.rb + - lib/open_api_sdk/models/shared/productupdate.rb + - lib/open_api_sdk/models/shared/productupdate_metadata.rb + - lib/open_api_sdk/models/shared/productupdate_prices.rb + - lib/open_api_sdk/models/shared/properties.rb + - lib/open_api_sdk/models/shared/propertyaggregation.rb + - lib/open_api_sdk/models/shared/refreshtokenrequest.rb + - lib/open_api_sdk/models/shared/refund.rb + - lib/open_api_sdk/models/shared/refund_metadata.rb + - lib/open_api_sdk/models/shared/refundcreate.rb + - lib/open_api_sdk/models/shared/refundcreate_metadata.rb + - lib/open_api_sdk/models/shared/refundreason.rb + - lib/open_api_sdk/models/shared/refundsortproperty.rb + - lib/open_api_sdk/models/shared/refundstatus.rb + - lib/open_api_sdk/models/shared/revoketokenrequest.rb + - lib/open_api_sdk/models/shared/revoketokenresponse.rb + - lib/open_api_sdk/models/shared/s3downloadurl.rb + - lib/open_api_sdk/models/shared/s3filecreatemultipart.rb + - lib/open_api_sdk/models/shared/s3filecreatepart.rb + - lib/open_api_sdk/models/shared/s3fileuploadcompletedpart.rb + - lib/open_api_sdk/models/shared/s3fileuploadmultipart.rb + - lib/open_api_sdk/models/shared/s3fileuploadpart.rb + - lib/open_api_sdk/models/shared/scope.rb + - lib/open_api_sdk/models/shared/security.rb + - lib/open_api_sdk/models/shared/subscription.rb + - lib/open_api_sdk/models/shared/subscription_prices.rb + - lib/open_api_sdk/models/shared/subscriptioncancel.rb + - lib/open_api_sdk/models/shared/subscriptioncustomer.rb + - lib/open_api_sdk/models/shared/subscriptioncustomer_metadata.rb + - lib/open_api_sdk/models/shared/subscriptiondiscount.rb + - lib/open_api_sdk/models/shared/subscriptionmeter.rb + - lib/open_api_sdk/models/shared/subscriptionprorationbehavior.rb + - lib/open_api_sdk/models/shared/subscriptionrecurringinterval.rb + - lib/open_api_sdk/models/shared/subscriptionrevoke.rb + - lib/open_api_sdk/models/shared/subscriptionsortproperty.rb + - lib/open_api_sdk/models/shared/subscriptionstatus.rb + - lib/open_api_sdk/models/shared/subscriptionupdate.rb + - lib/open_api_sdk/models/shared/subscriptionupdateproduct.rb + - lib/open_api_sdk/models/shared/subtype.rb + - lib/open_api_sdk/models/shared/switching_from.rb + - lib/open_api_sdk/models/shared/tax_id.rb + - lib/open_api_sdk/models/shared/taxidformat.rb + - lib/open_api_sdk/models/shared/timeframe.rb + - lib/open_api_sdk/models/shared/timeinterval.rb + - lib/open_api_sdk/models/shared/token_endpoint_auth_method.rb + - lib/open_api_sdk/models/shared/token_type.rb + - lib/open_api_sdk/models/shared/token_type_hint.rb + - lib/open_api_sdk/models/shared/tokenresponse.rb + - lib/open_api_sdk/models/shared/unit_amount.rb + - lib/open_api_sdk/models/shared/userinfoorganization.rb + - lib/open_api_sdk/models/shared/userinfouser.rb + - lib/open_api_sdk/models/shared/validatedlicensekey.rb + - lib/open_api_sdk/models/shared/validationerror.rb + - lib/open_api_sdk/models/shared/value.rb + - lib/open_api_sdk/models/shared/webhookbenefitcreatedpayload.rb + - lib/open_api_sdk/models/shared/webhookbenefitgrantcreatedpayload.rb + - lib/open_api_sdk/models/shared/webhookbenefitgrantcycledpayload.rb + - lib/open_api_sdk/models/shared/webhookbenefitgrantrevokedpayload.rb + - lib/open_api_sdk/models/shared/webhookbenefitgrantupdatedpayload.rb + - lib/open_api_sdk/models/shared/webhookbenefitupdatedpayload.rb + - lib/open_api_sdk/models/shared/webhookcheckoutcreatedpayload.rb + - lib/open_api_sdk/models/shared/webhookcheckoutupdatedpayload.rb + - lib/open_api_sdk/models/shared/webhookcustomercreatedpayload.rb + - lib/open_api_sdk/models/shared/webhookcustomerdeletedpayload.rb + - lib/open_api_sdk/models/shared/webhookcustomerstatechangedpayload.rb + - lib/open_api_sdk/models/shared/webhookcustomerupdatedpayload.rb + - lib/open_api_sdk/models/shared/webhookordercreatedpayload.rb + - lib/open_api_sdk/models/shared/webhookorderpaidpayload.rb + - lib/open_api_sdk/models/shared/webhookorderrefundedpayload.rb + - lib/open_api_sdk/models/shared/webhookorderupdatedpayload.rb + - lib/open_api_sdk/models/shared/webhookorganizationupdatedpayload.rb + - lib/open_api_sdk/models/shared/webhookproductcreatedpayload.rb + - lib/open_api_sdk/models/shared/webhookproductupdatedpayload.rb + - lib/open_api_sdk/models/shared/webhookrefundcreatedpayload.rb + - lib/open_api_sdk/models/shared/webhookrefundupdatedpayload.rb + - lib/open_api_sdk/models/shared/webhooksubscriptionactivepayload.rb + - lib/open_api_sdk/models/shared/webhooksubscriptioncanceledpayload.rb + - lib/open_api_sdk/models/shared/webhooksubscriptioncreatedpayload.rb + - lib/open_api_sdk/models/shared/webhooksubscriptionrevokedpayload.rb + - lib/open_api_sdk/models/shared/webhooksubscriptionuncanceledpayload.rb + - lib/open_api_sdk/models/shared/webhooksubscriptionupdatedpayload.rb + - lib/open_api_sdk/models/webhooks/_endpointbenefit_created_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_created_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_cycled_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_revoked_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_updated_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointbenefit_updated_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointcheckout_created_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointcheckout_updated_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointcustomer_created_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointcustomer_deleted_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointcustomer_state_changed_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointcustomer_updated_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointorder_created_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointorder_paid_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointorder_refunded_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointorder_updated_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointorganization_updated_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointproduct_created_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointproduct_updated_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointrefund_created_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointrefund_updated_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointsubscription_active_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointsubscription_canceled_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointsubscription_created_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointsubscription_revoked_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointsubscription_uncanceled_post_response.rb + - lib/open_api_sdk/models/webhooks/_endpointsubscription_updated_post_response.rb + - lib/open_api_sdk/oauth2.rb + - lib/open_api_sdk/oauth2_clients.rb + - lib/open_api_sdk/orders.rb + - lib/open_api_sdk/organizations.rb + - lib/open_api_sdk/polar.rb + - lib/open_api_sdk/products.rb + - lib/open_api_sdk/refunds.rb + - lib/open_api_sdk/sdk_hooks/hooks.rb + - lib/open_api_sdk/sdk_hooks/types.rb + - lib/open_api_sdk/sdkconfiguration.rb + - lib/open_api_sdk/subscriptions.rb + - lib/open_api_sdk/utils/retries.rb + - lib/open_api_sdk/utils/utils.rb + - lib/polar-sdk.rb + - polar-sdk.gemspec + - sorbet/config + - sorbet/rbi/annotations/.gitattributes + - sorbet/rbi/gems/.gitattributes + - sorbet/tapioca/config.yml + - sorbet/tapioca/require.rb +examples: + _endpointcheckout_created_post: + speakeasy-default-endpointcheckout-created-post: + requestBody: + application/json: {"type": "checkout.created", "data": {"created_at": "2025-11-12T14:26:42.882Z", "modified_at": "2024-05-27T05:08:06.235Z", "id": "", "payment_processor": "stripe", "status": "failed", "client_secret": "", "url": "https://heavy-beret.com/", "expires_at": "2023-02-25T02:26:48.460Z", "success_url": "https://sardonic-final.info/", "embed_origin": "", "amount": 962818, "discount_amount": 6400, "net_amount": 426090, "tax_amount": 648726, "total_amount": 210702, "currency": "Riel", "product_id": "", "product_price_id": "", "discount_id": "", "allow_discount_codes": false, "require_billing_address": false, "is_discount_applicable": false, "is_free_product_price": false, "is_payment_required": false, "is_payment_setup_required": false, "is_payment_form_required": false, "customer_id": "", "customer_name": "", "customer_email": "", "customer_ip_address": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {}, "metadata": {"key": 366960, "key1": false}, "customer_external_id": "", "products": [{"created_at": "2023-01-21T11:17:02.173Z", "modified_at": "2024-08-14T19:11:10.463Z", "id": "", "name": "", "description": "accessorise ack pave", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-08-13T03:41:03.035Z", "modified_at": "2025-03-10T13:49:13.967Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "unit_amount": "", "cap_amount": 383315, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2023-10-09T19:13:38.530Z", "modified_at": "2025-03-10T05:19:02.590Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 948682, "maximum_amount": 780456, "preset_amount": 117746}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/media", "mime_type": "", "size": 757308, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-07-16T16:32:06.101Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-12-08T10:05:37.208Z", "size_readable": "", "public_url": "https://separate-pinstripe.com"}]}], "product": {"created_at": "2025-08-22T02:17:20.661Z", "modified_at": "2025-09-12T19:41:14.261Z", "id": "", "name": "", "description": "darling lined nephew crank", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"id": "", "created_at": "2025-11-18T07:12:26.749Z", "modified_at": "2024-08-14T14:29:29.201Z", "type": "github_repository", "description": "phew empty flawed worth radiant anti of blissfully", "selectable": false, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2024-03-12T06:20:21.161Z", "modified_at": "2024-06-27T20:20:27.400Z", "type": "license_keys", "description": "ack neatly jagged as weekly drat nor why", "selectable": true, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2024-03-31T07:42:35.077Z", "modified_at": "2025-04-30T13:13:01.707Z", "type": "github_repository", "description": "ironclad chilly seriously finger unbearably and bourgeoisie deplore unless", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/share", "mime_type": "", "size": 366209, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-08T17:09:22.377Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-01-15T08:45:21.256Z", "size_readable": "", "public_url": "https://cumbersome-seafood.net"}]}, "product_price": {"created_at": "2024-07-13T21:39:11.166Z", "modified_at": "2024-10-08T14:17:28.404Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month"}, "discount": {"duration": "forever", "duration_in_months": 928294, "type": "fixed", "basis_points": 887018, "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-11-17T23:09:10.440Z", "modified_at": "2023-10-01T11:23:28.337Z", "id": "", "metadata": {"key": 785273, "key1": true, "key2": ""}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 192934, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-03-09T08:02:38.742Z", "modified_at": "2023-12-31T13:39:55.566Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 597839, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2025-10-02T17:17:35.825Z", "modified_at": "2023-09-28T13:20:26.690Z", "id": "", "metadata": {"key": 1407.44, "key1": 229266}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 660585, "required": false}], "customer_metadata": {"key": true}, "customer_billing_address_fields": {"country": true, "state": false, "city": false, "postal_code": true, "line1": false, "line2": false}}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointcheckout_updated_post: + speakeasy-default-endpointcheckout-updated-post: + requestBody: + application/json: {"type": "checkout.updated", "data": {"created_at": "2025-10-04T13:06:10.658Z", "modified_at": "2024-10-02T21:25:15.366Z", "id": "", "payment_processor": "stripe", "status": "failed", "client_secret": "", "url": "https://square-cafe.biz/", "expires_at": "2025-03-25T08:55:11.873Z", "success_url": "https://physical-import.name/", "embed_origin": "", "amount": 245418, "discount_amount": 624213, "net_amount": 615580, "tax_amount": 24587, "total_amount": 447013, "currency": "New Israeli Sheqel", "product_id": "", "product_price_id": "", "discount_id": "", "allow_discount_codes": true, "require_billing_address": true, "is_discount_applicable": false, "is_free_product_price": false, "is_payment_required": true, "is_payment_setup_required": false, "is_payment_form_required": true, "customer_id": "", "customer_name": "", "customer_email": "", "customer_ip_address": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {"key": "", "key1": "", "key2": ""}, "metadata": {"key": 879426}, "customer_external_id": "", "products": [{"created_at": "2023-07-11T15:52:54.020Z", "modified_at": "2025-01-24T14:28:29.444Z", "id": "", "name": "", "description": "sashay thankfully overreact yum before overspend red bitter recklessly along", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2025-10-30T16:31:38.299Z", "modified_at": "2024-09-08T20:06:51.922Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "price_amount": 382177, "legacy": true}, {"created_at": "2024-01-01T20:52:22.271Z", "modified_at": "2023-07-12T23:12:27.554Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "month"}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/ports", "mime_type": "", "size": 169809, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-05-04T17:24:48.236Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2024-05-10T22:17:32.087Z", "size_readable": "", "public_url": "https://repentant-hammock.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/ports", "mime_type": "", "size": 673778, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-06-10T14:04:55.695Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-12-09T06:38:01.979Z", "size_readable": "", "public_url": "https://whole-guard.name"}]}], "product": {"created_at": "2023-11-12T16:32:46.306Z", "modified_at": "2025-07-30T13:09:54.405Z", "id": "", "name": "", "description": "blah likewise whose notwithstanding airline aboard frightened enfold colorfully", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"id": "", "created_at": "2024-01-15T18:22:33.094Z", "modified_at": "2024-11-11T01:37:51.103Z", "type": "github_repository", "description": "whoever boohoo substantiate cuddly entwine vice", "selectable": false, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2023-04-01T00:57:21.418Z", "modified_at": "2024-05-15T00:49:45.246Z", "type": "license_keys", "description": "because um however whereas", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2023-08-19T03:03:05.766Z", "modified_at": "2025-09-01T08:03:56.452Z", "type": "custom", "description": "less kiddingly brr", "selectable": true, "deletable": false, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2024-12-06T17:16:07.395Z", "modified_at": "2023-05-08T03:57:28.293Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 875758}, "discount": {"duration": "forever", "type": "fixed", "basis_points": 16598, "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2025-03-31T20:44:56.995Z", "modified_at": "2025-06-11T17:42:23.634Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}]}}, "order": 157284, "required": true}], "customer_metadata": {"key": 779675}, "customer_billing_address_fields": {"country": false, "state": true, "city": true, "postal_code": false, "line1": false, "line2": true}}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointcustomer_created_post: + speakeasy-default-endpointcustomer-created-post: + requestBody: + application/json: {"type": "customer.created", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-11-05T00:02:45.979Z", "modified_at": "2025-11-25T19:38:56.737Z", "metadata": {"key": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-12-23T01:13:50.641Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointcustomer_updated_post: + speakeasy-default-endpointcustomer-updated-post: + requestBody: + application/json: {"type": "customer.updated", "data": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-10-11T01:52:16.669Z", "modified_at": "2024-07-17T00:54:05.167Z", "metadata": {"key": 906944, "key1": false}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-10-11T03:02:11.318Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _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-23T22:06:15.045Z", "modified_at": "2025-04-24T07:05:50.504Z", "metadata": {"key": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-05-11T04:45:12.206Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _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": "2024-04-26T07:11:39.517Z", "modified_at": "2023-06-21T11:54:36.368Z", "metadata": {"key": 6612.66, "key1": 162534}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-11-01T16:24:29.890Z", "active_subscriptions": [{"id": "e5149aae-e521-42b9-b24c-abb3d71eea2e", "created_at": "2025-12-23T00:00:00.457Z", "modified_at": "2024-03-19T21:14:46.825Z", "metadata": {}, "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": [{"created_at": "2025-06-03T23:57:08.417Z", "modified_at": "2025-07-31T05:42:27.761Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}, {"created_at": "2024-07-04T21:55:47.759Z", "modified_at": "2025-09-17T10:53:45.757Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}, {"created_at": "2024-04-19T12:37:55.806Z", "modified_at": "2025-02-24T12:54:31.112Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}]}, {"id": "e5149aae-e521-42b9-b24c-abb3d71eea2e", "created_at": "2025-07-09T06:32:19.884Z", "modified_at": "2024-02-15T21:51:13.048Z", "metadata": {}, "status": "active", "amount": 1000, "currency": "usd", "recurring_interval": "month", "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": [{"created_at": "2024-05-21T10:11:40.885Z", "modified_at": "2024-05-01T05:59:19.269Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}, {"created_at": "2023-11-21T13:12:44.218Z", "modified_at": "2023-02-15T23:19:28.506Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}]}], "granted_benefits": [{"id": "d322132c-a9d0-4e0d-b8d3-d81ad021a3a9", "created_at": "2024-01-06T17:05:41.501Z", "modified_at": "2024-06-15T05:38:38.765Z", "granted_at": "2025-01-03T13:37:00Z", "benefit_id": "397a17aa-15cf-4cb4-9333-18040203cf98", "benefit_type": "downloadables", "properties": {}}], "active_meters": [{"created_at": "2023-04-30T20:06:18.800Z", "modified_at": "2025-06-17T18:24:55.187Z", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75}], "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointorder_created_post: + speakeasy-default-endpointorder-created-post: + requestBody: + application/json: {"type": "order.created", "data": {"id": "", "created_at": "2024-11-11T12:46:15.007Z", "modified_at": "2024-03-23T03:54:38.261Z", "status": "refunded", "paid": true, "subtotal_amount": 284355, "discount_amount": 196366, "net_amount": 485666, "amount": 81588, "tax_amount": 605593, "total_amount": 738083, "refunded_amount": 409401, "refunded_tax_amount": 229323, "currency": "Denar", "billing_reason": "subscription_update", "billing_address": {"country": "FR"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": 248386, "key1": 3868.55, "key2": ""}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-04-15T20:14:00.592Z", "modified_at": "2023-09-26T00:50:02.940Z", "metadata": {"key": 656121, "key1": 9233.29, "key2": 694649}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-05-22T16:28:34.624Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "user_id": "", "product": {"metadata": {"key": "", "key1": 935855, "key2": 2496.08}, "created_at": "2025-08-23T02:33:27.360Z", "modified_at": "2025-10-21T04:45:49.423Z", "id": "", "name": "", "description": "neatly merge rag disconnection reach because eventually contravene", "recurring_interval": "year", "is_recurring": false, "is_archived": true, "organization_id": ""}, "discount": {"duration": "repeating", "type": "fixed", "basis_points": 972228, "created_at": "2023-06-23T18:54:19.334Z", "modified_at": "2025-08-11T01:22:59.503Z", "id": "", "metadata": {"key": true, "key1": ""}, "name": "", "code": "", "starts_at": "2024-06-29T19:48:33.823Z", "ends_at": "2023-10-13T23:31:11.679Z", "max_redemptions": 344316, "redemptions_count": 559255, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {"key": false, "key1": "", "key2": true}, "created_at": "2025-10-26T04:20:46.828Z", "modified_at": "2024-02-21T07:49:51.858Z", "id": "", "amount": 162785, "currency": "Kina", "recurring_interval": "month", "status": "incomplete", "current_period_start": "2023-07-16T15:15:20.704Z", "current_period_end": "2025-07-20T01:25:23.024Z", "cancel_at_period_end": false, "canceled_at": "2025-05-19T17:32:22.162Z", "started_at": "2024-04-06T15:59:15.318Z", "ends_at": "2023-09-04T19:31:06.745Z", "ended_at": "2025-09-25T00:56:37.047Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "too_complex", "customer_cancellation_comment": ""}, "items": [{"created_at": "2025-01-27T10:45:43.275Z", "modified_at": "2024-07-14T13:43:10.873Z", "id": "", "label": "", "amount": 579249, "tax_amount": 463268, "proration": true, "product_price_id": ""}, {"created_at": "2025-03-17T12:03:23.602Z", "modified_at": "2025-09-21T14:39:10.503Z", "id": "", "label": "", "amount": 486225, "tax_amount": 575297, "proration": true, "product_price_id": ""}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointorder_updated_post: + speakeasy-default-endpointorder-updated-post: + requestBody: + application/json: {"type": "order.updated", "data": {"id": "", "created_at": "2023-07-30T20:50:28.569Z", "modified_at": "2024-03-02T13:14:46.788Z", "status": "paid", "paid": true, "subtotal_amount": 910012, "discount_amount": 738831, "net_amount": 68465, "amount": 334220, "tax_amount": 7263, "total_amount": 832690, "refunded_amount": 700550, "refunded_tax_amount": 61899, "currency": "Colombian Peso", "billing_reason": "subscription_create", "billing_address": {"country": "US"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-06-13T08:03:05.271Z", "modified_at": "2025-04-22T08:20:32.904Z", "metadata": {"key": 162825, "key1": false, "key2": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-08-18T13:18:44.717Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "user_id": "", "product": {"metadata": {"key": 516915, "key1": true, "key2": 3570.43}, "created_at": "2024-05-23T17:41:10.316Z", "modified_at": "2023-04-06T20:49:28.848Z", "id": "", "name": "", "description": "lest over gaseous ill far-off badly", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": ""}, "discount": {"duration": "once", "duration_in_months": 252847, "type": "fixed", "amount": 270973, "currency": "Pa'anga", "created_at": "2024-05-06T07:36:36.588Z", "modified_at": "2024-02-28T01:41:38.707Z", "id": "", "metadata": {"key": "", "key1": 2876.02}, "name": "", "code": "", "starts_at": "2025-01-09T01:08:18.771Z", "ends_at": "2024-12-08T05:33:30.842Z", "max_redemptions": 851788, "redemptions_count": 927547, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {"key": 667630, "key1": ""}, "created_at": "2023-05-18T21:27:20.128Z", "modified_at": "2024-07-11T06:32:04.767Z", "id": "", "amount": 291443, "currency": "Turkish Lira", "recurring_interval": "year", "status": "incomplete_expired", "current_period_start": "2024-04-27T20:21:39.429Z", "current_period_end": "2023-03-05T13:16:50.130Z", "cancel_at_period_end": false, "canceled_at": "2023-01-07T04:01:29.671Z", "started_at": "2025-12-04T07:00:35.238Z", "ends_at": "2025-04-19T13:37:03.701Z", "ended_at": "2023-01-04T20:55:05.952Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "customer_service", "customer_cancellation_comment": ""}, "items": [{"created_at": "2024-07-02T07:53:49.841Z", "modified_at": "2024-08-16T02:12:27.937Z", "id": "", "label": "", "amount": 25445, "tax_amount": 335609, "proration": false, "product_price_id": ""}, {"created_at": "2025-05-27T01:46:10.631Z", "modified_at": "2024-10-20T14:26:05.582Z", "id": "", "label": "", "amount": 157162, "tax_amount": 32649, "proration": true, "product_price_id": ""}, {"created_at": "2024-10-12T15:26:10.266Z", "modified_at": "2025-08-10T20:15:57.071Z", "id": "", "label": "", "amount": 748679, "tax_amount": 303463, "proration": false, "product_price_id": ""}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointorder_paid_post: + speakeasy-default-endpointorder-paid-post: + requestBody: + application/json: {"type": "order.paid", "data": {"id": "", "created_at": "2023-06-20T16:51:26.974Z", "modified_at": "2023-07-05T02:29:13.883Z", "status": "paid", "paid": true, "subtotal_amount": 279288, "discount_amount": 937633, "net_amount": 789757, "amount": 296121, "tax_amount": 852158, "total_amount": 356116, "refunded_amount": 518304, "refunded_tax_amount": 963472, "currency": "Cape Verde Escudo", "billing_reason": "subscription_update", "billing_address": {"country": "FR"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": "", "key1": 685627}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-09-05T01:56:49.572Z", "modified_at": "2023-07-13T16:16:00.191Z", "metadata": {"key": 4962.91, "key1": 807521}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-11-29T10:23:33.223Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "user_id": "", "product": {"metadata": {}, "created_at": "2025-05-27T18:14:36.669Z", "modified_at": "2023-08-29T00:07:39.616Z", "id": "", "name": "", "description": "kindly unless reporter courtroom midst the underneath onto", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": ""}, "discount": {"duration": "once", "duration_in_months": 831360, "type": "fixed", "amount": 647340, "currency": "Burundi Franc", "created_at": "2023-05-12T14:03:43.474Z", "modified_at": "2023-07-31T02:11:36.219Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2024-07-19T16:17:24.047Z", "ends_at": "2024-02-03T17:07:58.129Z", "max_redemptions": 853312, "redemptions_count": 512493, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {"key": 4746.64, "key1": 1425.19}, "created_at": "2025-07-12T14:56:35.077Z", "modified_at": "2023-11-06T20:14:02.358Z", "id": "", "amount": 681345, "currency": "Egyptian Pound", "recurring_interval": "month", "status": "active", "current_period_start": "2025-11-01T02:57:30.371Z", "current_period_end": "2025-09-13T23:53:46.890Z", "cancel_at_period_end": true, "canceled_at": "2025-11-25T02:54:38.042Z", "started_at": "2025-07-10T15:24:37.366Z", "ends_at": "2025-03-24T18:32:32.732Z", "ended_at": "2023-02-05T07:45:22.279Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "customer_service", "customer_cancellation_comment": ""}, "items": [{"created_at": "2024-10-21T20:50:24.490Z", "modified_at": "2024-05-21T19:26:34.740Z", "id": "", "label": "", "amount": 684174, "tax_amount": 154582, "proration": true, "product_price_id": ""}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointorder_refunded_post: + speakeasy-default-endpointorder-refunded-post: + requestBody: + application/json: {"type": "order.refunded", "data": {"id": "", "created_at": "2023-01-02T23:38:59.363Z", "modified_at": "2025-02-28T12:31:35.473Z", "status": "partially_refunded", "paid": true, "subtotal_amount": 938386, "discount_amount": 82333, "net_amount": 848427, "amount": 114854, "tax_amount": 325272, "total_amount": 528865, "refunded_amount": 824083, "refunded_tax_amount": 158895, "currency": "Liberian Dollar", "billing_reason": "subscription_update", "billing_address": {"country": "FR"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": "", "key1": 594696}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-06-19T18:45:29.196Z", "modified_at": "2025-02-26T15:57:28.522Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-09-11T11:03:14.922Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "user_id": "", "product": {"metadata": {"key": 91157, "key1": 403095, "key2": 276505}, "created_at": "2024-11-25T06:39:16.384Z", "modified_at": "2025-10-01T02:04:20.920Z", "id": "", "name": "", "description": "till wilt sans reach sell", "recurring_interval": "year", "is_recurring": false, "is_archived": true, "organization_id": ""}, "discount": {"duration": "forever", "type": "fixed", "basis_points": 650319, "created_at": "2024-04-01T07:20:29.895Z", "modified_at": "2024-07-01T00:09:41.292Z", "id": "", "metadata": {"key": true, "key1": 8866.54, "key2": false}, "name": "", "code": "", "starts_at": "2023-11-04T21:13:28.799Z", "ends_at": "2025-10-31T17:08:16.307Z", "max_redemptions": 747397, "redemptions_count": 856085, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {"key": false, "key1": 771711}, "created_at": "2023-11-24T13:38:21.359Z", "modified_at": "2025-01-18T21:21:09.755Z", "id": "", "amount": 696061, "currency": "Kip", "recurring_interval": "month", "status": "trialing", "current_period_start": "2023-01-03T15:25:02.321Z", "current_period_end": "2025-05-05T04:48:09.499Z", "cancel_at_period_end": false, "canceled_at": "2025-07-13T22:35:47.255Z", "started_at": "2025-06-08T14:31:47.800Z", "ends_at": "2024-02-14T21:42:14.621Z", "ended_at": "2025-05-14T18:27:08.842Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "switched_service", "customer_cancellation_comment": ""}, "items": []}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointsubscription_created_post: + speakeasy-default-endpointsubscription-created-post: + requestBody: + application/json: {"type": "subscription.created", "data": {"created_at": "2024-07-03T01:29:40.920Z", "modified_at": "2023-02-20T03:35:25.500Z", "id": "", "amount": 78980, "currency": "Dong", "recurring_interval": "month", "status": "incomplete_expired", "current_period_start": "2025-01-25T02:46:12.208Z", "current_period_end": "2023-10-08T16:07:22.449Z", "cancel_at_period_end": false, "canceled_at": "2025-10-17T20:21:29.819Z", "started_at": "2023-02-26T17:52:17.099Z", "ends_at": "2023-07-04T19:46:53.033Z", "ended_at": "2023-09-06T09:33:34.348Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "unused", "customer_cancellation_comment": "", "metadata": {"key": "", "key1": 2294.09}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-04-01T11:22:10.531Z", "modified_at": "2024-06-26T00:08:47.301Z", "metadata": {"key": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-05-16T01:12:33.254Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2025-11-30T21:57:15.452Z", "modified_at": "2024-10-01T17:40:20.374Z", "id": "", "name": "", "description": "likewise publication partially afore under subsidy", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "metadata": {}, "prices": [], "benefits": [{"id": "", "created_at": "2025-08-04T21:33:41.088Z", "modified_at": "2024-01-18T07:13:43.618Z", "type": "", "description": "forenenst best oh save carelessly sheepishly incomparable even", "selectable": false, "deletable": true, "organization_id": "", "metadata": {}, "properties": {"units": 700179, "meter_id": ""}}, {"id": "", "created_at": "2024-02-24T03:01:46.062Z", "modified_at": "2023-05-13T05:26:59.772Z", "type": "", "description": "pish on vamoose rightfully", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": false, "key1": 208660, "key2": true}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "maintain"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/bin", "mime_type": "", "size": 748789, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-02-12T15:58:53.546Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-11-01T22:56:07.845Z", "size_readable": "", "public_url": "https://outrageous-dead.org"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-07-27T08:40:30.745Z", "modified_at": "2024-05-01T18:56:38.258Z", "id": "", "metadata": {"key": ""}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 914697, "required": true}]}, "discount": {"duration": "once", "type": "percentage", "amount": 803154, "currency": "Somoni", "created_at": "2025-01-05T04:14:46.492Z", "modified_at": "2023-09-23T02:20:13.988Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2024-05-17T17:16:41.803Z", "ends_at": "2023-09-20T09:03:51.426Z", "max_redemptions": 823872, "redemptions_count": 263404, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [], "meters": [{"created_at": "2024-05-01T03:43:55.760Z", "modified_at": "2024-12-20T10:24:18.080Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 548349, "key1": 5802.62, "key2": 660061}, "created_at": "2024-01-08T01:57:20.378Z", "modified_at": "2024-03-02T01:26:17.229Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}, {"created_at": "2025-05-07T13:44:00.705Z", "modified_at": "2024-11-21T11:37:28.520Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {}, "created_at": "2024-08-13T20:42:08.040Z", "modified_at": "2023-09-25T20:12:33.320Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {}, "organization_id": ""}}, {"created_at": "2025-03-17T12:22:39.918Z", "modified_at": "2024-04-30T20:36:47.473Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 608050, "key1": "", "key2": false}, "created_at": "2024-04-02T23:02:34.789Z", "modified_at": "2023-07-18T11:38:25.103Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "min", "property": ""}, "organization_id": ""}}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointsubscription_updated_post: + speakeasy-default-endpointsubscription-updated-post: + requestBody: + application/json: {"type": "subscription.updated", "data": {"created_at": "2023-08-16T06:35:49.390Z", "modified_at": "2025-11-13T10:48:05.575Z", "id": "", "amount": 299644, "currency": "Baht", "recurring_interval": "year", "status": "trialing", "current_period_start": "2025-10-06T07:01:55.000Z", "current_period_end": "2025-01-20T06:59:31.349Z", "cancel_at_period_end": false, "canceled_at": "2023-10-04T04:56:04.382Z", "started_at": "2023-01-22T12:57:07.430Z", "ends_at": "2025-08-08T17:53:12.513Z", "ended_at": "2023-10-08T02:40:52.099Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "too_expensive", "customer_cancellation_comment": "", "metadata": {"key": 394013}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-09-14T04:37:19.722Z", "modified_at": "2025-03-24T00:03:13.207Z", "metadata": {"key": "", "key1": true, "key2": 3929}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-03-10T21:57:02.022Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2025-09-03T02:13:58.900Z", "modified_at": "2023-01-06T20:49:48.804Z", "id": "", "name": "", "description": "tall sans now duh mysteriously", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "metadata": {}, "prices": [], "benefits": [{"id": "", "created_at": "2023-05-21T23:14:33.066Z", "modified_at": "2023-06-03T11:59:38.300Z", "type": "", "description": "inquisitively harvest likewise", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 506784, "key1": 3920.45}, "properties": {"note": ""}}], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-08-17T16:24:27.302Z", "modified_at": "2025-01-08T14:04:12.750Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 915760, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2025-07-17T05:00:37.853Z", "modified_at": "2025-04-13T10:51:42.560Z", "id": "", "metadata": {"key": 8740.41, "key1": 562154, "key2": false}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 560596, "required": false}]}, "discount": {"duration": "repeating", "type": "fixed", "basis_points": 172538, "created_at": "2023-03-14T09:14:44.030Z", "modified_at": "2025-07-07T23:54:00.303Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2023-10-11T04:49:26.739Z", "ends_at": "2025-05-30T13:10:48.001Z", "max_redemptions": 981769, "redemptions_count": 131085, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-09-16T06:56:23.715Z", "modified_at": "2025-06-23T00:36:18.040Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 119495, "maximum_amount": 792275, "preset_amount": 346545, "legacy": false}, {"created_at": "2024-03-09T00:03:49.294Z", "modified_at": "2025-02-03T18:13:44.476Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 464282, "maximum_amount": 553735, "preset_amount": 757547, "legacy": false}, {"created_at": "2024-03-22T04:50:19.718Z", "modified_at": "2025-02-28T04:37:08.274Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "price_amount": 330654, "legacy": true}], "meters": [{"created_at": "2024-01-12T16:48:08.024Z", "modified_at": "2023-10-27T10:49:03.150Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": ""}, "created_at": "2024-09-26T10:52:31.232Z", "modified_at": "2024-10-22T00:38:08.110Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": [{"property": "", "operator": "eq", "value": ""}]}, "aggregation": {"func": "min", "property": ""}, "organization_id": ""}}, {"created_at": "2024-05-26T14:01:08.339Z", "modified_at": "2023-05-01T04:54:46.773Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 4108.38}, "created_at": "2025-09-01T19:58:32.729Z", "modified_at": "2023-04-15T12:01:43.458Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "sum", "property": ""}, "organization_id": ""}}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointsubscription_active_post: + speakeasy-default-endpointsubscription-active-post: + requestBody: + application/json: {"type": "subscription.active", "data": {"created_at": "2023-09-17T11:03:44.679Z", "modified_at": "2025-07-24T20:02:17.426Z", "id": "", "amount": 116760, "currency": "Quetzal", "recurring_interval": "month", "status": "incomplete", "current_period_start": "2023-08-25T00:14:50.252Z", "current_period_end": "2023-12-10T18:25:01.577Z", "cancel_at_period_end": false, "canceled_at": "2024-07-05T14:07:23.099Z", "started_at": "2024-06-30T08:12:48.355Z", "ends_at": "2023-06-29T07:42:54.895Z", "ended_at": "2025-10-30T02:51:06.576Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "switched_service", "customer_cancellation_comment": "", "metadata": {"key": 4802.79, "key1": "", "key2": 6152.12}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-04-25T08:49:41.567Z", "modified_at": "2025-09-05T08:50:11.879Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-04-06T03:26:32.986Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2025-10-29T01:44:30.411Z", "modified_at": "2025-01-17T08:14:32.982Z", "id": "", "name": "", "description": "like thoughtfully skyline ouch openly aboard moisten graffiti pleasure claw", "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {"key": false, "key1": true, "key2": ""}, "prices": [], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/lib", "mime_type": "", "size": 471788, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-04-29T21:41:28.180Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-01-21T03:01:14.288Z", "size_readable": "", "public_url": "https://some-mantua.org"}, {"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 212226, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-02-06T12:14:24.412Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-05-06T03:32:35.129Z", "size_readable": "", "public_url": "https://soupy-secret.name/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-10-20T20:21:06.932Z", "modified_at": "2024-10-19T13:44:20.141Z", "id": "", "metadata": {"key": 5084.95, "key1": 240424}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 504359, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-09-20T00:47:23.112Z", "modified_at": "2023-10-02T10:57:52.944Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 569952, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2025-08-23T03:01:49.852Z", "modified_at": "2023-11-28T06:12:47.691Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 853452, "required": true}]}, "discount": {"duration": "once", "duration_in_months": 156138, "type": "percentage", "amount": 378097, "currency": "Colombian Peso", "created_at": "2025-02-03T17:12:33.225Z", "modified_at": "2025-04-12T05:33:41.833Z", "id": "", "metadata": {"key": 843499, "key1": false, "key2": 6362.72}, "name": "", "code": "", "starts_at": "2025-03-08T08:26:36.119Z", "ends_at": "2023-06-29T22:39:21.226Z", "max_redemptions": 707770, "redemptions_count": 555106, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2024-02-25T19:36:51.428Z", "modified_at": "2024-08-19T22:29:31.563Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 295684, "maximum_amount": 374123, "preset_amount": 297748, "legacy": false}, {"created_at": "2024-07-27T18:04:02.928Z", "modified_at": "2025-02-14T21:57:39.684Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "legacy": false}], "meters": [{"created_at": "2023-02-11T05:37:36.272Z", "modified_at": "2025-01-20T12:23:37.845Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": false, "key1": false}, "created_at": "2023-09-08T22:16:21.336Z", "modified_at": "2024-09-15T15:58:52.712Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": [{"property": "", "operator": "lt", "value": ""}]}, "aggregation": {"func": "min", "property": ""}, "organization_id": ""}}, {"created_at": "2023-03-09T22:12:48.363Z", "modified_at": "2025-09-09T06:07:50.979Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 6040.55, "key1": "", "key2": 1010.5}, "created_at": "2024-04-25T22:22:19.388Z", "modified_at": "2024-02-02T00:30:57.495Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}, {"created_at": "2023-10-26T16:01:57.187Z", "modified_at": "2025-09-24T14:23:14.148Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 7086.53}, "created_at": "2024-07-22T07:33:56.099Z", "modified_at": "2025-03-02T15:40:26.218Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointsubscription_canceled_post: + speakeasy-default-endpointsubscription-canceled-post: + requestBody: + application/json: {"type": "subscription.canceled", "data": {"created_at": "2024-02-08T10:04:43.200Z", "modified_at": "2023-02-20T09:16:44.963Z", "id": "", "amount": 384017, "currency": "Nakfa", "recurring_interval": "month", "status": "canceled", "current_period_start": "2025-08-29T23:51:26.505Z", "current_period_end": "2024-01-30T14:57:29.126Z", "cancel_at_period_end": false, "canceled_at": "2023-05-31T10:57:35.559Z", "started_at": "2024-10-31T08:13:37.012Z", "ends_at": "2023-08-22T21:50:14.399Z", "ended_at": "2023-07-13T20:08:34.251Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "too_expensive", "customer_cancellation_comment": "", "metadata": {"key": 38827, "key1": 199269, "key2": 668826}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-03-16T21:08:54.900Z", "modified_at": "2023-10-15T15:32:03.593Z", "metadata": {"key": 497112, "key1": true, "key2": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-09-21T11:12:46.571Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2025-10-12T16:18:30.796Z", "modified_at": "2024-02-08T11:59:00.133Z", "id": "", "name": "", "description": "excluding pfft upside-down ick rust bestride circa", "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {}, "prices": [{"created_at": "2024-12-20T19:19:43.546Z", "modified_at": "2023-01-17T19:43:17.240Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month"}], "benefits": [{"id": "", "created_at": "2025-04-14T07:37:10.697Z", "modified_at": "2023-05-15T21:22:51.684Z", "type": "", "description": "finally knight famously optimistically sympathetically pfft cumbersome", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": ""}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "admin"}}, {"id": "", "created_at": "2024-06-05T13:42:12.919Z", "modified_at": "2023-08-16T10:46:37.353Z", "type": "", "description": "ceramic outside apropos minister during energetically versus repeatedly hence", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 7.11}, "properties": {"archived": {"key": false}, "files": [""]}}, {"id": "", "created_at": "2025-11-14T05:51:25.007Z", "modified_at": "2023-03-19T17:30:46.300Z", "type": "", "description": "solidly international singe excluding throbbing kinase phooey vacantly", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": true, "key1": 3999.35}, "properties": {"archived": {"key": true, "key1": false, "key2": false}, "files": ["", "", ""]}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/bin", "mime_type": "", "size": 134264, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-05-29T03:29:41.945Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2024-02-12T09:19:41.334Z", "size_readable": "", "public_url": "https://black-and-white-pharmacopoeia.net"}, {"id": "", "organization_id": "", "name": "", "path": "/opt/share", "mime_type": "", "size": 430302, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-04-06T16:29:58.577Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-01-07T11:02:44.524Z", "size_readable": "", "public_url": "https://violent-publicity.com"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2025-05-15T12:05:59.485Z", "modified_at": "2024-05-05T22:59:07.544Z", "id": "", "metadata": {"key": 548021, "key1": 714428, "key2": 1944.32}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 848717, "required": true}]}, "discount": {"duration": "forever", "type": "percentage", "basis_points": 357022, "created_at": "2024-11-07T02:15:48.395Z", "modified_at": "2024-08-13T10:10:44.714Z", "id": "", "metadata": {"key": false}, "name": "", "code": "", "starts_at": "2023-08-08T20:27:11.335Z", "ends_at": "2025-04-02T16:35:30.414Z", "max_redemptions": 982290, "redemptions_count": 227101, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2024-02-11T10:16:29.150Z", "modified_at": "2024-10-29T14:28:18.648Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "legacy": false}, {"created_at": "2024-02-09T18:18:33.467Z", "modified_at": "2024-11-23T06:36:13.889Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 879680, "maximum_amount": 432155, "preset_amount": 480086}, {"created_at": "2025-07-04T01:40:07.080Z", "modified_at": "2023-08-08T04:08:56.316Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "minimum_amount": 711316, "maximum_amount": 645375, "preset_amount": 131251, "legacy": true}], "meters": [{"created_at": "2024-05-13T08:53:24.642Z", "modified_at": "2023-02-08T04:22:37.807Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {}, "created_at": "2024-10-09T11:24:58.450Z", "modified_at": "2024-01-04T14:57:22.990Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": [{"property": "", "operator": "lt", "value": false}]}, "aggregation": {"func": "sum", "property": ""}, "organization_id": ""}}, {"created_at": "2023-10-15T19:57:28.120Z", "modified_at": "2024-07-05T08:08:12.059Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {}, "created_at": "2024-09-18T19:36:25.904Z", "modified_at": "2025-12-24T00:48:09.714Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "min", "property": ""}, "organization_id": ""}}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointsubscription_uncanceled_post: + speakeasy-default-endpointsubscription-uncanceled-post: + requestBody: + application/json: {"type": "subscription.uncanceled", "data": {"created_at": "2024-06-17T13:11:57.598Z", "modified_at": "2025-03-19T00:33:29.972Z", "id": "", "amount": 243909, "currency": "Swiss Franc", "recurring_interval": "month", "status": "past_due", "current_period_start": "2025-04-10T22:53:35.005Z", "current_period_end": "2025-11-06T14:37:36.152Z", "cancel_at_period_end": false, "canceled_at": "2025-11-20T17:26:51.612Z", "started_at": "2023-03-17T23:30:29.508Z", "ends_at": "2024-09-26T10:53:58.966Z", "ended_at": "2023-07-03T15:11:27.108Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": "", "metadata": {"key": 213.99, "key1": 316364}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-01-30T22:08:30.455Z", "modified_at": "2023-02-02T22:26:23.446Z", "metadata": {"key": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-10-31T14:46:23.010Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2024-11-09T05:19:53.169Z", "modified_at": "2024-09-22T08:44:15.301Z", "id": "", "name": "", "description": "creamy furthermore where", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "metadata": {"key": 3172.58, "key1": 785644, "key2": 146640}, "prices": [{"created_at": "2024-12-21T23:06:09.697Z", "modified_at": "2023-05-31T05:38:02.546Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "legacy": true}, {"created_at": "2024-02-09T08:57:24.238Z", "modified_at": "2024-02-14T18:38:24.900Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year"}, {"created_at": "2024-02-25T12:26:26.256Z", "modified_at": "2023-10-29T00:03:55.769Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "minimum_amount": 468878, "maximum_amount": 203744, "preset_amount": 951124, "legacy": false}], "benefits": [{"id": "", "created_at": "2024-02-14T00:22:42.673Z", "modified_at": "2025-12-11T09:31:52.340Z", "type": "", "description": "strait cool what whenever ah spectacles bowler overheard righteously", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": true, "key1": 1945.3, "key2": 752599}, "properties": {"units": 41991, "meter_id": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 305590, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-04-07T19:12:22.347Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-02-25T23:13:27.940Z", "size_readable": "", "public_url": "https://triangular-pendant.org"}], "attached_custom_fields": []}, "discount": {"duration": "once", "duration_in_months": 562624, "type": "fixed", "basis_points": 358515, "created_at": "2024-12-04T02:39:52.466Z", "modified_at": "2025-06-29T07:17:41.845Z", "id": "", "metadata": {"key": true}, "name": "", "code": "", "starts_at": "2024-05-11T05:47:37.827Z", "ends_at": "2024-08-31T12:26:23.183Z", "max_redemptions": 553484, "redemptions_count": 307144, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-03-18T04:07:15.266Z", "modified_at": "2025-06-28T02:22:05.259Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "legacy": false}, {"created_at": "2023-01-02T21:20:54.004Z", "modified_at": "2025-09-28T06:56:53.284Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 127080, "maximum_amount": 108038, "preset_amount": 958725, "legacy": true}], "meters": [{"created_at": "2023-07-29T08:57:54.368Z", "modified_at": "2023-05-30T06:21:31.559Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {}, "created_at": "2024-03-03T03:07:53.190Z", "modified_at": "2023-01-26T05:22:36.002Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": [{"property": "", "operator": "eq", "value": ""}]}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointsubscription_revoked_post: + speakeasy-default-endpointsubscription-revoked-post: + requestBody: + application/json: {"type": "subscription.revoked", "data": {"created_at": "2025-11-29T12:00:55.925Z", "modified_at": "2023-03-13T04:36:55.320Z", "id": "", "amount": 780683, "currency": "CFP Franc", "recurring_interval": "year", "status": "trialing", "current_period_start": "2023-06-20T05:55:42.170Z", "current_period_end": "2024-05-16T17:55:53.899Z", "cancel_at_period_end": true, "canceled_at": "2025-10-25T10:04:20.460Z", "started_at": "2024-09-29T18:36:35.285Z", "ends_at": "2024-02-23T17:26:12.806Z", "ended_at": "2024-01-24T11:12:57.680Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "too_expensive", "customer_cancellation_comment": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-09-02T15:09:07.489Z", "modified_at": "2025-06-23T22:13:15.423Z", "metadata": {"key": "", "key1": 1826.63}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-12-07T07:31:07.439Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2025-10-10T20:53:21.424Z", "modified_at": "2025-04-13T14:40:28.840Z", "id": "", "name": "", "description": "tousle evenly footrest whoever happy underpants collaborate license", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {"key": true, "key1": 738461, "key2": ""}, "prices": [{"created_at": "2024-08-08T04:03:47.757Z", "modified_at": "2023-01-06T04:50:36.294Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 991529, "maximum_amount": 558880, "preset_amount": 431760}, {"created_at": "2025-07-14T21:19:27.598Z", "modified_at": "2023-01-29T12:49:28.784Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 657600, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2025-09-24T13:03:31.087Z", "modified_at": "2023-12-15T15:35:52.203Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "price_amount": 809939}], "benefits": [{"id": "", "created_at": "2025-08-18T00:05:09.206Z", "modified_at": "2024-10-25T16:43:54.572Z", "type": "", "description": "ice-cream cluttered ouch of", "selectable": true, "deletable": true, "organization_id": "", "metadata": {}, "properties": {"guild_id": "", "role_id": "", "guild_token": ""}}, {"id": "", "created_at": "2023-05-25T03:41:40.124Z", "modified_at": "2025-03-24T11:18:28.141Z", "type": "", "description": "ew slimy even amongst until absent", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": false, "key1": 157629, "key2": true}, "properties": {"units": 156843, "meter_id": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/etc/mail", "mime_type": "", "size": 530169, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-01-04T02:19:46.902Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-07-08T20:17:06.724Z", "size_readable": "", "public_url": "https://scared-subexpression.info"}, {"id": "", "organization_id": "", "name": "", "path": "/opt/sbin", "mime_type": "", "size": 830297, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-03-26T22:10:02.657Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2024-09-27T22:03:48.752Z", "size_readable": "", "public_url": "https://lined-developing.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 357142, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-01-07T17:24:21.854Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-05-18T08:32:33.285Z", "size_readable": "", "public_url": "https://sparkling-platter.com"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-04-18T15:55:18.436Z", "modified_at": "2025-02-07T05:40:42.263Z", "id": "", "metadata": {"key": 5658.66, "key1": true, "key2": 750374}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}]}}, "order": 849523, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2025-10-25T18:07:36.755Z", "modified_at": "2025-02-10T11:20:27.626Z", "id": "", "metadata": {"key": 745656, "key1": true}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 119373, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-08-02T07:44:35.677Z", "modified_at": "2023-11-05T03:01:24.932Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 333677, "required": false}]}, "discount": {"duration": "repeating", "duration_in_months": 100172, "type": "percentage", "basis_points": 306142, "created_at": "2023-03-30T14:36:41.417Z", "modified_at": "2025-05-01T03:35:09.760Z", "id": "", "metadata": {"key": 696581, "key1": 156123}, "name": "", "code": "", "starts_at": "2025-04-27T19:15:55.010Z", "ends_at": "2024-08-10T03:47:28.734Z", "max_redemptions": 335600, "redemptions_count": 160261, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2024-06-04T10:03:21.797Z", "modified_at": "2023-09-02T20:36:05.956Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 692485, "maximum_amount": 767468, "preset_amount": 341978}, {"created_at": "2024-02-05T14:51:37.851Z", "modified_at": "2025-11-17T07:57:17.698Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "minimum_amount": 26387, "maximum_amount": 254474, "preset_amount": 463882, "legacy": false}, {"created_at": "2024-03-05T20:30:20.233Z", "modified_at": "2024-01-17T19:32:53.108Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "price_amount": 764305, "legacy": true}], "meters": [{"created_at": "2024-07-21T02:28:10.454Z", "modified_at": "2024-05-25T09:34:20.944Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {}, "created_at": "2023-05-13T16:20:53.597Z", "modified_at": "2024-08-11T16:14:24.565Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": [{"property": "", "operator": "lt", "value": ""}]}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}, {"created_at": "2024-06-13T10:57:42.559Z", "modified_at": "2023-09-23T09:38:12.227Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": "", "key1": true}, "created_at": "2025-09-16T15:28:51.135Z", "modified_at": "2023-05-19T16:38:07.059Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointrefund_created_post: + speakeasy-default-endpointrefund-created-post: + requestBody: + application/json: {"type": "refund.created", "data": {"created_at": "2025-12-29T06:17:19.062Z", "modified_at": "2023-06-28T13:27:59.588Z", "id": "", "metadata": {"key": false, "key1": true}, "status": "canceled", "reason": "fraudulent", "amount": 872325, "tax_amount": 273821, "currency": "New Israeli Sheqel", "organization_id": "", "order_id": "", "subscription_id": "", "customer_id": "", "revoke_benefits": true}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointrefund_updated_post: + speakeasy-default-endpointrefund-updated-post: + requestBody: + application/json: {"type": "refund.updated", "data": {"created_at": "2024-01-23T03:57:31.216Z", "modified_at": "2024-04-24T01:16:45.429Z", "id": "", "metadata": {}, "status": "succeeded", "reason": "other", "amount": 397442, "tax_amount": 509120, "currency": "Rufiyaa", "organization_id": "", "order_id": "", "subscription_id": "", "customer_id": "", "revoke_benefits": false}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointproduct_created_post: + speakeasy-default-endpointproduct-created-post: + requestBody: + application/json: {"type": "product.created", "data": {"created_at": "2023-03-27T06:36:20.130Z", "modified_at": "2025-04-21T12:05:16.637Z", "id": "", "name": "", "description": "into horst metal grimy clinch big grounded industrialize", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {"key": 273829, "key1": 168.26}, "prices": [{"created_at": "2024-12-14T22:49:15.878Z", "modified_at": "2025-02-21T03:23:39.700Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 937326}], "benefits": [{"id": "", "created_at": "2025-12-04T18:07:56.097Z", "modified_at": "2024-04-05T15:20:16.354Z", "type": "", "description": "huzzah whereas kosher ick oddly as atop", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": 987898}, "properties": {"archived": {"key": true, "key1": false}, "files": [""]}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 581265, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-04-07T02:06:02.757Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-04-12T13:06:20.088Z", "size_readable": "", "public_url": "https://unripe-co-producer.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/sbin", "mime_type": "", "size": 59414, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-07-07T02:17:46.592Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-10-19T10:03:16.084Z", "size_readable": "", "public_url": "https://shimmering-longboat.com/"}, {"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 150978, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-01-22T17:57:22.350Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-04-18T23:00:14.080Z", "size_readable": "", "public_url": "https://self-assured-sock.name/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2025-07-17T22:09:03.517Z", "modified_at": "2023-06-26T02:18:28.257Z", "id": "", "metadata": {"key": 9213.48, "key1": 570132, "key2": 8619.37}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 238471, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2023-06-21T15:29:47.140Z", "modified_at": "2025-08-03T05:27:40.759Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 841436, "required": false}]}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointproduct_updated_post: + speakeasy-default-endpointproduct-updated-post: + requestBody: + application/json: {"type": "product.updated", "data": {"created_at": "2024-06-25T03:46:32.479Z", "modified_at": "2023-06-04T01:47:33.158Z", "id": "", "name": "", "description": "er ick birdcage", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "metadata": {"key": 498845}, "prices": [{"created_at": "2024-02-20T02:09:40.194Z", "modified_at": "2023-08-19T20:17:23.005Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "price_amount": 805673, "legacy": true}], "benefits": [{"id": "", "created_at": "2025-10-26T20:37:43.383Z", "modified_at": "2023-06-03T07:24:34.542Z", "type": "", "description": "incidentally mountain eek jaunty among physical stable against", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": 8261.85}, "properties": {"archived": {"key": true, "key1": false}, "files": [""]}}, {"id": "", "created_at": "2023-02-26T17:48:06.596Z", "modified_at": "2024-01-23T05:34:11.376Z", "type": "", "description": "hippodrome ack mystify skateboard above", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": "", "key1": true, "key2": false}, "properties": {"archived": {}, "files": [""]}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/boot", "mime_type": "", "size": 776281, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-15T22:09:06.445Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-02-18T02:35:29.302Z", "size_readable": "", "public_url": "https://meager-dividend.biz"}, {"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 277255, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-06-25T07:43:21.903Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-11-06T13:08:07.456Z", "size_readable": "", "public_url": "https://bossy-councilman.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/mnt", "mime_type": "", "size": 877252, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-11-11T22:19:55.213Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-01-25T13:37:38.935Z", "size_readable": "", "public_url": "https://metallic-behest.name/"}], "attached_custom_fields": []}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointorganization_updated_post: + speakeasy-default-endpointorganization-updated-post: + requestBody: + application/json: {"type": "organization.updated", "data": {"created_at": "2023-08-12T18:45:04.236Z", "modified_at": "2025-12-29T16:35:25.119Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://devoted-bump.net", "email": "Shaylee26@hotmail.com", "website": "", "socials": [{"platform": "tiktok", "url": "https://bright-bug.biz"}], "details_submitted_at": "2025-09-21T05:55:39.282Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": true, "proration_behavior": "prorate"}}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointbenefit_created_post: + speakeasy-default-endpointbenefit-created-post: + requestBody: + application/json: {"type": "benefit.created", "data": {"id": "", "created_at": "2023-04-15T11:45:18.891Z", "modified_at": "2025-06-17T12:04:55.002Z", "type": "", "description": "vastly lest but", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": 251765, "key1": 587659}, "properties": {"prefix": "", "expires": {"ttl": 545067, "timeframe": "year"}, "activations": {"limit": 77829, "enable_customer_admin": true}, "limit_usage": 616089}}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointbenefit_updated_post: + speakeasy-default-endpointbenefit-updated-post: + requestBody: + application/json: {"type": "benefit.updated", "data": {"id": "", "created_at": "2025-11-19T14:31:03.333Z", "modified_at": "2023-08-21T02:54:25.671Z", "type": "", "description": "merge when gratefully sparse hmph throughout honesty untried gripping um", "selectable": false, "deletable": false, "organization_id": "", "metadata": {}, "properties": {"archived": {"key": true, "key1": false}, "files": ["", "", ""]}}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointbenefit_grant_created_post: + speakeasy-default-endpointbenefit-grant-created-post: + requestBody: + application/json: {"type": "benefit_grant.created", "data": {"created_at": "2025-01-04T13:03:27.870Z", "modified_at": "2023-05-08T00:47:14.556Z", "id": "", "is_granted": true, "is_revoked": false, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-08-25T12:22:42.430Z", "modified_at": "2023-03-03T22:39:55.256Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-04-05T03:50:05.028Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "properties": {}, "benefit": {"id": "", "created_at": "2023-11-27T15:06:21.370Z", "modified_at": "2024-04-10T11:35:59.119Z", "type": "", "description": "once while mmm provided thorny geez sesame upwardly ah", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": "", "key1": false}, "properties": {"archived": {"key": false, "key1": false, "key2": true}, "files": ["", "", ""]}}}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointbenefit_grant_updated_post: + speakeasy-default-endpointbenefit-grant-updated-post: + requestBody: + application/json: {"type": "benefit_grant.updated", "data": {"created_at": "2025-01-02T13:54:42.243Z", "modified_at": "2024-02-25T11:58:59.486Z", "id": "", "is_granted": false, "is_revoked": false, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-08-08T07:44:28.757Z", "modified_at": "2024-08-31T04:19:19.970Z", "metadata": {"key": "", "key1": 5493.71, "key2": 5023.5}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-07-15T16:39:59.264Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "properties": {}, "benefit": {"id": "", "created_at": "2024-09-15T13:53:09.807Z", "modified_at": "2024-09-13T15:51:09.639Z", "type": "", "description": "access collaboration ascertain draft hearten fantastic nicely", "selectable": true, "deletable": true, "organization_id": "", "metadata": {}, "properties": {"note": ""}}}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointbenefit_grant_cycled_post: + speakeasy-default-endpointbenefit-grant-cycled-post: + requestBody: + application/json: {"type": "benefit_grant.cycled", "data": {"created_at": "2024-09-17T22:29:23.174Z", "modified_at": "2025-06-14T11:07:13.305Z", "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-11-28T04:36:34.627Z", "modified_at": "2024-12-06T09:05:10.912Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-10-18T02:05:35.631Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "properties": {}, "benefit": {"id": "", "created_at": "2025-01-01T04:29:23.483Z", "modified_at": "2023-03-13T00:00:26.850Z", "type": "", "description": "knottily notwithstanding tremendously institutionalize lift", "selectable": false, "deletable": true, "organization_id": "", "metadata": {}, "properties": {"guild_id": "", "role_id": "", "guild_token": ""}}}} + responses: + "200": + application/json: "" + "422": + application/json: {} + _endpointbenefit_grant_revoked_post: + speakeasy-default-endpointbenefit-grant-revoked-post: + requestBody: + application/json: {"type": "benefit_grant.revoked", "data": {"created_at": "2025-03-12T10:35:36.881Z", "modified_at": "2025-04-12T13:10:16.426Z", "id": "", "is_granted": true, "is_revoked": false, "subscription_id": "", "order_id": "", "customer_id": "", "benefit_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-03-29T21:56:48.008Z", "modified_at": "2025-07-18T16:16:40.562Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-11-01T21:51:36.732Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "properties": {}, "benefit": {"id": "", "created_at": "2023-08-22T08:35:56.494Z", "modified_at": "2025-10-31T01:52:55.437Z", "type": "", "description": "masticate biodegrade outrun consequently phooey hmph", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": 935243}, "properties": {"archived": {"key": true}, "files": [""]}}}} + responses: + "200": + application/json: "" + "422": + application/json: {} + organizations:list: + speakeasy-default-organizations:list: + responses: + "200": + application/json: {"items": [{"created_at": "2024-08-22T19:26:20.850Z", "modified_at": "2025-01-13T10:26:00.433Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://energetic-circumference.name/", "email": "Ahmad.Bogan@yahoo.com", "website": "", "socials": [{"platform": "x", "url": "https://hidden-jet.com/"}, {"platform": "other", "url": "https://ugly-jungle.com"}], "details_submitted_at": "2023-12-20T13:34:28.286Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": true, "proration_behavior": "prorate"}}, {"created_at": "2024-04-10T02:32:42.816Z", "modified_at": "2025-09-28T03:47:03.515Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://blue-technologist.com/", "email": "Herminia52@yahoo.com", "website": "", "socials": [{"platform": "linkedin", "url": "https://imaginative-cap.biz/"}], "details_submitted_at": "2025-09-28T13:56:10.162Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "prorate"}}, {"created_at": "2025-10-03T17:49:22.042Z", "modified_at": "2023-04-03T06:30:19.876Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://odd-spork.net", "email": "Armani_Bins77@hotmail.com", "website": "", "socials": [{"platform": "facebook", "url": "https://necessary-basket.com"}, {"platform": "facebook", "url": "https://simple-disk.biz"}], "details_submitted_at": "2023-04-16T23:50:27.729Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": true, "proration_behavior": "invoice"}}], "pagination": {"total_count": 810770, "max_page": 956959}} + "422": + application/json: {} + organizations:create: + speakeasy-default-organizations:create: + requestBody: + application/json: {"name": "", "slug": ""} + responses: + "201": + application/json: {"created_at": "2024-06-17T07:14:55.338Z", "modified_at": "2024-11-30T17:06:07.804Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://concerned-battle.net/", "email": "Aaliyah_Borer@hotmail.com", "website": "", "socials": [{"platform": "other", "url": "https://far-off-affect.biz/"}, {"platform": "github", "url": "https://glorious-convection.com/"}, {"platform": "x", "url": "https://gripping-analogy.name"}], "details_submitted_at": "2024-12-13T15:50:02.770Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": true, "proration_behavior": "prorate"}} + "422": + application/json: {} + organizations:get: + speakeasy-default-organizations:get: + parameters: + path: + id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737" + responses: + "200": + application/json: {"created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://misguided-violin.info", "email": "Dewitt.Wehner80@yahoo.com", "website": "", "socials": [], "details_submitted_at": "2023-12-10T13:21:20.945Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "prorate"}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + organizations:update: + speakeasy-default-organizations:update: + parameters: + path: + id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737" + requestBody: + application/json: {} + responses: + "200": + application/json: {"created_at": "2025-07-28T19:04:48.565Z", "modified_at": "2024-10-16T10:52:42.015Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://yearly-order.info/", "email": "Amiya.King24@hotmail.com", "website": "", "socials": [{"platform": "other", "url": "https://legal-safe.net/"}, {"platform": "instagram", "url": "https://slushy-siege.info/"}, {"platform": "youtube", "url": "https://entire-forage.net/"}], "details_submitted_at": "2025-07-03T16:37:38.189Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": false, "proration_behavior": "prorate"}} + "403": + application/json: {"error": "NotPermitted", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + subscriptions:list: + speakeasy-default-subscriptions:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "id": "", "amount": 229716, "currency": "Belize Dollar", "recurring_interval": "year", "status": "past_due", "current_period_start": "2023-01-20T06:21:22.156Z", "current_period_end": "2025-02-26T06:14:46.641Z", "cancel_at_period_end": true, "canceled_at": "2023-03-17T01:57:00.187Z", "started_at": "2025-01-24T00:05:25.844Z", "ends_at": "2024-07-12T19:57:33.016Z", "ended_at": "2024-11-25T18:23:24.264Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "customer_service", "customer_cancellation_comment": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-02-08T01:09:52.088Z", "modified_at": "2024-06-16T08:36:51.636Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-08-18T13:00:42.665Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2024-06-21T03:00:04.393Z", "modified_at": "2023-02-26T15:25:42.165Z", "id": "", "name": "", "description": "blah brook cleverly blossom defiantly", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "metadata": {}, "prices": [{"created_at": "2024-08-19T22:29:27.736Z", "modified_at": "2023-03-15T10:11:56.132Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "legacy": false}, {"created_at": "2023-12-22T07:54:29.563Z", "modified_at": "2023-04-16T23:50:27.729Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "minimum_amount": 810770, "maximum_amount": 956959, "preset_amount": 777438}], "benefits": [{"id": "", "created_at": "2025-09-13T12:26:55.235Z", "modified_at": "2023-01-23T14:15:37.576Z", "type": "", "description": "unless brightly for dead meh yippee", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": 933854, "key1": 8690.95}, "properties": {"units": 500063, "meter_id": ""}}, {"id": "", "created_at": "2023-12-07T04:19:04.202Z", "modified_at": "2025-02-17T17:43:49.763Z", "type": "", "description": "joyfully discourse merrily wherever failing orchestrate", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": 580639, "key1": ""}, "properties": {"guild_id": "", "role_id": "", "guild_token": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/src", "mime_type": "", "size": 65720, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-12-11T21:57:01.257Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-09-28T14:04:50.967Z", "size_readable": "", "public_url": "https://well-lit-fund.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/var", "mime_type": "", "size": 233358, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-03-31T20:36:57.465Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-01-22T12:19:34.261Z", "size_readable": "", "public_url": "https://deep-vestment.name"}], "attached_custom_fields": []}, "discount": {"duration": "repeating", "type": "fixed", "amount": 536405, "currency": "Som", "created_at": "2023-11-15T16:58:31.247Z", "modified_at": "2025-08-22T13:40:19.150Z", "id": "", "metadata": {"key": 2077.13}, "name": "", "code": "", "starts_at": "2023-01-01T09:29:03.176Z", "ends_at": "2024-04-27T12:09:29.137Z", "max_redemptions": 414274, "redemptions_count": 253529, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-06-16T22:11:32.719Z", "modified_at": "2025-10-03T23:44:36.269Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 232917, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2024-11-12T02:36:59.348Z", "modified_at": "2025-07-01T16:47:46.535Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 412854, "maximum_amount": 942258, "preset_amount": 282049, "legacy": true}], "meters": [{"created_at": "2024-09-11T13:10:32.933Z", "modified_at": "2024-05-27T07:14:10.577Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": "", "key1": true}, "created_at": "2025-07-30T17:58:06.895Z", "modified_at": "2024-06-27T18:50:42.778Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}, {"created_at": "2025-01-09T05:13:52.456Z", "modified_at": "2023-06-25T16:02:25.369Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 6842.22}, "created_at": "2025-12-19T02:03:54.761Z", "modified_at": "2023-07-24T21:01:11.396Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}, {"created_at": "2025-08-14T13:01:58.600Z", "modified_at": "2024-01-30T05:46:03.648Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 80289, "key1": 2105.25}, "created_at": "2025-12-04T11:22:18.277Z", "modified_at": "2025-10-13T14:46:57.561Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}]}, {"created_at": "2023-10-27T00:34:15.525Z", "modified_at": "2025-05-18T21:08:27.359Z", "id": "", "amount": 421, "currency": "Somali Shilling", "recurring_interval": "month", "status": "trialing", "current_period_start": "2023-03-14T00:27:12.916Z", "current_period_end": "2024-12-14T18:53:29.970Z", "cancel_at_period_end": false, "canceled_at": "2023-05-22T12:31:34.361Z", "started_at": "2025-05-04T14:49:32.580Z", "ends_at": "2024-05-04T10:16:57.233Z", "ended_at": "2023-10-23T20:39:57.368Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-07-04T09:28:02.624Z", "modified_at": "2025-07-09T08:01:51.932Z", "metadata": {"key": "", "key1": 1899.83, "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-05-24T09:19:28.400Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2025-01-08T00:53:45.951Z", "modified_at": "2025-01-30T19:10:46.194Z", "id": "", "name": "", "description": "while whoa piglet apud suffice", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": "", "metadata": {"key": "", "key1": 684218, "key2": false}, "prices": [], "benefits": [{"id": "", "created_at": "2024-08-14T18:41:19.055Z", "modified_at": "2024-03-01T04:00:01.219Z", "type": "", "description": "pro pish clear-cut an mid aw disconnection", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": true, "key1": 869031}, "properties": {"note": ""}}, {"id": "", "created_at": "2024-02-02T20:51:32.983Z", "modified_at": "2025-03-15T19:32:30.408Z", "type": "", "description": "insignificant uh-huh equate beside indeed amongst incomparable knavishly", "selectable": false, "deletable": false, "organization_id": "", "metadata": {}, "properties": {"units": 145532, "meter_id": ""}}, {"id": "", "created_at": "2025-08-07T16:09:30.509Z", "modified_at": "2023-12-28T20:46:39.493Z", "type": "", "description": "ripe solicit that willing gah", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": true, "key1": true}, "properties": {"units": 458410, "meter_id": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 263498, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-08-28T04:19:26.736Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-10-10T03:21:06.991Z", "size_readable": "", "public_url": "https://repentant-rust.name/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-11-05T07:52:54.174Z", "modified_at": "2024-08-31T03:57:12.777Z", "id": "", "metadata": {"key": 7264.74, "key1": 439032}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}]}}, "order": 213662, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-07-08T08:27:04.982Z", "modified_at": "2025-03-05T15:08:11.722Z", "id": "", "metadata": {"key": false}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 223595, "required": false}]}, "discount": {"duration": "repeating", "type": "fixed", "amount": 341163, "currency": "Pula", "created_at": "2025-02-06T05:52:39.668Z", "modified_at": "2023-03-10T23:54:55.605Z", "id": "", "metadata": {"key": false, "key1": 1912.55, "key2": 9235.65}, "name": "", "code": "", "starts_at": "2024-06-08T07:01:01.703Z", "ends_at": "2025-08-12T23:43:12.321Z", "max_redemptions": 370247, "redemptions_count": 906209, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2023-07-15T13:55:49.316Z", "modified_at": "2023-08-25T07:45:20.632Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "month"}, {"created_at": "2024-05-19T20:06:15.435Z", "modified_at": "2023-09-28T19:48:55.538Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 134580, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2024-05-29T02:21:30.439Z", "modified_at": "2023-08-11T20:43:56.103Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "unit_amount": "", "cap_amount": 223832, "meter_id": "", "meter": {"id": "", "name": ""}}], "meters": []}], "pagination": {"total_count": 81192, "max_page": 198286}} + "422": + application/json: {} + subscriptions:export: + speakeasy-default-subscriptions:export: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: "" + "422": + application/json: {} + subscriptions:get: + speakeasy-default-subscriptions:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "id": "", "amount": 544221, "currency": "Moroccan Dirham", "recurring_interval": "year", "status": "active", "current_period_start": "2024-05-09T02:28:23.533Z", "current_period_end": "2023-10-16T00:34:27.106Z", "cancel_at_period_end": true, "canceled_at": "2025-10-24T02:41:21.259Z", "started_at": "2024-04-25T04:53:50.189Z", "ends_at": "2025-05-28T07:17:57.134Z", "ended_at": "2023-03-28T11:05:23.685Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": "", "metadata": {"key": ""}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-08-28T15:06:35.685Z", "modified_at": "2025-06-02T05:45:06.910Z", "metadata": {"key": 6085.35}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-12-21T05:04:07.004Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2023-07-14T09:41:03.922Z", "modified_at": "2023-09-24T17:11:04.561Z", "id": "", "name": "", "description": "apostrophize cafe impure notwithstanding harangue once out effector determined", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {"key": 168726, "key1": "", "key2": 411.01}, "prices": [{"created_at": "2023-03-21T02:59:14.977Z", "modified_at": "2025-12-04T14:13:02.442Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year"}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/ports", "mime_type": "", "size": 531548, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-24T06:33:56.610Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-01-20T11:46:53.929Z", "size_readable": "", "public_url": "https://unselfish-tinderbox.biz"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2025-11-06T10:06:37.656Z", "modified_at": "2024-03-01T01:11:57.881Z", "id": "", "metadata": {"key": 698722, "key1": 5543.34}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 365275, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-09-25T20:07:17.479Z", "modified_at": "2025-07-27T18:59:52.807Z", "id": "", "metadata": {"key": 90042}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 784944, "required": true}]}, "discount": {"duration": "once", "type": "fixed", "basis_points": 533710, "created_at": "2023-08-06T23:04:38.947Z", "modified_at": "2024-04-17T04:04:12.484Z", "id": "", "metadata": {"key": 807.42}, "name": "", "code": "", "starts_at": "2024-02-03T08:18:51.900Z", "ends_at": "2025-11-12T10:51:39.493Z", "max_redemptions": 530112, "redemptions_count": 813525, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2024-01-12T14:28:10.298Z", "modified_at": "2025-11-18T09:58:39.949Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "minimum_amount": 618869, "maximum_amount": 913115, "preset_amount": 186592}], "meters": [{"created_at": "2023-09-29T18:18:20.911Z", "modified_at": "2025-05-08T18:55:26.211Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {}, "created_at": "2025-10-18T08:53:06.113Z", "modified_at": "2023-11-20T17:50:58.298Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "sum", "property": ""}, "organization_id": ""}}]} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + subscriptions:update: + speakeasy-default-subscriptions:update: + parameters: + path: + id: "" + requestBody: + application/json: {"revoke": false} + responses: + "200": + application/json: {"created_at": "2024-01-13T16:52:57.274Z", "modified_at": "2025-12-22T15:27:45.882Z", "id": "", "amount": 627690, "currency": "Kip", "recurring_interval": "year", "status": "incomplete", "current_period_start": "2025-09-09T13:32:29.600Z", "current_period_end": "2024-05-04T18:16:40.936Z", "cancel_at_period_end": true, "canceled_at": "2023-10-01T09:16:09.932Z", "started_at": "2023-06-02T23:29:52.263Z", "ends_at": "2025-05-15T01:05:20.251Z", "ended_at": "2025-09-02T06:16:41.919Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "missing_features", "customer_cancellation_comment": "", "metadata": {"key": false}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-03-19T01:46:46.018Z", "modified_at": "2023-02-07T05:49:27.174Z", "metadata": {"key": true, "key1": 1111.58, "key2": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-07-03T16:37:38.189Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2025-08-31T06:06:29.234Z", "modified_at": "2025-02-18T20:59:13.521Z", "id": "", "name": "", "description": "daintily certainly yak surprised beyond blah intensely", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "metadata": {"key": false}, "prices": [{"created_at": "2024-12-21T09:02:21.902Z", "modified_at": "2023-09-30T22:23:40.880Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "minimum_amount": 532806, "maximum_amount": 784089, "preset_amount": 556706, "legacy": true}], "benefits": [{"id": "", "created_at": "2025-11-26T02:34:57.845Z", "modified_at": "2023-12-24T14:22:27.846Z", "type": "", "description": "lightly ultimately in", "selectable": true, "deletable": false, "organization_id": "", "metadata": {}, "properties": {"note": ""}}], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-04-27T18:43:33.136Z", "modified_at": "2025-08-14T18:17:42.881Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 750835, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2025-03-17T07:48:24.040Z", "modified_at": "2024-11-14T02:19:32.060Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}]}}, "order": 974927, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2025-05-02T02:09:14.054Z", "modified_at": "2024-11-11T12:17:08.583Z", "id": "", "metadata": {"key": 3023.63}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 553539, "required": false}]}, "discount": {"duration": "once", "type": "fixed", "amount": 975440, "currency": "Saudi Riyal", "created_at": "2025-04-09T18:14:21.090Z", "modified_at": "2024-02-12T19:23:28.744Z", "id": "", "metadata": {"key": "", "key1": 734197}, "name": "", "code": "", "starts_at": "2023-09-20T00:46:12.203Z", "ends_at": "2025-10-10T07:26:50.939Z", "max_redemptions": 867342, "redemptions_count": 536597, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [{"created_at": "2025-05-05T06:06:40.987Z", "modified_at": "2025-10-17T01:35:15.856Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 890948, "maximum_amount": 224552, "preset_amount": 207320}], "meters": [{"created_at": "2023-06-01T04:50:20.641Z", "modified_at": "2023-07-15T06:46:09.402Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": ""}, "created_at": "2025-05-23T09:44:45.780Z", "modified_at": "2023-05-07T07:53:27.293Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": [{"property": "", "operator": "gt", "value": ""}]}, "aggregation": {}, "organization_id": ""}}, {"created_at": "2025-05-02T22:50:08.491Z", "modified_at": "2025-04-15T06:13:12.913Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 2347.9}, "created_at": "2024-05-10T03:31:03.136Z", "modified_at": "2023-10-05T22:28:31.580Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""}}, {"created_at": "2024-06-04T13:23:06.952Z", "modified_at": "2025-04-14T17:47:24.255Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"metadata": {"key": 462626, "key1": 6797.91}, "created_at": "2025-01-11T09:46:45.064Z", "modified_at": "2025-04-01T20:29:08.914Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {}, "organization_id": ""}}]} + "403": + application/json: {"error": "AlreadyCanceledSubscription", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + subscriptions:revoke: + speakeasy-default-subscriptions:revoke: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2025-08-02T01:27:08.104Z", "modified_at": "2023-02-05T23:02:33.945Z", "id": "", "amount": 124611, "currency": "Yuan Renminbi", "recurring_interval": "year", "status": "active", "current_period_start": "2025-11-15T01:01:28.985Z", "current_period_end": "2025-06-27T03:22:38.420Z", "cancel_at_period_end": true, "canceled_at": "2024-07-23T03:28:01.127Z", "started_at": "2024-09-11T11:09:42.114Z", "ends_at": "2025-06-26T07:29:32.091Z", "ended_at": "2023-12-21T11:58:28.310Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "missing_features", "customer_cancellation_comment": "", "metadata": {"key": "", "key1": 8201.72}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-12-27T11:38:31.558Z", "modified_at": "2023-04-03T07:08:59.801Z", "metadata": {"key": 5659.6}, "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-12T13:31:01.735Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "product": {"created_at": "2024-03-07T05:43:58.187Z", "modified_at": "2025-05-19T03:11:11.730Z", "id": "", "name": "", "description": "fervently if mockingly monasticism unless antagonize", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {"key": false, "key1": true}, "prices": [{"created_at": "2024-08-07T14:34:55.957Z", "modified_at": "2024-05-07T15:04:47.534Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "price_amount": 337099, "legacy": false}, {"created_at": "2023-02-23T14:47:37.579Z", "modified_at": "2024-12-25T10:12:31.163Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "minimum_amount": 507112, "maximum_amount": 17798, "preset_amount": 39144}], "benefits": [], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-12-10T18:22:22.723Z", "modified_at": "2024-09-05T00:53:43.219Z", "id": "", "metadata": {"key": 6733.19}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 3790, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2025-10-16T15:20:35.251Z", "modified_at": "2024-11-29T11:59:42.208Z", "id": "", "metadata": {"key": true, "key1": false, "key2": 7070.09}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 461305, "required": false}]}, "discount": {"duration": "forever", "type": "percentage", "basis_points": 11503, "created_at": "2023-07-11T19:26:02.693Z", "modified_at": "2024-11-07T05:20:19.967Z", "id": "", "metadata": {"key": 2110.67, "key1": 4464.22}, "name": "", "code": "", "starts_at": "2024-07-26T10:39:49.461Z", "ends_at": "2025-03-18T15:58:12.132Z", "max_redemptions": 323711, "redemptions_count": 737064, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "prices": [], "meters": []} + "403": + application/json: {"error": "AlreadyCanceledSubscription", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + oauth2:clients:list: + speakeasy-default-oauth2-:clients:list: + responses: + "200": + application/json: {"items": [{"redirect_uris": ["https://definite-deer.com", "https://productive-affect.net"], "client_name": "", "created_at": "2023-04-05T09:49:38.010Z", "modified_at": "2023-03-17T01:57:00.187Z", "client_id": "", "client_secret": "", "client_id_issued_at": 687960, "client_secret_expires_at": 509883}, {"redirect_uris": ["https://awful-fund.info/", "https://victorious-merit.org/"], "client_name": "", "created_at": "2024-06-21T03:00:04.393Z", "modified_at": "2023-02-26T15:25:42.165Z", "client_id": "", "client_secret": "", "client_id_issued_at": 322596, "client_secret_expires_at": 860596}, {"redirect_uris": [], "client_name": "", "created_at": "2025-09-10T07:49:25.657Z", "modified_at": "2024-04-10T02:32:42.816Z", "client_id": "", "client_secret": "", "client_id_issued_at": 913465, "client_secret_expires_at": 173090}], "pagination": {"total_count": 75058, "max_page": 897069}} + "422": + application/json: {} + oauth2:clients:oauth2:create_client: + speakeasy-default-oauth2-:clients:oauth2-:create-client: + requestBody: + application/json: {"redirect_uris": ["https://inferior-chainstay.com"], "client_name": ""} + responses: + "200": + application/json: "" + "422": + application/json: {} + oauth2:clients:oauth2:get_client: + speakeasy-default-oauth2-:clients:oauth2-:get-client: + parameters: + path: + client_id: "" + responses: + "200": + application/json: "" + "422": + application/json: {} + oauth2:clients:oauth2:update_client: + speakeasy-default-oauth2-:clients:oauth2-:update-client: + parameters: + path: + client_id: "" + requestBody: + application/json: {"redirect_uris": ["https://grown-worth.name", "https://worthwhile-avalanche.org/", "https://general-digit.com/"], "client_name": "", "client_id": ""} + responses: + "200": + application/json: "" + "422": + application/json: {} + oauth2:clients:oauth2:delete_client: + speakeasy-default-oauth2-:clients:oauth2-:delete-client: + parameters: + path: + client_id: "" + responses: + "200": + application/json: "" + "422": + application/json: {} + oauth2:authorize: + speakeasy-default-oauth2-:authorize: + responses: + "200": + application/json: {"client": {"created_at": "2023-05-14T00:33:15.801Z", "modified_at": "2023-01-08T10:23:26.945Z", "client_id": "", "client_name": "", "client_uri": "https://thrifty-excess.biz/", "logo_uri": "https://zany-morbidity.info/", "tos_uri": "https://noted-digit.com/", "policy_uri": "https://that-airmail.info"}, "sub_type": "", "sub": {"id": "", "email": "Frederic48@hotmail.com", "avatar_url": "https://burdensome-institute.info"}, "scopes": ["license_keys:write", "checkouts:write"]} + oauth2:request_token: + speakeasy-default-oauth2-:request-token: + requestBody: + application/x-www-form-urlencoded: {"grant_type": "", "client_id": "", "client_secret": "", "code": "", "redirect_uri": "https://old-fort.name"} + responses: + "200": + application/json: {"access_token": "", "token_type": "", "expires_in": 71421, "refresh_token": "", "scope": "", "id_token": ""} + oauth2:revoke_token: + speakeasy-default-oauth2-:revoke-token: + requestBody: + application/x-www-form-urlencoded: {"token": "", "client_id": "", "client_secret": ""} + responses: + "200": + application/json: {} + oauth2:introspect_token: + speakeasy-default-oauth2-:introspect-token: + requestBody: + application/x-www-form-urlencoded: {"token": "", "client_id": "", "client_secret": ""} + responses: + "200": + application/json: {"active": true, "client_id": "", "token_type": "access_token", "scope": "", "sub_type": "user", "sub": "", "aud": "", "iss": "", "exp": 169240, "iat": 646887} + oauth2:userinfo: + speakeasy-default-oauth2-:userinfo: + responses: + "200": + application/json: {"sub": ""} + benefits:list: + speakeasy-default-benefits:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"id": "", "created_at": "2023-07-14T18:23:27.528Z", "modified_at": "2023-09-09T18:28:08.953Z", "type": "", "description": "rudely as toward uselessly", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": 480616}, "properties": {"prefix": "", "expires": {"ttl": 103421, "timeframe": "month"}, "activations": {"limit": 841031, "enable_customer_admin": true}, "limit_usage": 863466}}, {"id": "", "created_at": "2024-03-05T16:40:09.484Z", "modified_at": "2023-05-05T09:08:16.530Z", "type": "", "description": "safely briefly ugh fen", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": ""}, "properties": {"guild_id": "", "role_id": "", "guild_token": ""}}], "pagination": {"total_count": 810770, "max_page": 956959}} + "422": + application/json: {} + benefits:create: + speakeasy-default-benefits:create: + requestBody: + application/json: {"type": "", "description": "delightfully fumigate convection though zowie up bulky electronics", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"files": ["", ""]}} + responses: + "201": + application/json: {"id": "", "created_at": "2023-12-24T06:50:18.755Z", "modified_at": "2024-03-22T23:38:14.940Z", "type": "", "description": "aw blend ha", "selectable": false, "deletable": false, "organization_id": "", "metadata": {}, "properties": {"archived": {"key": true, "key1": false}, "files": [""]}} + "422": + application/json: {} + benefits:get: + speakeasy-default-benefits:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "created_at": "2024-09-04T11:33:52.011Z", "modified_at": "2024-08-19T11:11:04.610Z", "type": "", "description": "hundred whereas dimly unused cone restructure gadzooks", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": 725000, "key1": 103111, "key2": 3925.74}, "properties": {"prefix": "", "expires": {"ttl": 908293, "timeframe": "day"}, "activations": {"limit": 843618, "enable_customer_admin": true}, "limit_usage": 149108}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + benefits:update: + speakeasy-default-benefits:update: + parameters: + path: + id: "" + requestBody: + application/json: {"type": ""} + responses: + "200": + application/json: {"id": "", "created_at": "2024-01-13T16:52:57.274Z", "modified_at": "2025-12-22T15:27:45.882Z", "type": "", "description": "hence reconstitute amid miserable daintily certainly yak surprised", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": "", "key1": 198183}, "properties": {"archived": {"key": false}, "files": []}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + benefits:delete: + speakeasy-default-benefits:delete: + parameters: + path: + id: "" + responses: + "403": + application/json: {"error": "NotPermitted", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + benefits:grants: + speakeasy-default-benefits:grants: + parameters: + path: + id: "" + query: {} + responses: + "200": + application/json: {"items": [{"created_at": "2023-12-04T08:24:23.192Z", "modified_at": "2025-08-14T16:34:09.973Z", "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-10-11T12:56:55.986Z", "modified_at": "2025-01-29T18:41:47.026Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-01-17T08:37:11.054Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "properties": {}}], "pagination": {"total_count": 851574, "max_page": 450739}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + products:list: + speakeasy-default-products:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "id": "", "name": "", "description": "biodegrade miserably fedora blah", "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {"key": 480616}, "prices": [], "benefits": [{"id": "", "created_at": "2024-03-25T14:03:52.771Z", "modified_at": "2025-08-04T08:35:41.482Z", "type": "", "description": "tromp worth reluctantly wound accompanist", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": 9486.14, "key1": true, "key2": 993677}, "properties": {"units": 726700, "meter_id": ""}}, {"id": "", "created_at": "2024-03-21T14:01:55.283Z", "modified_at": "2023-02-02T01:51:19.643Z", "type": "", "description": "kindheartedly nor fooey a supposing regarding times uselessly", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 2922.28}, "properties": {"prefix": "", "expires": {"ttl": 256538, "timeframe": "day"}, "activations": {"limit": 726951, "enable_customer_admin": false}, "limit_usage": 895424}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/etc/namedb", "mime_type": "", "size": 480213, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-03-21T06:52:57.825Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-11-06T04:06:54.106Z", "size_readable": "", "public_url": "https://gummy-cope.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/bin", "mime_type": "", "size": 634941, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-04-13T01:33:37.391Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-05-23T16:01:48.733Z", "size_readable": "", "public_url": "https://jumbo-legislature.org/"}], "attached_custom_fields": []}, {"created_at": "2023-06-09T01:19:27.771Z", "modified_at": "2024-09-19T19:57:30.820Z", "id": "", "name": "", "description": "early abseil noisily consequently husband since wonderfully ruin", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "metadata": {"key": false}, "prices": [{"created_at": "2025-05-08T05:53:10.405Z", "modified_at": "2024-02-15T10:16:55.982Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "price_amount": 498898}], "benefits": [{"id": "", "created_at": "2025-10-25T10:50:37.438Z", "modified_at": "2025-01-09T05:13:52.456Z", "type": "", "description": "punctually duh how though", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": 269946, "key1": "", "key2": ""}, "properties": {"prefix": "", "expires": {"ttl": 835214, "timeframe": "day"}, "activations": {"limit": 968727, "enable_customer_admin": true}, "limit_usage": 578524}}, {"id": "", "created_at": "2025-09-05T07:44:59.336Z", "modified_at": "2023-07-24T14:46:52.205Z", "type": "", "description": "distinction range flood", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": 6661.77, "key1": 648937, "key2": ""}, "properties": {"guild_id": "", "role_id": "", "guild_token": ""}}], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-07-23T07:34:30.872Z", "modified_at": "2024-04-23T03:52:08.925Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 981844, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2025-04-13T00:39:36.473Z", "modified_at": "2025-08-25T02:25:37.454Z", "id": "", "metadata": {"key": "", "key1": 8884.01, "key2": ""}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}]}}, "order": 684218, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2023-06-26T17:38:16.835Z", "modified_at": "2025-09-04T00:37:31.188Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 539944, "required": true}]}], "pagination": {"total_count": 586154, "max_page": 313724}} + "422": + application/json: {} + products:create: + speakeasy-default-products:create: + requestBody: + application/json: {"name": "", "recurring_interval": "month", "prices": [{"amount_type": ""}, {"amount_type": "", "price_amount": 69025}], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"} + responses: + "201": + application/json: {"created_at": "2025-05-22T22:27:14.379Z", "modified_at": "2025-11-08T08:43:39.394Z", "id": "", "name": "", "description": "vice between gee", "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {"key": "", "key1": 5504.83}, "prices": [{"created_at": "2023-10-12T17:02:32.250Z", "modified_at": "2025-05-07T11:22:17.516Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "price_amount": 920994, "legacy": false}, {"created_at": "2024-05-07T08:18:44.967Z", "modified_at": "2024-04-13T23:08:55.199Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "price_amount": 490420}, {"created_at": "2023-02-19T18:37:18.227Z", "modified_at": "2023-05-23T02:39:32.755Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "legacy": false}], "benefits": [{"id": "", "created_at": "2023-04-21T23:18:33.658Z", "modified_at": "2023-07-26T12:35:34.317Z", "type": "", "description": "for ick superb nudge embalm simple ouch when pfft", "selectable": false, "deletable": false, "organization_id": "", "metadata": {"key": 788281}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "pull"}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr", "mime_type": "", "size": 116971, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-03-20T10:12:21.713Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-05-10T02:31:33.292Z", "size_readable": "", "public_url": "https://unwilling-clamp.net/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-05-26T00:30:59.331Z", "modified_at": "2025-10-18T00:28:01.302Z", "id": "", "metadata": {"key": 982866}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 482357, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2023-06-15T00:28:26.571Z", "modified_at": "2024-02-24T22:31:50.589Z", "id": "", "metadata": {"key": true, "key1": 9775.91}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": []}}, "order": 314179, "required": false}]} + "422": + application/json: {} + products:get: + speakeasy-default-products:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "id": "", "name": "", "description": "tune only fellow scary but embarrassment metabolise", "recurring_interval": "year", "is_recurring": false, "is_archived": false, "organization_id": "", "metadata": {"key": 725000, "key1": 103111, "key2": 3925.74}, "prices": [{"created_at": "2024-03-31T04:11:43.083Z", "modified_at": "2023-06-13T10:08:35.363Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 486669, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2023-07-01T01:48:45.676Z", "modified_at": "2024-12-12T10:59:52.193Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 25042, "maximum_amount": 637754, "preset_amount": 688735, "legacy": true}, {"created_at": "2023-09-18T20:12:25.613Z", "modified_at": "2025-02-17T20:34:29.848Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 667645, "maximum_amount": 188420, "preset_amount": 457772}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/mail", "mime_type": "", "size": 395188, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-07-04T22:10:57.702Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2024-08-21T23:59:38.589Z", "size_readable": "", "public_url": "https://mad-overheard.name/"}], "attached_custom_fields": []} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + products:update: + speakeasy-default-products:update: + parameters: + path: + id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"created_at": "2025-07-28T19:04:48.565Z", "modified_at": "2024-10-16T10:52:42.015Z", "id": "", "name": "", "description": "hydrolyze for drat underneath sticky", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "metadata": {"key": "", "key1": 35.15}, "prices": [{"created_at": "2024-01-06T08:10:12.343Z", "modified_at": "2024-01-18T02:16:35.227Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "legacy": false}], "benefits": [{"id": "", "created_at": "2024-03-06T08:49:00.130Z", "modified_at": "2023-10-16T11:25:33.944Z", "type": "", "description": "disapprove finer ha excepting hence heartbeat", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": ""}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo", "permission": "admin"}}, {"id": "", "created_at": "2024-06-16T12:36:03.175Z", "modified_at": "2024-08-10T02:36:04.300Z", "type": "", "description": "clamour urgently voluntarily scale gut readies concerning statement", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": 780342, "key1": false, "key2": 7283.24}, "properties": {"note": ""}}, {"id": "", "created_at": "2023-09-04T02:36:51.246Z", "modified_at": "2023-08-16T05:21:16.931Z", "type": "", "description": "translation scrutinise condense lovingly following and qua queasily down", "selectable": false, "deletable": true, "organization_id": "", "metadata": {"key": false}, "properties": {"units": 611007, "meter_id": ""}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/media", "mime_type": "", "size": 817980, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-17T11:47:01.705Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-01-03T13:42:15.243Z", "size_readable": "", "public_url": "https://forsaken-smog.name/"}, {"id": "", "organization_id": "", "name": "", "path": "/media", "mime_type": "", "size": 898661, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-08-14T07:09:37.156Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-11-05T17:18:18.318Z", "size_readable": "", "public_url": "https://gleaming-dusk.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/sys", "mime_type": "", "size": 734120, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-08-20T10:07:30.377Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2024-04-14T06:17:10.741Z", "size_readable": "", "public_url": "https://overcooked-lyre.info/"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-01-03T15:03:49.797Z", "modified_at": "2023-11-09T03:51:09.859Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 57147, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-01-02T16:02:58.566Z", "modified_at": "2023-02-22T07:35:28.311Z", "id": "", "metadata": {"key": 182892}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 38614, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-02-15T02:49:37.124Z", "modified_at": "2023-05-25T10:03:31.964Z", "id": "", "metadata": {"key": 7772.88, "key1": 3221.25}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 253034, "required": true}]} + "403": + application/json: {"error": "NotPermitted", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + products:update_benefits: + speakeasy-default-products:update-benefits: + parameters: + path: + id: "" + requestBody: + application/json: {"benefits": [""]} + responses: + "200": + application/json: {"created_at": "2024-03-20T10:54:06.081Z", "modified_at": "2025-03-05T13:29:26.777Z", "id": "", "name": "", "description": "tag shakily wholly thankfully", "recurring_interval": "year", "is_recurring": false, "is_archived": false, "organization_id": "", "metadata": {"key": 459899}, "prices": [], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/etc/namedb", "mime_type": "", "size": 924838, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-11-20T11:00:09.297Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2024-05-03T02:33:19.033Z", "size_readable": "", "public_url": "https://miserly-wedding.info"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/obj", "mime_type": "", "size": 323066, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-24T15:12:10.243Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-01-30T15:26:59.424Z", "size_readable": "", "public_url": "https://light-straw.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 676448, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-12-12T16:44:59.741Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2024-06-09T14:18:13.393Z", "size_readable": "", "public_url": "https://somber-pulse.biz"}], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-06-19T17:54:59.183Z", "modified_at": "2024-03-26T01:32:10.008Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}]}}, "order": 790197, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2023-06-06T00:48:41.583Z", "modified_at": "2023-07-29T09:08:04.068Z", "id": "", "metadata": {"key": 1959.85, "key1": 4267.85}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 303525, "required": true}]} + "403": + application/json: {"error": "NotPermitted", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + orders:list: + speakeasy-default-orders:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"id": "", "created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "status": "pending", "paid": true, "subtotal_amount": 152837, "discount_amount": 635532, "net_amount": 639387, "amount": 17577, "tax_amount": 718303, "total_amount": 86140, "refunded_amount": 68504, "refunded_tax_amount": 687960, "currency": "Liberian Dollar", "billing_reason": "subscription_cycle", "billing_address": {"country": "US"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-02-08T01:09:52.088Z", "modified_at": "2024-06-16T08:36:51.636Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-08-18T13:00:42.665Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "user_id": "", "product": {"metadata": {"key": ""}, "created_at": "2023-12-20T13:34:28.286Z", "modified_at": "2025-08-01T05:06:49.492Z", "id": "", "name": "", "description": "among sprinkles er", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": ""}, "discount": {"duration": "once", "duration_in_months": 692918, "type": "percentage", "basis_points": 838930, "created_at": "2025-06-14T00:49:25.662Z", "modified_at": "2025-12-27T15:09:02.427Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2023-06-30T19:14:35.502Z", "ends_at": "2023-03-23T01:47:30.770Z", "max_redemptions": 836788, "redemptions_count": 777245, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {}, "created_at": "2024-12-28T19:56:44.465Z", "modified_at": "2023-11-08T21:35:05.868Z", "id": "", "amount": 781409, "currency": "Denar", "recurring_interval": "month", "status": "incomplete", "current_period_start": "2023-11-19T07:34:10.466Z", "current_period_end": "2025-12-24T15:52:28.107Z", "cancel_at_period_end": false, "canceled_at": "2023-10-11T19:17:33.283Z", "started_at": "2023-12-22T07:54:29.563Z", "ends_at": "2023-04-16T23:50:27.729Z", "ended_at": "2025-01-13T06:48:49.446Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "switched_service", "customer_cancellation_comment": ""}, "items": []}, {"id": "", "created_at": "2025-06-07T14:29:00.429Z", "modified_at": "2025-11-14T19:49:34.065Z", "status": "partially_refunded", "paid": true, "subtotal_amount": 505778, "discount_amount": 948614, "net_amount": 900109, "amount": 20615, "tax_amount": 467775, "total_amount": 993677, "refunded_amount": 726700, "refunded_tax_amount": 767950, "currency": "Iceland Krona", "billing_reason": "purchase", "billing_address": {"country": "SE"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": 4080.66, "key1": ""}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-06-28T00:46:13.804Z", "modified_at": "2023-12-27T23:30:11.053Z", "metadata": {"key": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-12-19T15:02:23.114Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "user_id": "", "product": {"metadata": {"key": 457442}, "created_at": "2023-08-22T08:40:22.005Z", "modified_at": "2025-09-14T09:33:23.636Z", "id": "", "name": "", "description": "righteously reservation down", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": ""}, "discount": {"duration": "repeating", "type": "percentage", "basis_points": 206163, "created_at": "2023-12-07T04:19:04.202Z", "modified_at": "2025-02-17T17:43:49.763Z", "id": "", "metadata": {"key": false}, "name": "", "code": "", "starts_at": "2025-04-28T22:29:22.162Z", "ends_at": "2023-06-27T21:31:56.583Z", "max_redemptions": 182622, "redemptions_count": 213989, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {"key": true}, "created_at": "2024-07-27T09:20:59.531Z", "modified_at": "2023-12-12T02:49:50.316Z", "id": "", "amount": 621551, "currency": "Lari", "recurring_interval": "month", "status": "unpaid", "current_period_start": "2025-03-07T17:43:00.381Z", "current_period_end": "2025-06-02T11:43:36.892Z", "cancel_at_period_end": false, "canceled_at": "2025-01-25T06:39:02.045Z", "started_at": "2023-06-14T04:35:02.740Z", "ends_at": "2024-06-10T07:32:02.289Z", "ended_at": "2025-03-21T06:52:57.825Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "unused", "customer_cancellation_comment": ""}, "items": [{"created_at": "2024-06-20T13:26:28.598Z", "modified_at": "2024-01-19T17:39:17.317Z", "id": "", "label": "", "amount": 190272, "tax_amount": 830742, "proration": true, "product_price_id": ""}]}], "pagination": {"total_count": 634941, "max_page": 93125}} + "422": + application/json: {} + orders:get: + speakeasy-default-orders:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "status": "refunded", "paid": true, "subtotal_amount": 521235, "discount_amount": 969961, "net_amount": 458049, "amount": 450824, "tax_amount": 262795, "total_amount": 213457, "refunded_amount": 937146, "refunded_tax_amount": 438142, "currency": "Dobra", "billing_reason": "purchase", "billing_address": {"country": "US"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "metadata": {"key": ""}, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-08-28T15:06:35.685Z", "modified_at": "2025-06-02T05:45:06.910Z", "metadata": {"key": 6085.35}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-12-21T05:04:07.004Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "user_id": "", "product": {"metadata": {}, "created_at": "2023-09-24T17:11:04.561Z", "modified_at": "2025-05-05T04:00:06.053Z", "id": "", "name": "", "description": "willfully toward guilt shinny vaguely", "recurring_interval": "year", "is_recurring": false, "is_archived": true, "organization_id": ""}, "discount": {"duration": "repeating", "type": "percentage", "amount": 950598, "currency": "Tenge", "created_at": "2023-03-21T00:44:28.600Z", "modified_at": "2023-03-31T04:26:02.125Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2024-12-12T10:59:52.193Z", "ends_at": "2025-01-01T00:13:47.245Z", "max_redemptions": 988917, "redemptions_count": 25042, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "subscription": {"metadata": {"key": 2924.69, "key1": true}, "created_at": "2023-09-18T20:12:25.613Z", "modified_at": "2025-02-17T20:34:29.848Z", "id": "", "amount": 256758, "currency": "Surinam Dollar", "recurring_interval": "year", "status": "past_due", "current_period_start": "2023-07-26T12:11:42.166Z", "current_period_end": "2024-05-16T17:14:04.529Z", "cancel_at_period_end": true, "canceled_at": "2024-03-24T07:38:20.352Z", "started_at": "2025-11-03T02:18:54.211Z", "ends_at": "2024-03-09T03:01:19.173Z", "ended_at": "2023-07-04T22:10:57.702Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "customer_service", "customer_cancellation_comment": ""}, "items": [{"created_at": "2023-02-15T01:07:24.861Z", "modified_at": "2024-06-22T03:56:43.060Z", "id": "", "label": "", "amount": 634224, "tax_amount": 638700, "proration": true, "product_price_id": ""}, {"created_at": "2025-12-04T14:13:02.442Z", "modified_at": "2024-08-22T17:07:10.826Z", "id": "", "label": "", "amount": 786783, "tax_amount": 972276, "proration": true, "product_price_id": ""}]} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + orders:invoice: + speakeasy-default-orders:invoice: + parameters: + path: + id: "" + responses: + "200": + application/json: {"url": "https://those-director.org"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + refunds:list: + speakeasy-default-refunds:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "id": "", "metadata": {}, "status": "pending", "reason": "service_disruption", "amount": 639387, "tax_amount": 17577, "currency": "Russian Ruble", "organization_id": "", "order_id": "", "subscription_id": "", "customer_id": "", "revoke_benefits": true}, {"created_at": "2023-03-17T01:57:00.187Z", "modified_at": "2025-01-24T00:05:25.844Z", "id": "", "metadata": {"key": 74.68, "key1": ""}, "status": "succeeded", "reason": "customer_request", "amount": 73227, "tax_amount": 931165, "currency": "Ouguiya", "organization_id": "", "order_id": "", "subscription_id": "", "customer_id": "", "revoke_benefits": false}], "pagination": {"total_count": 490078, "max_page": 51681}} + "422": + application/json: {} + refunds:create: + speakeasy-default-refunds:create: + requestBody: + application/json: {"order_id": "", "reason": "customer_request", "amount": 638424} + responses: + "200": + application/json: {"created_at": "2024-04-02T12:48:32.253Z", "modified_at": "2023-05-28T06:20:22.766Z", "id": "", "metadata": {}, "status": "canceled", "reason": "other", "amount": 86, "tax_amount": 169727, "currency": "Bulgarian Lev", "organization_id": "", "order_id": "", "subscription_id": "", "customer_id": "", "revoke_benefits": false} + "400": + application/json: {"error": "RefundAmountTooHigh", "detail": ""} + "403": + application/json: {"error": "RefundedAlready", "detail": ""} + "422": + application/json: {} + checkouts:list: + speakeasy-default-checkouts:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "id": "", "payment_processor": "stripe", "status": "expired", "client_secret": "", "url": "https://primary-paintwork.com/", "expires_at": "2025-02-26T06:14:46.641Z", "success_url": "https://black-poetry.name/", "embed_origin": "", "amount": 633911, "discount_amount": 7468, "net_amount": 54607, "tax_amount": 367745, "total_amount": 485729, "currency": "Barbados Dollar", "product_id": "", "product_price_id": "", "discount_id": "", "allow_discount_codes": false, "require_billing_address": false, "is_discount_applicable": false, "is_free_product_price": true, "is_payment_required": true, "is_payment_setup_required": true, "is_payment_form_required": false, "customer_id": "", "customer_name": "", "customer_email": "", "customer_ip_address": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {"key": "", "key1": "", "key2": ""}, "metadata": {"key": true}, "customer_external_id": "", "products": [], "product": {"created_at": "2025-09-10T04:30:13.188Z", "modified_at": "2023-05-29T14:05:29.727Z", "id": "", "name": "", "description": "aha although gosh whenever as plastic", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2025-11-05T16:19:50.933Z", "modified_at": "2025-09-13T12:26:55.235Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "year"}, {"created_at": "2024-03-21T14:01:55.283Z", "modified_at": "2023-02-02T01:51:19.643Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 408066, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2023-12-27T23:30:11.053Z", "modified_at": "2024-03-21T09:41:56.524Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "legacy": false}], "benefits": [{"id": "", "created_at": "2024-04-08T13:05:11.917Z", "modified_at": "2024-02-10T20:11:51.410Z", "type": "github_repository", "description": "dead meh yippee stigmatize", "selectable": false, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2023-12-07T04:19:04.202Z", "modified_at": "2025-02-17T17:43:49.763Z", "type": "github_repository", "description": "uselessly toothpick silently aftermath never tooth swelter fund provided", "selectable": true, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2024-11-16T21:16:42.369Z", "modified_at": "2023-01-22T06:30:00.744Z", "type": "custom", "description": "midst taxicab describe house what married owlishly which wonderfully CD", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/boot/defaults", "mime_type": "", "size": 651266, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-10-05T17:09:46.559Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-05-04T14:49:32.580Z", "size_readable": "", "public_url": "https://fine-curl.com/"}]}, "product_price": {"created_at": "2025-11-27T17:23:02.117Z", "modified_at": "2023-04-04T09:25:47.730Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 186693, "meter_id": "", "meter": {"id": "", "name": ""}}, "discount": {"duration": "forever", "type": "fixed", "amount": 673392, "currency": "Guarani", "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-10-13T02:20:02.927Z", "modified_at": "2025-07-29T15:14:26.705Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 94321, "required": false}], "customer_metadata": {"key": false, "key1": 372405, "key2": true}, "customer_billing_address_fields": {"country": true, "state": true, "city": true, "postal_code": false, "line1": true, "line2": false}}, {"created_at": "2025-03-30T00:07:45.253Z", "modified_at": "2024-12-31T03:06:35.935Z", "id": "", "payment_processor": "stripe", "status": "confirmed", "client_secret": "", "url": "https://every-affiliate.org", "expires_at": "2025-07-03T01:58:07.843Z", "success_url": "https://jaunty-desk.org/", "embed_origin": "", "amount": 31664, "discount_amount": 784266, "net_amount": 760062, "tax_amount": 882392, "total_amount": 811673, "currency": "Brunei Dollar", "product_id": "", "product_price_id": "", "discount_id": "", "allow_discount_codes": false, "require_billing_address": false, "is_discount_applicable": true, "is_free_product_price": true, "is_payment_required": false, "is_payment_setup_required": false, "is_payment_form_required": false, "customer_id": "", "customer_name": "", "customer_email": "", "customer_ip_address": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {"key": "", "key1": "", "key2": ""}, "metadata": {}, "customer_external_id": "", "products": [{"created_at": "2024-03-01T04:00:01.219Z", "modified_at": "2024-10-04T10:11:23.447Z", "id": "", "name": "", "description": "before whoever frenetically from yuck", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-10-03T06:38:24.300Z", "modified_at": "2023-08-10T06:23:08.124Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year"}], "benefits": [{"id": "", "created_at": "2023-10-08T07:15:02.232Z", "modified_at": "2023-07-04T18:07:17.452Z", "type": "discord", "description": "shrilly ramp ethical busily archaeology coaxingly ew ack", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2024-08-31T14:37:02.919Z", "modified_at": "2024-05-22T05:51:55.323Z", "type": "discord", "description": "verbally drat pillow joyous upbeat pfft ouch barring motor severe", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2024-01-21T09:29:51.966Z", "modified_at": "2023-08-23T04:10:39.290Z", "type": "meter_credit", "description": "mid as er polished whether welcome", "selectable": false, "deletable": true, "organization_id": ""}], "medias": []}, {"created_at": "2025-02-01T02:14:45.676Z", "modified_at": "2023-02-03T04:26:41.842Z", "id": "", "name": "", "description": "explode fantastic like notwithstanding", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-07-03T23:59:32.103Z", "modified_at": "2024-01-31T21:47:42.410Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "price_amount": 73215, "legacy": true}, {"created_at": "2025-04-17T10:52:56.406Z", "modified_at": "2023-04-10T04:49:36.950Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "minimum_amount": 677344, "maximum_amount": 510593, "preset_amount": 989663, "legacy": false}, {"created_at": "2024-08-14T06:27:57.198Z", "modified_at": "2023-08-03T11:15:58.409Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "minimum_amount": 633451, "maximum_amount": 50745, "preset_amount": 947132, "legacy": true}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 760111, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-07-22T13:39:20.206Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-09-09T02:23:31.754Z", "size_readable": "", "public_url": "https://unsightly-license.org"}]}], "product": {"created_at": "2023-03-22T15:36:05.437Z", "modified_at": "2023-10-15T22:44:40.264Z", "id": "", "name": "", "description": "scarcely honestly submitter likewise pessimistic", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2024-07-28T19:07:52.526Z", "modified_at": "2023-07-07T06:05:22.693Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "minimum_amount": 197579, "maximum_amount": 490604, "preset_amount": 95798}, {"created_at": "2023-04-11T04:01:33.016Z", "modified_at": "2023-08-31T01:24:41.834Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 593128, "maximum_amount": 706622, "preset_amount": 82745, "legacy": false}, {"created_at": "2024-09-01T16:13:44.253Z", "modified_at": "2024-09-03T11:28:25.577Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "legacy": false}], "benefits": [{"id": "", "created_at": "2025-10-15T15:45:55.786Z", "modified_at": "2024-03-18T21:36:49.651Z", "type": "license_keys", "description": "unless smog circa delightfully a spirit rebuke while into darling", "selectable": false, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2024-12-15T03:08:16.060Z", "modified_at": "2025-04-18T03:21:17.743Z", "type": "downloadables", "description": "chunter dimly impostor as great whether prime huzzah damaged", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/mnt", "mime_type": "", "size": 895450, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-04-27T04:36:31.900Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-12-05T23:38:38.128Z", "size_readable": "", "public_url": "https://dull-challenge.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/opt/bin", "mime_type": "", "size": 292377, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-06-15T02:28:41.444Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-04-27T23:59:08.688Z", "size_readable": "", "public_url": "https://advanced-creature.biz"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/sbin", "mime_type": "", "size": 702025, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-09-17T06:46:24.716Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-03-21T04:29:10.440Z", "size_readable": "", "public_url": "https://tame-expansion.info"}]}, "product_price": {"created_at": "2025-10-04T08:17:36.229Z", "modified_at": "2025-12-12T13:12:46.314Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "legacy": false}, "discount": {"duration": "once", "duration_in_months": 474109, "type": "percentage", "amount": 188415, "currency": "Russian Ruble", "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-12-28T10:22:11.548Z", "modified_at": "2024-01-13T03:59:35.884Z", "id": "", "metadata": {"key": 615543, "key1": "", "key2": 173935}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 250113, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2023-11-19T11:56:36.728Z", "modified_at": "2024-12-03T22:12:14.159Z", "id": "", "metadata": {"key": ""}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 755485, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2025-04-21T07:11:23.704Z", "modified_at": "2024-07-30T12:22:08.566Z", "id": "", "metadata": {"key": "", "key1": 515259}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 569185, "required": true}], "customer_metadata": {"key": 567243}, "customer_billing_address_fields": {"country": false, "state": true, "city": true, "postal_code": true, "line1": true, "line2": false}}], "pagination": {"total_count": 936048, "max_page": 478898}} + "422": + application/json: {} + checkouts:create: + speakeasy-default-checkouts:create: + requestBody: + application/json: {"customer_billing_address": {"country": "SE"}, "products": ["", ""]} + responses: + "201": + application/json: {"created_at": "2024-04-02T12:48:32.253Z", "modified_at": "2023-05-28T06:20:22.766Z", "id": "", "payment_processor": "stripe", "status": "open", "client_secret": "", "url": "https://well-documented-cd.biz", "expires_at": "2023-04-09T14:25:29.356Z", "success_url": "https://substantial-morbidity.net", "embed_origin": "", "amount": 957409, "discount_amount": 357021, "net_amount": 259629, "tax_amount": 17759, "total_amount": 230313, "currency": "Cape Verde Escudo", "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": "", "customer_name": "", "customer_email": "", "customer_ip_address": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {"key": "", "key1": ""}, "metadata": {"key": "", "key1": ""}, "customer_external_id": "", "products": [{"created_at": "2023-01-31T06:30:36.486Z", "modified_at": "2024-12-24T00:15:46.309Z", "id": "", "name": "", "description": "ha supposing whoa coordination affect hmph worth", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-06-28T18:56:13.043Z", "modified_at": "2024-10-30T06:59:44.964Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 117747, "maximum_amount": 589813, "preset_amount": 865538}], "benefits": [{"id": "", "created_at": "2025-04-24T07:48:43.099Z", "modified_at": "2024-01-20T05:49:45.340Z", "type": "custom", "description": "defiantly indolent apud formula other gosh carouse obligation elliptical ick", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/src", "mime_type": "", "size": 199311, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-11T01:54:42.561Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-03-28T10:54:13.192Z", "size_readable": "", "public_url": "https://blank-manner.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/var", "mime_type": "", "size": 475786, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-02-01T04:08:07.069Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-10-14T21:15:17.585Z", "size_readable": "", "public_url": "https://impolite-dish.biz"}, {"id": "", "organization_id": "", "name": "", "path": "/private", "mime_type": "", "size": 149413, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-03-25T05:20:06.588Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-02-09T15:32:31.554Z", "size_readable": "", "public_url": "https://mild-switchboard.info/"}]}, {"created_at": "2023-12-09T20:13:45.912Z", "modified_at": "2025-08-28T09:50:51.563Z", "id": "", "name": "", "description": "political inside bony procurement funny entwine institute shrilly yum on", "recurring_interval": "year", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2024-07-18T12:18:30.481Z", "modified_at": "2025-03-05T11:25:25.980Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 681367, "maximum_amount": 962535, "preset_amount": 128582}], "benefits": [{"id": "", "created_at": "2025-01-10T00:58:14.028Z", "modified_at": "2024-06-09T18:41:13.610Z", "type": "license_keys", "description": "whenever ew cruelty essay properly purple now once times", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 590951, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-02-21T06:17:52.584Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-02-16T19:35:05.825Z", "size_readable": "", "public_url": "https://suburban-obedience.info"}, {"id": "", "organization_id": "", "name": "", "path": "/var/mail", "mime_type": "", "size": 916417, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-09-30T19:16:02.592Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-10-09T09:43:15.238Z", "size_readable": "", "public_url": "https://numb-publicity.net"}]}], "product": {"created_at": "2023-02-27T16:04:11.438Z", "modified_at": "2024-02-23T01:40:23.367Z", "id": "", "name": "", "description": "till but exactly ill a stir-fry hospitalization couch longboat quietly", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"id": "", "created_at": "2024-12-28T08:54:14.673Z", "modified_at": "2024-09-05T18:19:44.660Z", "type": "license_keys", "description": "rosemary clueless hm pip", "selectable": true, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2025-09-23T23:05:14.083Z", "modified_at": "2023-04-06T02:18:55.123Z", "type": "meter_credit", "description": "soupy incidentally with who exonerate why heroine or mechanically", "selectable": true, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2025-05-15T11:09:31.879Z", "modified_at": "2024-09-30T04:38:54.774Z", "type": "discord", "description": "about finding nice improbable around ack except concerning likewise", "selectable": true, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/lib", "mime_type": "", "size": 854351, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-11-09T00:15:57.367Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-09-17T19:05:21.799Z", "size_readable": "", "public_url": "https://probable-tuxedo.info"}, {"id": "", "organization_id": "", "name": "", "path": "/usr", "mime_type": "", "size": 768190, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-01-02T01:56:36.633Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-12-10T05:35:51.417Z", "size_readable": "", "public_url": "https://soupy-remark.info/"}]}, "product_price": {"created_at": "2024-01-17T16:09:41.829Z", "modified_at": "2024-03-04T19:13:01.636Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "price_amount": 361525, "legacy": true}, "discount": {"duration": "repeating", "type": "fixed", "basis_points": 603587, "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [], "customer_metadata": {"key": false}, "customer_billing_address_fields": {"country": true, "state": false, "city": false, "postal_code": false, "line1": true, "line2": false}} + "422": + application/json: {} + checkouts:get: + speakeasy-default-checkouts:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "id": "", "payment_processor": "stripe", "status": "confirmed", "client_secret": "", "url": "https://willing-impostor.info", "expires_at": "2023-10-16T00:34:27.106Z", "success_url": "https://warm-hundred.net/", "embed_origin": "", "amount": 78888, "discount_amount": 219956, "net_amount": 313464, "tax_amount": 94589, "total_amount": 552582, "currency": "Syrian Pound", "product_id": "", "product_price_id": "", "discount_id": "", "allow_discount_codes": true, "require_billing_address": false, "is_discount_applicable": false, "is_free_product_price": false, "is_payment_required": true, "is_payment_setup_required": true, "is_payment_form_required": true, "customer_id": "", "customer_name": "", "customer_email": "", "customer_ip_address": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {"key": "", "key1": "", "key2": ""}, "metadata": {"key": 7721.05}, "customer_external_id": "", "products": [{"created_at": "2025-09-23T09:26:26.647Z", "modified_at": "2023-12-22T20:41:29.028Z", "id": "", "name": "", "description": "cafe impure notwithstanding", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-03-06T06:16:39.367Z", "modified_at": "2025-09-22T11:43:32.718Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "legacy": true}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/proc", "mime_type": "", "size": 950598, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-06-17T09:19:42.888Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-03-31T04:26:02.125Z", "size_readable": "", "public_url": "https://pushy-piglet.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/bin", "mime_type": "", "size": 637754, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-01-24T20:29:18.334Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-09-05T05:46:59.698Z", "size_readable": "", "public_url": "https://everlasting-programme.biz/"}]}, {"created_at": "2025-05-12T11:59:16.084Z", "modified_at": "2025-05-08T16:06:38.834Z", "id": "", "name": "", "description": "huzzah bell unabashedly unwilling disk modulo offset pacemaker", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2025-10-19T07:48:52.961Z", "modified_at": "2024-05-07T15:33:34.683Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "minimum_amount": 96389, "maximum_amount": 494415, "preset_amount": 618869}, {"created_at": "2024-02-20T01:25:38.973Z", "modified_at": "2023-09-29T18:18:20.911Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "price_amount": 295386}], "benefits": [{"id": "", "created_at": "2023-01-25T09:28:25.935Z", "modified_at": "2025-04-02T04:37:19.052Z", "type": "custom", "description": "amid upon triumphantly minus kaleidoscopic knavishly how shred inside", "selectable": false, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2024-08-26T07:18:58.011Z", "modified_at": "2024-05-08T09:02:59.417Z", "type": "github_repository", "description": "emerge digitize bank boohoo including wherever", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2023-09-26T15:11:58.536Z", "modified_at": "2023-03-01T07:53:48.628Z", "type": "github_repository", "description": "uneven easily afore separately", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/local/bin", "mime_type": "", "size": 772067, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-12-31T12:26:31.867Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-10-12T00:02:46.228Z", "size_readable": "", "public_url": "https://menacing-cleaner.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/etc/ppp", "mime_type": "", "size": 256912, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-06-10T15:58:26.626Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-07-09T01:47:28.046Z", "size_readable": "", "public_url": "https://unselfish-hope.org"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/include", "mime_type": "", "size": 508455, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-09-26T16:47:02.381Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-07-17T18:20:17.195Z", "size_readable": "", "public_url": "https://tedious-recovery.info"}]}], "product": {"created_at": "2023-03-18T02:28:53.336Z", "modified_at": "2024-02-19T17:58:57.044Z", "id": "", "name": "", "description": "oof ha polarisation", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-04-06T04:43:36.763Z", "modified_at": "2023-03-05T20:09:58.564Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 338130, "meter_id": "", "meter": {"id": "", "name": ""}}], "benefits": [{"id": "", "created_at": "2023-10-14T05:54:51.045Z", "modified_at": "2025-10-07T12:15:32.354Z", "type": "license_keys", "description": "present coin bowed musty ack lest fondly over till emotional", "selectable": false, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2025-08-31T15:15:09.068Z", "modified_at": "2023-05-04T17:55:19.596Z", "type": "discord", "description": "rectangular furlough limping zowie", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2025-05-03T09:05:56.100Z", "modified_at": "2023-05-04T02:53:12.710Z", "type": "github_repository", "description": "alive sunbathe unimpressively handle unlike unlike fen gently or exotic", "selectable": true, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 990109, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-04T05:23:32.931Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-04-26T04:14:14.257Z", "size_readable": "", "public_url": "https://awesome-chiffonier.info/"}]}, "product_price": {"created_at": "2024-10-24T20:36:17.743Z", "modified_at": "2023-01-20T00:02:07.657Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "price_amount": 799367, "legacy": false}, "discount": {"duration": "forever", "duration_in_months": 788880, "type": "fixed", "amount": 158471, "currency": "Bermudian Dollar (customarily known as Bermuda Dollar)", "id": "", "name": "", "code": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-10-23T06:26:57.261Z", "modified_at": "2025-03-03T11:39:51.755Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 837654, "required": true}], "customer_metadata": {"key": true, "key1": false, "key2": 901999}, "customer_billing_address_fields": {"country": true, "state": false, "city": false, "postal_code": false, "line1": false, "line2": false}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + checkouts:client_get: + speakeasy-default-checkouts:client-get: + parameters: + path: + client_secret: "" + responses: + "200": + application/json: {"created_at": "2023-06-23T19:45:02.115Z", "modified_at": "2023-11-26T05:04:17.930Z", "id": "", "payment_processor": "stripe", "status": "succeeded", "client_secret": "", "url": "https://firm-median.name", "expires_at": "2025-10-05T02:43:03.106Z", "success_url": "https://distinct-release.info", "embed_origin": "", "amount": 649087, "discount_amount": 818651, "net_amount": 200899, "tax_amount": 643894, "total_amount": 773661, "currency": "Philippine Peso", "product_id": "", "product_price_id": "", "discount_id": "", "allow_discount_codes": true, "require_billing_address": false, "is_discount_applicable": false, "is_free_product_price": true, "is_payment_required": false, "is_payment_setup_required": true, "is_payment_form_required": false, "customer_id": "", "customer_name": "", "customer_email": "", "customer_ip_address": "", "customer_billing_address": {"country": "US"}, "customer_tax_id": "", "payment_processor_metadata": {"key": "", "key1": "", "key2": ""}, "products": [], "product": {"created_at": "2025-09-06T08:48:06.798Z", "modified_at": "2024-03-07T20:07:13.547Z", "id": "", "name": "", "description": "grave parade whereas wherever assail vivid tasty", "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2025-02-21T04:45:40.112Z", "modified_at": "2023-05-02T17:16:17.296Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 994357, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2024-01-28T03:46:12.152Z", "modified_at": "2024-04-02T16:23:45.928Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "price_amount": 48139, "legacy": false}], "benefits": [{"id": "", "created_at": "2025-04-28T06:12:50.830Z", "modified_at": "2025-02-21T05:10:37.421Z", "type": "custom", "description": "oof phooey gah polarisation easily from pro", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2023-07-26T23:22:58.899Z", "modified_at": "2024-06-25T18:30:18.061Z", "type": "discord", "description": "failing telescope object blah instead behind yahoo", "selectable": false, "deletable": true, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2024-04-04T10:59:54.493Z", "modified_at": "2024-12-14T11:24:22.320Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 556513, "meter_id": "", "meter": {"id": "", "name": ""}}, "discount": {"duration": "repeating", "type": "percentage", "amount": 672173, "currency": "Afghani", "id": "", "name": "", "code": ""}, "organization": {"created_at": "2025-07-29T14:56:31.554Z", "modified_at": "2023-02-12T10:20:32.373Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://scratchy-hyena.name", "email": "Haskell_Pfeffer12@yahoo.com", "website": "", "socials": [{"platform": "linkedin", "url": "https://lumbering-intervention.com"}], "details_submitted_at": "2024-05-19T08:02:55.340Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": true, "proration_behavior": "invoice"}}, "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-12-09T06:51:57.370Z", "modified_at": "2024-02-25T03:15:42.987Z", "id": "", "metadata": {"key": 8595.88, "key1": "", "key2": ""}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 310288, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-08-16T01:49:55.051Z", "modified_at": "2025-11-04T06:24:20.947Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 5561, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-01-05T17:06:29.161Z", "modified_at": "2025-08-21T16:19:52.015Z", "id": "", "metadata": {"key": 434586, "key1": "", "key2": 5503.59}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}}, "order": 86914, "required": false}], "customer_billing_address_fields": {"country": false, "state": false, "city": false, "postal_code": false, "line1": true, "line2": true}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "410": + application/json: {"error": "ExpiredCheckoutError", "detail": ""} + "422": + application/json: {} + files:list: + speakeasy-default-files:list: + parameters: + query: + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737" + responses: + "200": + application/json: {"items": [{"id": "", "organization_id": "", "name": "", "path": "/usr", "mime_type": "", "size": 177706, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-09-09T18:28:08.953Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2024-11-27T13:02:27.296Z", "size_readable": "", "public_url": "https://agile-publicity.com"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/X11R6", "mime_type": "", "size": 509883, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-11-25T18:23:24.264Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-03-01T20:22:54.911Z", "size_readable": ""}, {"id": "", "organization_id": "", "name": "", "path": "/private/var", "mime_type": "", "size": 73227, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-10-17T13:20:28.265Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-08-18T13:00:42.665Z", "size_readable": "", "public_url": "https://average-fedora.org/"}], "pagination": {"total_count": 18278, "max_page": 897196}} + "422": + application/json: {} + files:create: + speakeasy-default-files:create: + requestBody: + application/json: {"organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "mime_type": "", "size": 638424, "upload": {"parts": [{"number": 134365, "chunk_start": 69025, "chunk_end": 796474}]}, "service": ""} + responses: + "201": + application/json: {"id": "", "organization_id": "", "name": "", "path": "/var/spool", "mime_type": "", "size": 86, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-07-06T00:30:20.403Z", "upload": {"id": "", "path": "/etc", "parts": [{"number": 816588, "chunk_start": 586220, "chunk_end": 752438, "url": "https://harmful-disposer.com", "expires_at": "2023-09-10T10:08:53.440Z"}, {"number": 211337, "chunk_start": 64738, "chunk_end": 322997, "url": "https://blind-breastplate.name/", "expires_at": "2024-01-07T19:16:11.129Z"}, {"number": 36521, "chunk_start": 621636, "chunk_end": 650237, "url": "https://aggravating-lid.com/", "expires_at": "2024-12-24T00:15:46.309Z"}]}, "version": "", "service": "product_media", "size_readable": ""} + "422": + application/json: {} + files:uploaded: + speakeasy-default-files:uploaded: + parameters: + path: + id: "" + requestBody: + application/json: {"id": "", "path": "/sys", "parts": [{"number": 173116, "checksum_etag": "", "checksum_sha256_base64": ""}, {"number": 894030, "checksum_etag": "", "checksum_sha256_base64": ""}, {"number": 673715, "checksum_etag": "", "checksum_sha256_base64": ""}]} + responses: + "200": + application/json: {"id": "", "organization_id": "", "name": "", "path": "/net", "mime_type": "", "size": 361127, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-01-17T04:07:38.336Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-07-26T19:39:54.130Z", "size_readable": "", "public_url": "https://buzzing-step-mother.biz/"} + "403": + application/json: {"error": "NotPermitted", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + files:update: + speakeasy-default-files:update: + parameters: + path: + id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 344620, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-12-22T15:27:45.882Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-06-19T18:46:17.643Z", "size_readable": "", "public_url": "https://awful-technician.info"} + "403": + application/json: {"error": "NotPermitted", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + files:delete: + speakeasy-default-files:delete: + parameters: + path: + id: "" + responses: + "403": + application/json: {"error": "NotPermitted", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + metrics:get: + speakeasy-default-metrics:get: + parameters: + query: + start_date: "2025-02-06" + end_date: "2024-09-04" + interval: "week" + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"periods": [{"timestamp": "2024-05-17T00:32:02.244Z", "orders": 450824, "revenue": 262795, "cumulative_revenue": 213457, "average_order_value": 937146, "one_time_products": 438142, "one_time_products_revenue": 801373, "new_subscriptions": 78888, "new_subscriptions_revenue": 219956, "renewed_subscriptions": 313464, "renewed_subscriptions_revenue": 94589, "active_subscriptions": 552582, "monthly_recurring_revenue": 805876}, {"timestamp": "2024-02-22T05:54:37.856Z", "orders": 746585, "revenue": 608535, "cumulative_revenue": 550965, "average_order_value": 322612, "one_time_products": 323185, "one_time_products_revenue": 177375, "new_subscriptions": 243354, "new_subscriptions_revenue": 780262, "renewed_subscriptions": 284041, "renewed_subscriptions_revenue": 737581, "active_subscriptions": 772105, "monthly_recurring_revenue": 710500}, {"timestamp": "2025-09-23T09:26:26.647Z", "orders": 324692, "revenue": 32069, "cumulative_revenue": 963286, "average_order_value": 444836, "one_time_products": 424256, "one_time_products_revenue": 132944, "new_subscriptions": 159685, "new_subscriptions_revenue": 550563, "renewed_subscriptions": 108980, "renewed_subscriptions_revenue": 862018, "active_subscriptions": 644971, "monthly_recurring_revenue": 538661}], "metrics": {"orders": {"slug": "", "display_name": "Elda.Runolfsson38", "type": "currency"}, "revenue": {"slug": "", "display_name": "Johanna_Marquardt", "type": "currency"}, "cumulative_revenue": {"slug": "", "display_name": "Jacklyn90", "type": "currency"}, "average_order_value": {"slug": "", "display_name": "Hassan_Robel", "type": "scalar"}, "one_time_products": {"slug": "", "display_name": "Armani_OConner98", "type": "currency"}, "one_time_products_revenue": {"slug": "", "display_name": "Martine23", "type": "scalar"}, "new_subscriptions": {"slug": "", "display_name": "Pansy.Orn45", "type": "scalar"}, "new_subscriptions_revenue": {"slug": "", "display_name": "Tyson.Cummings54", "type": "scalar"}, "renewed_subscriptions": {"slug": "", "display_name": "Lorenza54", "type": "currency"}, "renewed_subscriptions_revenue": {"slug": "", "display_name": "Alexandrea57", "type": "scalar"}, "active_subscriptions": {"slug": "", "display_name": "Kadin.Veum53", "type": "currency"}, "monthly_recurring_revenue": {"slug": "", "display_name": "Gilbert_Gerlach", "type": "scalar"}}} + "422": + application/json: {} + metrics:limits: + speakeasy-default-metrics:limits: + responses: + "200": + application/json: {"min_date": "2025-09-15", "intervals": {"hour": {"max_days": 187794}, "day": {"max_days": 119301}, "week": {"max_days": 20713}, "month": {"max_days": 305673}, "year": {"max_days": 373883}}} + license_keys:list: + speakeasy-default-license-keys:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"id": "", "created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-09-09T18:28:08.953Z", "modified_at": "2023-06-17T12:14:27.999Z", "metadata": {"key": 175.77, "key1": 861.4}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-07-12T19:57:33.016Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "revoked", "limit_activations": 7468, "usage": 54607, "limit_usage": 367745, "validations": 485729, "last_validated_at": "2023-03-22T06:10:55.267Z", "expires_at": "2025-10-17T13:20:28.265Z"}, {"id": "", "created_at": "2024-09-13T22:04:07.138Z", "modified_at": "2025-08-18T13:00:42.665Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-06-21T03:00:04.393Z", "modified_at": "2023-02-26T15:25:42.165Z", "metadata": {"key": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-09-28T03:47:03.515Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "granted", "limit_activations": 75058, "usage": 897069, "limit_usage": 135572, "validations": 460276, "last_validated_at": "2024-04-11T03:59:08.538Z", "expires_at": "2024-04-19T11:47:41.889Z"}], "pagination": {"total_count": 480616, "max_page": 103421}} + "401": + application/json: {"error": "Unauthorized", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + license_keys:get: + speakeasy-default-license-keys:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-08-19T11:11:04.610Z", "modified_at": "2024-07-25T06:33:15.810Z", "metadata": {"key": 450824, "key1": 213457, "key2": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-08-30T01:43:46.030Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "granted", "limit_activations": 94589, "usage": 552582, "limit_usage": 805876, "validations": 380699, "last_validated_at": "2025-03-29T06:09:39.323Z", "expires_at": "2024-10-28T22:54:36.498Z", "activations": [{"id": "", "license_key_id": "", "label": "", "meta": {"key": 177375}, "created_at": "2023-09-24T17:11:04.561Z", "modified_at": "2025-05-05T04:00:06.053Z"}, {"id": "", "license_key_id": "", "label": "", "meta": {"key": 7721.05}, "created_at": "2025-02-17T16:58:52.102Z", "modified_at": "2025-09-23T09:26:26.647Z"}]} + "401": + application/json: {"error": "Unauthorized", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + license_keys:update: + speakeasy-default-license-keys:update: + parameters: + path: + id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"id": "", "created_at": "2025-07-28T19:04:48.565Z", "modified_at": "2024-10-16T10:52:42.015Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-01-13T16:52:57.274Z", "modified_at": "2025-12-22T15:27:45.882Z", "metadata": {"key": 984008, "key1": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-12-08T09:52:54.805Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "granted", "limit_activations": 139579, "usage": 789275, "limit_usage": 889838, "validations": 302461, "last_validated_at": "2024-05-23T23:10:45.412Z", "expires_at": "2025-04-25T05:43:42.397Z"} + "401": + application/json: {"error": "Unauthorized", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + license_keys:get_activation: + speakeasy-default-license-keys:get-activation: + parameters: + path: + id: "" + activation_id: "" + responses: + "200": + application/json: {"id": "", "license_key_id": "", "label": "", "meta": {"key": 806587, "key1": 2036.98}, "created_at": "2023-08-06T18:06:35.469Z", "modified_at": "2024-03-26T01:14:01.072Z", "license_key": {"id": "", "created_at": "2024-09-22T00:25:39.915Z", "modified_at": "2023-06-18T11:24:13.598Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-02-12T09:53:47.529Z", "modified_at": "2024-03-28T03:08:34.429Z", "metadata": {"key": true, "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": "2025-02-28T03:57:28.912Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "revoked", "limit_activations": 635381, "usage": 144056, "limit_usage": 536885, "validations": 905007, "last_validated_at": "2024-07-07T15:22:07.988Z", "expires_at": "2023-08-23T21:27:34.297Z"}} + "401": + application/json: {"error": "Unauthorized", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + checkout-links:list: + speakeasy-default-checkout-links:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "id": "", "metadata": {}, "payment_processor": "stripe", "client_secret": "", "success_url": "https://primary-paintwork.com/", "label": "", "allow_discount_codes": false, "require_billing_address": true, "discount_id": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": [], "discount": {"duration": "forever", "type": "percentage", "basis_points": 7468, "created_at": "2023-03-01T20:22:54.911Z", "modified_at": "2024-02-08T01:09:52.088Z", "id": "", "metadata": {"key": ""}, "name": "", "code": "", "starts_at": "2025-10-17T13:20:28.265Z", "ends_at": "2024-09-13T22:04:07.138Z", "max_redemptions": 876407, "redemptions_count": 490078, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "url": "https://glorious-strategy.com/"}, {"created_at": "2025-09-10T07:49:25.657Z", "modified_at": "2024-04-10T02:32:42.816Z", "id": "", "metadata": {"key": "", "key1": "", "key2": true}, "payment_processor": "stripe", "client_secret": "", "success_url": "https://instructive-hospitalization.info/", "label": "", "allow_discount_codes": true, "require_billing_address": false, "discount_id": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": [{"metadata": {"key": true}, "created_at": "2024-03-05T16:40:09.484Z", "modified_at": "2023-05-05T09:08:16.530Z", "id": "", "name": "", "description": "safely briefly ugh fen", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [{"id": "", "created_at": "2025-11-14T19:49:34.065Z", "modified_at": "2025-05-02T01:42:40.060Z", "type": "downloadables", "description": "during someplace woot excepting gah only despite seemingly eventually ah", "selectable": true, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2025-03-07T17:43:00.381Z", "modified_at": "2025-06-02T11:43:36.892Z", "type": "meter_credit", "description": "fork shampoo outnumber so hence heartache afford pish", "selectable": true, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2023-08-16T15:42:00.686Z", "modified_at": "2023-01-01T09:29:03.176Z", "type": "github_repository", "description": "whether wherever too unfortunately reflecting better", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt", "mime_type": "", "size": 527084, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-03-27T14:59:46.668Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-01-31T09:03:27.590Z", "size_readable": "", "public_url": "https://wise-transparency.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/private", "mime_type": "", "size": 314043, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-10-27T00:34:15.525Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-01-01T11:05:05.995Z", "size_readable": "", "public_url": "https://good-natured-fundraising.com"}, {"id": "", "organization_id": "", "name": "", "path": "/Users", "mime_type": "", "size": 587331, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-05-22T12:31:34.361Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-05-04T10:16:57.233Z", "size_readable": "", "public_url": "https://each-carnival.org/"}]}, {"metadata": {"key": true, "key1": 1899.83, "key2": true}, "created_at": "2023-04-28T15:20:19.317Z", "modified_at": "2024-06-27T02:37:34.714Z", "id": "", "name": "", "description": "and jaggedly aftermath after although while", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2025-09-04T00:37:31.188Z", "modified_at": "2023-05-23T19:32:31.453Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "price_amount": 313724}, {"created_at": "2023-10-19T07:09:33.817Z", "modified_at": "2023-10-01T20:49:37.013Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month"}, {"created_at": "2023-11-28T08:17:13.465Z", "modified_at": "2025-07-17T07:32:23.211Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 940883, "maximum_amount": 677862, "preset_amount": 917801, "legacy": false}], "benefits": [{"id": "", "created_at": "2025-07-06T18:31:24.280Z", "modified_at": "2023-05-10T00:49:50.875Z", "type": "discord", "description": "considering despite darn even heavy ick sadly", "selectable": true, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2024-01-29T07:09:20.439Z", "modified_at": "2024-07-05T20:46:49.834Z", "type": "meter_credit", "description": "in fooey whose rival astride yowza whose portray rectangular mixed", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 615685, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-04-14T20:41:02.506Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-10-03T00:02:08.627Z", "size_readable": "", "public_url": "https://circular-intellect.com"}, {"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 584284, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-04-03T09:40:26.403Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-06-14T16:34:33.586Z", "size_readable": "", "public_url": "https://lavish-hydrant.org/"}, {"id": "", "organization_id": "", "name": "", "path": "/Library", "mime_type": "", "size": 552172, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-08-15T15:31:52.313Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-03-15T11:23:58.611Z", "size_readable": "", "public_url": "https://somber-luck.name"}]}, {"metadata": {"key": 5548.95, "key1": 6904.89}, "created_at": "2025-03-07T05:10:23.090Z", "modified_at": "2024-06-11T11:22:18.392Z", "id": "", "name": "", "description": "grizzled boo larva homely commonly grass", "recurring_interval": "month", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-08-11T20:43:56.103Z", "modified_at": "2025-02-01T02:14:45.676Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "minimum_amount": 125652, "maximum_amount": 81192, "preset_amount": 198286}, {"created_at": "2023-12-08T14:28:27.366Z", "modified_at": "2023-11-27T15:10:44.967Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "minimum_amount": 737966, "maximum_amount": 906109, "preset_amount": 650946, "legacy": true}, {"created_at": "2024-03-30T11:43:42.338Z", "modified_at": "2024-12-07T20:14:47.035Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 543675, "maximum_amount": 571921, "preset_amount": 735465, "legacy": true}], "benefits": [{"id": "", "created_at": "2024-11-24T21:11:57.686Z", "modified_at": "2023-12-29T15:26:46.647Z", "type": "downloadables", "description": "indeed phew rejigger overcoat when", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 902819, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-07-26T13:39:28.807Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-03-22T15:36:05.437Z", "size_readable": "", "public_url": "https://honored-hope.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/home", "mime_type": "", "size": 557483, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-02-02T03:54:43.289Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-02-03T14:30:50.543Z", "size_readable": "", "public_url": "https://brilliant-lawmaker.com/"}, {"id": "", "organization_id": "", "name": "", "path": "/home", "mime_type": "", "size": 287329, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-01-02T11:04:56.964Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-07-15T11:04:28.100Z", "size_readable": "", "public_url": "https://frail-wedding.info"}]}], "discount": {"duration": "once", "duration_in_months": 677400, "type": "percentage", "basis_points": 213270, "created_at": "2023-01-13T20:53:35.326Z", "modified_at": "2024-10-18T23:42:45.873Z", "id": "", "metadata": {"key": ""}, "name": "", "code": "", "starts_at": "2023-10-30T16:28:56.771Z", "ends_at": "2024-04-09T05:39:27.446Z", "max_redemptions": 946235, "redemptions_count": 458459, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "url": "https://pessimistic-gradient.biz"}], "pagination": {"total_count": 120165, "max_page": 889771}} + "422": + application/json: {} + checkout-links:create: + speakeasy-default-checkout-links:create: + requestBody: + application/json: {"payment_processor": "", "product_id": ""} + responses: + "201": + application/json: {"created_at": "2024-11-30T17:06:07.804Z", "modified_at": "2024-04-02T12:48:32.253Z", "id": "", "metadata": {}, "payment_processor": "stripe", "client_secret": "", "success_url": "https://standard-utilization.com/", "label": "", "allow_discount_codes": true, "require_billing_address": true, "discount_id": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": [{"metadata": {"key": 7524.38, "key1": true, "key2": 17759}, "created_at": "2023-09-10T10:08:53.440Z", "modified_at": "2023-08-20T15:01:30.899Z", "id": "", "name": "", "description": "approximate though championship", "recurring_interval": "year", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-04-13T23:08:55.199Z", "modified_at": "2024-10-06T23:48:35.278Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "price_amount": 490420, "legacy": true}, {"created_at": "2023-05-23T02:39:32.755Z", "modified_at": "2023-11-12T18:17:33.913Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 407833}, {"created_at": "2025-06-10T11:35:34.629Z", "modified_at": "2025-09-01T12:33:12.040Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 898841, "maximum_amount": 540711, "preset_amount": 17207, "legacy": true}], "benefits": [{"id": "", "created_at": "2024-01-23T11:16:40.339Z", "modified_at": "2024-04-14T21:42:08.184Z", "type": "license_keys", "description": "ha ew poorly", "selectable": false, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2025-04-24T07:48:43.099Z", "modified_at": "2024-01-20T05:49:45.340Z", "type": "custom", "description": "defiantly indolent apud formula other gosh carouse obligation elliptical ick", "selectable": true, "deletable": false, "organization_id": ""}, {"id": "", "created_at": "2025-08-26T02:51:53.751Z", "modified_at": "2025-09-05T11:25:01.920Z", "type": "discord", "description": "er how allocation nocturnal negative fax since", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/Network", "mime_type": "", "size": 320521, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-02-15T17:13:16.217Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-03-06T20:24:35.058Z", "size_readable": "", "public_url": "https://rosy-millet.name/"}, {"id": "", "organization_id": "", "name": "", "path": "/mnt", "mime_type": "", "size": 330292, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-10-10T08:21:56.833Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-11-10T16:34:38.355Z", "size_readable": "", "public_url": "https://blushing-equal.net/"}]}, {"metadata": {}, "created_at": "2023-09-06T14:26:15.228Z", "modified_at": "2023-08-16T05:49:46.698Z", "id": "", "name": "", "description": "gladly whose woot yesterday responsible times whenever ew", "recurring_interval": "year", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-08-18T15:41:55.049Z", "modified_at": "2025-02-09T09:21:24.307Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "legacy": true}, {"created_at": "2023-11-26T12:37:45.639Z", "modified_at": "2024-04-04T13:19:54.353Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "price_currency": "", "minimum_amount": 678847, "maximum_amount": 291524, "preset_amount": 204212, "legacy": false}], "benefits": [{"id": "", "created_at": "2024-01-01T06:38:13.314Z", "modified_at": "2024-11-29T15:14:58.249Z", "type": "meter_credit", "description": "foolishly clinch address positively impolite numb compete marvelous opposite though", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/ports", "mime_type": "", "size": 387357, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-10-17T05:41:07.474Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-06-23T20:56:30.191Z", "size_readable": "", "public_url": "https://whole-diver.com"}]}, {"metadata": {"key": 3843.51}, "created_at": "2025-10-16T18:48:01.991Z", "modified_at": "2023-04-30T07:59:34.558Z", "id": "", "name": "", "description": "braid factorise apud generally", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-12-28T08:54:14.673Z", "modified_at": "2024-09-05T18:19:44.660Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "legacy": false}, {"created_at": "2024-12-19T18:23:46.394Z", "modified_at": "2025-10-06T17:51:23.882Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year", "price_currency": "", "minimum_amount": 259697, "maximum_amount": 792608, "preset_amount": 660634}, {"created_at": "2023-05-14T00:09:00.361Z", "modified_at": "2024-04-03T10:46:55.078Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "year"}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/Network", "mime_type": "", "size": 541543, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-03-01T17:07:03.830Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-10-03T22:35:48.504Z", "size_readable": "", "public_url": "https://blushing-obedience.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/src", "mime_type": "", "size": 909637, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-04-06T02:18:55.123Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-05-31T16:33:35.390Z", "size_readable": "", "public_url": "https://glaring-worth.org/"}]}], "discount": {"duration": "forever", "duration_in_months": 776482, "type": "percentage", "basis_points": 310286, "created_at": "2023-04-15T04:59:52.626Z", "modified_at": "2025-10-24T07:54:19.373Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2024-08-29T08:24:24.063Z", "ends_at": "2024-01-12T14:07:27.933Z", "max_redemptions": 536225, "redemptions_count": 659333, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "url": "https://celebrated-nun.org/"} + "422": + application/json: {} + checkout-links:get: + speakeasy-default-checkout-links:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "id": "", "metadata": {"key": 9699.61, "key1": 450824}, "payment_processor": "stripe", "client_secret": "", "success_url": "https://earnest-tuber.info/", "label": "", "allow_discount_codes": false, "require_billing_address": true, "discount_id": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": [], "discount": {"duration": "once", "duration_in_months": 552582, "type": "percentage", "amount": 380699, "currency": "Seychelles Rupee", "created_at": "2024-10-28T22:54:36.498Z", "modified_at": "2024-08-26T20:35:38.595Z", "id": "", "metadata": {"key": 177375}, "name": "", "code": "", "starts_at": "2023-09-24T17:11:04.561Z", "ends_at": "2025-05-05T04:00:06.053Z", "max_redemptions": 284041, "redemptions_count": 737581, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "url": "https://scary-thorn.biz"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + checkout-links:update: + speakeasy-default-checkout-links:update: + parameters: + path: + id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"created_at": "2025-07-28T19:04:48.565Z", "modified_at": "2024-10-16T10:52:42.015Z", "id": "", "metadata": {"key": false}, "payment_processor": "stripe", "client_secret": "", "success_url": "https://worthwhile-avalanche.org/", "label": "", "allow_discount_codes": true, "require_billing_address": true, "discount_id": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": [], "discount": {"duration": "repeating", "type": "percentage", "amount": 302461, "currency": "Won", "created_at": "2025-04-25T05:43:42.397Z", "modified_at": "2025-01-30T02:01:14.461Z", "id": "", "metadata": {"key": ""}, "name": "", "code": "", "starts_at": "2025-04-08T20:18:13.273Z", "ends_at": "2025-06-07T17:17:15.505Z", "max_redemptions": 439152, "redemptions_count": 501135, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"}, "url": "https://entire-forage.net/"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + checkout-links:delete: + speakeasy-default-checkout-links:delete: + parameters: + path: + id: "" + responses: + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + custom-fields:list: + speakeasy-default-custom-fields:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"created_at": "2023-07-14T18:23:27.528Z", "modified_at": "2023-09-09T18:28:08.953Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}]}}, {"created_at": "2023-01-20T06:21:22.156Z", "modified_at": "2025-02-26T06:14:46.641Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": []}}], "pagination": {"total_count": 687960, "max_page": 509883}} + "422": + application/json: {} + custom-fields:create: + speakeasy-default-custom-fields:create: + requestBody: + application/json: {"type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}} + responses: + "201": + application/json: {"created_at": "2024-04-02T12:48:32.253Z", "modified_at": "2023-05-28T06:20:22.766Z", "id": "", "metadata": {}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}} + "422": + application/json: {} + custom-fields:get: + speakeasy-default-custom-fields:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2024-09-04T11:33:52.011Z", "modified_at": "2024-08-19T11:11:04.610Z", "id": "", "metadata": {"key": true, "key1": 262795}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {"options": []}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + custom-fields:update: + speakeasy-default-custom-fields:update: + parameters: + path: + id: "" + requestBody: + application/json: {"type": ""} + responses: + "200": + application/json: {"created_at": "2024-01-13T16:52:57.274Z", "modified_at": "2025-12-22T15:27:45.882Z", "id": "", "metadata": {"key": 984008, "key1": ""}, "type": "", "slug": "", "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "properties": {}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + custom-fields:delete: + speakeasy-default-custom-fields:delete: + parameters: + path: + id: "" + responses: + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + discounts:list: + speakeasy-default-discounts:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"duration": "once", "type": "fixed", "basis_points": 152837, "created_at": "2024-11-27T13:02:27.296Z", "modified_at": "2024-12-01T18:25:37.169Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2025-02-26T06:14:46.641Z", "ends_at": "2023-04-05T09:49:38.010Z", "max_redemptions": 68504, "redemptions_count": 687960, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": [{"metadata": {"key": "", "key1": ""}, "created_at": "2024-02-08T01:09:52.088Z", "modified_at": "2024-06-16T08:36:51.636Z", "id": "", "name": "", "description": "toward uselessly lid", "recurring_interval": "year", "is_recurring": true, "is_archived": false, "organization_id": ""}, {"metadata": {"key": 113486}, "created_at": "2023-07-18T12:08:53.113Z", "modified_at": "2025-09-28T13:56:10.162Z", "id": "", "name": "", "description": "gosh whenever as", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": ""}]}, {"duration": "once", "duration_in_months": 96709, "type": "percentage", "amount": 445673, "currency": "UAE Dirham", "created_at": "2025-06-07T14:29:00.429Z", "modified_at": "2025-11-14T19:49:34.065Z", "id": "", "metadata": {"key": 9486.14, "key1": true, "key2": 993677}, "name": "", "code": "", "starts_at": "2025-03-07T11:07:08.720Z", "ends_at": "2025-04-21T16:08:32.154Z", "max_redemptions": 406555, "redemptions_count": 29267, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": [{"metadata": {"key": 4080.66, "key1": ""}, "created_at": "2025-06-28T00:46:13.804Z", "modified_at": "2023-12-27T23:30:11.053Z", "id": "", "name": "", "description": "nor fooey a supposing regarding times", "recurring_interval": "year", "is_recurring": false, "is_archived": true, "organization_id": ""}, {"metadata": {}, "created_at": "2023-08-23T12:47:09.406Z", "modified_at": "2024-02-29T18:45:04.137Z", "id": "", "name": "", "description": "toothpick silently aftermath never tooth swelter fund provided although dreary", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": ""}]}], "pagination": {"total_count": 253529, "max_page": 552332}} + "422": + application/json: {} + discounts:create: + speakeasy-default-discounts:create: + requestBody: + application/json: {"duration": "forever", "duration_in_months": 417458, "type": "fixed", "amount": 69025, "name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"} + responses: + "201": + application/json: {"duration": "repeating", "duration_in_months": 86, "type": "fixed", "basis_points": 89964, "created_at": "2025-05-18T17:03:53.906Z", "modified_at": "2025-06-13T23:30:51.782Z", "id": "", "metadata": {"key": false, "key1": 259629}, "name": "", "code": "", "starts_at": "2023-01-20T11:09:16.789Z", "ends_at": "2023-09-10T10:08:53.440Z", "max_redemptions": 211337, "redemptions_count": 64738, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": [{"metadata": {}, "created_at": "2023-03-22T23:50:34.661Z", "modified_at": "2023-04-21T15:49:25.047Z", "id": "", "name": "", "description": "nicely disposer demob fencing fencing vainly kookily for", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": ""}]} + "422": + application/json: {} + discounts:get: + speakeasy-default-discounts:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"duration": "forever", "type": "percentage", "basis_points": 521235, "created_at": "2025-11-29T01:50:48.954Z", "modified_at": "2024-05-17T00:32:02.244Z", "id": "", "metadata": {"key": 213457}, "name": "", "code": "", "starts_at": "2025-10-24T02:41:21.259Z", "ends_at": "2024-04-25T04:53:50.189Z", "max_redemptions": 801373, "redemptions_count": 78888, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": []} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + discounts:update: + speakeasy-default-discounts:update: + parameters: + path: + id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"duration": "forever", "duration_in_months": 344620, "type": "percentage", "basis_points": 627690, "created_at": "2024-06-19T18:46:17.643Z", "modified_at": "2025-12-14T11:19:45.098Z", "id": "", "metadata": {}, "name": "", "code": "", "starts_at": "2025-09-09T13:32:29.600Z", "ends_at": "2024-05-04T18:16:40.936Z", "max_redemptions": 311507, "redemptions_count": 249440, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "products": []} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + discounts:delete: + speakeasy-default-discounts:delete: + parameters: + path: + id: "" + responses: + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customers:list: + speakeasy-default-customers:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-12-01T18:25:37.169Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-01-20T06:21:22.156Z", "modified_at": "2025-02-26T06:14:46.641Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-07-12T19:57:33.016Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}], "pagination": {"total_count": 633911, "max_page": 7468}} + "422": + application/json: {} + customers:create: + speakeasy-default-customers:create: + requestBody: + application/json: {"external_id": "usr_1337", "email": "customer@example.com", "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"} + responses: + "201": + application/json: {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-04-02T12:48:32.253Z", "modified_at": "2023-05-28T06:20:22.766Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-01-01T02:16:41.381Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"} + "422": + application/json: {} + customers:get: + speakeasy-default-customers:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "metadata": {"key": 9699.61, "key1": 450824}, "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-10-24T02:41:21.259Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customers:update: + speakeasy-default-customers:update: + parameters: + path: + id: "" + requestBody: + application/json: {"email": "customer@example.com", "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "external_id": "usr_1337"} + responses: + "200": + application/json: {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-01-13T16:52:57.274Z", "modified_at": "2025-12-22T15:27:45.882Z", "metadata": {"key": 984008, "key1": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-12-08T09:52:54.805Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customers:delete: + speakeasy-default-customers:delete: + parameters: + path: + id: "" + responses: + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customers:get_external: + speakeasy-default-customers:get-external: + parameters: + path: + external_id: "" + responses: + "200": + application/json: {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-11-11T12:00:26.165Z", "modified_at": "2024-03-07T16:31:27.246Z", "metadata": {"key": 272056, "key1": 554600, "key2": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-04-23T12:08:18.734Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customers:update_external: + speakeasy-default-customers:update-external: + parameters: + path: + external_id: "" + requestBody: + application/json: {"email": "customer@example.com", "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"]} + responses: + "200": + application/json: {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-09-03T23:27:29.395Z", "modified_at": "2025-12-09T17:18:24.005Z", "metadata": {"key": 187529, "key1": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-01-27T15:12:21.624Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customers:delete_external: + speakeasy-default-customers:delete-external: + parameters: + path: + external_id: "" + responses: + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customers:get_state: + speakeasy-default-customers:get-state: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-04-08T18:58:47.121Z", "modified_at": "2025-02-09T06:33:34.363Z", "metadata": {"key": 3663.79, "key1": "", "key2": 307196}, "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-14T14:28:05.776Z", "active_subscriptions": [{"id": "e5149aae-e521-42b9-b24c-abb3d71eea2e", "created_at": "2025-02-06T12:23:58.940Z", "modified_at": "2024-10-25T13:48:31.960Z", "metadata": {}, "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": [{"created_at": "2023-03-05T07:56:21.694Z", "modified_at": "2023-09-20T10:44:37.561Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}, {"created_at": "2025-09-13T04:44:51.819Z", "modified_at": "2025-12-02T06:10:01.228Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}, {"created_at": "2023-11-12T12:34:11.793Z", "modified_at": "2023-06-06T01:26:43.146Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}]}], "granted_benefits": [], "active_meters": [{"created_at": "2024-12-31T03:20:35.403Z", "modified_at": "2025-05-04T16:06:23.058Z", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75}, {"created_at": "2023-01-04T14:39:09.847Z", "modified_at": "2023-02-08T19:13:44.329Z", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75}], "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customers:get_state_external: + speakeasy-default-customers:get-state-external: + parameters: + path: + external_id: "" + responses: + "200": + application/json: {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-09-21T18:48:56.097Z", "modified_at": "2025-04-10T01:52:28.109Z", "metadata": {"key": "", "key1": 151840, "key2": 5400.03}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-09-03T01:36:53.320Z", "active_subscriptions": [{"id": "e5149aae-e521-42b9-b24c-abb3d71eea2e", "created_at": "2025-07-13T22:52:36.368Z", "modified_at": "2024-08-24T04:02:38.493Z", "metadata": {"key": "", "key1": ""}, "status": "active", "amount": 1000, "currency": "usd", "recurring_interval": "month", "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": []}, {"id": "e5149aae-e521-42b9-b24c-abb3d71eea2e", "created_at": "2023-12-15T20:15:09.841Z", "modified_at": "2024-08-11T22:48:26.853Z", "metadata": {"key": 471.65, "key1": true}, "status": "active", "amount": 1000, "currency": "usd", "recurring_interval": "month", "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": [{"created_at": "2023-05-23T00:20:13.828Z", "modified_at": "2023-09-26T23:44:03.308Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}, {"created_at": "2025-12-27T21:49:03.537Z", "modified_at": "2025-07-22T12:04:30.878Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}, {"created_at": "2024-07-28T14:24:11.532Z", "modified_at": "2024-12-06T13:05:15.664Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22"}]}, {"id": "e5149aae-e521-42b9-b24c-abb3d71eea2e", "created_at": "2023-01-25T01:47:23.863Z", "modified_at": "2024-09-04T08:51:14.199Z", "metadata": {"key": "", "key1": ""}, "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": [{"created_at": "2024-09-14T05:50:05.351Z", "modified_at": "2025-07-25T14:08:48.339Z", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75}], "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:benefit-grants:list: + speakeasy-default-customer-portal:benefit-grants:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"created_at": "2023-07-14T18:23:27.528Z", "modified_at": "2023-09-09T18:28:08.953Z", "id": "", "granted_at": "2023-06-17T12:14:27.999Z", "revoked_at": "2024-11-27T13:02:27.296Z", "customer_id": "", "benefit_id": "", "subscription_id": "", "order_id": "", "is_granted": false, "is_revoked": true, "customer": {"created_at": "2025-02-26T06:14:46.641Z", "modified_at": "2023-04-05T09:49:38.010Z", "id": "", "email": "Martin.Nader@gmail.com", "email_verified": true, "name": "", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "oauth_accounts": {"key": {"account_id": "", "account_username": ""}, "key1": {"account_id": "", "account_username": ""}}}, "benefit": {"id": "", "created_at": "2025-08-18T13:00:42.665Z", "modified_at": "2024-06-21T03:00:04.393Z", "type": "", "description": "comparison now despite", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": "", "key1": 9349.6, "key2": true}, "organization": {"created_at": "2025-01-29T10:30:11.361Z", "modified_at": "2024-09-14T04:48:08.824Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://substantial-yin.com", "email": "April.Sanford66@gmail.com", "website": "", "socials": [{"platform": "youtube", "url": "https://basic-emergent.org/"}, {"platform": "tiktok", "url": "https://glum-boyfriend.net/"}, {"platform": "instagram", "url": "https://stunning-vanadyl.net/"}], "details_submitted_at": "2024-07-08T07:59:15.466Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": false, "proration_behavior": "invoice"}}, "properties": {"note": ""}}, "properties": {}}, {"created_at": "2025-12-25T01:40:30.203Z", "modified_at": "2025-03-07T11:07:08.720Z", "id": "", "granted_at": "2025-04-21T16:08:32.154Z", "revoked_at": "2024-03-21T14:01:55.283Z", "customer_id": "", "benefit_id": "", "subscription_id": "", "order_id": "", "is_granted": true, "is_revoked": false, "customer": {"created_at": "2025-01-24T21:46:28.752Z", "modified_at": "2024-10-25T03:45:41.195Z", "id": "", "email": "Allen.Harber7@yahoo.com", "email_verified": false, "name": "", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "oauth_accounts": {"key": {"account_id": "", "account_username": ""}}}, "benefit": {"id": "", "created_at": "2024-05-16T08:33:13.471Z", "modified_at": "2023-08-22T08:40:22.005Z", "type": "", "description": "commonly softly boo massive sorrowful aw strict behind along energetic", "selectable": true, "deletable": false, "organization_id": "", "metadata": {"key": 9196.45, "key1": false}, "organization": {"created_at": "2024-06-02T06:24:14.389Z", "modified_at": "2024-09-28T09:08:13.966Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://natural-teammate.com/", "email": "Hailie36@yahoo.com", "website": "", "socials": [{"platform": "github", "url": "https://moral-aftermath.name/"}, {"platform": "github", "url": "https://potable-aftermath.com"}, {"platform": "other", "url": "https://muted-hunger.biz/"}], "details_submitted_at": "2025-08-22T13:40:19.150Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "invoice"}}, "properties": {"active_files": []}}, "properties": {}}], "pagination": {"total_count": 440243, "max_page": 414274}} + "422": + application/json: {} + customer_portal:benefit-grants:get: + speakeasy-default-customer-portal:benefit-grants:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2024-09-04T11:33:52.011Z", "modified_at": "2024-08-19T11:11:04.610Z", "id": "", "granted_at": "2024-07-25T06:33:15.810Z", "revoked_at": "2025-11-29T01:50:48.954Z", "customer_id": "", "benefit_id": "", "subscription_id": "", "order_id": "", "is_granted": true, "is_revoked": true, "customer": {"created_at": "2023-10-16T00:34:27.106Z", "modified_at": "2023-08-22T22:47:10.166Z", "id": "", "email": "Ian.Block31@hotmail.com", "email_verified": false, "name": "", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "oauth_accounts": {"key": {"account_id": "", "account_username": ""}, "key1": {"account_id": "", "account_username": ""}}}, "benefit": {"id": "", "created_at": "2024-10-28T22:54:36.498Z", "modified_at": "2024-08-26T20:35:38.595Z", "type": "", "description": "scrabble ignite aw showboat shakily", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": 908293, "key1": false}, "organization": {"created_at": "2024-03-31T04:11:43.083Z", "modified_at": "2023-06-13T10:08:35.363Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://mealy-unit.info", "email": "Armani_OConner98@gmail.com", "website": "", "socials": [{"platform": "tiktok", "url": "https://unkempt-effector.biz/"}, {"platform": "tiktok", "url": "https://spiteful-scenario.net/"}], "details_submitted_at": "2023-07-26T12:11:42.166Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": true, "proration_behavior": "invoice"}}, "properties": {"note": ""}}, "properties": {}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:benefit-grants:update: + speakeasy-default-customer-portal:benefit-grants:update: + parameters: + path: + id: "" + requestBody: + application/json: {"benefit_type": ""} + responses: + "200": + application/json: {"created_at": "2024-01-13T16:52:57.274Z", "modified_at": "2025-12-22T15:27:45.882Z", "id": "", "granted_at": "2024-11-18T22:44:58.301Z", "revoked_at": "2024-06-19T18:46:17.643Z", "customer_id": "", "benefit_id": "", "subscription_id": "", "order_id": "", "is_granted": false, "is_revoked": true, "customer": {"created_at": "2025-09-09T13:32:29.600Z", "modified_at": "2024-05-04T18:16:40.936Z", "id": "", "email": "Delphia_Schamberger@gmail.com", "email_verified": false, "name": "", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "oauth_accounts": {}}, "benefit": {"id": "", "created_at": "2025-04-08T20:18:13.273Z", "modified_at": "2025-06-07T17:17:15.505Z", "type": "", "description": "underneath sticky yuck even gosh frantically", "selectable": true, "deletable": true, "organization_id": "", "metadata": {"key": "", "key1": 332914}, "organization": {"created_at": "2023-03-06T17:16:19.176Z", "modified_at": "2024-04-19T15:21:04.348Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://lumpy-switch.info/", "email": "Maximillian59@hotmail.com", "website": "", "socials": [{"platform": "other", "url": "https://fragrant-hamburger.biz"}], "details_submitted_at": "2024-12-21T09:02:21.902Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": true, "proration_behavior": "invoice"}}, "properties": {"prefix": "", "expires": {"ttl": 532806, "timeframe": "day"}, "activations": {"limit": 556706, "enable_customer_admin": true}, "limit_usage": 416023}}, "properties": {}} + "403": + application/json: {"error": "NotPermitted", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:customers:get: + speakeasy-default-customer-portal:customers:get: + responses: + "200": + application/json: {"created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "id": "", "email": "Jovanny21@yahoo.com", "email_verified": true, "name": "", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "oauth_accounts": {}} + customer_portal:customers:update: + speakeasy-default-customer-portal:customers:update: + requestBody: + application/json: {"billing_address": {"country": "FR"}} + responses: + "200": + application/json: {"created_at": "2024-10-16T10:52:42.015Z", "modified_at": "2024-01-13T16:52:57.274Z", "id": "", "email": "Lizzie.Wyman@hotmail.com", "email_verified": true, "name": "", "billing_address": {"country": "US"}, "tax_id": ["911144442", "us_ein"], "oauth_accounts": {"key": {"account_id": "", "account_username": ""}, "key1": {"account_id": "", "account_username": ""}, "key2": {"account_id": "", "account_username": ""}}} + "422": + application/json: {} + customer_portal:customers:get_payment_methods: + speakeasy-default-customer-portal:customers:get-payment-methods: + responses: + "200": + application/json: {"items": [{"id": "", "type": "", "created_at": "2025-03-26T22:06:20.246Z", "default": false}, {"id": "", "type": "", "created_at": "2024-06-04T07:22:57.901Z", "default": false}, {"id": "", "type": "", "created_at": "2023-03-09T22:19:26.171Z", "default": true, "card": {"brand": "", "last4": "", "exp_month": 356791, "exp_year": 767653}}], "pagination": {"total_count": 910734, "max_page": 149115}} + "422": + application/json: {} + customer_portal:customers:add_payment_method: + speakeasy-default-customer-portal:customers:add-payment-method: + requestBody: + application/json: {"confirmation_token_id": "", "set_default": false, "return_url": "https://slight-digestive.info"} + responses: + "201": + application/json: {"id": "", "type": "", "created_at": "2024-07-11T07:51:11.362Z", "default": true} + "422": + application/json: {} + customer_portal:customers:delete_payment_method: + speakeasy-default-customer-portal:customers:delete-payment-method: + parameters: + path: + id: "" + responses: + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:customer_meters:list: + speakeasy-default-customer-portal:customer-meters:list: + responses: + "200": + application/json: {"items": [{"id": "", "created_at": "2024-08-22T19:26:20.850Z", "modified_at": "2025-01-13T10:26:00.433Z", "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75, "meter": {"created_at": "2023-07-14T18:23:27.528Z", "modified_at": "2023-09-09T18:28:08.953Z", "id": "", "name": ""}}, {"id": "", "created_at": "2023-06-17T12:14:27.999Z", "modified_at": "2024-11-27T13:02:27.296Z", "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75, "meter": {"created_at": "2024-12-01T18:25:37.169Z", "modified_at": "2023-01-20T06:21:22.156Z", "id": "", "name": ""}}, {"id": "", "created_at": "2025-02-26T06:14:46.641Z", "modified_at": "2023-04-05T09:49:38.010Z", "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75, "meter": {"created_at": "2023-03-17T01:57:00.187Z", "modified_at": "2025-01-24T00:05:25.844Z", "id": "", "name": ""}}], "pagination": {"total_count": 509883, "max_page": 633911}} + "422": + application/json: {} + customer_portal:customer_meters:get: + speakeasy-default-customer-portal:customer-meters:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75, "meter": {"created_at": "2024-08-19T11:11:04.610Z", "modified_at": "2024-07-25T06:33:15.810Z", "id": "", "name": ""}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:downloadables:list: + speakeasy-default-customer-portal:downloadables:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"id": "", "benefit_id": "", "file": {"id": "", "organization_id": "", "name": "", "path": "/usr", "mime_type": "", "size": 177706, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-09-09T18:28:08.953Z", "download": {"url": "https://primary-paintwork.com/", "expires_at": "2025-02-26T06:14:46.641Z"}, "version": "", "is_uploaded": true, "service": "downloadable", "size_readable": ""}}, {"id": "", "benefit_id": "", "file": {"id": "", "organization_id": "", "name": "", "path": "/usr/X11R6", "mime_type": "", "size": 509883, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-11-25T18:23:24.264Z", "download": {"url": "https://awful-fund.info/", "expires_at": "2023-03-22T06:10:55.267Z"}, "version": "", "is_uploaded": false, "service": "product_media", "size_readable": ""}}], "pagination": {"total_count": 876407, "max_page": 490078}} + "422": + application/json: {} + customer_portal:downloadables:customer_portal.downloadables.get: + speakeasy-default-customer-portal:downloadables:customer-portal-downloadables-get: + parameters: + path: + token: "" + responses: + "200": + application/json: "" + "422": + application/json: {} + customer_portal:license_keys:list: + speakeasy-default-customer-portal:license-keys:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"id": "", "created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-09-09T18:28:08.953Z", "modified_at": "2023-06-17T12:14:27.999Z", "metadata": {"key": 175.77, "key1": 861.4}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-07-12T19:57:33.016Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "revoked", "limit_activations": 7468, "usage": 54607, "limit_usage": 367745, "validations": 485729, "last_validated_at": "2023-03-22T06:10:55.267Z", "expires_at": "2025-10-17T13:20:28.265Z"}, {"id": "", "created_at": "2024-09-13T22:04:07.138Z", "modified_at": "2025-08-18T13:00:42.665Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-06-21T03:00:04.393Z", "modified_at": "2023-02-26T15:25:42.165Z", "metadata": {"key": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-09-28T03:47:03.515Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "granted", "limit_activations": 75058, "usage": 897069, "limit_usage": 135572, "validations": 460276, "last_validated_at": "2024-04-11T03:59:08.538Z", "expires_at": "2024-04-19T11:47:41.889Z"}], "pagination": {"total_count": 480616, "max_page": 103421}} + "401": + application/json: {"error": "Unauthorized", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:license_keys:get: + speakeasy-default-customer-portal:license-keys:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-08-19T11:11:04.610Z", "modified_at": "2024-07-25T06:33:15.810Z", "metadata": {"key": 450824, "key1": 213457, "key2": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-08-30T01:43:46.030Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "granted", "limit_activations": 94589, "usage": 552582, "limit_usage": 805876, "validations": 380699, "last_validated_at": "2025-03-29T06:09:39.323Z", "expires_at": "2024-10-28T22:54:36.498Z", "activations": [{"id": "", "license_key_id": "", "label": "", "meta": {"key": 177375}, "created_at": "2023-09-24T17:11:04.561Z", "modified_at": "2025-05-05T04:00:06.053Z"}, {"id": "", "license_key_id": "", "label": "", "meta": {"key": 7721.05}, "created_at": "2025-02-17T16:58:52.102Z", "modified_at": "2025-09-23T09:26:26.647Z"}]} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:license_keys:validate: + speakeasy-default-customer-portal:license-keys:validate: + requestBody: + application/json: {"key": "", "organization_id": ""} + responses: + "200": + application/json: {"id": "", "created_at": "2025-02-03T12:24:22.139Z", "modified_at": "2023-08-06T01:08:18.676Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-08-31T02:48:57.079Z", "modified_at": "2023-09-25T18:32:25.974Z", "metadata": {"key": false}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2025-06-24T08:27:51.217Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "revoked", "limit_activations": 495384, "usage": 387992, "limit_usage": 982092, "validations": 777548, "last_validated_at": "2025-07-11T15:06:59.187Z", "expires_at": "2025-03-15T08:32:29.645Z"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:license_keys:activate: + speakeasy-default-customer-portal:license-keys:activate: + requestBody: + application/json: {"key": "", "organization_id": "", "label": ""} + responses: + "200": + application/json: {"id": "", "license_key_id": "", "label": "", "meta": {"key": "", "key1": false}, "created_at": "2025-06-27T10:16:03.361Z", "modified_at": "2025-06-02T17:42:57.802Z", "license_key": {"id": "", "created_at": "2023-11-10T20:54:22.648Z", "modified_at": "2024-05-21T01:18:42.820Z", "organization_id": "", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-12-13T04:02:19.973Z", "modified_at": "2024-05-17T10:55:35.861Z", "metadata": {"key": true, "key1": 296877, "key2": 92223}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "SE"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-08-04T00:07:59.160Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "benefit_id": "", "key": "", "display_key": "", "status": "revoked", "limit_activations": 407890, "usage": 290826, "limit_usage": 838079, "validations": 32532, "last_validated_at": "2024-11-15T09:59:32.832Z", "expires_at": "2024-12-19T21:16:07.738Z"}} + "403": + application/json: {"error": "NotPermitted", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:license_keys:deactivate: + speakeasy-default-customer-portal:license-keys:deactivate: + requestBody: + application/json: {"key": "", "organization_id": "", "activation_id": ""} + responses: + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:orders:list: + speakeasy-default-customer-portal:orders:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"id": "", "created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "status": "pending", "paid": true, "subtotal_amount": 152837, "discount_amount": 635532, "net_amount": 639387, "amount": 17577, "tax_amount": 718303, "total_amount": 86140, "refunded_amount": 68504, "refunded_tax_amount": 687960, "currency": "Liberian Dollar", "billing_reason": "subscription_cycle", "billing_address": {"country": "US"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "user_id": "", "product": {"created_at": "2023-03-01T20:22:54.911Z", "modified_at": "2024-02-08T01:09:52.088Z", "id": "", "name": "", "description": "fedora blah brook cleverly blossom defiantly", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"id": "", "created_at": "2023-11-08T21:35:05.868Z", "modified_at": "2025-05-06T10:10:32.094Z", "type": "downloadables", "description": "along memorise ruin", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2024-12-15T22:46:18.179Z", "modified_at": "2025-01-24T21:46:28.752Z", "type": "downloadables", "description": "ick absent righteously reservation down dramatic", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/ports", "mime_type": "", "size": 517221, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-04-28T22:29:22.162Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-07-20T03:42:25.608Z", "size_readable": "", "public_url": "https://ill-teammate.com/"}], "organization": {"created_at": "2024-07-27T09:20:59.531Z", "modified_at": "2023-12-12T02:49:50.316Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://frail-discourse.org", "email": "Rachel48@hotmail.com", "website": "", "socials": [{"platform": "facebook", "url": "https://gummy-cope.net/"}, {"platform": "x", "url": "https://bulky-instructor.net"}, {"platform": "facebook", "url": "https://miserly-technician.biz/"}], "details_submitted_at": "2023-06-09T01:19:27.771Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": false, "proration_behavior": "prorate"}}}, "subscription": {"created_at": "2025-10-04T22:19:43.532Z", "modified_at": "2025-05-17T20:40:45.053Z", "id": "", "amount": 568383, "currency": "Kuwaiti Dinar", "recurring_interval": "year", "status": "incomplete_expired", "current_period_start": "2024-08-14T08:49:49.731Z", "current_period_end": "2025-09-07T23:06:08.488Z", "cancel_at_period_end": true, "canceled_at": "2024-12-11T21:57:01.257Z", "started_at": "2024-03-23T19:09:17.797Z", "ends_at": "2023-09-28T14:04:50.967Z", "ended_at": "2023-01-03T14:26:00.039Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "other", "customer_cancellation_comment": ""}, "items": [{"created_at": "2025-10-27T03:34:38.356Z", "modified_at": "2025-09-24T21:13:12.223Z", "id": "", "label": "", "amount": 233358, "tax_amount": 415930, "proration": false, "product_price_id": ""}]}, {"id": "", "created_at": "2023-01-22T12:19:34.261Z", "modified_at": "2024-08-12T02:33:31.911Z", "status": "pending", "paid": true, "subtotal_amount": 962607, "discount_amount": 625809, "net_amount": 19407, "amount": 140142, "tax_amount": 900213, "total_amount": 29339, "refunded_amount": 536405, "refunded_tax_amount": 439898, "currency": "Pound Sterling", "billing_reason": "subscription_update", "billing_address": {"country": "SE"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "user_id": "", "product": {"created_at": "2024-09-07T00:17:39.154Z", "modified_at": "2023-08-16T15:42:00.686Z", "id": "", "name": "", "description": "crooked enthusiastically flustered", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2025-05-08T05:53:10.405Z", "modified_at": "2024-02-15T10:16:55.982Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "price_amount": 498898}], "benefits": [{"id": "", "created_at": "2025-05-27T06:03:00.110Z", "modified_at": "2025-10-25T10:50:37.438Z", "type": "license_keys", "description": "punctually duh how though", "selectable": false, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2025-05-04T14:49:32.580Z", "modified_at": "2024-05-04T10:16:57.233Z", "type": "discord", "description": "finally populist save lively", "selectable": true, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/include", "mime_type": "", "size": 19821, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-07-12T11:27:51.614Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-12-31T03:06:35.935Z", "size_readable": "", "public_url": "https://purple-descent.com/"}], "organization": {"created_at": "2025-11-03T16:27:04.267Z", "modified_at": "2025-07-03T01:58:07.843Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://jaunty-desk.org/", "email": "Otto_Tillman@gmail.com", "website": "", "socials": [{"platform": "x", "url": "https://right-toothbrush.org/"}, {"platform": "github", "url": "https://compassionate-maestro.info"}, {"platform": "youtube", "url": "https://stark-pension.biz/"}], "details_submitted_at": "2023-10-01T20:49:37.013Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "invoice"}}}, "subscription": {"created_at": "2023-04-17T02:32:11.293Z", "modified_at": "2023-02-08T12:01:40.965Z", "id": "", "amount": 302322, "currency": "Pa'anga", "recurring_interval": "month", "status": "unpaid", "current_period_start": "2025-10-28T04:58:58.509Z", "current_period_end": "2025-01-12T22:29:09.717Z", "cancel_at_period_end": false, "canceled_at": "2025-02-22T01:58:22.710Z", "started_at": "2025-01-17T21:03:55.557Z", "ends_at": "2025-07-06T18:31:24.280Z", "ended_at": "2023-05-10T00:49:50.875Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "missing_features", "customer_cancellation_comment": ""}, "items": [{"created_at": "2023-10-24T09:02:41.029Z", "modified_at": "2025-02-15T04:47:55.629Z", "id": "", "label": "", "amount": 215391, "tax_amount": 841910, "proration": true, "product_price_id": ""}, {"created_at": "2024-06-15T02:57:43.819Z", "modified_at": "2024-02-18T08:06:39.496Z", "id": "", "label": "", "amount": 710428, "tax_amount": 390738, "proration": true, "product_price_id": ""}]}], "pagination": {"total_count": 981370, "max_page": 551552}} + "422": + application/json: {} + customer_portal:orders:get: + speakeasy-default-customer-portal:orders:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "status": "refunded", "paid": true, "subtotal_amount": 521235, "discount_amount": 969961, "net_amount": 458049, "amount": 450824, "tax_amount": 262795, "total_amount": 213457, "refunded_amount": 937146, "refunded_tax_amount": 438142, "currency": "Dobra", "billing_reason": "purchase", "billing_address": {"country": "US"}, "customer_id": "", "product_id": "", "discount_id": "", "subscription_id": "", "checkout_id": "", "user_id": "", "product": {"created_at": "2023-12-10T13:21:20.945Z", "modified_at": "2023-04-14T16:04:46.468Z", "id": "", "name": "", "description": "fellow scary but embarrassment metabolise last huddle", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-03-31T04:26:02.125Z", "modified_at": "2023-07-01T01:48:45.676Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 988917, "maximum_amount": 25042, "preset_amount": 637754, "legacy": false}, {"created_at": "2023-11-11T01:19:41.687Z", "modified_at": "2023-09-18T20:12:25.613Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "legacy": false}, {"created_at": "2023-07-26T12:11:42.166Z", "modified_at": "2024-05-16T17:14:04.529Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "year"}], "benefits": [{"id": "", "created_at": "2023-07-04T22:10:57.702Z", "modified_at": "2023-03-05T14:01:26.927Z", "type": "downloadables", "description": "scholarship to blink", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/Library", "mime_type": "", "size": 698722, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-08-11T22:26:32.433Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-02-05T08:11:26.016Z", "size_readable": "", "public_url": "https://babyish-mixture.org"}, {"id": "", "organization_id": "", "name": "", "path": "/net", "mime_type": "", "size": 287673, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-04-09T16:28:47.030Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-06-04T09:34:39.316Z", "size_readable": "", "public_url": "https://dutiful-grass.name"}], "organization": {"created_at": "2023-08-06T23:04:38.947Z", "modified_at": "2024-04-17T04:04:12.484Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://private-birdbath.info/", "email": "Justice_Kulas@hotmail.com", "website": "", "socials": [{"platform": "facebook", "url": "https://majestic-octave.org/"}, {"platform": "github", "url": "https://experienced-scenario.com/"}, {"platform": "other", "url": "https://ugly-aircraft.net/"}], "details_submitted_at": "2023-01-09T14:26:53.626Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": true, "proration_behavior": "prorate"}}}, "subscription": {"created_at": "2024-05-01T10:07:54.353Z", "modified_at": "2023-12-12T23:35:27.798Z", "id": "", "amount": 254674, "currency": "Forint", "recurring_interval": "month", "status": "active", "current_period_start": "2024-11-17T11:40:22.285Z", "current_period_end": "2023-08-02T00:17:06.651Z", "cancel_at_period_end": false, "canceled_at": "2024-07-02T22:04:49.988Z", "started_at": "2023-12-11T03:15:37.914Z", "ends_at": "2025-10-20T04:57:39.211Z", "ended_at": "2023-05-29T23:31:48.271Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "other", "customer_cancellation_comment": ""}, "items": [{"created_at": "2023-01-04T19:57:36.739Z", "modified_at": "2025-09-19T13:07:51.180Z", "id": "", "label": "", "amount": 30856, "tax_amount": 831606, "proration": true, "product_price_id": ""}, {"created_at": "2024-10-30T08:25:44.878Z", "modified_at": "2024-10-14T11:09:33.114Z", "id": "", "label": "", "amount": 306618, "tax_amount": 14490, "proration": true, "product_price_id": ""}]} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:orders:invoice: + speakeasy-default-customer-portal:orders:invoice: + parameters: + path: + id: "" + responses: + "200": + application/json: {"url": "https://those-director.org"} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:organizations:get: + speakeasy-default-customer-portal:organizations:get: + parameters: + path: + slug: "" + responses: + "200": + application/json: {"organization": {"created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://misguided-violin.info", "email": "Dewitt.Wehner80@yahoo.com", "website": "", "socials": [], "details_submitted_at": "2023-12-10T13:21:20.945Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "prorate"}}, "products": [{"created_at": "2025-03-29T06:09:39.323Z", "modified_at": "2024-10-28T22:54:36.498Z", "id": "", "name": "", "description": "qua meanwhile bah because impassioned responsibility jogging", "recurring_interval": "month", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-01-28T10:42:29.356Z", "modified_at": "2024-11-29T23:29:10.334Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 286547, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2023-10-09T09:46:52.616Z", "modified_at": "2025-05-12T11:59:16.084Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "legacy": true}], "benefits": [{"id": "", "created_at": "2023-04-02T16:57:28.496Z", "modified_at": "2024-03-24T07:38:20.352Z", "type": "meter_credit", "description": "bah hourly unselfish plus babyish consequently", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/root", "mime_type": "", "size": 198870, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-04-17T04:04:12.484Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2024-11-30T03:14:17.295Z", "size_readable": "", "public_url": "https://heavy-valley.name/"}]}]} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:subscriptions:list: + speakeasy-default-customer-portal:subscriptions:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "id": "", "amount": 229716, "currency": "Belize Dollar", "recurring_interval": "year", "status": "past_due", "current_period_start": "2023-01-20T06:21:22.156Z", "current_period_end": "2025-02-26T06:14:46.641Z", "cancel_at_period_end": true, "canceled_at": "2023-03-17T01:57:00.187Z", "started_at": "2025-01-24T00:05:25.844Z", "ends_at": "2024-07-12T19:57:33.016Z", "ended_at": "2024-11-25T18:23:24.264Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "customer_service", "customer_cancellation_comment": "", "product": {"created_at": "2023-03-01T20:22:54.911Z", "modified_at": "2024-02-08T01:09:52.088Z", "id": "", "name": "", "description": "fedora blah brook cleverly blossom defiantly", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"id": "", "created_at": "2023-11-08T21:35:05.868Z", "modified_at": "2025-05-06T10:10:32.094Z", "type": "downloadables", "description": "along memorise ruin", "selectable": true, "deletable": true, "organization_id": ""}, {"id": "", "created_at": "2024-12-15T22:46:18.179Z", "modified_at": "2025-01-24T21:46:28.752Z", "type": "downloadables", "description": "ick absent righteously reservation down dramatic", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/ports", "mime_type": "", "size": 517221, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-04-28T22:29:22.162Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2023-07-20T03:42:25.608Z", "size_readable": "", "public_url": "https://ill-teammate.com/"}], "organization": {"created_at": "2024-07-27T09:20:59.531Z", "modified_at": "2023-12-12T02:49:50.316Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://frail-discourse.org", "email": "Rachel48@hotmail.com", "website": "", "socials": [{"platform": "facebook", "url": "https://gummy-cope.net/"}, {"platform": "x", "url": "https://bulky-instructor.net"}, {"platform": "facebook", "url": "https://miserly-technician.biz/"}], "details_submitted_at": "2023-06-09T01:19:27.771Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": false, "proration_behavior": "prorate"}}}, "prices": [{"created_at": "2024-06-02T06:24:14.389Z", "modified_at": "2024-09-28T09:08:13.966Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "year"}, {"created_at": "2024-03-23T19:09:17.797Z", "modified_at": "2023-09-28T14:04:50.967Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "price_amount": 367314, "legacy": false}, {"created_at": "2024-03-31T20:36:57.465Z", "modified_at": "2024-08-01T09:45:28.536Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 962607}], "meters": [{"created_at": "2023-01-22T06:30:00.744Z", "modified_at": "2023-06-03T14:18:34.914Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2025-09-13T15:11:12.432Z", "modified_at": "2023-02-02T03:44:23.370Z", "id": "", "name": ""}}, {"created_at": "2024-08-10T21:36:18.548Z", "modified_at": "2024-04-27T03:04:42.633Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2023-11-15T16:58:31.247Z", "modified_at": "2025-08-22T13:40:19.150Z", "id": "", "name": ""}}]}, {"created_at": "2024-04-29T04:53:25.451Z", "modified_at": "2024-09-07T00:17:39.154Z", "id": "", "amount": 207713, "currency": "UAE Dirham", "recurring_interval": "month", "status": "trialing", "current_period_start": "2023-10-05T20:49:32.362Z", "current_period_end": "2024-08-28T08:32:20.644Z", "cancel_at_period_end": false, "canceled_at": "2025-06-07T12:21:44.732Z", "started_at": "2023-06-16T22:11:32.719Z", "ends_at": "2025-10-03T23:44:36.269Z", "ended_at": "2025-07-14T16:07:38.809Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "switched_service", "customer_cancellation_comment": "", "product": {"created_at": "2025-12-03T09:47:00.347Z", "modified_at": "2023-09-13T06:39:19.968Z", "id": "", "name": "", "description": "unbalance cuddly ha", "recurring_interval": "year", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"id": "", "created_at": "2024-09-10T11:54:14.319Z", "modified_at": "2025-01-19T21:45:37.595Z", "type": "meter_credit", "description": "house for concerning freely", "selectable": true, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/ports", "mime_type": "", "size": 968727, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-04-04T09:25:47.730Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-07-28T05:18:58.410Z", "size_readable": "", "public_url": "https://descriptive-bungalow.info"}, {"id": "", "organization_id": "", "name": "", "path": "/private", "mime_type": "", "size": 673392, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-01-30T19:10:46.194Z", "version": "", "service": "", "is_uploaded": true, "created_at": "2025-06-03T09:44:45.907Z", "size_readable": "", "public_url": "https://tiny-attraction.com/"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 899687, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-06-28T04:24:50.758Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-01-26T14:05:14.650Z", "size_readable": "", "public_url": "https://spotless-intervention.com/"}], "organization": {"created_at": "2023-12-15T04:21:10.429Z", "modified_at": "2024-01-12T23:45:01.413Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://agreeable-squid.net", "email": "Jess94@yahoo.com", "website": "", "socials": [], "details_submitted_at": "2024-04-23T03:52:08.925Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "invoice"}}}, "prices": [{"created_at": "2025-06-08T14:13:41.397Z", "modified_at": "2023-05-02T01:47:04.536Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "unit_amount": "", "cap_amount": 476639, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2025-12-31T08:16:04.009Z", "modified_at": "2023-06-26T17:38:16.835Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "unit_amount": "", "cap_amount": 387926, "meter_id": "", "meter": {"id": "", "name": ""}}, {"created_at": "2025-05-23T21:54:30.697Z", "modified_at": "2024-12-19T21:19:09.188Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "month", "price_currency": "", "minimum_amount": 727522, "maximum_amount": 115762, "preset_amount": 96811}], "meters": []}], "pagination": {"total_count": 302322, "max_page": 847002}} + "422": + application/json: {} + customer_portal:subscriptions:get: + speakeasy-default-customer-portal:subscriptions:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "id": "", "amount": 544221, "currency": "Moroccan Dirham", "recurring_interval": "year", "status": "active", "current_period_start": "2024-05-09T02:28:23.533Z", "current_period_end": "2023-10-16T00:34:27.106Z", "cancel_at_period_end": true, "canceled_at": "2025-10-24T02:41:21.259Z", "started_at": "2024-04-25T04:53:50.189Z", "ends_at": "2025-05-28T07:17:57.134Z", "ended_at": "2023-03-28T11:05:23.685Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "low_quality", "customer_cancellation_comment": "", "product": {"created_at": "2023-12-10T13:21:20.945Z", "modified_at": "2023-04-14T16:04:46.468Z", "id": "", "name": "", "description": "fellow scary but embarrassment metabolise last huddle", "recurring_interval": "month", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-03-31T04:26:02.125Z", "modified_at": "2023-07-01T01:48:45.676Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 988917, "maximum_amount": 25042, "preset_amount": 637754, "legacy": false}, {"created_at": "2023-11-11T01:19:41.687Z", "modified_at": "2023-09-18T20:12:25.613Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "month", "legacy": false}, {"created_at": "2023-07-26T12:11:42.166Z", "modified_at": "2024-05-16T17:14:04.529Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "year"}], "benefits": [{"id": "", "created_at": "2023-07-04T22:10:57.702Z", "modified_at": "2023-03-05T14:01:26.927Z", "type": "downloadables", "description": "scholarship to blink", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/Library", "mime_type": "", "size": 698722, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-08-11T22:26:32.433Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-02-05T08:11:26.016Z", "size_readable": "", "public_url": "https://babyish-mixture.org"}, {"id": "", "organization_id": "", "name": "", "path": "/net", "mime_type": "", "size": 287673, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-04-09T16:28:47.030Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-06-04T09:34:39.316Z", "size_readable": "", "public_url": "https://dutiful-grass.name"}], "organization": {"created_at": "2023-08-06T23:04:38.947Z", "modified_at": "2024-04-17T04:04:12.484Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://private-birdbath.info/", "email": "Justice_Kulas@hotmail.com", "website": "", "socials": [{"platform": "facebook", "url": "https://majestic-octave.org/"}, {"platform": "github", "url": "https://experienced-scenario.com/"}, {"platform": "other", "url": "https://ugly-aircraft.net/"}], "details_submitted_at": "2023-01-09T14:26:53.626Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": false, "allow_customer_updates": true, "proration_behavior": "prorate"}}}, "prices": [{"created_at": "2024-01-28T12:32:42.599Z", "modified_at": "2023-05-06T23:12:57.018Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 194354, "maximum_amount": 637233, "preset_amount": 500839, "legacy": true}], "meters": [{"created_at": "2023-05-29T23:31:48.271Z", "modified_at": "2025-09-05T20:43:01.371Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2024-07-15T23:11:06.727Z", "modified_at": "2023-01-04T19:57:36.739Z", "id": "", "name": ""}}, {"created_at": "2025-09-19T13:07:51.180Z", "modified_at": "2023-02-03T19:38:47.426Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2025-06-30T10:33:17.686Z", "modified_at": "2024-01-11T09:24:54.882Z", "id": "", "name": ""}}, {"created_at": "2024-10-30T08:25:44.878Z", "modified_at": "2024-10-14T11:09:33.114Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2023-12-03T01:17:26.514Z", "modified_at": "2023-01-16T21:10:10.827Z", "id": "", "name": ""}}]} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:subscriptions:update: + speakeasy-default-customer-portal:subscriptions:update: + parameters: + path: + id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"created_at": "2024-10-16T10:52:42.015Z", "modified_at": "2024-01-13T16:52:57.274Z", "id": "", "amount": 991464, "currency": "Norwegian Krone", "recurring_interval": "month", "status": "unpaid", "current_period_start": "2023-03-01T06:03:05.915Z", "current_period_end": "2025-09-09T13:32:29.600Z", "cancel_at_period_end": true, "canceled_at": "2023-12-08T09:52:54.805Z", "started_at": "2023-10-01T09:16:09.932Z", "ends_at": "2023-06-02T23:29:52.263Z", "ended_at": "2025-05-15T01:05:20.251Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "other", "customer_cancellation_comment": "", "product": {"created_at": "2023-11-28T11:56:11.232Z", "modified_at": "2024-05-23T23:10:45.412Z", "id": "", "name": "", "description": "mostly rekindle bleak from that qualified cycle woot abseil", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2024-10-20T22:49:18.353Z", "modified_at": "2023-11-16T09:03:13.366Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "month", "legacy": false}, {"created_at": "2024-01-03T08:52:11.922Z", "modified_at": "2024-08-06T22:56:22.190Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 463392, "maximum_amount": 416023, "preset_amount": 58704, "legacy": false}, {"created_at": "2025-09-26T03:13:45.129Z", "modified_at": "2023-05-10T12:36:21.295Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 674600, "maximum_amount": 446252, "preset_amount": 438996, "legacy": true}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/include", "mime_type": "", "size": 134816, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-04-18T04:36:28.046Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2025-11-16T14:51:36.195Z", "size_readable": "", "public_url": "https://smug-bob.org"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/libexec", "mime_type": "", "size": 504322, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-04-19T21:35:13.447Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-06-16T09:29:17.954Z", "size_readable": "", "public_url": "https://waterlogged-distinction.info/"}], "organization": {"created_at": "2025-08-14T18:17:42.881Z", "modified_at": "2023-06-30T00:35:12.989Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://dapper-reward.net", "email": "Boyd38@yahoo.com", "website": "", "socials": [{"platform": "facebook", "url": "https://front-marksman.net"}, {"platform": "x", "url": "https://fantastic-waist.net/"}], "details_submitted_at": "2025-04-09T18:14:21.090Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "invoice"}}}, "prices": [{"created_at": "2025-10-10T07:26:50.939Z", "modified_at": "2025-08-08T14:33:10.018Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "price_amount": 353996}], "meters": [{"created_at": "2025-10-17T01:35:15.856Z", "modified_at": "2024-08-29T02:34:50.546Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2024-07-25T09:32:51.778Z", "modified_at": "2025-03-09T05:49:14.680Z", "id": "", "name": ""}}, {"created_at": "2025-09-03T11:29:55.574Z", "modified_at": "2023-09-04T02:36:51.246Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2023-08-16T05:21:16.931Z", "modified_at": "2025-04-28T21:13:40.227Z", "id": "", "name": ""}}, {"created_at": "2023-06-01T04:50:20.641Z", "modified_at": "2023-07-15T06:46:09.402Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2023-11-11T19:06:20.796Z", "modified_at": "2023-07-02T00:00:11.531Z", "id": "", "name": ""}}]} + "403": + application/json: {"error": "AlreadyCanceledSubscription", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_portal:subscriptions:cancel: + speakeasy-default-customer-portal:subscriptions:cancel: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2023-01-28T04:39:19.513Z", "modified_at": "2025-12-24T10:36:51.473Z", "id": "", "amount": 473916, "currency": "Bulgarian Lev", "recurring_interval": "month", "status": "trialing", "current_period_start": "2023-02-14T08:23:52.236Z", "current_period_end": "2023-06-28T03:41:26.855Z", "cancel_at_period_end": false, "canceled_at": "2023-06-09T14:11:56.790Z", "started_at": "2023-08-28T23:20:26.332Z", "ends_at": "2023-08-29T10:04:34.451Z", "ended_at": "2023-03-26T15:01:55.926Z", "customer_id": "", "product_id": "", "discount_id": "", "checkout_id": "", "customer_cancellation_reason": "unused", "customer_cancellation_comment": "", "product": {"created_at": "2024-04-03T03:17:46.224Z", "modified_at": "2025-08-19T22:51:49.844Z", "id": "", "name": "", "description": "once likewise ecliptic along maintainer premise pfft retrospectivity", "recurring_interval": "month", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-04-08T21:08:29.894Z", "modified_at": "2023-04-16T16:07:32.719Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "recurring", "recurring_interval": "month", "price_currency": "", "price_amount": 806700}, {"created_at": "2023-07-02T04:17:16.638Z", "modified_at": "2023-11-19T17:12:45.282Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "one_time", "recurring_interval": "month"}, {"created_at": "2023-10-21T12:54:12.228Z", "modified_at": "2025-01-15T21:10:47.290Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 660092, "maximum_amount": 27071, "preset_amount": 979409, "legacy": false}], "benefits": [{"id": "", "created_at": "2025-02-15T04:39:43.032Z", "modified_at": "2025-07-29T14:39:40.765Z", "type": "discord", "description": "gee duh across though bonfire treble drain", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/X11R6", "mime_type": "", "size": 671524, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-02-05T06:38:34.387Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-07-20T04:37:06.459Z", "size_readable": "", "public_url": "https://shadowy-dwell.com/"}, {"id": "", "organization_id": "", "name": "", "path": "/Applications", "mime_type": "", "size": 684806, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2025-10-10T17:32:42.477Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2024-12-06T09:14:25.814Z", "size_readable": "", "public_url": "https://grave-fibre.org"}, {"id": "", "organization_id": "", "name": "", "path": "/etc/mail", "mime_type": "", "size": 500355, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-01-04T00:31:31.524Z", "version": "", "service": "", "is_uploaded": false, "created_at": "2023-10-05T10:43:57.121Z", "size_readable": "", "public_url": "https://gleaming-citizen.name"}], "organization": {"created_at": "2023-10-02T19:09:48.395Z", "modified_at": "2024-02-01T10:59:24.360Z", "id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "name": "", "slug": "", "avatar_url": "https://wordy-polarisation.com", "email": "Sigrid.Crooks@yahoo.com", "website": "", "socials": [{"platform": "facebook", "url": "https://obvious-possession.name"}, {"platform": "youtube", "url": "https://brilliant-ostrich.name"}, {"platform": "other", "url": "https://those-pick.name"}], "details_submitted_at": "2025-07-21T05:47:19.720Z", "feature_settings": {}, "subscription_settings": {"allow_multiple_subscriptions": true, "allow_customer_updates": false, "proration_behavior": "prorate"}}}, "prices": [{"created_at": "2025-08-13T20:44:30.751Z", "modified_at": "2024-02-27T07:44:28.461Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "price_currency": "", "minimum_amount": 495502, "maximum_amount": 867007, "preset_amount": 656192, "legacy": false}, {"created_at": "2025-12-30T10:24:06.364Z", "modified_at": "2025-03-21T16:02:33.351Z", "id": "", "amount_type": "", "is_archived": true, "product_id": "", "type": "", "recurring_interval": "year", "legacy": false}, {"created_at": "2023-01-17T01:10:44.992Z", "modified_at": "2024-08-11T06:27:57.456Z", "id": "", "amount_type": "", "is_archived": false, "product_id": "", "type": "one_time", "recurring_interval": "year", "price_currency": "", "minimum_amount": 360983, "maximum_amount": 380384, "preset_amount": 472520}], "meters": [{"created_at": "2025-11-16T11:33:50.227Z", "modified_at": "2023-05-20T14:31:20.398Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2023-11-29T02:04:29.604Z", "modified_at": "2025-04-10T04:20:38.137Z", "id": "", "name": ""}}, {"created_at": "2024-01-22T08:31:49.478Z", "modified_at": "2025-07-02T15:01:51.423Z", "id": "", "consumed_units": 25, "credited_units": 100, "amount": 0, "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "meter": {"created_at": "2024-10-10T19:22:42.780Z", "modified_at": "2024-03-29T22:52:19.236Z", "id": "", "name": ""}}]} + "403": + application/json: {"error": "AlreadyCanceledSubscription", "detail": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer-sessions:create: + speakeasy-default-customer-sessions:create: + requestBody: + application/json: {"customer_id": ""} + responses: + "201": + application/json: {"created_at": "2024-11-30T17:06:07.804Z", "modified_at": "2024-04-02T12:48:32.253Z", "id": "", "token": "", "expires_at": "2023-05-28T06:20:22.766Z", "customer_portal_url": "https://standard-utilization.com/", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-07-06T00:30:20.403Z", "modified_at": "2023-04-09T14:25:29.356Z", "metadata": {"key": false, "key1": false, "key2": 259629}, "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-08-20T15:01:30.899Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}} + "422": + application/json: {} + events:list: + speakeasy-default-events:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"metadata": {"key": "", "key1": ""}, "id": "", "timestamp": "2023-06-17T12:14:27.999Z", "name": "", "source": "user", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-12-01T18:25:37.169Z", "modified_at": "2023-01-20T06:21:22.156Z", "metadata": {"key": "", "key1": ""}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-11-25T18:23:24.264Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "external_customer_id": ""}, {"metadata": {}, "id": "", "timestamp": "2023-03-01T20:22:54.911Z", "name": "", "source": "system", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-06-16T08:36:51.636Z", "modified_at": "2023-03-22T06:10:55.267Z", "metadata": {"key": 8764.07, "key1": 51681, "key2": 860596}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-04-10T02:32:42.816Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "external_customer_id": ""}], "pagination": {"total_count": 913465, "max_page": 173090}} + "422": + application/json: {} + events:list_names: + speakeasy-default-events:list-names: + parameters: + query: + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737" + responses: + "200": + application/json: {"items": [{"name": "", "source": "user", "occurrences": 375427, "first_seen": "2025-01-07T06:11:40.431Z", "last_seen": "2025-06-06T01:25:58.058Z"}, {"name": "", "source": "system", "occurrences": 732459, "first_seen": "2025-07-21T16:42:35.544Z", "last_seen": "2025-04-20T08:00:03.767Z"}], "pagination": {"total_count": 428504, "max_page": 660724}} + "422": + application/json: {} + events:get: + speakeasy-default-events:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"metadata": {"key": 5442.21, "key1": 9699.61}, "id": "", "timestamp": "2024-05-17T00:32:02.244Z", "name": "", "source": "system", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "customer_id": "", "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-10-16T00:34:27.106Z", "modified_at": "2023-08-22T22:47:10.166Z", "metadata": {"key": 801373, "key1": "", "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-08-28T15:06:35.685Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "external_customer_id": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + events:ingest: + speakeasy-default-events:ingest: + requestBody: + application/json: {"events": [{"name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "customer_id": ""}, {"name": "", "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "external_customer_id": ""}]} + responses: + "200": + application/json: {"inserted": 207692} + "422": + application/json: {} + meters:list: + speakeasy-default-meters:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"metadata": {"key": "", "key1": ""}, "created_at": "2023-06-17T12:14:27.999Z", "modified_at": "2024-11-27T13:02:27.296Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "sum", "property": ""}, "organization_id": ""}, {"metadata": {}, "created_at": "2025-01-24T00:05:25.844Z", "modified_at": "2024-07-12T19:57:33.016Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "sum", "property": ""}, "organization_id": ""}], "pagination": {"total_count": 367745, "max_page": 485729}} + "422": + application/json: {} + meters:create: + speakeasy-default-meters:create: + requestBody: + application/json: {"name": "", "filter": {"conjunction": "and", "clauses": [{"property": "", "operator": "ne", "value": ""}]}, "aggregation": {"func": "sum", "property": ""}, "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737"} + responses: + "201": + application/json: {"metadata": {}, "created_at": "2023-04-09T14:25:29.356Z", "modified_at": "2025-05-18T17:03:53.906Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {}, "organization_id": ""} + "422": + application/json: {} + meters:get: + speakeasy-default-meters:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"metadata": {"key": 5442.21, "key1": 9699.61}, "created_at": "2024-05-17T00:32:02.244Z", "modified_at": "2024-05-09T02:28:23.533Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {"func": "max", "property": ""}, "organization_id": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + meters:update: + speakeasy-default-meters:update: + parameters: + path: + id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"metadata": {"key": 3446.2, "key1": false, "key2": 984008}, "created_at": "2023-03-01T06:03:05.915Z", "modified_at": "2025-09-09T13:32:29.600Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": [{"property": "", "operator": "ne", "value": false}]}, "aggregation": {}, "organization_id": ""} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + meters:quantities: + speakeasy-default-meters:quantities: + parameters: + path: + id: "" + query: + start_timestamp: "2023-09-17T00:45:34.608Z" + end_timestamp: "2023-07-21T18:11:39.069Z" + interval: "hour" + responses: + "200": + application/json: {"quantities": [{"timestamp": "2023-10-29T11:55:31.312Z", "quantity": 10}], "total": 100} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} + customer_meters:list: + speakeasy-default-customer-meters:list: + parameters: + query: + organization_id: ["1dbfc517-0bbf-4301-9ba8-555ca42b9737"] + responses: + "200": + application/json: {"items": [{"id": "", "created_at": "2025-01-13T10:26:00.433Z", "modified_at": "2023-07-14T18:23:27.528Z", "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2023-09-09T18:28:08.953Z", "modified_at": "2023-06-17T12:14:27.999Z", "metadata": {"key": 175.77, "key1": 861.4}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "US"}, "tax_id": ["FR61954506077", "eu_vat"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-07-12T19:57:33.016Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "meter": {"metadata": {"key": "", "key1": ""}, "created_at": "2024-02-08T01:09:52.088Z", "modified_at": "2024-06-16T08:36:51.636Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": [{"property": "", "operator": "eq", "value": ""}]}, "aggregation": {"func": "sum", "property": ""}, "organization_id": ""}}, {"id": "", "created_at": "2025-09-10T07:49:25.657Z", "modified_at": "2024-04-10T02:32:42.816Z", "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2025-09-28T03:47:03.515Z", "modified_at": "2023-07-09T16:58:41.012Z", "metadata": {}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2024-05-19T11:06:26.987Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "meter": {"metadata": {"key": 480616}, "created_at": "2023-04-24T08:24:21.019Z", "modified_at": "2024-07-28T04:00:22.486Z", "id": "", "name": "", "filter": {"conjunction": "or", "clauses": []}, "aggregation": {"func": "avg", "property": ""}, "organization_id": ""}}], "pagination": {"total_count": 307390, "max_page": 392057}} + "422": + application/json: {} + customer_meters:get: + speakeasy-default-customer-meters:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "created_at": "2025-02-06T13:54:48.821Z", "modified_at": "2024-09-04T11:33:52.011Z", "customer_id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "meter_id": "d498a884-e2cd-4d3e-8002-f536468a8b22", "consumed_units": 25, "credited_units": 100, "balance": 75, "customer": {"id": "992fae2a-2a17-4b7a-8d9e-e287cf90131b", "created_at": "2024-08-19T11:11:04.610Z", "modified_at": "2024-07-25T06:33:15.810Z", "metadata": {"key": 450824, "key1": 213457, "key2": true}, "external_id": "usr_1337", "email": "customer@example.com", "email_verified": true, "name": "John Doe", "billing_address": {"country": "FR"}, "tax_id": ["911144442", "us_ein"], "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737", "deleted_at": "2023-08-30T01:43:46.030Z", "avatar_url": "https://www.gravatar.com/avatar/xxx?d=blank"}, "meter": {"metadata": {"key": ""}, "created_at": "2024-08-28T15:06:35.685Z", "modified_at": "2025-06-02T05:45:06.910Z", "id": "", "name": "", "filter": {"conjunction": "and", "clauses": []}, "aggregation": {}, "organization_id": ""}} + "404": + application/json: {"error": "ResourceNotFound", "detail": ""} + "422": + application/json: {} +examplesVersion: 1.0.1 +generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index f7dbf02..fa1c0c3 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -7,15 +7,24 @@ generation: useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true + nameResolutionFeb2025: false parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true + securityFeb2025: false + sharedErrorComponentsApr2025: false auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true ruby: version: 0.0.1 + additionalDependencies: + development: {} + runtime: {} author: Polar + clientServerStatusCodesAsErrors: true + defaultErrorName: APIError description: Ruby Client SDK Generated by Speakeasy + flattenGlobalSecurity: true imports: option: openapi paths: diff --git a/.speakeasy/temp/downloaded_wgSPEHBECz.json b/.speakeasy/temp/downloaded_wgSPEHBECz.json deleted file mode 100644 index 171e90f..0000000 --- a/.speakeasy/temp/downloaded_wgSPEHBECz.json +++ /dev/null @@ -1 +0,0 @@ -{"openapi":"3.1.0","info":{"title":"Polar API","summary":"Polar HTTP and Webhooks API","description":"Read the docs at https://docs.polar.sh/api","version":"0.1.0"},"servers":[{"url":"https://api.polar.sh","description":"Production environment","x-speakeasy-server-id":"production"},{"url":"https://sandbox-api.polar.sh","description":"Sandbox environment","x-speakeasy-server-id":"sandbox"}],"paths":{"/v1/external_organizations/":{"get":{"tags":["external_organizations","documented","issue_funding"],"summary":"List External Organizations","description":"List external organizations.","operationId":"external_organizations:list","security":[{"oidc":["external_organizations:read"]},{"pat":[]}],"parameters":[{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Platforms"},{"type":"array","items":{"$ref":"#/components/schemas/Platforms"}},{"type":"null"}],"title":"Platform Filter","description":"Filter by platform."},"description":"Filter by platform."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"RepositoryName Filter","description":"Filter by name."},"description":"Filter by name."},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ExternalOrganizationSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_ExternalOrganization_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"external_organizations","x-speakeasy-name-override":"list"}},"/v1/repositories/":{"get":{"tags":["repositories","documented","issue_funding"],"summary":"List Repositories","description":"List repositories.","operationId":"repositories:list","security":[{"oidc":["repositories:read","repositories:write"]},{"pat":[]}],"parameters":[{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Platforms"},{"type":"array","items":{"$ref":"#/components/schemas/Platforms"}},{"type":"null"}],"title":"Platform Filter","description":"Filter by platform."},"description":"Filter by platform."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"RepositoryName Filter","description":"Filter by name."},"description":"Filter by name."},{"name":"external_organization_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"ExternalOrganizationName Filter","description":"Filter by external organization name."},"description":"Filter by external organization name."},{"name":"is_private","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by private status.","title":"Is Private"},"description":"Filter by private status."},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RepositorySortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Repository_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"repositories","x-speakeasy-name-override":"list"}},"/v1/repositories/{id}":{"get":{"tags":["repositories","documented","issue_funding"],"summary":"Get Repository","description":"Get a repository by ID.","operationId":"repositories:get","security":[{"oidc":["repositories:read","repositories:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The repository ID.","x-polar-selector-widget":{"resourceRoot":"/v1/repositories","resourceName":"Repository","displayProperty":"name"},"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"404":{"description":"Repository not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","Organization","User"],"x-speakeasy-group":"repositories","x-speakeasy-name-override":"get"},"patch":{"tags":["repositories","documented","issue_funding"],"summary":"Update Repository","description":"Update a repository.","operationId":"repositories:update","security":[{"oidc":["repositories:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The repository ID.","x-polar-selector-widget":{"resourceRoot":"/v1/repositories","resourceName":"Repository","displayProperty":"name"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryUpdate"}}}},"responses":{"200":{"description":"Repository updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"403":{"description":"You don't have the permission to update this repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Repository not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"repositories","x-speakeasy-name-override":"update"}},"/v1/organizations/":{"get":{"tags":["organizations","documented","featured"],"summary":"List Organizations","description":"List organizations.","operationId":"organizations:list","security":[{"oidc":["organizations:read","organizations:write"]},{"pat":[]}],"parameters":[{"name":"slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by slug.","title":"Slug"},"description":"Filter by slug."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/OrganizationSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Organization_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"organizations","x-speakeasy-name-override":"list"},"post":{"tags":["organizations","documented","featured"],"summary":"Create Organization","description":"Create an organization.","operationId":"organizations:create","security":[{"oidc":["organizations:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}}},"responses":{"201":{"description":"Organization created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["User"],"x-speakeasy-group":"organizations","x-speakeasy-name-override":"create"}},"/v1/organizations/{id}":{"get":{"tags":["organizations","documented","featured"],"summary":"Get Organization","description":"Get an organization by ID.","operationId":"organizations:get","security":[{"oidc":["organizations:read","organizations:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"},"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"404":{"description":"Organization not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"organizations","x-speakeasy-name-override":"get"},"patch":{"tags":["organizations","documented","featured"],"summary":"Update Organization","description":"Update an organization.","operationId":"organizations:update","security":[{"oidc":["organizations:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Organization updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"403":{"description":"You don't have the permission to update this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Organization not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"organizations","x-speakeasy-name-override":"update"}},"/v1/subscriptions/":{"get":{"tags":["subscriptions","documented"],"summary":"List Subscriptions","description":"List subscriptions.","operationId":"subscriptions:list","security":[{"oidc":["subscriptions:read","subscriptions:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"CustomerID Filter","description":"Filter by customer ID."},"description":"Filter by customer ID."},{"name":"discount_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"DiscountID Filter","description":"Filter by discount ID."},"description":"Filter by discount ID."},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active or inactive subscription.","title":"Active"},"description":"Filter by active or inactive subscription."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-started_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Subscription_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"subscriptions","x-speakeasy-name-override":"list"}},"/v1/subscriptions/export":{"get":{"tags":["subscriptions","documented"],"summary":"Export Subscriptions","description":"Export subscriptions as a CSV file.","operationId":"subscriptions:export","security":[{"oidc":["subscriptions:read","subscriptions:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"description":"Filter by organization ID.","title":"Organization Id"},"description":"Filter by organization ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"subscriptions","x-speakeasy-name-override":"export"}},"/v1/advertisements/":{"get":{"tags":["advertisements","documented"],"summary":"List Campaigns","description":"List active advertisement campaigns for a benefit.","operationId":"advertisements:list","parameters":[{"name":"benefit_id","in":"query","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Benefit Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AdvertisementSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["granted_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvertisementCampaignListResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"advertisements","x-speakeasy-name-override":"list"}},"/v1/advertisements/{id}":{"get":{"tags":["advertisements","documented"],"summary":"Get Campaign","description":"Get an advertisement campaign by ID.","operationId":"advertisements:get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The advertisement campaign ID.","title":"Id"},"description":"The advertisement campaign ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvertisementCampaign"}}}},"404":{"description":"Advertisement campaign not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"advertisements","x-speakeasy-name-override":"get"}},"/v1/oauth2/":{"get":{"tags":["oauth2","clients","documented"],"summary":"List Clients","description":"List OAuth2 clients.","operationId":"oauth2:clients:list","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_OAuth2Client_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"list"}},"/v1/oauth2/register":{"post":{"tags":["oauth2","clients","documented"],"summary":"Create Client","description":"Create an OAuth2 client.","operationId":"oauth2:clients:oauth2:create_client","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2ClientConfiguration"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"oidc":[]},{"pat":[]}],"x-polar-allowed-subjects":["User"],"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"create"}},"/v1/oauth2/register/{client_id}":{"get":{"tags":["oauth2","clients","documented"],"summary":"Get Client","description":"Get an OAuth2 client by Client ID.","operationId":"oauth2:clients:oauth2:get_client","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"get"},"put":{"tags":["oauth2","clients","documented"],"summary":"Update Client","description":"Update an OAuth2 client.","operationId":"oauth2:clients:oauth2:update_client","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2ClientConfigurationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"update"},"delete":{"tags":["oauth2","clients","documented"],"summary":"Delete Client","description":"Delete an OAuth2 client.","operationId":"oauth2:clients:oauth2:delete_client","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"delete"}},"/v1/oauth2/authorize":{"get":{"tags":["oauth2","documented"],"summary":"Authorize","operationId":"oauth2:authorize","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AuthorizeResponseUser"},{"$ref":"#/components/schemas/AuthorizeResponseOrganization"}],"title":"Response Oauth2:Authorize","discriminator":{"propertyName":"sub_type","mapping":{"user":"#/components/schemas/AuthorizeResponseUser","organization":"#/components/schemas/AuthorizeResponseOrganization"}}}}}}},"security":[{"oidc":[]},{"pat":[]}],"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"oauth2","x-speakeasy-name-override":"authorize"}},"/v1/oauth2/token":{"post":{"tags":["oauth2","featured","documented"],"summary":"Request Token","description":"Request an access token using a valid grant.","operationId":"oauth2:request_token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"oneOf":[{"$ref":"#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest"},{"$ref":"#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest"}],"discriminator":{"propertyName":"grant_type","mapping":{"authorization_code":"#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest","refresh_token":"#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}},"x-components":{"AuthorizationCodeTokenRequest":{"properties":{"grant_type":{"const":"authorization_code","enum":["authorization_code"],"title":"Grant Type","type":"string"},"client_id":{"title":"Client Id","type":"string"},"client_secret":{"title":"Client Secret","type":"string"},"code":{"title":"Code","type":"string"},"redirect_uri":{"format":"uri","maxLength":2083,"minLength":1,"title":"Redirect Uri","type":"string"}},"required":["grant_type","client_id","client_secret","code","redirect_uri"],"title":"AuthorizationCodeTokenRequest","type":"object"},"RefreshTokenRequest":{"properties":{"grant_type":{"const":"refresh_token","enum":["refresh_token"],"title":"Grant Type","type":"string"},"client_id":{"title":"Client Id","type":"string"},"client_secret":{"title":"Client Secret","type":"string"},"refresh_token":{"title":"Refresh Token","type":"string"}},"required":["grant_type","client_id","client_secret","refresh_token"],"title":"RefreshTokenRequest","type":"object"}},"x-speakeasy-group":"oauth2","x-speakeasy-name-override":"token"}},"/v1/oauth2/revoke":{"post":{"tags":["oauth2","featured","documented"],"summary":"Revoke Token","description":"Revoke an access token or a refresh token.","operationId":"oauth2:revoke_token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"token":{"type":"string","title":"Token"},"token_type_hint":{"anyOf":[{"type":"string","enum":["access_token","refresh_token"]},{"type":"null"}],"title":"Token Type Hint"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["token","client_id","client_secret"],"title":"RevokeTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeTokenResponse"}}}}},"x-speakeasy-group":"oauth2","x-speakeasy-name-override":"revoke"}},"/v1/oauth2/introspect":{"post":{"tags":["oauth2","featured","documented"],"summary":"Introspect Token","description":"Get information about an access token.","operationId":"oauth2:introspect_token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"token":{"type":"string","title":"Token"},"token_type_hint":{"anyOf":[{"type":"string","enum":["access_token","refresh_token"]},{"type":"null"}],"title":"Token Type Hint"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["token","client_id","client_secret"],"title":"IntrospectTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntrospectTokenResponse"}}}}},"x-speakeasy-group":"oauth2","x-speakeasy-name-override":"introspect"}},"/v1/oauth2/userinfo":{"get":{"tags":["oauth2","featured","documented"],"summary":"Get User Info","description":"Get information about the authenticated user.","operationId":"oauth2:userinfo","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UserInfoUser"},{"$ref":"#/components/schemas/UserInfoOrganization"}],"title":"Response Oauth2:Userinfo"}}}}},"security":[{"oidc":[]}],"x-speakeasy-name-override":"userinfo","x-speakeasy-group":"oauth2"}},"/v1/benefits/":{"get":{"tags":["benefits","documented"],"summary":"List Benefits","description":"List benefits.","operationId":"benefits:list","security":[{"oidc":["benefits:read","benefits:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BenefitType"},{"type":"array","items":{"$ref":"#/components/schemas/BenefitType"}},{"type":"null"}],"title":"BenefitType Filter","description":"Filter by benefit type."},"description":"Filter by benefit type."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Benefit_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"benefits","x-speakeasy-name-override":"list"},"post":{"tags":["benefits","documented"],"summary":"Create Benefit","description":"Create a benefit.","operationId":"benefits:create","security":[{"oidc":["benefits:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenefitCreate"}}}},"responses":{"201":{"description":"Benefit created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"benefits","x-speakeasy-name-override":"create"}},"/v1/benefits/{id}":{"get":{"tags":["benefits","documented"],"summary":"Get Benefit","description":"Get a benefit by ID.","operationId":"benefits:get","security":[{"oidc":["benefits:read","benefits:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}}}},"404":{"description":"Benefit not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"benefits","x-speakeasy-name-override":"get"},"patch":{"tags":["benefits","documented"],"summary":"Update Benefit","description":"Update a benefit.","operationId":"benefits:update","security":[{"oidc":["benefits:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BenefitAdsUpdate"},{"$ref":"#/components/schemas/BenefitCustomUpdate"},{"$ref":"#/components/schemas/BenefitDiscordUpdate"},{"$ref":"#/components/schemas/BenefitGitHubRepositoryUpdate"},{"$ref":"#/components/schemas/BenefitDownloadablesUpdate"},{"$ref":"#/components/schemas/BenefitLicenseKeysUpdate"}],"title":"Benefit Update"}}}},"responses":{"200":{"description":"Benefit updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}}}},"403":{"description":"You don't have the permission to update this benefit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Benefit not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"benefits","x-speakeasy-name-override":"update"},"delete":{"tags":["benefits","documented"],"summary":"Delete Benefit","description":"Delete a benefit.\n\n> [!WARNING]\n> Every grants associated with the benefit will be revoked.\n> Users will lose access to the benefit.","operationId":"benefits:delete","security":[{"oidc":["benefits:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Id"}}],"responses":{"204":{"description":"Benefit deleted."},"403":{"description":"You don't have the permission to update this benefit or it's not deletable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Benefit not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"benefits","x-speakeasy-name-override":"delete"}},"/v1/benefits/{id}/grants":{"get":{"tags":["benefits","documented"],"summary":"List Benefit Grants","description":"List the individual grants for a benefit.\n\nIt's especially useful to check if a user has been granted a benefit.","operationId":"benefits:grants","security":[{"oidc":["benefits:read","benefits:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Id"}},{"name":"is_granted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. ","title":"Is Granted"},"description":"Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. "},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"CustomerID Filter","description":"Filter by customer."},"description":"Filter by customer."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_BenefitGrant_"}}}},"404":{"description":"Benefit not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"benefits","x-speakeasy-name-override":"grants"}},"/v1/products/":{"get":{"tags":["products","documented","featured"],"summary":"List Products","description":"List products.","operationId":"products:list","security":[{"oidc":["products:read","products:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by product name.","title":"Query"},"description":"Filter by product name."},{"name":"is_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter on archived products.","title":"Is Archived"},"description":"Filter on archived products."},{"name":"is_recurring","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. ","title":"Is Recurring"},"description":"Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. "},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}}},{"type":"null"}],"title":"BenefitID Filter","description":"Filter products granting specific benefit."},"description":"Filter products granting specific benefit."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ProductSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Product_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"products","x-speakeasy-name-override":"list"},"post":{"tags":["products","documented","featured"],"summary":"Create Product","description":"Create a product.","operationId":"products:create","security":[{"oidc":["products:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate","title":"ProductCreate"}}}},"responses":{"201":{"description":"Product created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"products","x-speakeasy-name-override":"create"}},"/v1/products/{id}":{"get":{"tags":["products","documented","featured"],"summary":"Get Product","description":"Get a product by ID.","operationId":"products:get","security":[{"oidc":["products:read","products:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"},"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"Product not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"products","x-speakeasy-name-override":"get"},"patch":{"tags":["products","documented","featured"],"summary":"Update Product","description":"Update a product.","operationId":"products:update","security":[{"oidc":["products:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Product updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"403":{"description":"You don't have the permission to update this product.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Product not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"products","x-speakeasy-name-override":"update"}},"/v1/products/{id}/benefits":{"post":{"tags":["products","documented","featured"],"summary":"Update Product Benefits","description":"Update benefits granted by a product.","operationId":"products:update_benefits","security":[{"oidc":["products:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductBenefitsUpdate"}}}},"responses":{"200":{"description":"Product benefits updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"403":{"description":"You don't have the permission to update this product.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Product not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"products","x-speakeasy-name-override":"update_benefits"}},"/v1/orders/":{"get":{"tags":["orders","documented"],"summary":"List Orders","description":"List orders.","operationId":"orders:list","security":[{"oidc":["orders:read"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"product_price_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ProductPriceType"},{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceType"}},{"type":"null"}],"title":"ProductPriceType Filter","description":"Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases."},"description":"Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases."},{"name":"discount_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"DiscountID Filter","description":"Filter by discount ID."},"description":"Filter by discount ID."},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"CustomerID Filter","description":"Filter by customer ID."},"description":"Filter by customer ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/OrderSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Order_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"orders","x-speakeasy-name-override":"list"}},"/v1/orders/{id}":{"get":{"tags":["orders","documented"],"summary":"Get Order","description":"Get an order by ID.","operationId":"orders:get","security":[{"oidc":["orders:read"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The order ID.","title":"Id"},"description":"The order ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"404":{"description":"Order not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"orders","x-speakeasy-name-override":"get"}},"/v1/orders/{id}/invoice":{"get":{"tags":["orders","documented"],"summary":"Get Order Invoice","description":"Get an order's invoice data.","operationId":"orders:invoice","security":[{"oidc":["orders:read"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The order ID.","title":"Id"},"description":"The order ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoice"}}}},"404":{"description":"Order not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"orders","x-speakeasy-name-override":"invoice"}},"/v1/checkouts/custom/":{"get":{"tags":["checkouts","custom","documented","featured"],"summary":"List Checkout Sessions","description":"List checkout sessions.","operationId":"checkouts:custom:list","security":[{"oidc":["checkouts:read","checkouts:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Checkout_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"list"},"post":{"tags":["checkouts","custom","documented","featured"],"summary":"Create Checkout Session","description":"Create a checkout session.","operationId":"checkouts:custom:create","security":[{"oidc":["checkouts:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreate"}}}},"responses":{"201":{"description":"Checkout session created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"create"}},"/v1/checkouts/custom/{id}":{"get":{"tags":["checkouts","custom","documented","featured"],"summary":"Get Checkout Session","description":"Get a checkout session by ID.","operationId":"checkouts:custom:get","security":[{"oidc":["checkouts:read","checkouts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout session ID.","title":"Id"},"description":"The checkout session ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"get"},"patch":{"tags":["checkouts","custom","documented","featured"],"summary":"Update Checkout Session","description":"Update a checkout session.","operationId":"checkouts:custom:update","security":[{"oidc":["checkouts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout session ID.","title":"Id"},"description":"The checkout session ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutUpdate"}}}},"responses":{"200":{"description":"Checkout session updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"update"}},"/v1/checkouts/custom/client/{client_secret}":{"get":{"tags":["checkouts","custom","documented","featured"],"summary":"Get Checkout Session from Client","description":"Get a checkout session by client secret.","operationId":"checkouts:custom:client_get","parameters":[{"name":"client_secret","in":"path","required":true,"schema":{"type":"string","description":"The checkout session client secret.","title":"Client Secret"},"description":"The checkout session client secret."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPublic"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"client_get"},"patch":{"tags":["checkouts","custom","documented","featured"],"summary":"Update Checkout Session from Client","description":"Update a checkout session by client secret.","operationId":"checkouts:custom:client_update","parameters":[{"name":"client_secret","in":"path","required":true,"schema":{"type":"string","description":"The checkout session client secret.","title":"Client Secret"},"description":"The checkout session client secret."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutUpdatePublic"}}}},"responses":{"200":{"description":"Checkout session updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPublic"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"client_update"}},"/v1/checkouts/custom/client/{client_secret}/confirm":{"post":{"tags":["checkouts","custom","documented","featured"],"summary":"Confirm Checkout Session from Client","description":"Confirm a checkout session by client secret.\n\nOrders and subscriptions will be processed.","operationId":"checkouts:custom:client_confirm","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"client_secret","in":"path","required":true,"schema":{"type":"string","description":"The checkout session client secret.","title":"Client Secret"},"description":"The checkout session client secret."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutConfirmStripe"}}}},"responses":{"200":{"description":"Checkout session confirmed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPublicConfirmed"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"client_confirm"}},"/v1/checkouts/":{"post":{"tags":["checkouts","documented"],"summary":"Create Checkout","description":"Create a checkout session.","operationId":"checkouts:create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLegacyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLegacy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"oidc":[]},{"pat":[]}],"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-deprecation-replacement":"checkouts:custom:create","x-speakeasy-deprecation-message":"This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information.","x-speakeasy-group":"checkouts","x-speakeasy-name-override":"create"}},"/v1/checkouts/{id}":{"get":{"tags":["checkouts","documented"],"summary":"Get Checkout","description":"Get an active checkout session by ID.","operationId":"checkouts:get","deprecated":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLegacy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-deprecation-message":"This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information.","x-speakeasy-group":"checkouts","x-speakeasy-name-override":"get"}},"/v1/files/":{"get":{"tags":["files","documented"],"summary":"List Files","description":"List files.","operationId":"files:list","security":[{"oidc":["files:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"null"}],"title":"Organization Id"}},{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"description":"List of file IDs to get. ","title":"Ids"},"description":"List of file IDs to get. "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_FileRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"files","x-speakeasy-name-override":"list"},"post":{"tags":["files","documented"],"summary":"Create File","description":"Create a file.","operationId":"files:create","security":[{"oidc":["files:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileCreate"}}}},"responses":{"201":{"description":"File created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUpload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"files","x-speakeasy-name-override":"create"}},"/v1/files/{id}/uploaded":{"post":{"tags":["files","documented"],"summary":"Complete File Upload","description":"Complete a file upload.","operationId":"files:uploaded","security":[{"oidc":["files:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The file ID.","title":"Id"},"description":"The file ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadCompleted"}}}},"responses":{"200":{"description":"File upload completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DownloadableFileRead"},{"$ref":"#/components/schemas/ProductMediaFileRead"},{"$ref":"#/components/schemas/OrganizationAvatarFileRead"}],"discriminator":{"propertyName":"service","mapping":{"downloadable":"#/components/schemas/DownloadableFileRead","product_media":"#/components/schemas/ProductMediaFileRead","organization_avatar":"#/components/schemas/OrganizationAvatarFileRead"}},"title":"Response Files:Uploaded"}}}},"403":{"description":"You don't have the permission to update this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"File not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"files","x-speakeasy-name-override":"uploaded"}},"/v1/files/{id}":{"patch":{"tags":["files","documented"],"summary":"Update File","description":"Update a file.","operationId":"files:update","security":[{"oidc":["files:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The file ID.","title":"Id"},"description":"The file ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilePatch"}}}},"responses":{"200":{"description":"File updated.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DownloadableFileRead"},{"$ref":"#/components/schemas/ProductMediaFileRead"},{"$ref":"#/components/schemas/OrganizationAvatarFileRead"}],"discriminator":{"propertyName":"service","mapping":{"downloadable":"#/components/schemas/DownloadableFileRead","product_media":"#/components/schemas/ProductMediaFileRead","organization_avatar":"#/components/schemas/OrganizationAvatarFileRead"}},"title":"Response Files:Update"}}}},"403":{"description":"You don't have the permission to update this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"File not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"files","x-speakeasy-name-override":"update"},"delete":{"tags":["files","documented"],"summary":"Delete File","description":"Delete a file.","operationId":"files:delete","security":[{"oidc":["files:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}}],"responses":{"204":{"description":"File deleted."},"403":{"description":"You don't have the permission to delete this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"File not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"files","x-speakeasy-name-override":"delete"}},"/v1/metrics/":{"get":{"tags":["metrics","documented"],"summary":"Get Metrics","description":"Get metrics about your orders and subscriptions.","operationId":"metrics:get","security":[{"oidc":["metrics:read"]},{"pat":[]}],"parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date.","title":"Start Date"},"description":"Start date."},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date.","title":"End Date"},"description":"End date."},{"name":"interval","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Interval","description":"Interval between two timestamps."},"description":"Interval between two timestamps."},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"product_price_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ProductPriceType"},{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceType"}},{"type":"null"}],"title":"ProductPriceType Filter","description":"Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."},"description":"Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"metrics","x-speakeasy-name-override":"get"}},"/v1/metrics/limits":{"get":{"tags":["metrics","documented"],"summary":"Get Metrics Limits","description":"Get the interval limits for the metrics endpoint.","operationId":"metrics:limits","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsLimits"}}}}},"security":[{"oidc":["metrics:read"]},{"pat":[]}],"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"metrics","x-speakeasy-name-override":"limits"}},"/v1/license-keys":{"get":{"tags":["license_keys","documented","featured"],"summary":"List License Keys","description":"Get license keys connected to the given organization & filters.","operationId":"license_keys:list","security":[{"oidc":["license_keys:read","license_keys:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}}},{"type":"null"}],"title":"BenefitID Filter","description":"Filter by benefit ID."},"description":"Filter by benefit ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_LicenseKeyRead_"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"license_keys","x-speakeasy-name-override":"list"}},"/v1/license-keys/{id}":{"get":{"tags":["license_keys","documented","featured"],"summary":"Get License Key","description":"Get a license key.","operationId":"license_keys:get","security":[{"oidc":["license_keys:read","license_keys:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyWithActivations"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"license_keys","x-speakeasy-name-override":"get"},"patch":{"tags":["license_keys","documented","featured"],"summary":"Update License Key","description":"Update a license key.","operationId":"license_keys:update","security":[{"oidc":["license_keys:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyRead"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"license_keys","x-speakeasy-name-override":"update"}},"/v1/license-keys/{id}/activations/{activation_id}":{"get":{"tags":["license_keys","documented","featured"],"summary":"Get Activation","description":"Get a license key activation.","operationId":"license_keys:get_activation","security":[{"oidc":["license_keys:read","license_keys:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}},{"name":"activation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Activation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyActivationRead"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"license_keys","x-speakeasy-name-override":"get_activation"}},"/v1/checkout-links/":{"get":{"tags":["checkout-links","documented"],"summary":"List Checkout Links","description":"List checkout links.","operationId":"checkout-links:list","security":[{"oidc":["checkout_links:read","checkout_links:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CheckoutLinkSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CheckoutLink_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"list"},"post":{"tags":["checkout-links","documented"],"summary":"Create Checkout Link","description":"Create a checkout link.","operationId":"checkout-links:create","security":[{"oidc":["checkout_links:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkCreate"}}}},"responses":{"201":{"description":"Checkout link created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"create"}},"/v1/checkout-links/{id}":{"get":{"tags":["checkout-links","documented"],"summary":"Get Checkout Link","description":"Get a checkout link by ID.","operationId":"checkout-links:get","security":[{"oidc":["checkout_links:read","checkout_links:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout link ID.","title":"Id"},"description":"The checkout link ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"404":{"description":"Checkout link not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"get"},"patch":{"tags":["checkout-links","documented"],"summary":"Update Checkout Link","description":"Update a checkout link.","operationId":"checkout-links:update","security":[{"oidc":["checkout_links:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout link ID.","title":"Id"},"description":"The checkout link ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkUpdate"}}}},"responses":{"200":{"description":"Checkout link updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"404":{"description":"Checkout link not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"update"},"delete":{"tags":["checkout-links","documented"],"summary":"Delete Checkout Link","description":"Delete a checkout link.","operationId":"checkout-links:delete","security":[{"oidc":["checkout_links:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout link ID.","title":"Id"},"description":"The checkout link ID."}],"responses":{"204":{"description":"Checkout link deleted."},"404":{"description":"Checkout link not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"delete"}},"/v1/custom-fields/":{"get":{"tags":["custom-fields","documented"],"summary":"List Custom Fields","description":"List custom fields.","operationId":"custom-fields:list","security":[{"oidc":["custom_fields:read","custom_fields:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by custom field name or slug.","title":"Query"},"description":"Filter by custom field name or slug."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldType"}},{"type":"null"}],"title":"CustomFieldType Filter","description":"Filter by custom field type."},"description":"Filter by custom field type."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["slug"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CustomField_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"list"},"post":{"tags":["custom-fields","documented"],"summary":"Create Custom Field","description":"Create a custom field.","operationId":"custom-fields:create","security":[{"oidc":["custom_fields:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldCreate"}}}},"responses":{"201":{"description":"Custom field created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField","title":"CustomField"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"create"}},"/v1/custom-fields/{id}":{"get":{"tags":["custom-fields","documented"],"summary":"Get Custom Field","description":"Get a custom field by ID.","operationId":"custom-fields:get","security":[{"oidc":["custom_fields:read","custom_fields:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The custom field ID.","title":"Id"},"description":"The custom field ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField","title":"CustomField"}}}},"404":{"description":"Custom field not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"get"},"patch":{"tags":["custom-fields","documented"],"summary":"Update Custom Field","description":"Update a custom field.","operationId":"custom-fields:update","security":[{"oidc":["custom_fields:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The custom field ID.","title":"Id"},"description":"The custom field ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldUpdate"}}}},"responses":{"200":{"description":"Custom field updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField","title":"CustomField"}}}},"404":{"description":"Custom field not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"update"},"delete":{"tags":["custom-fields","documented"],"summary":"Delete Custom Field","description":"Delete a custom field.","operationId":"custom-fields:delete","security":[{"oidc":["custom_fields:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The custom field ID.","title":"Id"},"description":"The custom field ID."}],"responses":{"204":{"description":"Custom field deleted."},"404":{"description":"Custom field not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"delete"}},"/v1/discounts/":{"get":{"tags":["discounts","featured","documented"],"summary":"List Discounts","description":"List discounts.","operationId":"discounts:list","security":[{"oidc":["discounts:read","discounts:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by name.","title":"Query"},"description":"Filter by name."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/DiscountSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Discount_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"discounts","x-speakeasy-name-override":"list"},"post":{"tags":["discounts","featured","documented"],"summary":"Create Discount","description":"Create a discount.","operationId":"discounts:create","security":[{"oidc":["discounts:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCreate"}}}},"responses":{"201":{"description":"Discount created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount","title":"Discount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"discounts","x-speakeasy-name-override":"create"}},"/v1/discounts/{id}":{"get":{"tags":["discounts","featured","documented"],"summary":"Get Discount","description":"Get a discount by ID.","operationId":"discounts:get","security":[{"oidc":["discounts:read","discounts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The discount ID.","title":"Id"},"description":"The discount ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount","title":"Discount"}}}},"404":{"description":"Discount not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"discounts","x-speakeasy-name-override":"get"},"patch":{"tags":["discounts","featured","documented"],"summary":"Update Discount","description":"Update a discount.","operationId":"discounts:update","security":[{"oidc":["discounts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The discount ID.","title":"Id"},"description":"The discount ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountUpdate"}}}},"responses":{"200":{"description":"Discount updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount","title":"Discount"}}}},"404":{"description":"Discount not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"discounts","x-speakeasy-name-override":"update"},"delete":{"tags":["discounts","featured","documented"],"summary":"Delete Discount","description":"Delete a discount.","operationId":"discounts:delete","security":[{"oidc":["discounts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The discount ID.","title":"Id"},"description":"The discount ID."}],"responses":{"204":{"description":"Discount deleted."},"404":{"description":"Discount not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"discounts","x-speakeasy-name-override":"delete"}},"/v1/customers/":{"get":{"tags":["customers","documented","featured"],"summary":"List Customers","description":"List customers.","operationId":"customers:list","security":[{"oidc":["customers:read","customers:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by name or email.","title":"Query"},"description":"Filter by name or email."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomerSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Customer_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customers","x-speakeasy-name-override":"list"},"post":{"tags":["customers","documented","featured"],"summary":"Create Customer","description":"Create a customer.","operationId":"customers:create","security":[{"oidc":["customers:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Customer created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customers","x-speakeasy-name-override":"create"}},"/v1/customers/{id}":{"get":{"tags":["customers","documented","featured"],"summary":"Get Customer","description":"Get a customer by ID.","operationId":"customers:get","security":[{"oidc":["customers:read","customers:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The customer ID.","title":"Id"},"description":"The customer ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customers","x-speakeasy-name-override":"get"},"patch":{"tags":["customers","documented","featured"],"summary":"Update Customer","description":"Update a customer.","operationId":"customers:update","security":[{"oidc":["customers:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The customer ID.","title":"Id"},"description":"The customer ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Customer updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customers","x-speakeasy-name-override":"update"},"delete":{"tags":["customers","documented","featured"],"summary":"Delete Customer","description":"Delete a customer.\n\nImmediately cancels any active subscriptions and revokes any active benefits.","operationId":"customers:delete","security":[{"oidc":["customers:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The customer ID.","title":"Id"},"description":"The customer ID."}],"responses":{"204":{"description":"Customer deleted."},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customers","x-speakeasy-name-override":"delete"}},"/v1/customer-portal/benefit-grants/":{"get":{"tags":["customer_portal","benefit-grants","documented"],"summary":"List Benefit Grants","description":"List benefits grants of the authenticated customer or user.","operationId":"customer_portal:benefit-grants:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BenefitType"},{"type":"array","items":{"$ref":"#/components/schemas/BenefitType"}},{"type":"null"}],"title":"BenefitType Filter","description":"Filter by benefit type."},"description":"Filter by benefit type."},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"BenefitID Filter","description":"Filter by benefit ID."},"description":"Filter by benefit ID."},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"checkout_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"CheckoutID Filter","description":"Filter by checkout ID."},"description":"Filter by checkout ID."},{"name":"order_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"OrderID Filter","description":"Filter by order ID."},"description":"Filter by order ID."},{"name":"subscription_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"SubscriptionID Filter","description":"Filter by subscription ID."},"description":"Filter by subscription ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomerBenefitGrantSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-granted_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CustomerBenefitGrant_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.benefit-grants","x-speakeasy-name-override":"list"}},"/v1/customer-portal/benefit-grants/{id}":{"get":{"tags":["customer_portal","benefit-grants","documented"],"summary":"Get Benefit Grant","description":"Get a benefit grant by ID for the authenticated customer or user.","operationId":"customer_portal:benefit-grants:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit grant ID.","title":"Id"},"description":"The benefit grant ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBenefitGrant","title":"CustomerBenefitGrant"}}}},"404":{"description":"Benefit grant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.benefit-grants","x-speakeasy-name-override":"get"},"patch":{"tags":["customer_portal","benefit-grants","documented"],"summary":"Update Benefit Grant","description":"Update a benefit grant for the authenticated customer or user.","operationId":"customer_portal:benefit-grants:update","security":[{"oidc":["customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit grant ID.","title":"Id"},"description":"The benefit grant ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBenefitGrantUpdate","title":"CustomerBenefitGrantUpdate"}}}},"responses":{"200":{"description":"Benefit grant updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBenefitGrant","title":"CustomerBenefitGrant"}}}},"403":{"description":"The benefit grant is revoked and cannot be updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Benefit grant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.benefit-grants","x-speakeasy-name-override":"update"}},"/v1/customer-portal/customers/{id}":{"get":{"tags":["customer_portal","customers","documented"],"summary":"Get Customer","description":"Get a customer by ID for the authenticated customer or user.","operationId":"customer_portal:customers:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The customer ID.","title":"Id"},"description":"The customer ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPortalCustomer"}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.customers","x-speakeasy-name-override":"get"}},"/v1/customer-portal/downloadables/":{"get":{"tags":["customer_portal","downloadables","documented"],"summary":"List Downloadables","operationId":"customer_portal:downloadables:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}}},{"type":"null"}],"title":"BenefitID Filter","description":"Filter by benefit ID."},"description":"Filter by benefit ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_DownloadableRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.downloadables","x-speakeasy-name-override":"list"}},"/v1/customer-portal/downloadables/{token}":{"get":{"tags":["customer_portal","downloadables","documented"],"summary":"Get Downloadable","operationId":"customer_portal:downloadables:customer_portal.downloadables.get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"Redirected to download"},"400":{"description":"Invalid signature"},"404":{"description":"Downloadable not found"},"410":{"description":"Expired signature"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.downloadables","x-speakeasy-name-override":"get"}},"/v1/customer-portal/license-keys/":{"get":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"List License Keys","operationId":"customer_portal:license_keys:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}},{"type":"null"}],"description":"Filter by a specific benefit","title":"Benefit Id"},"description":"Filter by a specific benefit"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_LicenseKeyRead_"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"list"}},"/v1/customer-portal/license-keys/{id}":{"get":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"Get License Key","description":"Get a license key.","operationId":"customer_portal:license_keys:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyWithActivations"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"get"}},"/v1/customer-portal/license-keys/validate":{"post":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"Validate License Key","description":"Validate a license key.","operationId":"customer_portal:license_keys:validate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyValidate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidatedLicenseKey"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"validate"}},"/v1/customer-portal/license-keys/activate":{"post":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"Activate License Key","description":"Activate a license key instance.","operationId":"customer_portal:license_keys:activate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyActivate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyActivationRead"}}}},"403":{"description":"License key activation not required or permitted (limit reached).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"activate"}},"/v1/customer-portal/license-keys/deactivate":{"post":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"Deactivate License Key","description":"Deactivate a license key instance.","operationId":"customer_portal:license_keys:deactivate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyDeactivate"}}},"required":true},"responses":{"204":{"description":"License key activation deactivated."},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"deactivate"}},"/v1/customer-portal/orders/":{"get":{"tags":["customer_portal","orders","documented"],"summary":"List Orders","description":"List orders of the authenticated customer or user.","operationId":"customer_portal:orders:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"product_price_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ProductPriceType"},{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceType"}},{"type":"null"}],"title":"ProductPriceType Filter","description":"Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases."},"description":"Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases."},{"name":"subscription_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"SubscriptionID Filter","description":"Filter by subscription ID."},"description":"Filter by subscription ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by product or organization name.","title":"Query"},"description":"Search by product or organization name."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomerOrderSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CustomerOrder_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.orders","x-speakeasy-name-override":"list"}},"/v1/customer-portal/orders/{id}":{"get":{"tags":["customer_portal","orders","documented"],"summary":"Get Order","description":"Get an order by ID for the authenticated customer or user.","operationId":"customer_portal:orders:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The order ID.","title":"Id"},"description":"The order ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOrder"}}}},"404":{"description":"Order not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.orders","x-speakeasy-name-override":"get"}},"/v1/customer-portal/orders/{id}/invoice":{"get":{"tags":["customer_portal","orders","documented"],"summary":"Get Order Invoice","description":"Get an order's invoice data.","operationId":"customer_portal:orders:invoice","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The order ID.","title":"Id"},"description":"The order ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOrderInvoice"}}}},"404":{"description":"Order not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.orders","x-speakeasy-name-override":"invoice"}},"/v1/customer-portal/organizations/{slug}":{"get":{"tags":["customer_portal","organizations","documented"],"summary":"Get Organization","description":"Get a customer portal's organization by slug.","operationId":"customer_portal:organizations:get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","description":"The organization slug.","title":"Slug"},"description":"The organization slug."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"404":{"description":"Organization not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.organizations","x-speakeasy-name-override":"get"}},"/v1/customer-portal/subscriptions/":{"get":{"tags":["customer_portal","subscriptions","documented","featured"],"summary":"List Subscriptions","description":"List subscriptions of the authenticated customer or user.","operationId":"customer_portal:subscriptions:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active or cancelled subscription.","title":"Active"},"description":"Filter by active or cancelled subscription."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by product or organization name.","title":"Query"},"description":"Search by product or organization name."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomerSubscriptionSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-started_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CustomerSubscription_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.subscriptions","x-speakeasy-name-override":"list"}},"/v1/customer-portal/subscriptions/{id}":{"get":{"tags":["customer_portal","subscriptions","documented","featured"],"summary":"Get Subscription","description":"Get a subscription for the authenticated customer or user.","operationId":"customer_portal:subscriptions:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The subscription ID.","title":"Id"},"description":"The subscription ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSubscription"}}}},"404":{"description":"Subscription not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.subscriptions","x-speakeasy-name-override":"get"},"patch":{"tags":["customer_portal","subscriptions","documented","featured"],"summary":"Update Subscription","description":"Update a subscription of the authenticated customer or user.","operationId":"customer_portal:subscriptions:update","security":[{"oidc":["customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The subscription ID.","title":"Id"},"description":"The subscription ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSubscriptionUpdate"}}}},"responses":{"200":{"description":"Subscription updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSubscription"}}}},"404":{"description":"Subscription not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.subscriptions","x-speakeasy-name-override":"update"},"delete":{"tags":["customer_portal","subscriptions","documented","featured"],"summary":"Cancel Subscription","description":"Cancel a subscription of the authenticated customer or user.","operationId":"customer_portal:subscriptions:cancel","security":[{"oidc":["customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The subscription ID.","title":"Id"},"description":"The subscription ID."}],"responses":{"200":{"description":"Subscription canceled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSubscription"}}}},"403":{"description":"This subscription is already canceled or will be at the end of the period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlreadyCanceledSubscription"}}}},"404":{"description":"Subscription not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.subscriptions","x-speakeasy-name-override":"cancel"}},"/v1/customer-sessions/":{"post":{"tags":["customer-sessions","documented","featured"],"summary":"Create Customer Session","description":"Create a customer session.","operationId":"customer-sessions:create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSessionCreate"}}},"required":true},"responses":{"201":{"description":"Customer session created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"oidc":["customer_sessions:write"]},{"pat":[]}],"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customer-sessions","x-speakeasy-name-override":"create"}}},"webhooks":{"checkout.created":{"post":{"summary":"checkout.created","description":"Sent when a new checkout is created.\n\n**Discord & Slack support:** Basic","operationId":"_endpointcheckout_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCheckoutCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"checkout.updated":{"post":{"summary":"checkout.updated","description":"Sent when a checkout is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointcheckout_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCheckoutUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"order.created":{"post":{"summary":"order.created","description":"Sent when a new order is created.\n\n**Discord & Slack support:** Full","operationId":"_endpointorder_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOrderCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.created":{"post":{"summary":"subscription.created","description":"Sent when a new subscription is created.\n\n**Discord & Slack support:** Full","operationId":"_endpointsubscription_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.updated":{"post":{"summary":"subscription.updated","description":"Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord & Slack support:** On cancellation and revocation. Renewals are skipped.","operationId":"_endpointsubscription_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.active":{"post":{"summary":"subscription.active","description":"Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord & Slack support:** Full","operationId":"_endpointsubscription_active_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionActivePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.canceled":{"post":{"summary":"subscription.canceled","description":"Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord & Slack support:** Full","operationId":"_endpointsubscription_canceled_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionCanceledPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.revoked":{"post":{"summary":"subscription.revoked","description":"Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord & Slack support:** Full","operationId":"_endpointsubscription_revoked_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRevokedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"product.created":{"post":{"summary":"product.created","description":"Sent when a new product is created.\n\n**Discord & Slack support:** Basic","operationId":"_endpointproduct_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookProductCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"product.updated":{"post":{"summary":"product.updated","description":"Sent when a product is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointproduct_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookProductUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"pledge.created":{"post":{"summary":"pledge.created","description":"Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord & Slack support:** Full","operationId":"_endpointpledge_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPledgeCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"pledge.updated":{"post":{"summary":"pledge.updated","description":"Sent when a pledge is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointpledge_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPledgeUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"organization.updated":{"post":{"summary":"organization.updated","description":"Sent when a organization is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointorganization_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOrganizationUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit.created":{"post":{"summary":"benefit.created","description":"Sent when a new benefit is created.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit.updated":{"post":{"summary":"benefit.updated","description":"Sent when a benefit is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit_grant.created":{"post":{"summary":"benefit_grant.created","description":"Sent when a new benefit grant is created.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_grant_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitGrantCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit_grant.updated":{"post":{"summary":"benefit_grant.updated","description":"Sent when a new benefit grant is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_grant_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitGrantUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit_grant.revoked":{"post":{"summary":"benefit_grant.revoked","description":"Sent when a new benefit grant is revoked.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_grant_revoked_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitGrantRevokedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Address":{"properties":{"line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line2"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"type":"string","pattern":"^\\w{2}$","title":"Country"}},"type":"object","required":["country"],"title":"Address"},"AdvertisementCampaign":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id"},"image_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Image Url"},"image_url_dark":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Image Url Dark"},"text":{"type":"string","title":"Text"},"link_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Link Url"}},"type":"object","required":["created_at","modified_at","id","image_url","image_url_dark","text","link_url"],"title":"AdvertisementCampaign"},"AdvertisementCampaignListResource":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdvertisementCampaign"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"},"dimensions":{"prefixItems":[{"type":"integer"},{"type":"integer"}],"items":{"type":"integer"},"type":"array","maxItems":2,"minItems":2,"title":"Dimensions","description":"The dimensions (width, height) in pixels of the advertisement images."}},"type":"object","required":["items","pagination","dimensions"],"title":"AdvertisementCampaignListResource"},"AdvertisementSortProperty":{"type":"string","enum":["created_at","-created_at","granted_at","-granted_at","views","-views","clicks","-clicks"],"title":"AdvertisementSortProperty"},"AlreadyCanceledSubscription":{"properties":{"error":{"type":"string","enum":["AlreadyCanceledSubscription"],"const":"AlreadyCanceledSubscription","title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"AlreadyCanceledSubscription"},"Assignee":{"properties":{"id":{"type":"integer","title":"Id"},"login":{"type":"string","title":"Login"},"html_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Html Url"},"avatar_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Avatar Url"}},"type":"object","required":["id","login","html_url","avatar_url"],"title":"Assignee"},"AttachedCustomField":{"properties":{"custom_field_id":{"type":"string","format":"uuid4","title":"Custom Field Id","description":"ID of the custom field."},"custom_field":{"$ref":"#/components/schemas/CustomField","title":"CustomField"},"order":{"type":"integer","title":"Order","description":"Order of the custom field in the resource."},"required":{"type":"boolean","title":"Required","description":"Whether the value is required for this custom field."}},"type":"object","required":["custom_field_id","custom_field","order","required"],"title":"AttachedCustomField","description":"Schema of a custom field attached to a resource."},"AttachedCustomFieldCreate":{"properties":{"custom_field_id":{"type":"string","format":"uuid4","title":"Custom Field Id","description":"ID of the custom field to attach."},"required":{"type":"boolean","title":"Required","description":"Whether the value is required for this custom field."}},"type":"object","required":["custom_field_id","required"],"title":"AttachedCustomFieldCreate","description":"Schema to attach a custom field to a resource."},"Author":{"properties":{"id":{"type":"integer","title":"Id"},"login":{"type":"string","title":"Login"},"html_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Html Url"},"avatar_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Avatar Url"}},"type":"object","required":["id","login","html_url","avatar_url"],"title":"Author"},"AuthorizeOrganization":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"slug":{"type":"string","title":"Slug"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","slug","avatar_url"],"title":"AuthorizeOrganization"},"AuthorizeResponseOrganization":{"properties":{"client":{"$ref":"#/components/schemas/OAuth2ClientPublic"},"sub_type":{"type":"string","enum":["organization"],"const":"organization","title":"Sub Type"},"sub":{"anyOf":[{"$ref":"#/components/schemas/AuthorizeOrganization"},{"type":"null"}]},"scopes":{"items":{"$ref":"#/components/schemas/Scope"},"type":"array","title":"Scopes"},"organizations":{"items":{"$ref":"#/components/schemas/AuthorizeOrganization"},"type":"array","title":"Organizations"}},"type":"object","required":["client","sub_type","sub","scopes","organizations"],"title":"AuthorizeResponseOrganization"},"AuthorizeResponseUser":{"properties":{"client":{"$ref":"#/components/schemas/OAuth2ClientPublic"},"sub_type":{"type":"string","enum":["user"],"const":"user","title":"Sub Type"},"sub":{"anyOf":[{"$ref":"#/components/schemas/AuthorizeUser"},{"type":"null"}]},"scopes":{"items":{"$ref":"#/components/schemas/Scope"},"type":"array","title":"Scopes"}},"type":"object","required":["client","sub_type","sub","scopes"],"title":"AuthorizeResponseUser"},"AuthorizeUser":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","email","avatar_url"],"title":"AuthorizeUser"},"Benefit":{"anyOf":[{"$ref":"#/components/schemas/BenefitAds"},{"$ref":"#/components/schemas/BenefitCustom"},{"$ref":"#/components/schemas/BenefitDiscord"},{"$ref":"#/components/schemas/BenefitGitHubRepository"},{"$ref":"#/components/schemas/BenefitDownloadables"},{"$ref":"#/components/schemas/BenefitLicenseKeys"}]},"BenefitAds":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["ads"],"const":"ads","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitAdsProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitAds","description":"A benefit of type `ads`.\n\nUse it so your backers can display ads on your README, website, etc."},"BenefitAdsCreate":{"properties":{"type":{"type":"string","enum":["ads"],"const":"ads","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitAdsProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitAdsCreate"},"BenefitAdsProperties":{"properties":{"image_height":{"type":"integer","title":"Image Height","description":"The height of the displayed ad.","default":400},"image_width":{"type":"integer","title":"Image Width","description":"The width of the displayed ad.","default":400}},"type":"object","title":"BenefitAdsProperties","description":"Properties for a benefit of type `ads`."},"BenefitAdsSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["ads"],"const":"ads","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitAdsProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitAdsSubscriber"},"BenefitAdsUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["ads"],"const":"ads","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitAdsProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitAdsUpdate"},"BenefitBase":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"$ref":"#/components/schemas/BenefitType","description":"The type of the benefit."},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id"],"title":"BenefitBase"},"BenefitCreate":{"oneOf":[{"$ref":"#/components/schemas/BenefitCustomCreate"},{"$ref":"#/components/schemas/BenefitAdsCreate"},{"$ref":"#/components/schemas/BenefitDiscordCreate"},{"$ref":"#/components/schemas/BenefitGitHubRepositoryCreate"},{"$ref":"#/components/schemas/BenefitDownloadablesCreate"},{"$ref":"#/components/schemas/BenefitLicenseKeysCreate"}],"discriminator":{"propertyName":"type","mapping":{"ads":"#/components/schemas/BenefitAdsCreate","custom":"#/components/schemas/BenefitCustomCreate","discord":"#/components/schemas/BenefitDiscordCreate","downloadables":"#/components/schemas/BenefitDownloadablesCreate","github_repository":"#/components/schemas/BenefitGitHubRepositoryCreate","license_keys":"#/components/schemas/BenefitLicenseKeysCreate"}}},"BenefitCustom":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["custom"],"const":"custom","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitCustomProperties"},"is_tax_applicable":{"type":"boolean","title":"Is Tax Applicable","deprecated":true}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties","is_tax_applicable"],"title":"BenefitCustom","description":"A benefit of type `custom`.\n\nUse it to grant any kind of benefit that doesn't fit in the other types."},"BenefitCustomCreate":{"properties":{"type":{"type":"string","enum":["custom"],"const":"custom","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitCustomCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitCustomCreate","description":"Schema to create a benefit of type `custom`."},"BenefitCustomCreateProperties":{"properties":{"note":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private note to be shared with customers who have this benefit granted."},{"type":"null"}],"title":"Note"}},"type":"object","title":"BenefitCustomCreateProperties","description":"Properties for creating a benefit of type `custom`."},"BenefitCustomProperties":{"properties":{"note":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private note to be shared with customers who have this benefit granted."},{"type":"null"}],"title":"Note"}},"type":"object","required":["note"],"title":"BenefitCustomProperties","description":"Properties for a benefit of type `custom`."},"BenefitCustomSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["custom"],"const":"custom","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitCustomSubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitCustomSubscriber"},"BenefitCustomSubscriberProperties":{"properties":{"note":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private note to be shared with customers who have this benefit granted."},{"type":"null"}],"title":"Note"}},"type":"object","required":["note"],"title":"BenefitCustomSubscriberProperties","description":"Properties available to subscribers for a benefit of type `custom`."},"BenefitCustomUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["custom"],"const":"custom","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitCustomProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitCustomUpdate"},"BenefitDiscord":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["discord"],"const":"discord","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitDiscordProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitDiscord","description":"A benefit of type `discord`.\n\nUse it to automatically invite your backers to a Discord server."},"BenefitDiscordCreate":{"properties":{"type":{"type":"string","enum":["discord"],"const":"discord","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitDiscordCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitDiscordCreate"},"BenefitDiscordCreateProperties":{"properties":{"guild_token":{"type":"string","title":"Guild Token"},"role_id":{"type":"string","title":"Role Id","description":"The ID of the Discord role to grant."}},"type":"object","required":["guild_token","role_id"],"title":"BenefitDiscordCreateProperties","description":"Properties to create a benefit of type `discord`."},"BenefitDiscordProperties":{"properties":{"guild_id":{"type":"string","title":"Guild Id","description":"The ID of the Discord server."},"role_id":{"type":"string","title":"Role Id","description":"The ID of the Discord role to grant."},"guild_token":{"type":"string","title":"Guild Token","readOnly":true}},"type":"object","required":["guild_id","role_id","guild_token"],"title":"BenefitDiscordProperties","description":"Properties for a benefit of type `discord`."},"BenefitDiscordSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["discord"],"const":"discord","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitDiscordSubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitDiscordSubscriber"},"BenefitDiscordSubscriberProperties":{"properties":{"guild_id":{"type":"string","title":"Guild Id","description":"The ID of the Discord server."}},"type":"object","required":["guild_id"],"title":"BenefitDiscordSubscriberProperties","description":"Properties available to subscribers for a benefit of type `discord`."},"BenefitDiscordUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["discord"],"const":"discord","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitDiscordCreateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitDiscordUpdate"},"BenefitDownloadables":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitDownloadablesProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitDownloadables"},"BenefitDownloadablesCreate":{"properties":{"type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitDownloadablesCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitDownloadablesCreate"},"BenefitDownloadablesCreateProperties":{"properties":{"archived":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Archived","default":{}},"files":{"items":{"type":"string","format":"uuid4"},"type":"array","minItems":1,"title":"Files"}},"type":"object","required":["files"],"title":"BenefitDownloadablesCreateProperties"},"BenefitDownloadablesProperties":{"properties":{"archived":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Archived"},"files":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Files"}},"type":"object","required":["archived","files"],"title":"BenefitDownloadablesProperties"},"BenefitDownloadablesSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitDownloadablesSubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitDownloadablesSubscriber"},"BenefitDownloadablesSubscriberProperties":{"properties":{"active_files":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Active Files"}},"type":"object","required":["active_files"],"title":"BenefitDownloadablesSubscriberProperties"},"BenefitDownloadablesUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitDownloadablesCreateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitDownloadablesUpdate"},"BenefitGitHubRepository":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitGitHubRepositoryProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitGitHubRepository","description":"A benefit of type `github_repository`.\n\nUse it to automatically invite your backers to a private GitHub repository."},"BenefitGitHubRepositoryCreate":{"properties":{"type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitGitHubRepositoryCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitGitHubRepositoryCreate"},"BenefitGitHubRepositoryCreateProperties":{"properties":{"repository_owner":{"type":"string","title":"Repository Owner","description":"The owner of the repository.","examples":["polarsource"]},"repository_name":{"type":"string","title":"Repository Name","description":"The name of the repository.","examples":["private_repo"]},"permission":{"type":"string","enum":["pull","triage","push","maintain","admin"],"title":"Permission","description":"The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)."}},"type":"object","required":["repository_owner","repository_name","permission"],"title":"BenefitGitHubRepositoryCreateProperties","description":"Properties to create a benefit of type `github_repository`."},"BenefitGitHubRepositoryProperties":{"properties":{"repository_owner":{"type":"string","title":"Repository Owner","description":"The owner of the repository.","examples":["polarsource"]},"repository_name":{"type":"string","title":"Repository Name","description":"The name of the repository.","examples":["private_repo"]},"permission":{"type":"string","enum":["pull","triage","push","maintain","admin"],"title":"Permission","description":"The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)."},"repository_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Repository Id","deprecated":true}},"type":"object","required":["repository_owner","repository_name","permission"],"title":"BenefitGitHubRepositoryProperties","description":"Properties for a benefit of type `github_repository`."},"BenefitGitHubRepositorySubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitGitHubRepositorySubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitGitHubRepositorySubscriber"},"BenefitGitHubRepositorySubscriberProperties":{"properties":{"repository_owner":{"type":"string","title":"Repository Owner","description":"The owner of the repository.","examples":["polarsource"]},"repository_name":{"type":"string","title":"Repository Name","description":"The name of the repository.","examples":["private_repo"]}},"type":"object","required":["repository_owner","repository_name"],"title":"BenefitGitHubRepositorySubscriberProperties","description":"Properties available to subscribers for a benefit of type `github_repository`."},"BenefitGitHubRepositoryUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitGitHubRepositoryCreateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitGitHubRepositoryUpdate"},"BenefitGrant":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the grant."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At","description":"The timestamp when the benefit was granted. If `None`, the benefit is not granted."},"is_granted":{"type":"boolean","title":"Is Granted","description":"Whether the benefit is granted."},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At","description":"The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."},"is_revoked":{"type":"boolean","title":"Is Revoked","description":"Whether the benefit is revoked."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"The ID of the subscription that granted this benefit."},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id","description":"The ID of the order that granted this benefit."},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id","description":"The ID of the customer concerned by this grant."},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The ID of the benefit concerned by this grant."},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitGrantDiscordProperties"},{"$ref":"#/components/schemas/BenefitGrantGitHubRepositoryProperties"},{"$ref":"#/components/schemas/BenefitGrantDownloadablesProperties"},{"$ref":"#/components/schemas/BenefitGrantLicenseKeysProperties"},{"$ref":"#/components/schemas/BenefitGrantAdsProperties"},{"$ref":"#/components/schemas/BenefitGrantCustomProperties"}],"title":"Properties"}},"type":"object","required":["created_at","modified_at","id","is_granted","is_revoked","subscription_id","order_id","customer_id","user_id","benefit_id","properties"],"title":"BenefitGrant"},"BenefitGrantAdsProperties":{"properties":{"advertisement_campaign_id":{"type":"string","title":"Advertisement Campaign Id"}},"type":"object","required":["advertisement_campaign_id"],"title":"BenefitGrantAdsProperties"},"BenefitGrantCustomProperties":{"properties":{},"type":"object","title":"BenefitGrantCustomProperties"},"BenefitGrantDiscordProperties":{"properties":{"account_id":{"type":"string","title":"Account Id"},"guild_id":{"type":"string","title":"Guild Id"},"role_id":{"type":"string","title":"Role Id"}},"type":"object","title":"BenefitGrantDiscordProperties"},"BenefitGrantDownloadablesProperties":{"properties":{"files":{"items":{"type":"string"},"type":"array","title":"Files"}},"type":"object","title":"BenefitGrantDownloadablesProperties"},"BenefitGrantGitHubRepositoryProperties":{"properties":{"account_id":{"type":"string","title":"Account Id"},"repository_owner":{"type":"string","title":"Repository Owner"},"repository_name":{"type":"string","title":"Repository Name"},"permission":{"type":"string","enum":["pull","triage","push","maintain","admin"],"title":"Permission"}},"type":"object","title":"BenefitGrantGitHubRepositoryProperties"},"BenefitGrantLicenseKeysProperties":{"properties":{"license_key_id":{"type":"string","title":"License Key Id"},"display_key":{"type":"string","title":"Display Key"}},"type":"object","title":"BenefitGrantLicenseKeysProperties"},"BenefitGrantWebhook":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the grant."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At","description":"The timestamp when the benefit was granted. If `None`, the benefit is not granted."},"is_granted":{"type":"boolean","title":"Is Granted","description":"Whether the benefit is granted."},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At","description":"The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."},"is_revoked":{"type":"boolean","title":"Is Revoked","description":"Whether the benefit is revoked."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"The ID of the subscription that granted this benefit."},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id","description":"The ID of the order that granted this benefit."},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id","description":"The ID of the customer concerned by this grant."},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The ID of the benefit concerned by this grant."},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitGrantDiscordProperties"},{"$ref":"#/components/schemas/BenefitGrantGitHubRepositoryProperties"},{"$ref":"#/components/schemas/BenefitGrantDownloadablesProperties"},{"$ref":"#/components/schemas/BenefitGrantLicenseKeysProperties"},{"$ref":"#/components/schemas/BenefitGrantAdsProperties"},{"$ref":"#/components/schemas/BenefitGrantCustomProperties"}],"title":"Properties"},"benefit":{"$ref":"#/components/schemas/Benefit","title":"Benefit"},"previous_properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitGrantDiscordProperties"},{"$ref":"#/components/schemas/BenefitGrantGitHubRepositoryProperties"},{"$ref":"#/components/schemas/BenefitGrantDownloadablesProperties"},{"$ref":"#/components/schemas/BenefitGrantLicenseKeysProperties"},{"$ref":"#/components/schemas/BenefitGrantAdsProperties"},{"$ref":"#/components/schemas/BenefitGrantCustomProperties"},{"type":"null"}],"title":"Previous Properties"}},"type":"object","required":["created_at","modified_at","id","is_granted","is_revoked","subscription_id","order_id","customer_id","user_id","benefit_id","properties","benefit"],"title":"BenefitGrantWebhook"},"BenefitLicenseKeyActivationProperties":{"properties":{"limit":{"type":"integer","maximum":50.0,"exclusiveMinimum":0.0,"title":"Limit"},"enable_customer_admin":{"type":"boolean","title":"Enable Customer Admin"}},"type":"object","required":["limit","enable_customer_admin"],"title":"BenefitLicenseKeyActivationProperties"},"BenefitLicenseKeyExpirationProperties":{"properties":{"ttl":{"type":"integer","exclusiveMinimum":0.0,"title":"Ttl"},"timeframe":{"type":"string","enum":["year","month","day"],"title":"Timeframe"}},"type":"object","required":["ttl","timeframe"],"title":"BenefitLicenseKeyExpirationProperties"},"BenefitLicenseKeys":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitLicenseKeysProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitLicenseKeys"},"BenefitLicenseKeysCreate":{"properties":{"type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitLicenseKeysCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitLicenseKeysCreate"},"BenefitLicenseKeysCreateProperties":{"properties":{"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"expires":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyExpirationProperties"},{"type":"null"}]},"activations":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyActivationProperties"},{"type":"null"}]},"limit_usage":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Limit Usage"}},"type":"object","title":"BenefitLicenseKeysCreateProperties"},"BenefitLicenseKeysProperties":{"properties":{"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"expires":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyExpirationProperties"},{"type":"null"}]},"activations":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyActivationProperties"},{"type":"null"}]},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"}},"type":"object","required":["prefix","expires","activations","limit_usage"],"title":"BenefitLicenseKeysProperties"},"BenefitLicenseKeysSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitLicenseKeysSubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitLicenseKeysSubscriber"},"BenefitLicenseKeysSubscriberProperties":{"properties":{"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"expires":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyExpirationProperties"},{"type":"null"}]},"activations":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyActivationProperties"},{"type":"null"}]},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"}},"type":"object","required":["prefix","expires","activations","limit_usage"],"title":"BenefitLicenseKeysSubscriberProperties"},"BenefitLicenseKeysUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeysCreateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitLicenseKeysUpdate"},"BenefitType":{"type":"string","enum":["custom","ads","discord","github_repository","downloadables","license_keys"],"title":"BenefitType"},"Checkout":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"$ref":"#/components/schemas/PaymentProcessor","description":"Payment processor used."},"status":{"$ref":"#/components/schemas/CheckoutStatus","description":"Status of the checkout session."},"client_secret":{"type":"string","title":"Client Secret","description":"Client secret used to update and complete the checkout session from the client."},"url":{"type":"string","title":"Url","description":"URL where the customer can access the checkout session."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Expiration date and time of the checkout session."},"success_url":{"type":"string","title":"Success Url","description":"URL where the customer will be redirected after a successful payment."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"tax_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Amount","description":"Computed tax amount to pay in cents."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"Currency code of the checkout session."},"subtotal_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subtotal Amount","description":"Subtotal amount in cents, including discounts and before tax."},"total_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Amount","description":"Total amount to pay in cents, including discounts and after tax."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount applied to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"is_discount_applicable":{"type":"boolean","title":"Is Discount Applicable","description":"Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable."},"is_free_product_price":{"type":"boolean","title":"Is Free Product Price","description":"Whether the product price is free, regardless of discounts."},"is_payment_required":{"type":"boolean","title":"Is Payment Required","description":"Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount."},"is_payment_setup_required":{"type":"boolean","title":"Is Payment Setup Required","description":"Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles."},"is_payment_form_required":{"type":"boolean","title":"Is Payment Form Required","description":"Whether the checkout requires a payment form, whether because of a payment or payment method setup."},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"payment_processor_metadata":{"type":"object","title":"Payment Processor Metadata"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"product":{"$ref":"#/components/schemas/CheckoutProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountFixedRepeatDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageRepeatDuration"}]},{"type":"null"}],"title":"Discount"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomField"},"type":"array","title":"Attached Custom Fields"},"customer_metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Customer Metadata"}},"type":"object","required":["created_at","modified_at","id","payment_processor","status","client_secret","url","expires_at","success_url","embed_origin","amount","tax_amount","currency","subtotal_amount","total_amount","product_id","product_price_id","discount_id","allow_discount_codes","is_discount_applicable","is_free_product_price","is_payment_required","is_payment_setup_required","is_payment_form_required","customer_id","customer_name","customer_email","customer_ip_address","customer_billing_address","customer_tax_id","payment_processor_metadata","metadata","product","product_price","discount","subscription_id","attached_custom_fields","customer_metadata"],"title":"Checkout","description":"Checkout session data retrieved using an access token."},"CheckoutConfirmStripe":{"properties":{"custom_field_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Custom Field Data","description":"Key-value object storing custom field values."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id","description":"ID of the product price to checkout. Must correspond to a price linked to the same product."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"discount_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Code","description":"Discount code to apply to the checkout."},"confirmation_token_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation Token Id","description":"ID of the Stripe confirmation token. Required for fixed prices and custom prices."}},"type":"object","title":"CheckoutConfirmStripe","description":"Confirm a checkout session using a Stripe confirmation token."},"CheckoutCreate":{"anyOf":[{"$ref":"#/components/schemas/CheckoutProductCreate"},{"$ref":"#/components/schemas/CheckoutPriceCreate"}]},"CheckoutDiscountFixedOnceForeverDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["duration","type","amount","currency","id","name","code"],"title":"CheckoutDiscountFixedOnceForeverDuration","description":"Schema for a fixed amount discount that is applied once or forever."},"CheckoutDiscountFixedRepeatDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["duration","duration_in_months","type","amount","currency","id","name","code"],"title":"CheckoutDiscountFixedRepeatDuration","description":"Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months."},"CheckoutDiscountPercentageOnceForeverDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["duration","type","basis_points","id","name","code"],"title":"CheckoutDiscountPercentageOnceForeverDuration","description":"Schema for a percentage discount that is applied once or forever."},"CheckoutDiscountPercentageRepeatDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["duration","duration_in_months","type","basis_points","id","name","code"],"title":"CheckoutDiscountPercentageRepeatDuration","description":"Schema for a percentage discount that is applied on every invoice\nfor a certain number of months."},"CheckoutLegacy":{"properties":{"id":{"type":"string","title":"Id","description":"The ID of the checkout."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"URL the customer should be redirected to complete the purchase."},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"product":{"$ref":"#/components/schemas/CheckoutProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"}},"type":"object","required":["id","customer_email","customer_name","product","product_price"],"title":"CheckoutLegacy","description":"A checkout session."},"CheckoutLegacyCreate":{"properties":{"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to subscribe to."},"success_url":{"type":"string","minLength":1,"format":"uri","title":"Success Url","description":"URL where the customer will be redirected after a successful subscription. You can add the `session_id={CHECKOUT_SESSION_ID}` query parameter to retrieve the checkout session id."},"customer_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Customer Email","description":"If you already know the email of your customer, you can set it. It'll be pre-filled on the checkout page."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"ID of the subscription to update. If not provided, a new subscription will be created."}},"type":"object","required":["product_price_id","success_url"],"title":"CheckoutLegacyCreate"},"CheckoutLink":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"payment_processor":{"$ref":"#/components/schemas/PaymentProcessor","description":"Payment processor used."},"client_secret":{"type":"string","title":"Client Secret","description":"Client secret used to access the checkout link."},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Optional label to distinguish links internally"},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id","description":"ID of the product price to checkout. First available price will be selected unless an explicit price ID is set."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."},"product":{"$ref":"#/components/schemas/CheckoutLinkProduct"},"product_price":{"anyOf":[{"$ref":"#/components/schemas/ProductPrice"},{"type":"null"}]},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountFixedRepeatDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDurationBase"}],"title":"CheckoutLinkDiscount"},{"type":"null"}],"title":"Discount"},"url":{"type":"string","title":"Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","payment_processor","client_secret","success_url","label","allow_discount_codes","product_id","product_price_id","discount_id","product","product_price","discount","url"],"title":"CheckoutLink","description":"Checkout link data."},"CheckoutLinkCreate":{"anyOf":[{"$ref":"#/components/schemas/CheckoutLinkProductCreate"},{"$ref":"#/components/schemas/CheckoutLinkPriceCreate"}]},"CheckoutLinkPriceCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"payment_processor":{"type":"string","enum":["stripe"],"const":"stripe","title":"Payment Processor","description":"Payment processor to use. Currently only Stripe is supported."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Optional label to distinguish links internally"},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.","default":true},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."}},"type":"object","required":["payment_processor","product_price_id"],"title":"CheckoutLinkPriceCreate"},"CheckoutLinkProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/BenefitBase"},"type":"array","title":"BenefitPublic","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","prices","benefits","medias"],"title":"CheckoutLinkProduct","description":"Product data for a checkout link."},"CheckoutLinkProductCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"payment_processor":{"type":"string","enum":["stripe"],"const":"stripe","title":"Payment Processor","description":"Payment processor to use. Currently only Stripe is supported."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Optional label to distinguish links internally"},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.","default":true},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout. First available price will be selected."}},"type":"object","required":["payment_processor","product_id"],"title":"CheckoutLinkProductCreate"},"CheckoutLinkSortProperty":{"type":"string","enum":["created_at","-created_at"],"title":"CheckoutLinkSortProperty"},"CheckoutLinkUpdate":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"allow_discount_codes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."}},"type":"object","title":"CheckoutLinkUpdate","description":"Schema to update an existing checkout link."},"CheckoutPriceCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"type":"string","enum":["stripe"],"const":"stripe","title":"Payment Processor","description":"Payment processor to use. Currently only Stripe is supported."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.","default":true},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id","description":"ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer."},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"customer_metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Customer Metadata","description":"Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."}},"type":"object","required":["payment_processor","product_price_id"],"title":"CheckoutPriceCreate","description":"Create a new checkout session from a product price.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription."},"CheckoutProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/BenefitBase"},"type":"array","title":"BenefitPublic","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","prices","benefits","medias"],"title":"CheckoutProduct","description":"Product data for a checkout session."},"CheckoutProductCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"type":"string","enum":["stripe"],"const":"stripe","title":"Payment Processor","description":"Payment processor to use. Currently only Stripe is supported."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.","default":true},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id","description":"ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer."},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"customer_metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Customer Metadata","description":"Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout. First available price will be selected."}},"type":"object","required":["payment_processor","product_id"],"title":"CheckoutProductCreate","description":"Create a new checkout session from a product.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription."},"CheckoutPublic":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"$ref":"#/components/schemas/PaymentProcessor","description":"Payment processor used."},"status":{"$ref":"#/components/schemas/CheckoutStatus","description":"Status of the checkout session."},"client_secret":{"type":"string","title":"Client Secret","description":"Client secret used to update and complete the checkout session from the client."},"url":{"type":"string","title":"Url","description":"URL where the customer can access the checkout session."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Expiration date and time of the checkout session."},"success_url":{"type":"string","title":"Success Url","description":"URL where the customer will be redirected after a successful payment."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"tax_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Amount","description":"Computed tax amount to pay in cents."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"Currency code of the checkout session."},"subtotal_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subtotal Amount","description":"Subtotal amount in cents, including discounts and before tax."},"total_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Amount","description":"Total amount to pay in cents, including discounts and after tax."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount applied to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"is_discount_applicable":{"type":"boolean","title":"Is Discount Applicable","description":"Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable."},"is_free_product_price":{"type":"boolean","title":"Is Free Product Price","description":"Whether the product price is free, regardless of discounts."},"is_payment_required":{"type":"boolean","title":"Is Payment Required","description":"Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount."},"is_payment_setup_required":{"type":"boolean","title":"Is Payment Setup Required","description":"Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles."},"is_payment_form_required":{"type":"boolean","title":"Is Payment Form Required","description":"Whether the checkout requires a payment form, whether because of a payment or payment method setup."},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"payment_processor_metadata":{"type":"object","title":"Payment Processor Metadata"},"product":{"$ref":"#/components/schemas/CheckoutProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountFixedRepeatDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageRepeatDuration"}]},{"type":"null"}],"title":"Discount"},"organization":{"$ref":"#/components/schemas/Organization"},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomField"},"type":"array","title":"Attached Custom Fields"}},"type":"object","required":["created_at","modified_at","id","payment_processor","status","client_secret","url","expires_at","success_url","embed_origin","amount","tax_amount","currency","subtotal_amount","total_amount","product_id","product_price_id","discount_id","allow_discount_codes","is_discount_applicable","is_free_product_price","is_payment_required","is_payment_setup_required","is_payment_form_required","customer_id","customer_name","customer_email","customer_ip_address","customer_billing_address","customer_tax_id","payment_processor_metadata","product","product_price","discount","organization","attached_custom_fields"],"title":"CheckoutPublic","description":"Checkout session data retrieved using the client secret."},"CheckoutPublicConfirmed":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"$ref":"#/components/schemas/PaymentProcessor","description":"Payment processor used."},"status":{"type":"string","enum":["confirmed"],"const":"confirmed","title":"Status"},"client_secret":{"type":"string","title":"Client Secret","description":"Client secret used to update and complete the checkout session from the client."},"url":{"type":"string","title":"Url","description":"URL where the customer can access the checkout session."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Expiration date and time of the checkout session."},"success_url":{"type":"string","title":"Success Url","description":"URL where the customer will be redirected after a successful payment."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"tax_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Amount","description":"Computed tax amount to pay in cents."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"Currency code of the checkout session."},"subtotal_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subtotal Amount","description":"Subtotal amount in cents, including discounts and before tax."},"total_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Amount","description":"Total amount to pay in cents, including discounts and after tax."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount applied to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"is_discount_applicable":{"type":"boolean","title":"Is Discount Applicable","description":"Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable."},"is_free_product_price":{"type":"boolean","title":"Is Free Product Price","description":"Whether the product price is free, regardless of discounts."},"is_payment_required":{"type":"boolean","title":"Is Payment Required","description":"Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount."},"is_payment_setup_required":{"type":"boolean","title":"Is Payment Setup Required","description":"Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles."},"is_payment_form_required":{"type":"boolean","title":"Is Payment Form Required","description":"Whether the checkout requires a payment form, whether because of a payment or payment method setup."},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"payment_processor_metadata":{"type":"object","title":"Payment Processor Metadata"},"product":{"$ref":"#/components/schemas/CheckoutProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountFixedRepeatDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageRepeatDuration"}]},{"type":"null"}],"title":"Discount"},"organization":{"$ref":"#/components/schemas/Organization"},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomField"},"type":"array","title":"Attached Custom Fields"},"customer_session_token":{"type":"string","title":"Customer Session Token"}},"type":"object","required":["created_at","modified_at","id","payment_processor","status","client_secret","url","expires_at","success_url","embed_origin","amount","tax_amount","currency","subtotal_amount","total_amount","product_id","product_price_id","discount_id","allow_discount_codes","is_discount_applicable","is_free_product_price","is_payment_required","is_payment_setup_required","is_payment_form_required","customer_id","customer_name","customer_email","customer_ip_address","customer_billing_address","customer_tax_id","payment_processor_metadata","product","product_price","discount","organization","attached_custom_fields","customer_session_token"],"title":"CheckoutPublicConfirmed","description":"Checkout session data retrieved using the client secret after confirmation.\n\nIt contains a customer session token to retrieve order information\nright after the checkout."},"CheckoutSortProperty":{"type":"string","enum":["created_at","-created_at","expires_at","-expires_at"],"title":"CheckoutSortProperty"},"CheckoutStatus":{"type":"string","enum":["open","expired","confirmed","succeeded","failed"],"title":"CheckoutStatus"},"CheckoutUpdate":{"properties":{"custom_field_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Custom Field Data","description":"Key-value object storing custom field values."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id","description":"ID of the product price to checkout. Must correspond to a price linked to the same product."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout."},"allow_discount_codes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Customer Metadata","description":"Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."}},"type":"object","title":"CheckoutUpdate","description":"Update an existing checkout session using an access token."},"CheckoutUpdatePublic":{"properties":{"custom_field_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Custom Field Data","description":"Key-value object storing custom field values."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id","description":"ID of the product price to checkout. Must correspond to a price linked to the same product."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"discount_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Code","description":"Discount code to apply to the checkout."}},"type":"object","title":"CheckoutUpdatePublic","description":"Update an existing checkout session using the client secret."},"CurrencyAmount":{"properties":{"currency":{"type":"string","title":"Currency","description":"Three letter currency code (eg: USD)"},"amount":{"type":"integer","title":"Amount","description":"Amount in the currencies smallest unit (cents if currency is USD)"}},"type":"object","required":["currency","amount"],"title":"CurrencyAmount"},"CustomField":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldText"},{"$ref":"#/components/schemas/CustomFieldNumber"},{"$ref":"#/components/schemas/CustomFieldDate"},{"$ref":"#/components/schemas/CustomFieldCheckbox"},{"$ref":"#/components/schemas/CustomFieldSelect"}],"discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CustomFieldCheckbox","date":"#/components/schemas/CustomFieldDate","number":"#/components/schemas/CustomFieldNumber","select":"#/components/schemas/CustomFieldSelect","text":"#/components/schemas/CustomFieldText"}}},"CustomFieldCheckbox":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["checkbox"],"const":"checkbox","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldCheckboxProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldCheckbox","description":"Schema for a custom field of type checkbox."},"CustomFieldCheckboxProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"}},"type":"object","title":"CustomFieldCheckboxProperties"},"CustomFieldCreate":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldCreateText"},{"$ref":"#/components/schemas/CustomFieldCreateNumber"},{"$ref":"#/components/schemas/CustomFieldCreateDate"},{"$ref":"#/components/schemas/CustomFieldCreateCheckbox"},{"$ref":"#/components/schemas/CustomFieldCreateSelect"}],"discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CustomFieldCreateCheckbox","date":"#/components/schemas/CustomFieldCreateDate","number":"#/components/schemas/CustomFieldCreateNumber","select":"#/components/schemas/CustomFieldCreateSelect","text":"#/components/schemas/CustomFieldCreateText"}}},"CustomFieldCreateCheckbox":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["checkbox"],"const":"checkbox","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldCheckboxProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateCheckbox","description":"Schema to create a custom field of type checkbox."},"CustomFieldCreateDate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["date"],"const":"date","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldDateProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateDate","description":"Schema to create a custom field of type date."},"CustomFieldCreateNumber":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["number"],"const":"number","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldNumberProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateNumber","description":"Schema to create a custom field of type number."},"CustomFieldCreateSelect":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["select"],"const":"select","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldSelectProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateSelect","description":"Schema to create a custom field of type select."},"CustomFieldCreateText":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["text"],"const":"text","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldTextProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateText","description":"Schema to create a custom field of type text."},"CustomFieldDate":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["date"],"const":"date","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldDateProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldDate","description":"Schema for a custom field of type date."},"CustomFieldDateProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"},"ge":{"type":"integer","title":"Ge"},"le":{"type":"integer","title":"Le"}},"type":"object","title":"CustomFieldDateProperties"},"CustomFieldNumber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["number"],"const":"number","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldNumberProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldNumber","description":"Schema for a custom field of type number."},"CustomFieldNumberProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"},"ge":{"type":"integer","title":"Ge"},"le":{"type":"integer","title":"Le"}},"type":"object","title":"CustomFieldNumberProperties"},"CustomFieldSelect":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["select"],"const":"select","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldSelectProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldSelect","description":"Schema for a custom field of type select."},"CustomFieldSelectOption":{"properties":{"value":{"type":"string","minLength":1,"title":"Value"},"label":{"type":"string","minLength":1,"title":"Label"}},"type":"object","required":["value","label"],"title":"CustomFieldSelectOption"},"CustomFieldSelectProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"},"options":{"items":{"$ref":"#/components/schemas/CustomFieldSelectOption"},"type":"array","title":"Options"}},"type":"object","required":["options"],"title":"CustomFieldSelectProperties"},"CustomFieldSortProperty":{"type":"string","enum":["created_at","-created_at","slug","-slug","name","-name","type","-type"],"title":"CustomFieldSortProperty"},"CustomFieldText":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["text"],"const":"text","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldTextProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldText","description":"Schema for a custom field of type text."},"CustomFieldTextProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"},"textarea":{"type":"boolean","title":"Textarea"},"min_length":{"type":"integer","minimum":0.0,"title":"Min Length"},"max_length":{"type":"integer","minimum":0.0,"title":"Max Length"}},"type":"object","title":"CustomFieldTextProperties"},"CustomFieldType":{"type":"string","enum":["text","number","date","checkbox","select"],"title":"CustomFieldType"},"CustomFieldUpdate":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldUpdateText"},{"$ref":"#/components/schemas/CustomFieldUpdateNumber"},{"$ref":"#/components/schemas/CustomFieldUpdateDate"},{"$ref":"#/components/schemas/CustomFieldUpdateCheckbox"},{"$ref":"#/components/schemas/CustomFieldUpdateSelect"}],"discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CustomFieldUpdateCheckbox","date":"#/components/schemas/CustomFieldUpdateDate","number":"#/components/schemas/CustomFieldUpdateNumber","select":"#/components/schemas/CustomFieldUpdateSelect","text":"#/components/schemas/CustomFieldUpdateText"}}},"CustomFieldUpdateCheckbox":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["checkbox"],"const":"checkbox","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldCheckboxProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateCheckbox","description":"Schema to update a custom field of type checkbox."},"CustomFieldUpdateDate":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["date"],"const":"date","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateDate","description":"Schema to update a custom field of type date."},"CustomFieldUpdateNumber":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["number"],"const":"number","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldNumberProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateNumber","description":"Schema to update a custom field of type number."},"CustomFieldUpdateSelect":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["select"],"const":"select","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldSelectProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateSelect","description":"Schema to update a custom field of type select."},"CustomFieldUpdateText":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["text"],"const":"text","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldTextProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateText","description":"Schema to update a custom field of type text."},"Customer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"avatar_url":{"type":"string","title":"Avatar Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","email","email_verified","name","billing_address","tax_id","organization_id","avatar_url"],"title":"Customer","description":"A customer in an organization."},"CustomerBenefitGrant":{"anyOf":[{"$ref":"#/components/schemas/CustomerBenefitGrantDiscord"},{"$ref":"#/components/schemas/CustomerBenefitGrantGitHubRepository"},{"$ref":"#/components/schemas/CustomerBenefitGrantDownloadables"},{"$ref":"#/components/schemas/CustomerBenefitGrantLicenseKeys"},{"$ref":"#/components/schemas/CustomerBenefitGrantAds"},{"$ref":"#/components/schemas/CustomerBenefitGrantCustom"}]},"CustomerBenefitGrantAds":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitAdsSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantAdsProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantAds"},"CustomerBenefitGrantAdsUpdate":{"properties":{"benefit_type":{"type":"string","enum":["ads"],"const":"ads","title":"Benefit Type"}},"type":"object","required":["benefit_type"],"title":"CustomerBenefitGrantAdsUpdate"},"CustomerBenefitGrantCustom":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitCustomSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantCustomProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantCustom"},"CustomerBenefitGrantCustomUpdate":{"properties":{"benefit_type":{"type":"string","enum":["custom"],"const":"custom","title":"Benefit Type"}},"type":"object","required":["benefit_type"],"title":"CustomerBenefitGrantCustomUpdate"},"CustomerBenefitGrantDiscord":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitDiscordSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantDiscordProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantDiscord"},"CustomerBenefitGrantDiscordPropertiesUpdate":{"properties":{"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["account_id"],"title":"CustomerBenefitGrantDiscordPropertiesUpdate"},"CustomerBenefitGrantDiscordUpdate":{"properties":{"benefit_type":{"type":"string","enum":["discord"],"const":"discord","title":"Benefit Type"},"properties":{"$ref":"#/components/schemas/CustomerBenefitGrantDiscordPropertiesUpdate"}},"type":"object","required":["benefit_type","properties"],"title":"CustomerBenefitGrantDiscordUpdate"},"CustomerBenefitGrantDownloadables":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitDownloadablesSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantDownloadablesProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantDownloadables"},"CustomerBenefitGrantDownloadablesUpdate":{"properties":{"benefit_type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Benefit Type"}},"type":"object","required":["benefit_type"],"title":"CustomerBenefitGrantDownloadablesUpdate"},"CustomerBenefitGrantGitHubRepository":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitGitHubRepositorySubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantGitHubRepositoryProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantGitHubRepository"},"CustomerBenefitGrantGitHubRepositoryPropertiesUpdate":{"properties":{"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["account_id"],"title":"CustomerBenefitGrantGitHubRepositoryPropertiesUpdate"},"CustomerBenefitGrantGitHubRepositoryUpdate":{"properties":{"benefit_type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Benefit Type"},"properties":{"$ref":"#/components/schemas/CustomerBenefitGrantGitHubRepositoryPropertiesUpdate"}},"type":"object","required":["benefit_type","properties"],"title":"CustomerBenefitGrantGitHubRepositoryUpdate"},"CustomerBenefitGrantLicenseKeys":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitLicenseKeysSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantLicenseKeysProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantLicenseKeys"},"CustomerBenefitGrantLicenseKeysUpdate":{"properties":{"benefit_type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Benefit Type"}},"type":"object","required":["benefit_type"],"title":"CustomerBenefitGrantLicenseKeysUpdate"},"CustomerBenefitGrantSortProperty":{"type":"string","enum":["granted_at","-granted_at","type","-type","organization","-organization"],"title":"CustomerBenefitGrantSortProperty"},"CustomerBenefitGrantUpdate":{"oneOf":[{"$ref":"#/components/schemas/CustomerBenefitGrantDiscordUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantDownloadablesUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantAdsUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantCustomUpdate"}],"discriminator":{"propertyName":"benefit_type","mapping":{"ads":"#/components/schemas/CustomerBenefitGrantAdsUpdate","custom":"#/components/schemas/CustomerBenefitGrantCustomUpdate","discord":"#/components/schemas/CustomerBenefitGrantDiscordUpdate","downloadables":"#/components/schemas/CustomerBenefitGrantDownloadablesUpdate","github_repository":"#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate","license_keys":"#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate"}}},"CustomerCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the customer. **Required unless you use an organization token.**"}},"type":"object","required":["email"],"title":"CustomerCreate"},"CustomerOrder":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id"},"amount":{"type":"integer","title":"Amount"},"tax_amount":{"type":"integer","title":"Tax Amount"},"currency":{"type":"string","title":"Currency"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"product":{"$ref":"#/components/schemas/CustomerOrderProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/CustomerOrderSubscription"},{"type":"null"}]}},"type":"object","required":["created_at","modified_at","id","amount","tax_amount","currency","customer_id","product_id","product_price_id","subscription_id","user_id","product","product_price","subscription"],"title":"CustomerOrder"},"CustomerOrderInvoice":{"properties":{"url":{"type":"string","title":"Url","description":"The URL to the invoice."}},"type":"object","required":["url"],"title":"CustomerOrderInvoice","description":"Order's invoice data."},"CustomerOrderProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/BenefitBase"},"type":"array","title":"BenefitPublic","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."},"organization":{"$ref":"#/components/schemas/Organization"}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","prices","benefits","medias","organization"],"title":"CustomerOrderProduct"},"CustomerOrderSortProperty":{"type":"string","enum":["created_at","-created_at","amount","-amount","organization","-organization","product","-product","subscription","-subscription"],"title":"CustomerOrderSortProperty"},"CustomerOrderSubscription":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"price_id":{"type":"string","format":"uuid4","title":"Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"}},"type":"object","required":["created_at","modified_at","id","amount","currency","recurring_interval","status","current_period_start","current_period_end","cancel_at_period_end","started_at","ended_at","customer_id","product_id","price_id","discount_id","checkout_id"],"title":"CustomerOrderSubscription"},"CustomerPortalCustomer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"oauth_accounts":{"additionalProperties":{"$ref":"#/components/schemas/CustomerPortalOAuthAccount"},"type":"object","title":"Oauth Accounts"}},"type":"object","required":["created_at","modified_at","id","email","email_verified","name","billing_address","tax_id","oauth_accounts"],"title":"CustomerPortalCustomer"},"CustomerPortalOAuthAccount":{"properties":{"account_id":{"type":"string","title":"Account Id"},"account_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Username"}},"type":"object","required":["account_id","account_username"],"title":"CustomerPortalOAuthAccount"},"CustomerSession":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"customer":{"$ref":"#/components/schemas/Customer"}},"type":"object","required":["created_at","modified_at","id","token","expires_at","customer_id","customer"],"title":"CustomerSession","description":"A customer session that can be used to authenticate as a customer."},"CustomerSessionCreate":{"properties":{"customer_id":{"type":"string","format":"uuid4","title":"Customer Id","description":"ID of the customer to create a session for."}},"type":"object","required":["customer_id"],"title":"CustomerSessionCreate","description":"Schema for creating a customer session."},"CustomerSortProperty":{"type":"string","enum":["created_at","-created_at","email","-email","name","-name"],"title":"CustomerSortProperty"},"CustomerSubscription":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"price_id":{"type":"string","format":"uuid4","title":"Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"product":{"$ref":"#/components/schemas/CustomerSubscriptionProduct"},"price":{"$ref":"#/components/schemas/ProductPrice"}},"type":"object","required":["created_at","modified_at","id","amount","currency","recurring_interval","status","current_period_start","current_period_end","cancel_at_period_end","started_at","ended_at","customer_id","product_id","price_id","discount_id","checkout_id","user_id","product","price"],"title":"CustomerSubscription"},"CustomerSubscriptionProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/BenefitBase"},"type":"array","title":"BenefitPublic","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."},"organization":{"$ref":"#/components/schemas/Organization"}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","prices","benefits","medias","organization"],"title":"CustomerSubscriptionProduct"},"CustomerSubscriptionSortProperty":{"type":"string","enum":["started_at","-started_at","amount","-amount","status","-status","organization","-organization","product","-product"],"title":"CustomerSubscriptionSortProperty"},"CustomerSubscriptionUpdate":{"properties":{"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id"}},"type":"object","required":["product_price_id"],"title":"CustomerSubscriptionUpdate"},"CustomerUpdate":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"}},"type":"object","title":"CustomerUpdate"},"Discount":{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDuration"},{"$ref":"#/components/schemas/DiscountFixedRepeatDuration"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDuration"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDuration"}]},"DiscountCreate":{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDurationCreate"},{"$ref":"#/components/schemas/DiscountFixedRepeatDurationCreate"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDurationCreate"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDurationCreate"}]},"DiscountDuration":{"type":"string","enum":["once","forever","repeating"],"title":"DiscountDuration"},"DiscountFixedOnceForeverDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"products":{"items":{"$ref":"#/components/schemas/DiscountProduct"},"type":"array","title":"Products"}},"type":"object","required":["duration","type","amount","currency","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id","products"],"title":"DiscountFixedOnceForeverDuration","description":"Schema for a fixed amount discount that is applied once or forever."},"DiscountFixedOnceForeverDurationBase":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}}},"type":"object","required":["duration","type","amount","currency","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id"],"title":"DiscountFixedOnceForeverDurationBase"},"DiscountFixedOnceForeverDurationCreate":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType","description":"Type of the discount."},"amount":{"type":"integer","minimum":0.0,"title":"Amount","description":"Fixed amount to discount from the invoice total."},"currency":{"type":"string","pattern":"usd","title":"Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Optional timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Optional timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"Optional maximum number of times the discount can be redeemed."},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the discount. **Required unless you use an organization token.**"}},"type":"object","required":["duration","type","amount","name"],"title":"DiscountFixedOnceForeverDurationCreate","description":"Schema to create a fixed amount discount that is applied once or forever."},"DiscountFixedRepeatDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"products":{"items":{"$ref":"#/components/schemas/DiscountProduct"},"type":"array","title":"Products"}},"type":"object","required":["duration","duration_in_months","type","amount","currency","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id","products"],"title":"DiscountFixedRepeatDuration","description":"Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months."},"DiscountFixedRepeatDurationBase":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}}},"type":"object","required":["duration","duration_in_months","type","amount","currency","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id"],"title":"DiscountFixedRepeatDurationBase"},"DiscountFixedRepeatDurationCreate":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","minimum":1.0,"title":"Duration In Months","description":"Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24."},"type":{"$ref":"#/components/schemas/DiscountType","description":"Type of the discount."},"amount":{"type":"integer","minimum":0.0,"title":"Amount","description":"Fixed amount to discount from the invoice total."},"currency":{"type":"string","pattern":"usd","title":"Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Optional timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Optional timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"Optional maximum number of times the discount can be redeemed."},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the discount. **Required unless you use an organization token.**"}},"type":"object","required":["duration","duration_in_months","type","amount","name"],"title":"DiscountFixedRepeatDurationCreate","description":"Schema to create a fixed amount discount that is applied on every invoice\nfor a certain number of months."},"DiscountPercentageOnceForeverDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"products":{"items":{"$ref":"#/components/schemas/DiscountProduct"},"type":"array","title":"Products"}},"type":"object","required":["duration","type","basis_points","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id","products"],"title":"DiscountPercentageOnceForeverDuration","description":"Schema for a percentage discount that is applied once or forever."},"DiscountPercentageOnceForeverDurationBase":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}}},"type":"object","required":["duration","type","basis_points","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id"],"title":"DiscountPercentageOnceForeverDurationBase"},"DiscountPercentageOnceForeverDurationCreate":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType","description":"Type of the discount."},"basis_points":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Basis Points","description":"Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Optional timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Optional timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"Optional maximum number of times the discount can be redeemed."},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the discount. **Required unless you use an organization token.**"}},"type":"object","required":["duration","type","basis_points","name"],"title":"DiscountPercentageOnceForeverDurationCreate","description":"Schema to create a percentage discount that is applied once or forever."},"DiscountPercentageRepeatDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"products":{"items":{"$ref":"#/components/schemas/DiscountProduct"},"type":"array","title":"Products"}},"type":"object","required":["duration","duration_in_months","type","basis_points","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id","products"],"title":"DiscountPercentageRepeatDuration","description":"Schema for a percentage discount that is applied on every invoice\nfor a certain number of months."},"DiscountPercentageRepeatDurationBase":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}}},"type":"object","required":["duration","duration_in_months","type","basis_points","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id"],"title":"DiscountPercentageRepeatDurationBase"},"DiscountPercentageRepeatDurationCreate":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","minimum":1.0,"title":"Duration In Months","description":"Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24."},"type":{"$ref":"#/components/schemas/DiscountType","description":"Type of the discount."},"basis_points":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Basis Points","description":"Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Optional timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Optional timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"Optional maximum number of times the discount can be redeemed."},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the discount. **Required unless you use an organization token.**"}},"type":"object","required":["duration","duration_in_months","type","basis_points","name"],"title":"DiscountPercentageRepeatDurationCreate","description":"Schema to create a percentage discount that is applied on every invoice\nfor a certain number of months."},"DiscountProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id"],"title":"DiscountProduct","description":"A product that a discount can be applied to."},"DiscountSortProperty":{"type":"string","enum":["created_at","-created_at","name","-name","code","-code","redemptions_count","-redemptions_count"],"title":"DiscountSortProperty"},"DiscountType":{"type":"string","enum":["fixed","percentage"],"title":"DiscountType"},"DiscountUpdate":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the discount. Will be displayed to the customer when the discount is applied."},{"type":"null"}],"title":"Name"},"code":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},{"type":"null"}],"title":"Code"},"starts_at":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Optional timestamp after which the discount is redeemable."},{"type":"null"}],"title":"Starts At"},"ends_at":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Optional timestamp after which the discount is no longer redeemable."},{"type":"null"}],"title":"Ends At"},"max_redemptions":{"anyOf":[{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"description":"Optional maximum number of times the discount can be redeemed."},{"type":"null"}],"title":"Max Redemptions"},"duration":{"anyOf":[{"$ref":"#/components/schemas/DiscountDuration"},{"type":"null"}]},"duration_in_months":{"anyOf":[{"type":"integer","minimum":1.0,"description":"Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24."},{"type":"null"}],"title":"Duration In Months"},"type":{"anyOf":[{"$ref":"#/components/schemas/DiscountType"},{"type":"null"}]},"amount":{"anyOf":[{"type":"integer","minimum":0.0,"description":"Fixed amount to discount from the invoice total."},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string","pattern":"usd","description":"The currency. Currently, only `usd` is supported.","default":"usd"},{"type":"null"}],"title":"Currency"},"basis_points":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0,"description":"Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550."},{"type":"null"}],"title":"Basis Points"},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"}},"type":"object","title":"DiscountUpdate","description":"Schema to update a discount."},"DownloadableFileCreate":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"upload":{"$ref":"#/components/schemas/S3FileCreateMultipart"},"service":{"type":"string","enum":["downloadable"],"const":"downloadable","title":"Service"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","required":["name","mime_type","size","upload","service"],"title":"DownloadableFileCreate","description":"Schema to create a file to be associated with the downloadables benefit."},"DownloadableFileRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"service":{"type":"string","enum":["downloadable"],"const":"downloadable","title":"Service"},"is_uploaded":{"type":"boolean","title":"Is Uploaded"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","version","service","is_uploaded","created_at","size_readable"],"title":"DownloadableFileRead","description":"File to be associated with the downloadables benefit."},"DownloadableRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"file":{"$ref":"#/components/schemas/FileDownload"}},"type":"object","required":["id","benefit_id","file"],"title":"DownloadableRead"},"ExistingProductPrice":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"}},"type":"object","required":["id"],"title":"ExistingProductPrice","description":"A price that already exists for this product.\n\nUseful when updating a product if you want to keep an existing price."},"ExternalOrganization":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"platform":{"$ref":"#/components/schemas/Platforms"},"name":{"type":"string","title":"Name"},"avatar_url":{"type":"string","title":"Avatar Url"},"is_personal":{"type":"boolean","title":"Is Personal"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"pretty_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pretty Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"blog":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blog"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"twitter_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Username"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id"}},"type":"object","required":["id","platform","name","avatar_url","is_personal","bio","pretty_name","company","blog","location","email","twitter_username","organization_id"],"title":"ExternalOrganization"},"ExternalOrganizationSortProperty":{"type":"string","enum":["created_at","-created_at","name","-name"],"title":"ExternalOrganizationSortProperty"},"FileCreate":{"oneOf":[{"$ref":"#/components/schemas/DownloadableFileCreate"},{"$ref":"#/components/schemas/ProductMediaFileCreate"},{"$ref":"#/components/schemas/OrganizationAvatarFileCreate"}],"discriminator":{"propertyName":"service","mapping":{"downloadable":"#/components/schemas/DownloadableFileCreate","organization_avatar":"#/components/schemas/OrganizationAvatarFileCreate","product_media":"#/components/schemas/ProductMediaFileCreate"}}},"FileDownload":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"download":{"$ref":"#/components/schemas/S3DownloadURL"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"is_uploaded":{"type":"boolean","title":"Is Uploaded"},"service":{"$ref":"#/components/schemas/FileServiceTypes"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","download","version","is_uploaded","service","size_readable"],"title":"FileDownload"},"FilePatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","title":"FilePatch"},"FileServiceTypes":{"type":"string","enum":["downloadable","product_media","organization_avatar"],"title":"FileServiceTypes"},"FileUpload":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"upload":{"$ref":"#/components/schemas/S3FileUploadMultipart"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"is_uploaded":{"type":"boolean","title":"Is Uploaded","default":false},"service":{"$ref":"#/components/schemas/FileServiceTypes"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","upload","version","service","size_readable"],"title":"FileUpload"},"FileUploadCompleted":{"properties":{"id":{"type":"string","title":"Id"},"path":{"type":"string","title":"Path"},"parts":{"items":{"$ref":"#/components/schemas/S3FileUploadCompletedPart"},"type":"array","title":"Parts"}},"type":"object","required":["id","path","parts"],"title":"FileUploadCompleted"},"Funding":{"properties":{"funding_goal":{"anyOf":[{"$ref":"#/components/schemas/CurrencyAmount"},{"type":"null"}]},"pledges_sum":{"anyOf":[{"$ref":"#/components/schemas/CurrencyAmount"},{"type":"null"}],"description":"Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD."}},"type":"object","title":"Funding"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Interval":{"type":"string","enum":["year","month","week","day","hour"],"title":"Interval"},"IntrospectTokenResponse":{"properties":{"active":{"type":"boolean","title":"Active"},"client_id":{"type":"string","title":"Client Id"},"token_type":{"type":"string","enum":["access_token","refresh_token"],"title":"Token Type"},"scope":{"type":"string","title":"Scope"},"sub_type":{"$ref":"#/components/schemas/SubType"},"sub":{"type":"string","title":"Sub"},"aud":{"type":"string","title":"Aud"},"iss":{"type":"string","title":"Iss"},"exp":{"type":"integer","title":"Exp"},"iat":{"type":"integer","title":"Iat"}},"type":"object","required":["active","client_id","token_type","scope","sub_type","sub","aud","iss","exp","iat"],"title":"IntrospectTokenResponse"},"Issue":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"platform":{"$ref":"#/components/schemas/Platforms","description":"Issue platform (currently always GitHub)"},"number":{"type":"integer","title":"Number","description":"GitHub #number"},"title":{"type":"string","title":"Title","description":"GitHub issue title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"GitHub issue body"},"comments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comments","description":"Number of GitHub comments made on the issue"},"labels":{"items":{"$ref":"#/components/schemas/Label"},"type":"array","title":"Labels","default":[]},"author":{"anyOf":[{"$ref":"#/components/schemas/Author"},{"type":"null"}],"description":"GitHub author"},"assignees":{"anyOf":[{"items":{"$ref":"#/components/schemas/Assignee"},"type":"array"},{"type":"null"}],"title":"Assignees","description":"GitHub assignees"},"reactions":{"anyOf":[{"$ref":"#/components/schemas/Reactions"},{"type":"null"}],"description":"GitHub reactions"},"state":{"$ref":"#/components/schemas/State"},"issue_closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issue Closed At"},"issue_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issue Modified At"},"issue_created_at":{"type":"string","format":"date-time","title":"Issue Created At"},"needs_confirmation_solved":{"type":"boolean","title":"Needs Confirmation Solved","description":"If a maintainer needs to mark this issue as solved"},"confirmed_solved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed Solved At","description":"If this issue has been marked as confirmed solved through Polar"},"funding":{"$ref":"#/components/schemas/Funding"},"repository":{"$ref":"#/components/schemas/Repository","description":"The repository that the issue is in"},"upfront_split_to_contributors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Upfront Split To Contributors","description":"Share of rewrads that will be rewarded to contributors of this issue. A number between 0 and 100 (inclusive)."},"pledge_badge_currently_embedded":{"type":"boolean","title":"Pledge Badge Currently Embedded","description":"If this issue currently has the Polar badge SVG embedded"},"badge_custom_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Custom Content","description":"Optional custom badge SVG promotional content"}},"type":"object","required":["id","platform","number","title","state","issue_created_at","needs_confirmation_solved","funding","repository","pledge_badge_currently_embedded"],"title":"Issue"},"Label":{"properties":{"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"}},"type":"object","required":["name","color"],"title":"Label"},"LicenseKeyActivate":{"properties":{"key":{"type":"string","title":"Key"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"label":{"type":"string","title":"Label"},"conditions":{"type":"object","title":"Conditions","default":{}},"meta":{"type":"object","title":"Meta","default":{}}},"type":"object","required":["key","organization_id","label"],"title":"LicenseKeyActivate"},"LicenseKeyActivationBase":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"license_key_id":{"type":"string","format":"uuid4","title":"License Key Id"},"label":{"type":"string","title":"Label"},"meta":{"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At"}},"type":"object","required":["id","license_key_id","label","meta","created_at","modified_at"],"title":"LicenseKeyActivationBase"},"LicenseKeyActivationRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"license_key_id":{"type":"string","format":"uuid4","title":"License Key Id"},"label":{"type":"string","title":"Label"},"meta":{"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At"},"license_key":{"$ref":"#/components/schemas/LicenseKeyRead"}},"type":"object","required":["id","license_key_id","label","meta","created_at","modified_at","license_key"],"title":"LicenseKeyActivationRead"},"LicenseKeyCustomer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"avatar_url":{"type":"string","title":"Avatar Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","email","email_verified","name","billing_address","tax_id","organization_id","avatar_url"],"title":"LicenseKeyCustomer"},"LicenseKeyDeactivate":{"properties":{"key":{"type":"string","title":"Key"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"activation_id":{"type":"string","format":"uuid4","title":"Activation Id"}},"type":"object","required":["key","organization_id","activation_id"],"title":"LicenseKeyDeactivate"},"LicenseKeyRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"user":{"$ref":"#/components/schemas/LicenseKeyUser","deprecated":true},"customer":{"$ref":"#/components/schemas/LicenseKeyCustomer"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},"key":{"type":"string","title":"Key"},"display_key":{"type":"string","title":"Display Key"},"status":{"$ref":"#/components/schemas/LicenseKeyStatus"},"limit_activations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Activations"},"usage":{"type":"integer","title":"Usage"},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"},"validations":{"type":"integer","title":"Validations"},"last_validated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Validated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","organization_id","user_id","customer_id","user","customer","benefit_id","key","display_key","status","limit_activations","usage","limit_usage","validations","last_validated_at","expires_at"],"title":"LicenseKeyRead"},"LicenseKeyStatus":{"type":"string","enum":["granted","revoked","disabled"],"title":"LicenseKeyStatus"},"LicenseKeyUpdate":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/LicenseKeyStatus"},{"type":"null"}]},"usage":{"type":"integer","title":"Usage","default":0},"limit_activations":{"anyOf":[{"type":"integer","maximum":50.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Limit Activations"},"limit_usage":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Limit Usage"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","title":"LicenseKeyUpdate"},"LicenseKeyUser":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","title":"Email"},"public_name":{"type":"string","title":"Public Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","email","public_name"],"title":"LicenseKeyUser"},"LicenseKeyValidate":{"properties":{"key":{"type":"string","title":"Key"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"activation_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Activation Id"},"benefit_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},{"type":"null"}],"title":"Benefit Id"},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id"},"increment_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Increment Usage"},"conditions":{"type":"object","title":"Conditions","default":{}}},"type":"object","required":["key","organization_id"],"title":"LicenseKeyValidate"},"LicenseKeyWithActivations":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"user":{"$ref":"#/components/schemas/LicenseKeyUser","deprecated":true},"customer":{"$ref":"#/components/schemas/LicenseKeyCustomer"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},"key":{"type":"string","title":"Key"},"display_key":{"type":"string","title":"Display Key"},"status":{"$ref":"#/components/schemas/LicenseKeyStatus"},"limit_activations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Activations"},"usage":{"type":"integer","title":"Usage"},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"},"validations":{"type":"integer","title":"Validations"},"last_validated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Validated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"activations":{"items":{"$ref":"#/components/schemas/LicenseKeyActivationBase"},"type":"array","title":"Activations"}},"type":"object","required":["id","organization_id","user_id","customer_id","user","customer","benefit_id","key","display_key","status","limit_activations","usage","limit_usage","validations","last_validated_at","expires_at","activations"],"title":"LicenseKeyWithActivations"},"ListResource_BenefitGrant_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BenefitGrant"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[BenefitGrant]"},"ListResource_Benefit_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Benefit","title":"Benefit"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Benefit]"},"ListResource_CheckoutLink_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CheckoutLink"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CheckoutLink]"},"ListResource_Checkout_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Checkout"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Checkout]"},"ListResource_CustomField_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomField","title":"CustomField"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CustomField]"},"ListResource_CustomerBenefitGrant_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerBenefitGrant","title":"CustomerBenefitGrant"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CustomerBenefitGrant]"},"ListResource_CustomerOrder_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerOrder"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CustomerOrder]"},"ListResource_CustomerSubscription_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerSubscription"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CustomerSubscription]"},"ListResource_Customer_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Customer"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Customer]"},"ListResource_Discount_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Discount","title":"Discount"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Discount]"},"ListResource_DownloadableRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DownloadableRead"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[DownloadableRead]"},"ListResource_ExternalOrganization_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExternalOrganization"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[ExternalOrganization]"},"ListResource_FileRead_":{"properties":{"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/DownloadableFileRead"},{"$ref":"#/components/schemas/ProductMediaFileRead"},{"$ref":"#/components/schemas/OrganizationAvatarFileRead"}],"title":"FileRead","discriminator":{"propertyName":"service","mapping":{"downloadable":"#/components/schemas/DownloadableFileRead","organization_avatar":"#/components/schemas/OrganizationAvatarFileRead","product_media":"#/components/schemas/ProductMediaFileRead"}}},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[FileRead]"},"ListResource_LicenseKeyRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LicenseKeyRead"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[LicenseKeyRead]"},"ListResource_OAuth2Client_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OAuth2Client"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[OAuth2Client]"},"ListResource_Order_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Order"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Order]"},"ListResource_Organization_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Organization"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Organization]"},"ListResource_Product_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Product"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Product]"},"ListResource_Repository_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Repository"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Repository]"},"ListResource_Subscription_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Subscription"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Subscription]"},"Metric":{"properties":{"slug":{"type":"string","title":"Slug","description":"Unique identifier for the metric."},"display_name":{"type":"string","title":"Display Name","description":"Human-readable name for the metric."},"type":{"$ref":"#/components/schemas/MetricType","description":"Type of the metric, useful to know the unit or format of the value."}},"type":"object","required":["slug","display_name","type"],"title":"Metric","description":"Information about a metric."},"MetricPeriod":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"Timestamp of this period data."},"orders":{"type":"integer","title":"Orders"},"revenue":{"type":"integer","title":"Revenue"},"average_order_value":{"type":"integer","title":"Average Order Value"},"one_time_products":{"type":"integer","title":"One Time Products"},"one_time_products_revenue":{"type":"integer","title":"One Time Products Revenue"},"new_subscriptions":{"type":"integer","title":"New Subscriptions"},"new_subscriptions_revenue":{"type":"integer","title":"New Subscriptions Revenue"},"renewed_subscriptions":{"type":"integer","title":"Renewed Subscriptions"},"renewed_subscriptions_revenue":{"type":"integer","title":"Renewed Subscriptions Revenue"},"active_subscriptions":{"type":"integer","title":"Active Subscriptions"},"monthly_recurring_revenue":{"type":"integer","title":"Monthly Recurring Revenue"}},"type":"object","required":["timestamp","orders","revenue","average_order_value","one_time_products","one_time_products_revenue","new_subscriptions","new_subscriptions_revenue","renewed_subscriptions","renewed_subscriptions_revenue","active_subscriptions","monthly_recurring_revenue"],"title":"MetricPeriod"},"MetricType":{"type":"string","enum":["scalar","currency"],"title":"MetricType"},"Metrics":{"properties":{"orders":{"$ref":"#/components/schemas/Metric"},"revenue":{"$ref":"#/components/schemas/Metric"},"average_order_value":{"$ref":"#/components/schemas/Metric"},"one_time_products":{"$ref":"#/components/schemas/Metric"},"one_time_products_revenue":{"$ref":"#/components/schemas/Metric"},"new_subscriptions":{"$ref":"#/components/schemas/Metric"},"new_subscriptions_revenue":{"$ref":"#/components/schemas/Metric"},"renewed_subscriptions":{"$ref":"#/components/schemas/Metric"},"renewed_subscriptions_revenue":{"$ref":"#/components/schemas/Metric"},"active_subscriptions":{"$ref":"#/components/schemas/Metric"},"monthly_recurring_revenue":{"$ref":"#/components/schemas/Metric"}},"type":"object","required":["orders","revenue","average_order_value","one_time_products","one_time_products_revenue","new_subscriptions","new_subscriptions_revenue","renewed_subscriptions","renewed_subscriptions_revenue","active_subscriptions","monthly_recurring_revenue"],"title":"Metrics"},"MetricsIntervalLimit":{"properties":{"max_days":{"type":"integer","title":"Max Days","description":"Maximum number of days for this interval."}},"type":"object","required":["max_days"],"title":"MetricsIntervalLimit","description":"Date interval limit to get metrics for a given interval."},"MetricsIntervalsLimits":{"properties":{"hour":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the hour interval."},"day":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the day interval."},"week":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the week interval."},"month":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the month interval."},"year":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the year interval."}},"type":"object","required":["hour","day","week","month","year"],"title":"MetricsIntervalsLimits","description":"Date interval limits to get metrics for each interval."},"MetricsLimits":{"properties":{"min_date":{"type":"string","format":"date","title":"Min Date","description":"Minimum date to get metrics."},"intervals":{"$ref":"#/components/schemas/MetricsIntervalsLimits","description":"Limits for each interval."}},"type":"object","required":["min_date","intervals"],"title":"MetricsLimits","description":"Date limits to get metrics."},"MetricsResponse":{"properties":{"periods":{"items":{"$ref":"#/components/schemas/MetricPeriod"},"type":"array","title":"Periods","description":"List of data for each timestamp."},"metrics":{"$ref":"#/components/schemas/Metrics","description":"Information about the returned metrics."}},"type":"object","required":["periods","metrics"],"title":"MetricsResponse","description":"Metrics response schema."},"NotPermitted":{"properties":{"error":{"type":"string","enum":["NotPermitted"],"const":"NotPermitted","title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"NotPermitted"},"OAuth2Client":{"properties":{"redirect_uris":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","title":"Redirect Uris"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"title":"Token Endpoint Auth Method","default":"client_secret_post"},"grant_types":{"items":{"type":"string","enum":["authorization_code","refresh_token"]},"type":"array","title":"Grant Types","default":["authorization_code","refresh_token"]},"response_types":{"items":{"type":"string","enum":["code"],"const":"code"},"type":"array","title":"Response Types","default":["code"]},"scope":{"type":"string","title":"Scope","default":"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"},"client_name":{"type":"string","title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"logo_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Logo Uri"},"tos_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Tos Uri"},"policy_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Policy Uri"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"client_id_issued_at":{"type":"integer","title":"Client Id Issued At"},"client_secret_expires_at":{"type":"integer","title":"Client Secret Expires At"}},"type":"object","required":["redirect_uris","client_name","created_at","modified_at","client_id","client_secret","client_id_issued_at","client_secret_expires_at"],"title":"OAuth2Client"},"OAuth2ClientConfiguration":{"properties":{"redirect_uris":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","title":"Redirect Uris"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"title":"Token Endpoint Auth Method","default":"client_secret_post"},"grant_types":{"items":{"type":"string","enum":["authorization_code","refresh_token"]},"type":"array","title":"Grant Types","default":["authorization_code","refresh_token"]},"response_types":{"items":{"type":"string","enum":["code"],"const":"code"},"type":"array","title":"Response Types","default":["code"]},"scope":{"type":"string","title":"Scope","default":"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"},"client_name":{"type":"string","title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"logo_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Logo Uri"},"tos_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Tos Uri"},"policy_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Policy Uri"}},"type":"object","required":["redirect_uris","client_name"],"title":"OAuth2ClientConfiguration"},"OAuth2ClientConfigurationUpdate":{"properties":{"redirect_uris":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","title":"Redirect Uris"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"title":"Token Endpoint Auth Method","default":"client_secret_post"},"grant_types":{"items":{"type":"string","enum":["authorization_code","refresh_token"]},"type":"array","title":"Grant Types","default":["authorization_code","refresh_token"]},"response_types":{"items":{"type":"string","enum":["code"],"const":"code"},"type":"array","title":"Response Types","default":["code"]},"scope":{"type":"string","title":"Scope","default":"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"},"client_name":{"type":"string","title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"logo_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Logo Uri"},"tos_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Tos Uri"},"policy_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Policy Uri"},"client_id":{"type":"string","title":"Client Id"}},"type":"object","required":["redirect_uris","client_name","client_id"],"title":"OAuth2ClientConfigurationUpdate"},"OAuth2ClientPublic":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"client_id":{"type":"string","title":"Client Id"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"logo_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Uri"},"tos_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tos Uri"},"policy_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Uri"}},"type":"object","required":["created_at","modified_at","client_id","client_name","client_uri","logo_uri","tos_uri","policy_uri"],"title":"OAuth2ClientPublic"},"Order":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"amount":{"type":"integer","title":"Amount"},"tax_amount":{"type":"integer","title":"Tax Amount"},"currency":{"type":"string","title":"Currency"},"billing_reason":{"$ref":"#/components/schemas/OrderBillingReason"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"},"customer":{"$ref":"#/components/schemas/OrderCustomer"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"user":{"$ref":"#/components/schemas/OrderUser","deprecated":true},"product":{"$ref":"#/components/schemas/OrderProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountFixedRepeatDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDurationBase"}],"title":"OrderDiscount"},{"type":"null"}],"title":"Discount"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/OrderSubscription"},{"type":"null"}]}},"type":"object","required":["created_at","modified_at","id","metadata","amount","tax_amount","currency","billing_reason","billing_address","customer_id","product_id","product_price_id","discount_id","subscription_id","checkout_id","customer","user_id","user","product","product_price","discount","subscription"],"title":"Order"},"OrderBillingReason":{"type":"string","enum":["purchase","subscription_create","subscription_cycle","subscription_update"],"title":"OrderBillingReason"},"OrderCustomer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"avatar_url":{"type":"string","title":"Avatar Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","email","email_verified","name","billing_address","tax_id","organization_id","avatar_url"],"title":"OrderCustomer"},"OrderInvoice":{"properties":{"url":{"type":"string","title":"Url","description":"The URL to the invoice."}},"type":"object","required":["url"],"title":"OrderInvoice","description":"Order's invoice data."},"OrderProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id"],"title":"OrderProduct"},"OrderSortProperty":{"type":"string","enum":["created_at","-created_at","amount","-amount","customer","-customer","product","-product","discount","-discount","subscription","-subscription"],"title":"OrderSortProperty"},"OrderSubscription":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"price_id":{"type":"string","format":"uuid4","title":"Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true}},"type":"object","required":["metadata","created_at","modified_at","id","amount","currency","recurring_interval","status","current_period_start","current_period_end","cancel_at_period_end","started_at","ended_at","customer_id","product_id","price_id","discount_id","checkout_id","user_id"],"title":"OrderSubscription"},"OrderUser":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","title":"Email"},"public_name":{"type":"string","title":"Public Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"github_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Username"}},"type":"object","required":["id","email","public_name"],"title":"OrderUser"},"Organization":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"blog":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blog"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"twitter_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Username"},"pledge_minimum_amount":{"type":"integer","title":"Pledge Minimum Amount"},"pledge_badge_show_amount":{"type":"boolean","title":"Pledge Badge Show Amount"},"default_upfront_split_to_contributors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Upfront Split To Contributors"},"profile_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationProfileSettings"},{"type":"null"}],"description":"Settings for the organization profile"},"feature_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationFeatureSettings"},{"type":"null"}],"description":"Settings for the organization features"}},"type":"object","required":["created_at","modified_at","id","name","slug","avatar_url","bio","company","blog","location","email","twitter_username","pledge_minimum_amount","pledge_badge_show_amount","default_upfront_split_to_contributors","profile_settings","feature_settings"],"title":"Organization"},"OrganizationAvatarFileCreate":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","pattern":"^image\\/(jpeg|png|gif|webp|svg\\+xml)$","title":"Mime Type","description":"MIME type of the file. Only images are supported for this type of file."},"size":{"type":"integer","maximum":1048576.0,"title":"Size","description":"Size of the file. A maximum of 1 MB is allowed for this type of file."},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"upload":{"$ref":"#/components/schemas/S3FileCreateMultipart"},"service":{"type":"string","enum":["organization_avatar"],"const":"organization_avatar","title":"Service"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","required":["name","mime_type","size","upload","service"],"title":"OrganizationAvatarFileCreate","description":"Schema to create a file to be used as an organization avatar."},"OrganizationAvatarFileRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"service":{"type":"string","enum":["organization_avatar"],"const":"organization_avatar","title":"Service"},"is_uploaded":{"type":"boolean","title":"Is Uploaded"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true},"public_url":{"type":"string","title":"Public Url","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","version","service","is_uploaded","created_at","size_readable","public_url"],"title":"OrganizationAvatarFileRead","description":"File to be used as an organization avatar."},"OrganizationCreate":{"properties":{"name":{"type":"string","minLength":3,"title":"Name"},"slug":{"type":"string","minLength":3,"title":"Slug"},"avatar_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Avatar Url"},"feature_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationFeatureSettings"},{"type":"null"}]}},"type":"object","required":["name","slug"],"title":"OrganizationCreate"},"OrganizationFeatureSettings":{"properties":{"issue_funding_enabled":{"type":"boolean","title":"Issue Funding Enabled","description":"If this organization has issue funding enabled","default":false}},"type":"object","title":"OrganizationFeatureSettings"},"OrganizationProfileSettings":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"If this organization has a profile enabled"},"description":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Description","description":"A description of the organization"},"featured_projects":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Featured Projects","description":"A list of featured projects"},"featured_organizations":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Featured Organizations","description":"A list of featured organizations"},"links":{"anyOf":[{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array"},{"type":"null"}],"title":"Links","description":"A list of links associated with the organization"},"subscribe":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSubscribePromoteSettings"},{"type":"null"}],"description":"Subscription promotion settings","default":{"promote":true,"show_count":true,"count_free":true}},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color","description":"Accent color for the organization"}},"type":"object","title":"OrganizationProfileSettings"},"OrganizationSortProperty":{"type":"string","enum":["created_at","-created_at","name","-name"],"title":"OrganizationSortProperty"},"OrganizationSubscribePromoteSettings":{"properties":{"promote":{"type":"boolean","title":"Promote","description":"Promote email subscription (free)","default":true},"show_count":{"type":"boolean","title":"Show Count","description":"Show subscription count publicly","default":true},"count_free":{"type":"boolean","title":"Count Free","description":"Include free subscribers in total count","default":true}},"type":"object","title":"OrganizationSubscribePromoteSettings"},"OrganizationUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":3},{"type":"null"}],"title":"Name"},"avatar_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Avatar Url"},"default_upfront_split_to_contributors":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Default Upfront Split To Contributors"},"pledge_badge_show_amount":{"type":"boolean","title":"Pledge Badge Show Amount","default":false},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"default_badge_custom_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Badge Custom Content"},"pledge_minimum_amount":{"type":"integer","title":"Pledge Minimum Amount","default":2000},"total_monthly_spending_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Monthly Spending Limit"},"per_user_monthly_spending_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per User Monthly Spending Limit"},"profile_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationProfileSettings"},{"type":"null"}]},"feature_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationFeatureSettings"},{"type":"null"}]}},"type":"object","title":"OrganizationUpdate"},"Pagination":{"properties":{"total_count":{"type":"integer","title":"Total Count"},"max_page":{"type":"integer","title":"Max Page"}},"type":"object","required":["total_count","max_page"],"title":"Pagination"},"PaymentProcessor":{"type":"string","enum":["stripe"],"const":"stripe","title":"PaymentProcessor"},"Platforms":{"type":"string","enum":["github"],"const":"github","title":"Platforms"},"Pledge":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"type":"integer","title":"Amount","description":"Amount pledged towards the issue"},"currency":{"type":"string","title":"Currency"},"state":{"$ref":"#/components/schemas/PledgeState","description":"Current state of the pledge"},"type":{"$ref":"#/components/schemas/PledgeType","description":"Type of pledge"},"refunded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refunded At","description":"If and when the pledge was refunded to the pledger"},"scheduled_payout_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Payout At","description":"When the payout is scheduled to be made to the maintainers behind the issue. Disputes must be made before this date."},"issue":{"$ref":"#/components/schemas/Issue","description":"The issue that the pledge was made towards"},"pledger":{"anyOf":[{"$ref":"#/components/schemas/Pledger"},{"type":"null"}],"description":"The user or organization that made this pledge"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url","description":"URL of invoice for this pledge"},"authed_can_admin_sender":{"type":"boolean","title":"Authed Can Admin Sender","description":"If the currently authenticated subject can perform admin actions on behalf of the maker of the peldge","default":false},"authed_can_admin_received":{"type":"boolean","title":"Authed Can Admin Received","description":"If the currently authenticated subject can perform admin actions on behalf of the receiver of the peldge","default":false},"created_by":{"anyOf":[{"$ref":"#/components/schemas/Pledger"},{"type":"null"}],"description":"For pledges made by an organization, or on behalf of an organization. This is the user that made the pledge. Only visible for members of said organization."}},"type":"object","required":["created_at","modified_at","id","amount","currency","state","type","issue"],"title":"Pledge"},"PledgeState":{"type":"string","enum":["initiated","created","pending","refunded","disputed","charge_disputed","cancelled"],"title":"PledgeState"},"PledgeType":{"type":"string","enum":["pay_upfront","pay_on_completion","pay_directly"],"title":"PledgeType"},"Pledger":{"properties":{"name":{"type":"string","title":"Name"},"github_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Username"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["name","github_username","avatar_url"],"title":"Pledger"},"Product":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/Benefit","title":"Benefit"},"type":"array","title":"Benefits","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomField"},"type":"array","title":"Attached Custom Fields","description":"List of custom fields attached to the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","metadata","prices","benefits","medias","attached_custom_fields"],"title":"Product","description":"A product."},"ProductBenefitsUpdate":{"properties":{"benefits":{"items":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},"type":"array","title":"Benefits","description":"List of benefit IDs. Each one must be on the same organization as the product."}},"type":"object","required":["benefits"],"title":"ProductBenefitsUpdate","description":"Schema to update the benefits granted by a product."},"ProductCreate":{"anyOf":[{"$ref":"#/components/schemas/ProductRecurringCreate"},{"$ref":"#/components/schemas/ProductOneTimeCreate"}]},"ProductMediaFileCreate":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","pattern":"^image\\/(jpeg|png|gif|webp|svg\\+xml)$","title":"Mime Type","description":"MIME type of the file. Only images are supported for this type of file."},"size":{"type":"integer","maximum":10485760.0,"title":"Size","description":"Size of the file. A maximum of 10 MB is allowed for this type of file."},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"upload":{"$ref":"#/components/schemas/S3FileCreateMultipart"},"service":{"type":"string","enum":["product_media"],"const":"product_media","title":"Service"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","required":["name","mime_type","size","upload","service"],"title":"ProductMediaFileCreate","description":"Schema to create a file to be used as a product media file."},"ProductMediaFileRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"service":{"type":"string","enum":["product_media"],"const":"product_media","title":"Service"},"is_uploaded":{"type":"boolean","title":"Is Uploaded"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true},"public_url":{"type":"string","title":"Public Url","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","version","service","is_uploaded","created_at","size_readable","public_url"],"title":"ProductMediaFileRead","description":"File to be used as a product media file."},"ProductOneTimeCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":3,"title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"prices":{"items":{"anyOf":[{"$ref":"#/components/schemas/ProductPriceOneTimeFixedCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeCustomCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeFreeCreate"}]},"type":"array","maxItems":1,"minItems":1,"title":"ProductPriceOneTimeCreate","description":"List of available prices for this product."},"medias":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Medias","description":"List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded."},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomFieldCreate"},"type":"array","title":"Attached Custom Fields","description":"List of custom fields to attach."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the product. **Required unless you use an organization token.**"}},"type":"object","required":["name","prices"],"title":"ProductOneTimeCreate","description":"Schema to create a one-time product."},"ProductPrice":{"oneOf":[{"$ref":"#/components/schemas/ProductPriceRecurring"},{"$ref":"#/components/schemas/ProductPriceOneTime"}],"discriminator":{"propertyName":"type","mapping":{"one_time":"#/components/schemas/ProductPriceOneTime","recurring":"#/components/schemas/ProductPriceRecurring"}}},"ProductPriceOneTime":{"oneOf":[{"$ref":"#/components/schemas/ProductPriceOneTimeFixed"},{"$ref":"#/components/schemas/ProductPriceOneTimeCustom"},{"$ref":"#/components/schemas/ProductPriceOneTimeFree"}],"discriminator":{"propertyName":"amount_type","mapping":{"custom":"#/components/schemas/ProductPriceOneTimeCustom","fixed":"#/components/schemas/ProductPriceOneTimeFixed","free":"#/components/schemas/ProductPriceOneTimeFree"}}},"ProductPriceOneTimeCustom":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["custom"],"const":"custom","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"price_currency":{"type":"string","title":"Price Currency","description":"The currency."},"minimum_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Amount","description":"The minimum amount the customer can pay."},"maximum_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maximum Amount","description":"The maximum amount the customer can pay."},"preset_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Preset Amount","description":"The initial amount shown to the customer."},"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type","description":"The type of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","price_currency","minimum_amount","maximum_amount","preset_amount","type"],"title":"ProductPriceOneTimeCustom","description":"A pay-what-you-want price for a one-time product."},"ProductPriceOneTimeCustomCreate":{"properties":{"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type"},"amount_type":{"type":"string","enum":["custom"],"const":"custom","title":"Amount Type"},"price_currency":{"type":"string","pattern":"usd","title":"Price Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"},"minimum_amount":{"anyOf":[{"type":"integer","maximum":99999999.0,"minimum":50.0,"description":"The price in cents."},{"type":"null"}],"title":"Minimum Amount","description":"The minimum amount the customer can pay."},"maximum_amount":{"anyOf":[{"type":"integer","maximum":99999999.0,"minimum":50.0,"description":"The price in cents."},{"type":"null"}],"title":"Maximum Amount","description":"The maximum amount the customer can pay."},"preset_amount":{"anyOf":[{"type":"integer","maximum":99999999.0,"minimum":50.0,"description":"The price in cents."},{"type":"null"}],"title":"Preset Amount","description":"The initial amount shown to the customer."}},"type":"object","required":["type","amount_type"],"title":"ProductPriceOneTimeCustomCreate","description":"Schema to create a pay-what-you-want price for a one-time product."},"ProductPriceOneTimeFixed":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["fixed"],"const":"fixed","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"price_currency":{"type":"string","title":"Price Currency","description":"The currency."},"price_amount":{"type":"integer","title":"Price Amount","description":"The price in cents."},"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type","description":"The type of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","price_currency","price_amount","type"],"title":"ProductPriceOneTimeFixed","description":"A one-time price for a product."},"ProductPriceOneTimeFixedCreate":{"properties":{"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type"},"amount_type":{"type":"string","enum":["fixed"],"const":"fixed","title":"Amount Type"},"price_amount":{"type":"integer","maximum":99999999.0,"minimum":50.0,"title":"Price Amount","description":"The price in cents."},"price_currency":{"type":"string","pattern":"usd","title":"Price Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"}},"type":"object","required":["type","amount_type","price_amount"],"title":"ProductPriceOneTimeFixedCreate","description":"Schema to create a one-time product price."},"ProductPriceOneTimeFree":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["free"],"const":"free","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type","description":"The type of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","type"],"title":"ProductPriceOneTimeFree","description":"A free one-time price for a product."},"ProductPriceOneTimeFreeCreate":{"properties":{"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type"},"amount_type":{"type":"string","enum":["free"],"const":"free","title":"Amount Type"}},"type":"object","required":["type","amount_type"],"title":"ProductPriceOneTimeFreeCreate","description":"Schema to create a free one-time product price."},"ProductPriceRecurring":{"oneOf":[{"$ref":"#/components/schemas/ProductPriceRecurringFixed"},{"$ref":"#/components/schemas/ProductPriceRecurringCustom"},{"$ref":"#/components/schemas/ProductPriceRecurringFree"}],"discriminator":{"propertyName":"amount_type","mapping":{"custom":"#/components/schemas/ProductPriceRecurringCustom","fixed":"#/components/schemas/ProductPriceRecurringFixed","free":"#/components/schemas/ProductPriceRecurringFree"}}},"ProductPriceRecurringCustom":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["custom"],"const":"custom","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"price_currency":{"type":"string","title":"Price Currency","description":"The currency."},"minimum_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Amount","description":"The minimum amount the customer can pay."},"maximum_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maximum Amount","description":"The maximum amount the customer can pay."},"preset_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Preset Amount","description":"The initial amount shown to the customer."},"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type","description":"The type of the price."},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","price_currency","minimum_amount","maximum_amount","preset_amount","type","recurring_interval"],"title":"ProductPriceRecurringCustom","description":"A pay-what-you-want recurring price for a product, i.e. a subscription."},"ProductPriceRecurringFixed":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["fixed"],"const":"fixed","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"price_currency":{"type":"string","title":"Price Currency","description":"The currency."},"price_amount":{"type":"integer","title":"Price Amount","description":"The price in cents."},"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type","description":"The type of the price."},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","price_currency","price_amount","type","recurring_interval"],"title":"ProductPriceRecurringFixed","description":"A recurring price for a product, i.e. a subscription."},"ProductPriceRecurringFixedCreate":{"properties":{"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type"},"amount_type":{"type":"string","enum":["fixed"],"const":"fixed","title":"Amount Type"},"price_amount":{"type":"integer","maximum":99999999.0,"minimum":50.0,"title":"Price Amount","description":"The price in cents."},"price_currency":{"type":"string","pattern":"usd","title":"Price Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["type","amount_type","price_amount","recurring_interval"],"title":"ProductPriceRecurringFixedCreate","description":"Schema to create a recurring product price, i.e. a subscription."},"ProductPriceRecurringFree":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["free"],"const":"free","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type","description":"The type of the price."},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","type","recurring_interval"],"title":"ProductPriceRecurringFree","description":"A free recurring price for a product, i.e. a subscription."},"ProductPriceRecurringFreeCreate":{"properties":{"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type"},"amount_type":{"type":"string","enum":["free"],"const":"free","title":"Amount Type"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["type","amount_type","recurring_interval"],"title":"ProductPriceRecurringFreeCreate","description":"Schema to create a free recurring product price, i.e. a subscription."},"ProductPriceType":{"type":"string","enum":["one_time","recurring"],"title":"ProductPriceType"},"ProductRecurringCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":3,"title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"prices":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProductPriceRecurringFixedCreate"},"type":"array","maxItems":2,"minItems":1,"title":"ProductPriceRecurringFixedCreate","description":"List of recurring prices. Only one price per interval (one monthly and one yearly) is allowed."},{"items":{"$ref":"#/components/schemas/ProductPriceRecurringFreeCreate"},"type":"array","maxItems":1,"minItems":1,"title":"ProductPriceRecurringFreeCreate","description":"List with a single free recurring price."}],"title":"Prices","description":"List of available prices for this product."},"medias":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Medias","description":"List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded."},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomFieldCreate"},"type":"array","title":"Attached Custom Fields","description":"List of custom fields to attach."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the product. **Required unless you use an organization token.**"}},"type":"object","required":["name","prices"],"title":"ProductRecurringCreate","description":"Schema to create a recurring product, i.e. a subscription."},"ProductSortProperty":{"type":"string","enum":["created_at","-created_at","name","-name","price_type","-price_type","price_amount_type","-price_amount_type","price_amount","-price_amount"],"title":"ProductSortProperty"},"ProductUpdate":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":3,"description":"The name of the product."},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Archived","description":"Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally."},"prices":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/ExistingProductPrice"},{"$ref":"#/components/schemas/ProductPriceRecurringFixedCreate"},{"$ref":"#/components/schemas/ProductPriceRecurringFreeCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeFixedCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeCustomCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeFreeCreate"}]},"type":"array"},{"type":"null"}],"title":"Prices","description":"List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object."},"medias":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Medias","description":"List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded."},"attached_custom_fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttachedCustomFieldCreate"},"type":"array","description":"List of custom fields to attach."},{"type":"null"}],"title":"Attached Custom Fields"}},"type":"object","title":"ProductUpdate","description":"Schema to update a product."},"Reactions":{"properties":{"total_count":{"type":"integer","title":"Total Count"},"plus_one":{"type":"integer","title":"Plus One"},"minus_one":{"type":"integer","title":"Minus One"},"laugh":{"type":"integer","title":"Laugh"},"hooray":{"type":"integer","title":"Hooray"},"confused":{"type":"integer","title":"Confused"},"heart":{"type":"integer","title":"Heart"},"rocket":{"type":"integer","title":"Rocket"},"eyes":{"type":"integer","title":"Eyes"}},"type":"object","required":["total_count","plus_one","minus_one","laugh","hooray","confused","heart","rocket","eyes"],"title":"Reactions"},"Repository":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"platform":{"$ref":"#/components/schemas/Platforms"},"is_private":{"type":"boolean","title":"Is Private"},"name":{"type":"string","title":"Name","examples":["MyOrg"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"stars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stars","examples":[1337]},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License"},"homepage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage"},"profile_settings":{"anyOf":[{"$ref":"#/components/schemas/RepositoryProfileSettings"},{"type":"null"}],"description":"Settings for the repository profile"},"organization":{"$ref":"#/components/schemas/ExternalOrganization"},"internal_organization":{"anyOf":[{"$ref":"#/components/schemas/Organization"},{"type":"null"}]}},"type":"object","required":["id","platform","is_private","name","description","stars","license","homepage","profile_settings","organization","internal_organization"],"title":"Repository"},"RepositoryProfileSettings":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Description","description":"A description of the repository"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url","description":"A URL to a cover image"},"featured_organizations":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Featured Organizations","description":"A list of featured organizations"},"highlighted_subscription_tiers":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Highlighted Subscription Tiers","description":"A list of highlighted subscription tiers"},"links":{"anyOf":[{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array"},{"type":"null"}],"title":"Links","description":"A list of links related to the repository"}},"type":"object","title":"RepositoryProfileSettings"},"RepositoryProfileSettingsUpdate":{"properties":{"set_description":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Set Description"},"description":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Description"},"set_cover_image_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Set Cover Image Url"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url"},"featured_organizations":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Featured Organizations"},"highlighted_subscription_tiers":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","maxItems":3},{"type":"null"}],"title":"Highlighted Subscription Tiers"},"links":{"anyOf":[{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"RepositoryProfileSettingsUpdate"},"RepositorySortProperty":{"type":"string","enum":["created_at","-created_at","name","-name","stars","-stars"],"title":"RepositorySortProperty"},"RepositoryUpdate":{"properties":{"profile_settings":{"anyOf":[{"$ref":"#/components/schemas/RepositoryProfileSettingsUpdate"},{"type":"null"}]}},"type":"object","title":"RepositoryUpdate"},"ResourceNotFound":{"properties":{"error":{"type":"string","enum":["ResourceNotFound"],"const":"ResourceNotFound","title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"ResourceNotFound"},"RevokeTokenResponse":{"properties":{},"type":"object","title":"RevokeTokenResponse"},"S3DownloadURL":{"properties":{"url":{"type":"string","title":"Url"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["url","expires_at"],"title":"S3DownloadURL"},"S3FileCreateMultipart":{"properties":{"parts":{"items":{"$ref":"#/components/schemas/S3FileCreatePart"},"type":"array","title":"Parts"}},"type":"object","required":["parts"],"title":"S3FileCreateMultipart"},"S3FileCreatePart":{"properties":{"number":{"type":"integer","title":"Number"},"chunk_start":{"type":"integer","title":"Chunk Start"},"chunk_end":{"type":"integer","title":"Chunk End"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"}},"type":"object","required":["number","chunk_start","chunk_end"],"title":"S3FileCreatePart"},"S3FileUploadCompletedPart":{"properties":{"number":{"type":"integer","title":"Number"},"checksum_etag":{"type":"string","title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"}},"type":"object","required":["number","checksum_etag","checksum_sha256_base64"],"title":"S3FileUploadCompletedPart"},"S3FileUploadMultipart":{"properties":{"id":{"type":"string","title":"Id"},"path":{"type":"string","title":"Path"},"parts":{"items":{"$ref":"#/components/schemas/S3FileUploadPart"},"type":"array","title":"Parts"}},"type":"object","required":["id","path","parts"],"title":"S3FileUploadMultipart"},"S3FileUploadPart":{"properties":{"number":{"type":"integer","title":"Number"},"chunk_start":{"type":"integer","title":"Chunk Start"},"chunk_end":{"type":"integer","title":"Chunk End"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}}},"type":"object","required":["number","chunk_start","chunk_end","url","expires_at"],"title":"S3FileUploadPart"},"Scope":{"type":"string","enum":["openid","profile","email","user:read","admin","web_default","organizations:read","organizations:write","custom_fields:read","custom_fields:write","discounts:read","discounts:write","checkout_links:read","checkout_links:write","checkouts:read","checkouts:write","products:read","products:write","benefits:read","benefits:write","files:read","files:write","subscriptions:read","subscriptions:write","customers:read","customers:write","customer_sessions:write","orders:read","metrics:read","webhooks:read","webhooks:write","external_organizations:read","license_keys:read","license_keys:write","repositories:read","repositories:write","issues:read","issues:write","customer_portal:read","customer_portal:write"],"title":"Scope","enumNames":{"benefits:read":"Read benefits","benefits:write":"Create or modify benefits","checkout_links:read":"Read checkout links","checkout_links:write":"Create or modify checkout links","checkouts:read":"Read checkout sessions","checkouts:write":"Create or modify checkout sessions","custom_fields:read":"Read custom fields","custom_fields:write":"Create or modify custom fields","customer_portal:read":"Read your orders, subscriptions and benefits","customer_portal:write":"Create or modify your orders, subscriptions and benefits","customers:read":"Read customers","customers:write":"Create or modify customers","discounts:read":"Read discounts","discounts:write":"Create or modify discounts","email":"Read your email address","files:read":"Read file uploads","files:write":"Create or modify file uploads","license_keys:read":"Read license keys","license_keys:write":"Modify license keys","metrics:read":"Read metrics","openid":"OpenID","orders:read":"Read orders made on your organizations","organizations:read":"Read your organizations","organizations:write":"Create or modify organizations","products:read":"Read products","products:write":"Create or modify products","profile":"Read your profile","subscriptions:read":"Read subscriptions made on your organizations","subscriptions:write":"Create or modify subscriptions made on your organizations","user:read":"User Read","web_default":"Web Default","webhooks:read":"Read webhooks","webhooks:write":"Create or modify webhooks"}},"State":{"type":"string","enum":["open","closed"],"title":"State"},"SubType":{"type":"string","enum":["user","organization"],"title":"SubType"},"Subscription":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"price_id":{"type":"string","format":"uuid4","title":"Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"customer":{"$ref":"#/components/schemas/SubscriptionCustomer"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"user":{"$ref":"#/components/schemas/SubscriptionUser","deprecated":true},"product":{"$ref":"#/components/schemas/Product"},"price":{"$ref":"#/components/schemas/ProductPriceRecurring"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountFixedRepeatDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDurationBase"}],"title":"SubscriptionDiscount"},{"type":"null"}],"title":"Discount"}},"type":"object","required":["created_at","modified_at","id","amount","currency","recurring_interval","status","current_period_start","current_period_end","cancel_at_period_end","started_at","ended_at","customer_id","product_id","price_id","discount_id","checkout_id","metadata","customer","user_id","user","product","price","discount"],"title":"Subscription"},"SubscriptionCustomer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"avatar_url":{"type":"string","title":"Avatar Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","email","email_verified","name","billing_address","tax_id","organization_id","avatar_url"],"title":"SubscriptionCustomer"},"SubscriptionRecurringInterval":{"type":"string","enum":["month","year"],"title":"SubscriptionRecurringInterval"},"SubscriptionSortProperty":{"type":"string","enum":["customer","-customer","status","-status","started_at","-started_at","current_period_end","-current_period_end","amount","-amount","product","-product","discount","-discount"],"title":"SubscriptionSortProperty"},"SubscriptionStatus":{"type":"string","enum":["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"title":"SubscriptionStatus"},"SubscriptionUser":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","title":"Email"},"public_name":{"type":"string","title":"Public Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"github_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Username"}},"type":"object","required":["id","email","public_name"],"title":"SubscriptionUser"},"TaxIDFormat":{"type":"string","enum":["ad_nrt","ae_trn","ar_cuit","au_abn","au_arn","bg_uic","bh_vat","bo_tin","br_cnpj","br_cpf","ca_bn","ca_gst_hst","ca_pst_bc","ca_pst_mb","ca_pst_sk","ca_qst","ch_uid","ch_vat","cl_tin","cn_tin","co_nit","cr_tin","de_stn","do_rcn","ec_ruc","eg_tin","es_cif","eu_oss_vat","eu_vat","gb_vat","ge_vat","hk_br","hr_oib","hu_tin","id_npwp","il_vat","in_gst","is_vat","jp_cn","jp_rn","jp_trn","ke_pin","kr_brn","kz_bin","li_uid","mx_rfc","my_frp","my_itn","my_sst","ng_tin","no_vat","no_voec","nz_gst","om_vat","pe_ruc","ph_tin","ro_tin","rs_pib","ru_inn","ru_kpp","sa_vat","sg_gst","sg_uen","si_tin","sv_nit","th_vat","tr_tin","tw_vat","ua_vat","us_ein","uy_ruc","ve_rif","vn_tin","za_vat"],"title":"TaxIDFormat","description":"List of supported tax ID formats.\n\nRef: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","enum":["Bearer"],"const":"Bearer","title":"Token Type"},"expires_in":{"type":"integer","title":"Expires In"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"scope":{"type":"string","title":"Scope"},"id_token":{"type":"string","title":"Id Token"}},"type":"object","required":["access_token","token_type","expires_in","refresh_token","scope","id_token"],"title":"TokenResponse"},"Unauthorized":{"properties":{"error":{"type":"string","enum":["Unauthorized"],"const":"Unauthorized","title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"Unauthorized"},"UserInfoOrganization":{"properties":{"sub":{"type":"string","title":"Sub"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["sub"],"title":"UserInfoOrganization"},"UserInfoUser":{"properties":{"sub":{"type":"string","title":"Sub"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"email_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Verified"}},"type":"object","required":["sub"],"title":"UserInfoUser"},"ValidatedLicenseKey":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"user":{"$ref":"#/components/schemas/LicenseKeyUser","deprecated":true},"customer":{"$ref":"#/components/schemas/LicenseKeyCustomer"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},"key":{"type":"string","title":"Key"},"display_key":{"type":"string","title":"Display Key"},"status":{"$ref":"#/components/schemas/LicenseKeyStatus"},"limit_activations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Activations"},"usage":{"type":"integer","title":"Usage"},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"},"validations":{"type":"integer","title":"Validations"},"last_validated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Validated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"activation":{"anyOf":[{"$ref":"#/components/schemas/LicenseKeyActivationBase"},{"type":"null"}]}},"type":"object","required":["id","organization_id","user_id","customer_id","user","customer","benefit_id","key","display_key","status","limit_activations","usage","limit_usage","validations","last_validated_at","expires_at"],"title":"ValidatedLicenseKey"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookBenefitCreatedPayload":{"properties":{"type":{"type":"string","enum":["benefit.created"],"const":"benefit.created","title":"Type"},"data":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}},"type":"object","required":["type","data"],"title":"WebhookBenefitCreatedPayload","description":"Sent when a new benefit is created.\n\n**Discord & Slack support:** Basic"},"WebhookBenefitGrantCreatedPayload":{"properties":{"type":{"type":"string","enum":["benefit_grant.created"],"const":"benefit_grant.created","title":"Type"},"data":{"$ref":"#/components/schemas/BenefitGrantWebhook"}},"type":"object","required":["type","data"],"title":"WebhookBenefitGrantCreatedPayload","description":"Sent when a new benefit grant is created.\n\n**Discord & Slack support:** Basic"},"WebhookBenefitGrantRevokedPayload":{"properties":{"type":{"type":"string","enum":["benefit_grant.revoked"],"const":"benefit_grant.revoked","title":"Type"},"data":{"$ref":"#/components/schemas/BenefitGrantWebhook"}},"type":"object","required":["type","data"],"title":"WebhookBenefitGrantRevokedPayload","description":"Sent when a new benefit grant is revoked.\n\n**Discord & Slack support:** Basic"},"WebhookBenefitGrantUpdatedPayload":{"properties":{"type":{"type":"string","enum":["benefit_grant.updated"],"const":"benefit_grant.updated","title":"Type"},"data":{"$ref":"#/components/schemas/BenefitGrantWebhook"}},"type":"object","required":["type","data"],"title":"WebhookBenefitGrantUpdatedPayload","description":"Sent when a new benefit grant is updated.\n\n**Discord & Slack support:** Basic"},"WebhookBenefitUpdatedPayload":{"properties":{"type":{"type":"string","enum":["benefit.updated"],"const":"benefit.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}},"type":"object","required":["type","data"],"title":"WebhookBenefitUpdatedPayload","description":"Sent when a benefit is updated.\n\n**Discord & Slack support:** Basic"},"WebhookCheckoutCreatedPayload":{"properties":{"type":{"type":"string","enum":["checkout.created"],"const":"checkout.created","title":"Type"},"data":{"$ref":"#/components/schemas/Checkout"}},"type":"object","required":["type","data"],"title":"WebhookCheckoutCreatedPayload","description":"Sent when a new checkout is created.\n\n**Discord & Slack support:** Basic"},"WebhookCheckoutUpdatedPayload":{"properties":{"type":{"type":"string","enum":["checkout.updated"],"const":"checkout.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Checkout"}},"type":"object","required":["type","data"],"title":"WebhookCheckoutUpdatedPayload","description":"Sent when a checkout is updated.\n\n**Discord & Slack support:** Basic"},"WebhookOrderCreatedPayload":{"properties":{"type":{"type":"string","enum":["order.created"],"const":"order.created","title":"Type"},"data":{"$ref":"#/components/schemas/Order"}},"type":"object","required":["type","data"],"title":"WebhookOrderCreatedPayload","description":"Sent when a new order is created.\n\n**Discord & Slack support:** Full"},"WebhookOrganizationUpdatedPayload":{"properties":{"type":{"type":"string","enum":["organization.updated"],"const":"organization.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Organization"}},"type":"object","required":["type","data"],"title":"WebhookOrganizationUpdatedPayload","description":"Sent when a organization is updated.\n\n**Discord & Slack support:** Basic"},"WebhookPledgeCreatedPayload":{"properties":{"type":{"type":"string","enum":["pledge.created"],"const":"pledge.created","title":"Type"},"data":{"$ref":"#/components/schemas/Pledge"}},"type":"object","required":["type","data"],"title":"WebhookPledgeCreatedPayload","description":"Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord & Slack support:** Full"},"WebhookPledgeUpdatedPayload":{"properties":{"type":{"type":"string","enum":["pledge.updated"],"const":"pledge.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Pledge"}},"type":"object","required":["type","data"],"title":"WebhookPledgeUpdatedPayload","description":"Sent when a pledge is updated.\n\n**Discord & Slack support:** Basic"},"WebhookProductCreatedPayload":{"properties":{"type":{"type":"string","enum":["product.created"],"const":"product.created","title":"Type"},"data":{"$ref":"#/components/schemas/Product"}},"type":"object","required":["type","data"],"title":"WebhookProductCreatedPayload","description":"Sent when a new product is created.\n\n**Discord & Slack support:** Basic"},"WebhookProductUpdatedPayload":{"properties":{"type":{"type":"string","enum":["product.updated"],"const":"product.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Product"}},"type":"object","required":["type","data"],"title":"WebhookProductUpdatedPayload","description":"Sent when a product is updated.\n\n**Discord & Slack support:** Basic"},"WebhookSubscriptionActivePayload":{"properties":{"type":{"type":"string","enum":["subscription.active"],"const":"subscription.active","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionActivePayload","description":"Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord & Slack support:** Full"},"WebhookSubscriptionCanceledPayload":{"properties":{"type":{"type":"string","enum":["subscription.canceled"],"const":"subscription.canceled","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionCanceledPayload","description":"Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord & Slack support:** Full"},"WebhookSubscriptionCreatedPayload":{"properties":{"type":{"type":"string","enum":["subscription.created"],"const":"subscription.created","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionCreatedPayload","description":"Sent when a new subscription is created.\n\n**Discord & Slack support:** Full"},"WebhookSubscriptionRevokedPayload":{"properties":{"type":{"type":"string","enum":["subscription.revoked"],"const":"subscription.revoked","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionRevokedPayload","description":"Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord & Slack support:** Full"},"WebhookSubscriptionUpdatedPayload":{"properties":{"type":{"type":"string","enum":["subscription.updated"],"const":"subscription.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionUpdatedPayload","description":"Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord & Slack support:** On cancellation and revocation. Renewals are skipped."}},"securitySchemes":{"oidc":{"type":"openIdConnect","openIdConnectUrl":"/.well-known/openid-configuration"},"pat":{"type":"http","description":"You can generate a **Personal Access Token** from your [settings](https://polar.sh/settings).","scheme":"bearer"},"customer_session":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"private","description":"Endpoints that should appear in the schema only in development to generate our internal JS SDK."},{"name":"documented","description":"Endpoints shown and documented in the Polar API documentation."},{"name":"featured","description":"Endpoints featured in the Polar API documentation for their interest in common use-cases."},{"name":"issue_funding","description":"Endpoints related to issue funding and rewards in the Polar API."}]} \ No newline at end of file diff --git a/.speakeasy/temp/output_694e26.json b/.speakeasy/temp/output_694e26.json deleted file mode 100644 index a2b803c..0000000 --- a/.speakeasy/temp/output_694e26.json +++ /dev/null @@ -1,30641 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "summary": "Polar HTTP and Webhooks API", - "title": "Polar API", - "description": "Read the docs at https://docs.polar.sh/api", - "version": "0.1.0" - }, - "servers": [ - { - "url": "https://api.polar.sh", - "description": "Production environment", - "x-speakeasy-server-id": "production" - }, - { - "url": "https://sandbox-api.polar.sh", - "description": "Sandbox environment", - "x-speakeasy-server-id": "sandbox" - } - ], - "paths": { - "/v1/external_organizations/": { - "get": { - "tags": [ - "external_organizations", - "documented", - "issue_funding" - ], - "summary": "List External Organizations", - "description": "List external organizations.", - "operationId": "external_organizations:list", - "parameters": [ - { - "name": "platform", - "in": "query", - "description": "Filter by platform.", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Platforms" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Platforms" - } - }, - { - "type": "null" - } - ], - "title": "Platform Filter", - "description": "Filter by platform." - } - }, - { - "name": "name", - "in": "query", - "description": "Filter by name.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "title": "RepositoryName Filter", - "description": "Filter by name." - } - }, - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExternalOrganizationSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_ExternalOrganization_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "external_organizations:read" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "external_organizations", - "x-speakeasy-name-override": "list" - } - }, - "/v1/repositories/": { - "get": { - "tags": [ - "repositories", - "documented", - "issue_funding" - ], - "summary": "List Repositories", - "description": "List repositories.", - "operationId": "repositories:list", - "parameters": [ - { - "name": "platform", - "in": "query", - "description": "Filter by platform.", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Platforms" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Platforms" - } - }, - { - "type": "null" - } - ], - "title": "Platform Filter", - "description": "Filter by platform." - } - }, - { - "name": "name", - "in": "query", - "description": "Filter by name.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "title": "RepositoryName Filter", - "description": "Filter by name." - } - }, - { - "name": "external_organization_name", - "in": "query", - "description": "Filter by external organization name.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "title": "ExternalOrganizationName Filter", - "description": "Filter by external organization name." - } - }, - { - "name": "is_private", - "in": "query", - "description": "Filter by private status.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Is Private", - "description": "Filter by private status." - } - }, - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/RepositorySortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Repository_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "repositories:read", - "repositories:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "repositories", - "x-speakeasy-name-override": "list" - } - }, - "/v1/repositories/{id}": { - "get": { - "tags": [ - "repositories", - "documented", - "issue_funding" - ], - "summary": "Get Repository", - "description": "Get a repository by ID.", - "operationId": "repositories:get", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The repository ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/repositories", - "resourceName": "Repository", - "displayProperty": "name" - } - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Repository" - } - } - } - }, - "404": { - "description": "Repository not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "repositories:read", - "repositories:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "Organization", - "User" - ], - "x-speakeasy-group": "repositories", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "repositories", - "documented", - "issue_funding" - ], - "summary": "Update Repository", - "description": "Update a repository.", - "operationId": "repositories:update", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The repository ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/repositories", - "resourceName": "Repository", - "displayProperty": "name" - } - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RepositoryUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Repository updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Repository" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this repository.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Repository not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "repositories:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "repositories", - "x-speakeasy-name-override": "update" - } - }, - "/v1/organizations/": { - "get": { - "tags": [ - "organizations", - "documented", - "featured" - ], - "summary": "List Organizations", - "description": "List organizations.", - "operationId": "organizations:list", - "parameters": [ - { - "name": "slug", - "in": "query", - "description": "Filter by slug.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Slug", - "description": "Filter by slug." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrganizationSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Organization_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "organizations:read", - "organizations:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "organizations", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "organizations", - "documented", - "featured" - ], - "summary": "Create Organization", - "description": "Create an organization.", - "operationId": "organizations:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Organization created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "organizations:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "User" - ], - "x-speakeasy-group": "organizations", - "x-speakeasy-name-override": "create" - } - }, - "/v1/organizations/{id}": { - "get": { - "tags": [ - "organizations", - "documented", - "featured" - ], - "summary": "Get Organization", - "description": "Get an organization by ID.", - "operationId": "organizations:get", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "404": { - "description": "Organization not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "organizations:read", - "organizations:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "organizations", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "organizations", - "documented", - "featured" - ], - "summary": "Update Organization", - "description": "Update an organization.", - "operationId": "organizations:update", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Organization updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this organization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Organization not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "organizations:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "organizations", - "x-speakeasy-name-override": "update" - } - }, - "/v1/subscriptions/": { - "get": { - "tags": [ - "subscriptions", - "documented" - ], - "summary": "List Subscriptions", - "description": "List subscriptions.", - "operationId": "subscriptions:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "product_id", - "in": "query", - "description": "Filter by product ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - } - }, - { - "name": "customer_id", - "in": "query", - "description": "Filter by customer ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "CustomerID Filter", - "description": "Filter by customer ID." - } - }, - { - "name": "discount_id", - "in": "query", - "description": "Filter by discount ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "DiscountID Filter", - "description": "Filter by discount ID." - } - }, - { - "name": "active", - "in": "query", - "description": "Filter by active or inactive subscription.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Active", - "description": "Filter by active or inactive subscription." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubscriptionSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-started_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Subscription_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "subscriptions:read", - "subscriptions:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "subscriptions", - "x-speakeasy-name-override": "list" - } - }, - "/v1/subscriptions/export": { - "get": { - "tags": [ - "subscriptions", - "documented" - ], - "summary": "Export Subscriptions", - "description": "Export subscriptions as a CSV file.", - "operationId": "subscriptions:export", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "Filter by organization ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "subscriptions:read", - "subscriptions:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "subscriptions", - "x-speakeasy-name-override": "export" - } - }, - "/v1/advertisements/": { - "get": { - "tags": [ - "advertisements", - "documented" - ], - "summary": "List Campaigns", - "description": "List active advertisement campaigns for a benefit.", - "operationId": "advertisements:list", - "parameters": [ - { - "name": "benefit_id", - "in": "query", - "required": true, - "schema": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/AdvertisementSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "granted_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdvertisementCampaignListResource" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "advertisements", - "x-speakeasy-name-override": "list" - } - }, - "/v1/advertisements/{id}": { - "get": { - "tags": [ - "advertisements", - "documented" - ], - "summary": "Get Campaign", - "description": "Get an advertisement campaign by ID.", - "operationId": "advertisements:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The advertisement campaign ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The advertisement campaign ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdvertisementCampaign" - } - } - } - }, - "404": { - "description": "Advertisement campaign not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "advertisements", - "x-speakeasy-name-override": "get" - } - }, - "/v1/oauth2/": { - "get": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "List Clients", - "description": "List OAuth2 clients.", - "operationId": "oauth2:clients:list", - "parameters": [ - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_OAuth2Client_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "list" - } - }, - "/v1/oauth2/register": { - "post": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "Create Client", - "description": "Create an OAuth2 client.", - "operationId": "oauth2:clients:oauth2:create_client", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2ClientConfiguration" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "User" - ], - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "create" - } - }, - "/v1/oauth2/register/{client_id}": { - "get": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "Get Client", - "description": "Get an OAuth2 client by Client ID.", - "operationId": "oauth2:clients:oauth2:get_client", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Client Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "get" - }, - "put": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "Update Client", - "description": "Update an OAuth2 client.", - "operationId": "oauth2:clients:oauth2:update_client", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Client Id" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2ClientConfigurationUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "update" - }, - "delete": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "Delete Client", - "description": "Delete an OAuth2 client.", - "operationId": "oauth2:clients:oauth2:delete_client", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Client Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "delete" - } - }, - "/v1/oauth2/authorize": { - "get": { - "tags": [ - "oauth2", - "documented" - ], - "summary": "Authorize", - "operationId": "oauth2:authorize", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AuthorizeResponseUser" - }, - { - "$ref": "#/components/schemas/AuthorizeResponseOrganization" - } - ], - "discriminator": { - "propertyName": "sub_type", - "mapping": { - "user": "#/components/schemas/AuthorizeResponseUser", - "organization": "#/components/schemas/AuthorizeResponseOrganization" - } - }, - "title": "Response Oauth2:Authorize" - } - } - } - } - }, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "oauth2", - "x-speakeasy-name-override": "authorize" - } - }, - "/v1/oauth2/token": { - "post": { - "tags": [ - "oauth2", - "featured", - "documented" - ], - "summary": "Request Token", - "description": "Request an access token using a valid grant.", - "operationId": "oauth2:request_token", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "oneOf": [ - { - "$ref": "#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest" - }, - { - "$ref": "#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest" - } - ], - "discriminator": { - "propertyName": "grant_type", - "mapping": { - "authorization_code": "#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest", - "refresh_token": "#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest" - } - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenResponse" - } - } - } - } - }, - "x-components": { - "AuthorizationCodeTokenRequest": { - "properties": { - "grant_type": { - "const": "authorization_code", - "enum": [ - "authorization_code" - ], - "title": "Grant Type", - "type": "string" - }, - "client_id": { - "title": "Client Id", - "type": "string" - }, - "client_secret": { - "title": "Client Secret", - "type": "string" - }, - "code": { - "title": "Code", - "type": "string" - }, - "redirect_uri": { - "format": "uri", - "maxLength": 2083, - "minLength": 1, - "title": "Redirect Uri", - "type": "string" - } - }, - "required": [ - "grant_type", - "client_id", - "client_secret", - "code", - "redirect_uri" - ], - "title": "AuthorizationCodeTokenRequest", - "type": "object" - }, - "RefreshTokenRequest": { - "properties": { - "grant_type": { - "const": "refresh_token", - "enum": [ - "refresh_token" - ], - "title": "Grant Type", - "type": "string" - }, - "client_id": { - "title": "Client Id", - "type": "string" - }, - "client_secret": { - "title": "Client Secret", - "type": "string" - }, - "refresh_token": { - "title": "Refresh Token", - "type": "string" - } - }, - "required": [ - "grant_type", - "client_id", - "client_secret", - "refresh_token" - ], - "title": "RefreshTokenRequest", - "type": "object" - } - }, - "x-speakeasy-group": "oauth2", - "x-speakeasy-name-override": "token" - } - }, - "/v1/oauth2/revoke": { - "post": { - "tags": [ - "oauth2", - "featured", - "documented" - ], - "summary": "Revoke Token", - "description": "Revoke an access token or a refresh token.", - "operationId": "oauth2:revoke_token", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "token": { - "type": "string", - "title": "Token" - }, - "token_type_hint": { - "anyOf": [ - { - "type": "string", - "enum": [ - "access_token", - "refresh_token" - ] - }, - { - "type": "null" - } - ], - "title": "Token Type Hint" - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "client_secret": { - "type": "string", - "title": "Client Secret" - } - }, - "title": "RevokeTokenRequest", - "required": [ - "token", - "client_id", - "client_secret" - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RevokeTokenResponse" - } - } - } - } - }, - "x-speakeasy-group": "oauth2", - "x-speakeasy-name-override": "revoke" - } - }, - "/v1/oauth2/introspect": { - "post": { - "tags": [ - "oauth2", - "featured", - "documented" - ], - "summary": "Introspect Token", - "description": "Get information about an access token.", - "operationId": "oauth2:introspect_token", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "token": { - "type": "string", - "title": "Token" - }, - "token_type_hint": { - "anyOf": [ - { - "type": "string", - "enum": [ - "access_token", - "refresh_token" - ] - }, - { - "type": "null" - } - ], - "title": "Token Type Hint" - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "client_secret": { - "type": "string", - "title": "Client Secret" - } - }, - "title": "IntrospectTokenRequest", - "required": [ - "token", - "client_id", - "client_secret" - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntrospectTokenResponse" - } - } - } - } - }, - "x-speakeasy-group": "oauth2", - "x-speakeasy-name-override": "introspect" - } - }, - "/v1/oauth2/userinfo": { - "get": { - "tags": [ - "oauth2", - "featured", - "documented" - ], - "summary": "Get User Info", - "description": "Get information about the authenticated user.", - "operationId": "oauth2:userinfo", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/UserInfoUser" - }, - { - "$ref": "#/components/schemas/UserInfoOrganization" - } - ], - "title": "Response Oauth2:Userinfo" - } - } - } - } - }, - "security": [ - { - "oidc": [] - } - ], - "x-speakeasy-name-override": "userinfo", - "x-speakeasy-group": "oauth2" - } - }, - "/v1/benefits/": { - "get": { - "tags": [ - "benefits", - "documented" - ], - "summary": "List Benefits", - "description": "List benefits.", - "operationId": "benefits:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "type", - "in": "query", - "description": "Filter by benefit type.", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitType" - } - }, - { - "type": "null" - } - ], - "title": "BenefitType Filter", - "description": "Filter by benefit type." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Benefit_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "benefits:read", - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "benefits", - "documented" - ], - "summary": "Create Benefit", - "description": "Create a benefit.", - "operationId": "benefits:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BenefitCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Benefit created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "create" - } - }, - "/v1/benefits/{id}": { - "get": { - "tags": [ - "benefits", - "documented" - ], - "summary": "Get Benefit", - "description": "Get a benefit by ID.", - "operationId": "benefits:get", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - } - } - }, - "404": { - "description": "Benefit not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "benefits:read", - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "get" - }, - "delete": { - "tags": [ - "benefits", - "documented" - ], - "summary": "Delete Benefit", - "description": "Delete a benefit.\n\n\u003e [!WARNING]\n\u003e Every grants associated with the benefit will be revoked.\n\u003e Users will lose access to the benefit.", - "operationId": "benefits:delete", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - } - ], - "responses": { - "204": { - "description": "Benefit deleted." - }, - "403": { - "description": "You don't have the permission to update this benefit or it's not deletable.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Benefit not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "delete" - }, - "patch": { - "tags": [ - "benefits", - "documented" - ], - "summary": "Update Benefit", - "description": "Update a benefit.", - "operationId": "benefits:update", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitAdsUpdate" - }, - { - "$ref": "#/components/schemas/BenefitCustomUpdate" - }, - { - "$ref": "#/components/schemas/BenefitDiscordUpdate" - }, - { - "$ref": "#/components/schemas/BenefitGitHubRepositoryUpdate" - }, - { - "$ref": "#/components/schemas/BenefitDownloadablesUpdate" - }, - { - "$ref": "#/components/schemas/BenefitLicenseKeysUpdate" - } - ], - "title": "Benefit Update" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Benefit updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this benefit.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Benefit not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "update" - } - }, - "/v1/benefits/{id}/grants": { - "get": { - "tags": [ - "benefits", - "documented" - ], - "summary": "List Benefit Grants", - "description": "List the individual grants for a benefit.\n\nIt's especially useful to check if a user has been granted a benefit.", - "operationId": "benefits:grants", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - }, - { - "name": "is_granted", - "in": "query", - "description": "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. ", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Is Granted", - "description": "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. " - } - }, - { - "name": "customer_id", - "in": "query", - "description": "Filter by customer.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "CustomerID Filter", - "description": "Filter by customer." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_BenefitGrant_" - } - } - } - }, - "404": { - "description": "Benefit not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "benefits:read", - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "grants" - } - }, - "/v1/products/": { - "get": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "List Products", - "description": "List products.", - "operationId": "products:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "query", - "in": "query", - "description": "Filter by product name.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Query", - "description": "Filter by product name." - } - }, - { - "name": "is_archived", - "in": "query", - "description": "Filter on archived products.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Is Archived", - "description": "Filter on archived products." - } - }, - { - "name": "is_recurring", - "in": "query", - "description": "Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. ", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Is Recurring", - "description": "Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. " - } - }, - { - "name": "benefit_id", - "in": "query", - "description": "Filter products granting specific benefit.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - }, - { - "type": "null" - } - ], - "title": "BenefitID Filter", - "description": "Filter products granting specific benefit." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Product_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "products:read", - "products:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "Create Product", - "description": "Create a product.", - "operationId": "products:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductCreate", - "title": "ProductCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Product created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "products:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "create" - } - }, - "/v1/products/{id}": { - "get": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "Get Product", - "description": "Get a product by ID.", - "operationId": "products:get", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "404": { - "description": "Product not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "products:read", - "products:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "Update Product", - "description": "Update a product.", - "operationId": "products:update", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Product updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this product.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Product not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "products:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "update" - } - }, - "/v1/products/{id}/benefits": { - "post": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "Update Product Benefits", - "description": "Update benefits granted by a product.", - "operationId": "products:update_benefits", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductBenefitsUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Product benefits updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this product.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Product not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "products:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "update_benefits" - } - }, - "/v1/orders/": { - "get": { - "tags": [ - "orders", - "documented" - ], - "summary": "List Orders", - "description": "List orders.", - "operationId": "orders:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "product_id", - "in": "query", - "description": "Filter by product ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - } - }, - { - "name": "product_price_type", - "in": "query", - "description": "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases.", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPriceType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPriceType" - } - }, - { - "type": "null" - } - ], - "title": "ProductPriceType Filter", - "description": "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - } - }, - { - "name": "discount_id", - "in": "query", - "description": "Filter by discount ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "DiscountID Filter", - "description": "Filter by discount ID." - } - }, - { - "name": "customer_id", - "in": "query", - "description": "Filter by customer ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "CustomerID Filter", - "description": "Filter by customer ID." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrderSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Order_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "orders:read" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "orders", - "x-speakeasy-name-override": "list" - } - }, - "/v1/orders/{id}": { - "get": { - "tags": [ - "orders", - "documented" - ], - "summary": "Get Order", - "description": "Get an order by ID.", - "operationId": "orders:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The order ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The order ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Order" - } - } - } - }, - "404": { - "description": "Order not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "orders:read" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "orders", - "x-speakeasy-name-override": "get" - } - }, - "/v1/orders/{id}/invoice": { - "get": { - "tags": [ - "orders", - "documented" - ], - "summary": "Get Order Invoice", - "description": "Get an order's invoice data.", - "operationId": "orders:invoice", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The order ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The order ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrderInvoice" - } - } - } - }, - "404": { - "description": "Order not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "orders:read" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "orders", - "x-speakeasy-name-override": "invoice" - } - }, - "/v1/checkouts/custom/": { - "get": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "List Checkout Sessions", - "description": "List checkout sessions.", - "operationId": "checkouts:custom:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "product_id", - "in": "query", - "description": "Filter by product ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CheckoutSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Checkout_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "checkouts:read", - "checkouts:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Create Checkout Session", - "description": "Create a checkout session.", - "operationId": "checkouts:custom:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Checkout session created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Checkout" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "checkouts:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "create" - } - }, - "/v1/checkouts/custom/{id}": { - "get": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Get Checkout Session", - "description": "Get a checkout session by ID.", - "operationId": "checkouts:custom:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The checkout session ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The checkout session ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Checkout" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "checkouts:read", - "checkouts:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Update Checkout Session", - "description": "Update a checkout session.", - "operationId": "checkouts:custom:update", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The checkout session ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The checkout session ID." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Checkout session updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Checkout" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "checkouts:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "update" - } - }, - "/v1/checkouts/custom/client/{client_secret}": { - "get": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Get Checkout Session from Client", - "description": "Get a checkout session by client secret.", - "operationId": "checkouts:custom:client_get", - "parameters": [ - { - "name": "client_secret", - "in": "path", - "description": "The checkout session client secret.", - "required": true, - "schema": { - "type": "string", - "title": "Client Secret", - "description": "The checkout session client secret." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPublic" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "client_get" - }, - "patch": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Update Checkout Session from Client", - "description": "Update a checkout session by client secret.", - "operationId": "checkouts:custom:client_update", - "parameters": [ - { - "name": "client_secret", - "in": "path", - "description": "The checkout session client secret.", - "required": true, - "schema": { - "type": "string", - "title": "Client Secret", - "description": "The checkout session client secret." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutUpdatePublic" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Checkout session updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPublic" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "client_update" - } - }, - "/v1/checkouts/custom/client/{client_secret}/confirm": { - "post": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Confirm Checkout Session from Client", - "description": "Confirm a checkout session by client secret.\n\nOrders and subscriptions will be processed.", - "operationId": "checkouts:custom:client_confirm", - "parameters": [ - { - "name": "client_secret", - "in": "path", - "description": "The checkout session client secret.", - "required": true, - "schema": { - "type": "string", - "title": "Client Secret", - "description": "The checkout session client secret." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutConfirmStripe" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Checkout session confirmed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPublicConfirmed" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "client_confirm" - } - }, - "/v1/checkouts/": { - "post": { - "tags": [ - "checkouts", - "documented" - ], - "summary": "Create Checkout", - "description": "Create a checkout session.", - "operationId": "checkouts:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLegacyCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLegacy" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-deprecation-replacement": "checkouts:custom:create", - "x-speakeasy-deprecation-message": "This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information.", - "x-speakeasy-group": "checkouts", - "x-speakeasy-name-override": "create" - } - }, - "/v1/checkouts/{id}": { - "get": { - "tags": [ - "checkouts", - "documented" - ], - "summary": "Get Checkout", - "description": "Get an active checkout session by ID.", - "operationId": "checkouts:get", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLegacy" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "deprecated": true, - "x-speakeasy-deprecation-message": "This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information.", - "x-speakeasy-group": "checkouts", - "x-speakeasy-name-override": "get" - } - }, - "/v1/files/": { - "get": { - "tags": [ - "files", - "documented" - ], - "summary": "List Files", - "description": "List files.", - "operationId": "files:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - } - }, - { - "name": "ids", - "in": "query", - "description": "List of file IDs to get. ", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "Ids", - "description": "List of file IDs to get. " - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_FileRead_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "files", - "documented" - ], - "summary": "Create File", - "description": "Create a file.", - "operationId": "files:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "File created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileUpload" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "create" - } - }, - "/v1/files/{id}/uploaded": { - "post": { - "tags": [ - "files", - "documented" - ], - "summary": "Complete File Upload", - "description": "Complete a file upload.", - "operationId": "files:uploaded", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The file ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The file ID." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileUploadCompleted" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "File upload completed.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/DownloadableFileRead" - }, - { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - { - "$ref": "#/components/schemas/OrganizationAvatarFileRead" - } - ], - "discriminator": { - "propertyName": "service", - "mapping": { - "downloadable": "#/components/schemas/DownloadableFileRead", - "product_media": "#/components/schemas/ProductMediaFileRead", - "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead" - } - }, - "title": "Response Files:Uploaded" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "File not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "uploaded" - } - }, - "/v1/files/{id}": { - "delete": { - "tags": [ - "files", - "documented" - ], - "summary": "Delete File", - "description": "Delete a file.", - "operationId": "files:delete", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4" - } - } - ], - "responses": { - "204": { - "description": "File deleted." - }, - "403": { - "description": "You don't have the permission to delete this file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "File not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "delete" - }, - "patch": { - "tags": [ - "files", - "documented" - ], - "summary": "Update File", - "description": "Update a file.", - "operationId": "files:update", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The file ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The file ID." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FilePatch" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "File updated.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/DownloadableFileRead" - }, - { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - { - "$ref": "#/components/schemas/OrganizationAvatarFileRead" - } - ], - "discriminator": { - "propertyName": "service", - "mapping": { - "downloadable": "#/components/schemas/DownloadableFileRead", - "product_media": "#/components/schemas/ProductMediaFileRead", - "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead" - } - }, - "title": "Response Files:Update" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "File not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "update" - } - }, - "/v1/metrics/": { - "get": { - "tags": [ - "metrics", - "documented" - ], - "summary": "Get Metrics", - "description": "Get metrics about your orders and subscriptions.", - "operationId": "metrics:get", - "parameters": [ - { - "name": "start_date", - "in": "query", - "description": "Start date.", - "required": true, - "schema": { - "type": "string", - "title": "Start Date", - "format": "date", - "description": "Start date." - } - }, - { - "name": "end_date", - "in": "query", - "description": "End date.", - "required": true, - "schema": { - "type": "string", - "title": "End Date", - "format": "date", - "description": "End date." - } - }, - { - "name": "interval", - "in": "query", - "description": "Interval between two timestamps.", - "required": true, - "schema": { - "$ref": "#/components/schemas/Interval", - "description": "Interval between two timestamps." - } - }, - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "product_id", - "in": "query", - "description": "Filter by product ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - } - }, - { - "name": "product_price_type", - "in": "query", - "description": "Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases.", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPriceType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPriceType" - } - }, - { - "type": "null" - } - ], - "title": "ProductPriceType Filter", - "description": "Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricsResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "metrics:read" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "metrics", - "x-speakeasy-name-override": "get" - } - }, - "/v1/metrics/limits": { - "get": { - "tags": [ - "metrics", - "documented" - ], - "summary": "Get Metrics Limits", - "description": "Get the interval limits for the metrics endpoint.", - "operationId": "metrics:limits", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricsLimits" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "metrics:read" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "metrics", - "x-speakeasy-name-override": "limits" - } - }, - "/v1/license-keys": { - "get": { - "tags": [ - "license_keys", - "documented", - "featured" - ], - "summary": "List License Keys", - "description": "Get license keys connected to the given organization \u0026 filters.", - "operationId": "license_keys:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "benefit_id", - "in": "query", - "description": "Filter by benefit ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - }, - { - "type": "null" - } - ], - "title": "BenefitID Filter", - "description": "Filter by benefit ID." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_LicenseKeyRead_" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "license_keys:read", - "license_keys:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "license_keys", - "x-speakeasy-name-override": "list" - } - }, - "/v1/license-keys/{id}": { - "get": { - "tags": [ - "license_keys", - "documented", - "featured" - ], - "summary": "Get License Key", - "description": "Get a license key.", - "operationId": "license_keys:get", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyWithActivations" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "license_keys:read", - "license_keys:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "license_keys", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "license_keys", - "documented", - "featured" - ], - "summary": "Update License Key", - "description": "Update a license key.", - "operationId": "license_keys:update", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyRead" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "license_keys:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "license_keys", - "x-speakeasy-name-override": "update" - } - }, - "/v1/license-keys/{id}/activations/{activation_id}": { - "get": { - "tags": [ - "license_keys", - "documented", - "featured" - ], - "summary": "Get Activation", - "description": "Get a license key activation.", - "operationId": "license_keys:get_activation", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4" - } - }, - { - "name": "activation_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Activation Id", - "format": "uuid4" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyActivationRead" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "license_keys:read", - "license_keys:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "license_keys", - "x-speakeasy-name-override": "get_activation" - } - }, - "/v1/checkout-links/": { - "get": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "List Checkout Links", - "description": "List checkout links.", - "operationId": "checkout-links:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "product_id", - "in": "query", - "description": "Filter by product ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CheckoutLinkSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CheckoutLink_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "checkout_links:read", - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "Create Checkout Link", - "description": "Create a checkout link.", - "operationId": "checkout-links:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLinkCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Checkout link created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLink" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "create" - } - }, - "/v1/checkout-links/{id}": { - "get": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "Get Checkout Link", - "description": "Get a checkout link by ID.", - "operationId": "checkout-links:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The checkout link ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The checkout link ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLink" - } - } - } - }, - "404": { - "description": "Checkout link not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "checkout_links:read", - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "get" - }, - "delete": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "Delete Checkout Link", - "description": "Delete a checkout link.", - "operationId": "checkout-links:delete", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The checkout link ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The checkout link ID." - } - } - ], - "responses": { - "204": { - "description": "Checkout link deleted." - }, - "404": { - "description": "Checkout link not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "delete" - }, - "patch": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "Update Checkout Link", - "description": "Update a checkout link.", - "operationId": "checkout-links:update", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The checkout link ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The checkout link ID." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLinkUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Checkout link updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLink" - } - } - } - }, - "404": { - "description": "Checkout link not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "update" - } - }, - "/v1/custom-fields/": { - "get": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "List Custom Fields", - "description": "List custom fields.", - "operationId": "custom-fields:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "query", - "in": "query", - "description": "Filter by custom field name or slug.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Query", - "description": "Filter by custom field name or slug." - } - }, - { - "name": "type", - "in": "query", - "description": "Filter by custom field type.", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldType" - } - }, - { - "type": "null" - } - ], - "title": "CustomFieldType Filter", - "description": "Filter by custom field type." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "slug" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CustomField_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "custom_fields:read", - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "Create Custom Field", - "description": "Create a custom field.", - "operationId": "custom-fields:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomFieldCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Custom field created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "create" - } - }, - "/v1/custom-fields/{id}": { - "get": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "Get Custom Field", - "description": "Get a custom field by ID.", - "operationId": "custom-fields:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The custom field ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The custom field ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - } - } - } - }, - "404": { - "description": "Custom field not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "custom_fields:read", - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "get" - }, - "delete": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "Delete Custom Field", - "description": "Delete a custom field.", - "operationId": "custom-fields:delete", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The custom field ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The custom field ID." - } - } - ], - "responses": { - "204": { - "description": "Custom field deleted." - }, - "404": { - "description": "Custom field not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "delete" - }, - "patch": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "Update Custom Field", - "description": "Update a custom field.", - "operationId": "custom-fields:update", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The custom field ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The custom field ID." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomFieldUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Custom field updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - } - } - } - }, - "404": { - "description": "Custom field not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "update" - } - }, - "/v1/discounts/": { - "get": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "List Discounts", - "description": "List discounts.", - "operationId": "discounts:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "query", - "in": "query", - "description": "Filter by name.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Query", - "description": "Filter by name." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/DiscountSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Discount_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "discounts:read", - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "Create Discount", - "description": "Create a discount.", - "operationId": "discounts:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiscountCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Discount created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Discount", - "title": "Discount" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "create" - } - }, - "/v1/discounts/{id}": { - "get": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "Get Discount", - "description": "Get a discount by ID.", - "operationId": "discounts:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The discount ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The discount ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Discount", - "title": "Discount" - } - } - } - }, - "404": { - "description": "Discount not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "discounts:read", - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "get" - }, - "delete": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "Delete Discount", - "description": "Delete a discount.", - "operationId": "discounts:delete", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The discount ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The discount ID." - } - } - ], - "responses": { - "204": { - "description": "Discount deleted." - }, - "404": { - "description": "Discount not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "delete" - }, - "patch": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "Update Discount", - "description": "Update a discount.", - "operationId": "discounts:update", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The discount ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The discount ID." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiscountUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Discount updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Discount", - "title": "Discount" - } - } - } - }, - "404": { - "description": "Discount not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "update" - } - }, - "/v1/customers/": { - "get": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "List Customers", - "description": "List customers.", - "operationId": "customers:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "query", - "in": "query", - "description": "Filter by name or email.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Query", - "description": "Filter by name or email." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Customer_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customers:read", - "customers:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "Create Customer", - "description": "Create a customer.", - "operationId": "customers:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Customer created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customers:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "create" - } - }, - "/v1/customers/{id}": { - "get": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "Get Customer", - "description": "Get a customer by ID.", - "operationId": "customers:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The customer ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "404": { - "description": "Customer not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customers:read", - "customers:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "get" - }, - "delete": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "Delete Customer", - "description": "Delete a customer.\n\nImmediately cancels any active subscriptions and revokes any active benefits.", - "operationId": "customers:delete", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The customer ID." - } - } - ], - "responses": { - "204": { - "description": "Customer deleted." - }, - "404": { - "description": "Customer not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customers:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "delete" - }, - "patch": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "Update Customer", - "description": "Update a customer.", - "operationId": "customers:update", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The customer ID." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Customer updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "404": { - "description": "Customer not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customers:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "update" - } - }, - "/v1/customer-portal/benefit-grants/": { - "get": { - "tags": [ - "customer_portal", - "benefit-grants", - "documented" - ], - "summary": "List Benefit Grants", - "description": "List benefits grants of the authenticated customer or user.", - "operationId": "customer_portal:benefit-grants:list", - "parameters": [ - { - "name": "type", - "in": "query", - "description": "Filter by benefit type.", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitType" - } - }, - { - "type": "null" - } - ], - "title": "BenefitType Filter", - "description": "Filter by benefit type." - } - }, - { - "name": "benefit_id", - "in": "query", - "description": "Filter by benefit ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "BenefitID Filter", - "description": "Filter by benefit ID." - } - }, - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "checkout_id", - "in": "query", - "description": "Filter by checkout ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "CheckoutID Filter", - "description": "Filter by checkout ID." - } - }, - { - "name": "order_id", - "in": "query", - "description": "Filter by order ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "OrderID Filter", - "description": "Filter by order ID." - } - }, - { - "name": "subscription_id", - "in": "query", - "description": "Filter by subscription ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "SubscriptionID Filter", - "description": "Filter by subscription ID." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerBenefitGrantSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-granted_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CustomerBenefitGrant_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.benefit-grants", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/benefit-grants/{id}": { - "get": { - "tags": [ - "customer_portal", - "benefit-grants", - "documented" - ], - "summary": "Get Benefit Grant", - "description": "Get a benefit grant by ID for the authenticated customer or user.", - "operationId": "customer_portal:benefit-grants:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The benefit grant ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The benefit grant ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerBenefitGrant", - "title": "CustomerBenefitGrant" - } - } - } - }, - "404": { - "description": "Benefit grant not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.benefit-grants", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "customer_portal", - "benefit-grants", - "documented" - ], - "summary": "Update Benefit Grant", - "description": "Update a benefit grant for the authenticated customer or user.", - "operationId": "customer_portal:benefit-grants:update", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The benefit grant ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The benefit grant ID." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerBenefitGrantUpdate", - "title": "CustomerBenefitGrantUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Benefit grant updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerBenefitGrant", - "title": "CustomerBenefitGrant" - } - } - } - }, - "403": { - "description": "The benefit grant is revoked and cannot be updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Benefit grant not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.benefit-grants", - "x-speakeasy-name-override": "update" - } - }, - "/v1/customer-portal/customers/{id}": { - "get": { - "tags": [ - "customer_portal", - "customers", - "documented" - ], - "summary": "Get Customer", - "description": "Get a customer by ID for the authenticated customer or user.", - "operationId": "customer_portal:customers:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The customer ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The customer ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerPortalCustomer" - } - } - } - }, - "404": { - "description": "Customer not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.customers", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/downloadables/": { - "get": { - "tags": [ - "customer_portal", - "downloadables", - "documented" - ], - "summary": "List Downloadables", - "operationId": "customer_portal:downloadables:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "benefit_id", - "in": "query", - "description": "Filter by benefit ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - }, - { - "type": "null" - } - ], - "title": "BenefitID Filter", - "description": "Filter by benefit ID." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_DownloadableRead_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.downloadables", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/downloadables/{token}": { - "get": { - "tags": [ - "customer_portal", - "downloadables", - "documented" - ], - "summary": "Get Downloadable", - "operationId": "customer_portal:downloadables:customer_portal.downloadables.get", - "parameters": [ - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Token" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "302": { - "description": "Redirected to download" - }, - "400": { - "description": "Invalid signature" - }, - "404": { - "description": "Downloadable not found" - }, - "410": { - "description": "Expired signature" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.downloadables", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/license-keys/": { - "get": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "List License Keys", - "operationId": "customer_portal:license_keys:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "benefit_id", - "in": "query", - "description": "Filter by a specific benefit", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - }, - { - "type": "null" - } - ], - "title": "Benefit Id", - "description": "Filter by a specific benefit" - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_LicenseKeyRead_" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/license-keys/{id}": { - "get": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "Get License Key", - "description": "Get a license key.", - "operationId": "customer_portal:license_keys:get", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyWithActivations" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/license-keys/validate": { - "post": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "Validate License Key", - "description": "Validate a license key.", - "operationId": "customer_portal:license_keys:validate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyValidate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidatedLicenseKey" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "validate" - } - }, - "/v1/customer-portal/license-keys/activate": { - "post": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "Activate License Key", - "description": "Activate a license key instance.", - "operationId": "customer_portal:license_keys:activate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyActivate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyActivationRead" - } - } - } - }, - "403": { - "description": "License key activation not required or permitted (limit reached).", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "activate" - } - }, - "/v1/customer-portal/license-keys/deactivate": { - "post": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "Deactivate License Key", - "description": "Deactivate a license key instance.", - "operationId": "customer_portal:license_keys:deactivate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyDeactivate" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "License key activation deactivated." - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "deactivate" - } - }, - "/v1/customer-portal/orders/": { - "get": { - "tags": [ - "customer_portal", - "orders", - "documented" - ], - "summary": "List Orders", - "description": "List orders of the authenticated customer or user.", - "operationId": "customer_portal:orders:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "product_id", - "in": "query", - "description": "Filter by product ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - } - }, - { - "name": "product_price_type", - "in": "query", - "description": "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases.", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPriceType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPriceType" - } - }, - { - "type": "null" - } - ], - "title": "ProductPriceType Filter", - "description": "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - } - }, - { - "name": "subscription_id", - "in": "query", - "description": "Filter by subscription ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "SubscriptionID Filter", - "description": "Filter by subscription ID." - } - }, - { - "name": "query", - "in": "query", - "description": "Search by product or organization name.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Query", - "description": "Search by product or organization name." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerOrderSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CustomerOrder_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.orders", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/orders/{id}": { - "get": { - "tags": [ - "customer_portal", - "orders", - "documented" - ], - "summary": "Get Order", - "description": "Get an order by ID for the authenticated customer or user.", - "operationId": "customer_portal:orders:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The order ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The order ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerOrder" - } - } - } - }, - "404": { - "description": "Order not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.orders", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/orders/{id}/invoice": { - "get": { - "tags": [ - "customer_portal", - "orders", - "documented" - ], - "summary": "Get Order Invoice", - "description": "Get an order's invoice data.", - "operationId": "customer_portal:orders:invoice", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The order ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The order ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerOrderInvoice" - } - } - } - }, - "404": { - "description": "Order not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.orders", - "x-speakeasy-name-override": "invoice" - } - }, - "/v1/customer-portal/organizations/{slug}": { - "get": { - "tags": [ - "customer_portal", - "organizations", - "documented" - ], - "summary": "Get Organization", - "description": "Get a customer portal's organization by slug.", - "operationId": "customer_portal:organizations:get", - "parameters": [ - { - "name": "slug", - "in": "path", - "description": "The organization slug.", - "required": true, - "schema": { - "type": "string", - "title": "Slug", - "description": "The organization slug." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "404": { - "description": "Organization not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.organizations", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/subscriptions/": { - "get": { - "tags": [ - "customer_portal", - "subscriptions", - "documented", - "featured" - ], - "summary": "List Subscriptions", - "description": "List subscriptions of the authenticated customer or user.", - "operationId": "customer_portal:subscriptions:list", - "parameters": [ - { - "name": "organization_id", - "in": "query", - "description": "Filter by organization ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - } - }, - { - "name": "product_id", - "in": "query", - "description": "Filter by product ID.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - } - }, - { - "name": "active", - "in": "query", - "description": "Filter by active or cancelled subscription.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Active", - "description": "Filter by active or cancelled subscription." - } - }, - { - "name": "query", - "in": "query", - "description": "Search by product or organization name.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Query", - "description": "Search by product or organization name." - } - }, - { - "name": "page", - "in": "query", - "description": "Page number, defaults to 1.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Page", - "description": "Page number, defaults to 1.", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "required": false, - "schema": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10 - } - }, - { - "name": "sorting", - "in": "query", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerSubscriptionSortProperty" - } - }, - { - "type": "null" - } - ], - "title": "Sorting", - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-started_at" - ] - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CustomerSubscription_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.subscriptions", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/subscriptions/{id}": { - "get": { - "tags": [ - "customer_portal", - "subscriptions", - "documented", - "featured" - ], - "summary": "Get Subscription", - "description": "Get a subscription for the authenticated customer or user.", - "operationId": "customer_portal:subscriptions:get", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The subscription ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The subscription ID." - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSubscription" - } - } - } - }, - "404": { - "description": "Subscription not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.subscriptions", - "x-speakeasy-name-override": "get" - }, - "delete": { - "tags": [ - "customer_portal", - "subscriptions", - "documented", - "featured" - ], - "summary": "Cancel Subscription", - "description": "Cancel a subscription of the authenticated customer or user.", - "operationId": "customer_portal:subscriptions:cancel", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The subscription ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The subscription ID." - } - } - ], - "responses": { - "200": { - "description": "Subscription canceled.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSubscription" - } - } - } - }, - "403": { - "description": "This subscription is already canceled or will be at the end of the period.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlreadyCanceledSubscription" - } - } - } - }, - "404": { - "description": "Subscription not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.subscriptions", - "x-speakeasy-name-override": "cancel" - }, - "patch": { - "tags": [ - "customer_portal", - "subscriptions", - "documented", - "featured" - ], - "summary": "Update Subscription", - "description": "Update a subscription of the authenticated customer or user.", - "operationId": "customer_portal:subscriptions:update", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The subscription ID.", - "required": true, - "schema": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The subscription ID." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSubscriptionUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Subscription updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSubscription" - } - } - } - }, - "404": { - "description": "Subscription not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.subscriptions", - "x-speakeasy-name-override": "update" - } - }, - "/v1/customer-sessions/": { - "post": { - "tags": [ - "customer-sessions", - "documented", - "featured" - ], - "summary": "Create Customer Session", - "description": "Create a customer session.", - "operationId": "customer-sessions:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSessionCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Customer session created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSession" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_sessions:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customer-sessions", - "x-speakeasy-name-override": "create" - } - } - }, - "components": { - "schemas": { - "Address": { - "type": "object", - "properties": { - "line1": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Line1" - }, - "line2": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Line2" - }, - "postal_code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Postal Code" - }, - "city": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "City" - }, - "state": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "State" - }, - "country": { - "type": "string", - "title": "Country", - "pattern": "^\\w{2}$" - } - }, - "title": "Address", - "required": [ - "country" - ] - }, - "AdvertisementCampaign": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "image_url": { - "type": "string", - "title": "Image Url", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "image_url_dark": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Image Url Dark" - }, - "text": { - "type": "string", - "title": "Text" - }, - "link_url": { - "type": "string", - "title": "Link Url", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - } - }, - "title": "AdvertisementCampaign", - "required": [ - "created_at", - "modified_at", - "id", - "image_url", - "image_url_dark", - "text", - "link_url" - ] - }, - "AdvertisementCampaignListResource": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AdvertisementCampaign" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - }, - "dimensions": { - "type": "array", - "prefixItems": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], - "items": { - "type": "integer" - }, - "title": "Dimensions", - "maxItems": 2, - "minItems": 2, - "description": "The dimensions (width, height) in pixels of the advertisement images." - } - }, - "title": "AdvertisementCampaignListResource", - "required": [ - "items", - "pagination", - "dimensions" - ] - }, - "AdvertisementSortProperty": { - "type": "string", - "title": "AdvertisementSortProperty", - "enum": [ - "created_at", - "-created_at", - "granted_at", - "-granted_at", - "views", - "-views", - "clicks", - "-clicks" - ] - }, - "AlreadyCanceledSubscription": { - "type": "object", - "properties": { - "error": { - "type": "string", - "title": "Error", - "enum": [ - "AlreadyCanceledSubscription" - ], - "const": "AlreadyCanceledSubscription" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "title": "AlreadyCanceledSubscription", - "required": [ - "error", - "detail" - ] - }, - "Assignee": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "title": "Id" - }, - "login": { - "type": "string", - "title": "Login" - }, - "html_url": { - "type": "string", - "title": "Html Url", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - } - }, - "title": "Assignee", - "required": [ - "id", - "login", - "html_url", - "avatar_url" - ] - }, - "AttachedCustomField": { - "type": "object", - "properties": { - "custom_field_id": { - "type": "string", - "title": "Custom Field Id", - "format": "uuid4", - "description": "ID of the custom field." - }, - "custom_field": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - }, - "order": { - "type": "integer", - "title": "Order", - "description": "Order of the custom field in the resource." - }, - "required": { - "type": "boolean", - "title": "Required", - "description": "Whether the value is required for this custom field." - } - }, - "title": "AttachedCustomField", - "required": [ - "custom_field_id", - "custom_field", - "order", - "required" - ], - "description": "Schema of a custom field attached to a resource." - }, - "AttachedCustomFieldCreate": { - "type": "object", - "properties": { - "custom_field_id": { - "type": "string", - "title": "Custom Field Id", - "format": "uuid4", - "description": "ID of the custom field to attach." - }, - "required": { - "type": "boolean", - "title": "Required", - "description": "Whether the value is required for this custom field." - } - }, - "title": "AttachedCustomFieldCreate", - "required": [ - "custom_field_id", - "required" - ], - "description": "Schema to attach a custom field to a resource." - }, - "Author": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "title": "Id" - }, - "login": { - "type": "string", - "title": "Login" - }, - "html_url": { - "type": "string", - "title": "Html Url", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - } - }, - "title": "Author", - "required": [ - "id", - "login", - "html_url", - "avatar_url" - ] - }, - "AuthorizeOrganization": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "slug": { - "type": "string", - "title": "Slug" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - } - }, - "title": "AuthorizeOrganization", - "required": [ - "id", - "slug", - "avatar_url" - ] - }, - "AuthorizeResponseOrganization": { - "type": "object", - "properties": { - "client": { - "$ref": "#/components/schemas/OAuth2ClientPublic" - }, - "sub_type": { - "type": "string", - "title": "Sub Type", - "enum": [ - "organization" - ], - "const": "organization" - }, - "sub": { - "anyOf": [ - { - "$ref": "#/components/schemas/AuthorizeOrganization" - }, - { - "type": "null" - } - ] - }, - "scopes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Scope" - }, - "title": "Scopes" - }, - "organizations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AuthorizeOrganization" - }, - "title": "Organizations" - } - }, - "title": "AuthorizeResponseOrganization", - "required": [ - "client", - "sub_type", - "sub", - "scopes", - "organizations" - ] - }, - "AuthorizeResponseUser": { - "type": "object", - "properties": { - "client": { - "$ref": "#/components/schemas/OAuth2ClientPublic" - }, - "sub_type": { - "type": "string", - "title": "Sub Type", - "enum": [ - "user" - ], - "const": "user" - }, - "sub": { - "anyOf": [ - { - "$ref": "#/components/schemas/AuthorizeUser" - }, - { - "type": "null" - } - ] - }, - "scopes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Scope" - }, - "title": "Scopes" - } - }, - "title": "AuthorizeResponseUser", - "required": [ - "client", - "sub_type", - "sub", - "scopes" - ] - }, - "AuthorizeUser": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "email": { - "type": "string", - "title": "Email", - "format": "email" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - } - }, - "title": "AuthorizeUser", - "required": [ - "id", - "email", - "avatar_url" - ] - }, - "Benefit": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitAds" - }, - { - "$ref": "#/components/schemas/BenefitCustom" - }, - { - "$ref": "#/components/schemas/BenefitDiscord" - }, - { - "$ref": "#/components/schemas/BenefitGitHubRepository" - }, - { - "$ref": "#/components/schemas/BenefitDownloadables" - }, - { - "$ref": "#/components/schemas/BenefitLicenseKeys" - } - ] - }, - "BenefitAds": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "ads" - ], - "const": "ads" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitAdsProperties" - } - }, - "title": "BenefitAds", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ], - "description": "A benefit of type `ads`.\n\nUse it so your backers can display ads on your README, website, etc." - }, - "BenefitAdsCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "ads" - ], - "const": "ads" - }, - "description": { - "type": "string", - "title": "Description", - "maxLength": 42, - "minLength": 3, - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitAdsProperties" - } - }, - "title": "BenefitAdsCreate", - "required": [ - "type", - "description", - "properties" - ] - }, - "BenefitAdsProperties": { - "type": "object", - "properties": { - "image_height": { - "type": "integer", - "title": "Image Height", - "description": "The height of the displayed ad.", - "default": 400 - }, - "image_width": { - "type": "integer", - "title": "Image Width", - "description": "The width of the displayed ad.", - "default": 400 - } - }, - "title": "BenefitAdsProperties", - "description": "Properties for a benefit of type `ads`." - }, - "BenefitAdsSubscriber": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "ads" - ], - "const": "ads" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitAdsProperties" - } - }, - "title": "BenefitAdsSubscriber", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ] - }, - "BenefitAdsUpdate": { - "type": "object", - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "ads" - ], - "const": "ads" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitAdsProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "BenefitAdsUpdate", - "required": [ - "type" - ] - }, - "BenefitBase": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "$ref": "#/components/schemas/BenefitType", - "description": "The type of the benefit." - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - } - }, - "title": "BenefitBase", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id" - ] - }, - "BenefitCreate": { - "oneOf": [ - { - "$ref": "#/components/schemas/BenefitCustomCreate" - }, - { - "$ref": "#/components/schemas/BenefitAdsCreate" - }, - { - "$ref": "#/components/schemas/BenefitDiscordCreate" - }, - { - "$ref": "#/components/schemas/BenefitGitHubRepositoryCreate" - }, - { - "$ref": "#/components/schemas/BenefitDownloadablesCreate" - }, - { - "$ref": "#/components/schemas/BenefitLicenseKeysCreate" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "ads": "#/components/schemas/BenefitAdsCreate", - "custom": "#/components/schemas/BenefitCustomCreate", - "discord": "#/components/schemas/BenefitDiscordCreate", - "downloadables": "#/components/schemas/BenefitDownloadablesCreate", - "github_repository": "#/components/schemas/BenefitGitHubRepositoryCreate", - "license_keys": "#/components/schemas/BenefitLicenseKeysCreate" - } - } - }, - "BenefitCustom": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "custom" - ], - "const": "custom" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitCustomProperties" - }, - "is_tax_applicable": { - "type": "boolean", - "title": "Is Tax Applicable", - "deprecated": true - } - }, - "title": "BenefitCustom", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties", - "is_tax_applicable" - ], - "description": "A benefit of type `custom`.\n\nUse it to grant any kind of benefit that doesn't fit in the other types." - }, - "BenefitCustomCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "custom" - ], - "const": "custom" - }, - "description": { - "type": "string", - "title": "Description", - "maxLength": 42, - "minLength": 3, - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitCustomCreateProperties" - } - }, - "title": "BenefitCustomCreate", - "required": [ - "type", - "description", - "properties" - ], - "description": "Schema to create a benefit of type `custom`." - }, - "BenefitCustomCreateProperties": { - "type": "object", - "properties": { - "note": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Private note to be shared with customers who have this benefit granted." - }, - { - "type": "null" - } - ], - "title": "Note" - } - }, - "title": "BenefitCustomCreateProperties", - "description": "Properties for creating a benefit of type `custom`." - }, - "BenefitCustomProperties": { - "type": "object", - "properties": { - "note": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Private note to be shared with customers who have this benefit granted." - }, - { - "type": "null" - } - ], - "title": "Note" - } - }, - "title": "BenefitCustomProperties", - "required": [ - "note" - ], - "description": "Properties for a benefit of type `custom`." - }, - "BenefitCustomSubscriber": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "custom" - ], - "const": "custom" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitCustomSubscriberProperties" - } - }, - "title": "BenefitCustomSubscriber", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ] - }, - "BenefitCustomSubscriberProperties": { - "type": "object", - "properties": { - "note": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Private note to be shared with customers who have this benefit granted." - }, - { - "type": "null" - } - ], - "title": "Note" - } - }, - "title": "BenefitCustomSubscriberProperties", - "required": [ - "note" - ], - "description": "Properties available to subscribers for a benefit of type `custom`." - }, - "BenefitCustomUpdate": { - "type": "object", - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "custom" - ], - "const": "custom" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitCustomProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "BenefitCustomUpdate", - "required": [ - "type" - ] - }, - "BenefitDiscord": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "discord" - ], - "const": "discord" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitDiscordProperties" - } - }, - "title": "BenefitDiscord", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ], - "description": "A benefit of type `discord`.\n\nUse it to automatically invite your backers to a Discord server." - }, - "BenefitDiscordCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "discord" - ], - "const": "discord" - }, - "description": { - "type": "string", - "title": "Description", - "maxLength": 42, - "minLength": 3, - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitDiscordCreateProperties" - } - }, - "title": "BenefitDiscordCreate", - "required": [ - "type", - "description", - "properties" - ] - }, - "BenefitDiscordCreateProperties": { - "type": "object", - "properties": { - "guild_token": { - "type": "string", - "title": "Guild Token" - }, - "role_id": { - "type": "string", - "title": "Role Id", - "description": "The ID of the Discord role to grant." - } - }, - "title": "BenefitDiscordCreateProperties", - "required": [ - "guild_token", - "role_id" - ], - "description": "Properties to create a benefit of type `discord`." - }, - "BenefitDiscordProperties": { - "type": "object", - "properties": { - "guild_id": { - "type": "string", - "title": "Guild Id", - "description": "The ID of the Discord server." - }, - "role_id": { - "type": "string", - "title": "Role Id", - "description": "The ID of the Discord role to grant." - }, - "guild_token": { - "type": "string", - "title": "Guild Token", - "readOnly": true - } - }, - "title": "BenefitDiscordProperties", - "required": [ - "guild_id", - "role_id", - "guild_token" - ], - "description": "Properties for a benefit of type `discord`." - }, - "BenefitDiscordSubscriber": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "discord" - ], - "const": "discord" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitDiscordSubscriberProperties" - } - }, - "title": "BenefitDiscordSubscriber", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ] - }, - "BenefitDiscordSubscriberProperties": { - "type": "object", - "properties": { - "guild_id": { - "type": "string", - "title": "Guild Id", - "description": "The ID of the Discord server." - } - }, - "title": "BenefitDiscordSubscriberProperties", - "required": [ - "guild_id" - ], - "description": "Properties available to subscribers for a benefit of type `discord`." - }, - "BenefitDiscordUpdate": { - "type": "object", - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "discord" - ], - "const": "discord" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitDiscordCreateProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "BenefitDiscordUpdate", - "required": [ - "type" - ] - }, - "BenefitDownloadables": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "downloadables" - ], - "const": "downloadables" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitDownloadablesProperties" - } - }, - "title": "BenefitDownloadables", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ] - }, - "BenefitDownloadablesCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "downloadables" - ], - "const": "downloadables" - }, - "description": { - "type": "string", - "title": "Description", - "maxLength": 42, - "minLength": 3, - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitDownloadablesCreateProperties" - } - }, - "title": "BenefitDownloadablesCreate", - "required": [ - "type", - "description", - "properties" - ] - }, - "BenefitDownloadablesCreateProperties": { - "type": "object", - "properties": { - "archived": { - "type": "object", - "title": "Archived", - "additionalProperties": { - "type": "boolean" - }, - "default": {} - }, - "files": { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - }, - "title": "Files", - "minItems": 1 - } - }, - "title": "BenefitDownloadablesCreateProperties", - "required": [ - "files" - ] - }, - "BenefitDownloadablesProperties": { - "type": "object", - "properties": { - "archived": { - "type": "object", - "title": "Archived", - "additionalProperties": { - "type": "boolean" - } - }, - "files": { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - }, - "title": "Files" - } - }, - "title": "BenefitDownloadablesProperties", - "required": [ - "archived", - "files" - ] - }, - "BenefitDownloadablesSubscriber": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "downloadables" - ], - "const": "downloadables" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitDownloadablesSubscriberProperties" - } - }, - "title": "BenefitDownloadablesSubscriber", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ] - }, - "BenefitDownloadablesSubscriberProperties": { - "type": "object", - "properties": { - "active_files": { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - }, - "title": "Active Files" - } - }, - "title": "BenefitDownloadablesSubscriberProperties", - "required": [ - "active_files" - ] - }, - "BenefitDownloadablesUpdate": { - "type": "object", - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "downloadables" - ], - "const": "downloadables" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitDownloadablesCreateProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "BenefitDownloadablesUpdate", - "required": [ - "type" - ] - }, - "BenefitGitHubRepository": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "github_repository" - ], - "const": "github_repository" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitGitHubRepositoryProperties" - } - }, - "title": "BenefitGitHubRepository", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ], - "description": "A benefit of type `github_repository`.\n\nUse it to automatically invite your backers to a private GitHub repository." - }, - "BenefitGitHubRepositoryCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "github_repository" - ], - "const": "github_repository" - }, - "description": { - "type": "string", - "title": "Description", - "maxLength": 42, - "minLength": 3, - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGitHubRepositoryCreateProperties" - } - }, - "title": "BenefitGitHubRepositoryCreate", - "required": [ - "type", - "description", - "properties" - ] - }, - "BenefitGitHubRepositoryCreateProperties": { - "type": "object", - "properties": { - "repository_owner": { - "type": "string", - "examples": [ - "polarsource" - ], - "title": "Repository Owner", - "description": "The owner of the repository." - }, - "repository_name": { - "type": "string", - "examples": [ - "private_repo" - ], - "title": "Repository Name", - "description": "The name of the repository." - }, - "permission": { - "type": "string", - "title": "Permission", - "enum": [ - "pull", - "triage", - "push", - "maintain", - "admin" - ], - "description": "The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)." - } - }, - "title": "BenefitGitHubRepositoryCreateProperties", - "required": [ - "repository_owner", - "repository_name", - "permission" - ], - "description": "Properties to create a benefit of type `github_repository`." - }, - "BenefitGitHubRepositoryProperties": { - "type": "object", - "properties": { - "repository_owner": { - "type": "string", - "examples": [ - "polarsource" - ], - "title": "Repository Owner", - "description": "The owner of the repository." - }, - "repository_name": { - "type": "string", - "examples": [ - "private_repo" - ], - "title": "Repository Name", - "description": "The name of the repository." - }, - "permission": { - "type": "string", - "title": "Permission", - "enum": [ - "pull", - "triage", - "push", - "maintain", - "admin" - ], - "description": "The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)." - }, - "repository_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Repository Id", - "deprecated": true - } - }, - "title": "BenefitGitHubRepositoryProperties", - "required": [ - "repository_owner", - "repository_name", - "permission" - ], - "description": "Properties for a benefit of type `github_repository`." - }, - "BenefitGitHubRepositorySubscriber": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "github_repository" - ], - "const": "github_repository" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGitHubRepositorySubscriberProperties" - } - }, - "title": "BenefitGitHubRepositorySubscriber", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ] - }, - "BenefitGitHubRepositorySubscriberProperties": { - "type": "object", - "properties": { - "repository_owner": { - "type": "string", - "examples": [ - "polarsource" - ], - "title": "Repository Owner", - "description": "The owner of the repository." - }, - "repository_name": { - "type": "string", - "examples": [ - "private_repo" - ], - "title": "Repository Name", - "description": "The name of the repository." - } - }, - "title": "BenefitGitHubRepositorySubscriberProperties", - "required": [ - "repository_owner", - "repository_name" - ], - "description": "Properties available to subscribers for a benefit of type `github_repository`." - }, - "BenefitGitHubRepositoryUpdate": { - "type": "object", - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "github_repository" - ], - "const": "github_repository" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitGitHubRepositoryCreateProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "BenefitGitHubRepositoryUpdate", - "required": [ - "type" - ] - }, - "BenefitGrant": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the grant." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At", - "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted." - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted", - "description": "Whether the benefit is granted." - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At", - "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked." - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked", - "description": "Whether the benefit is revoked." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "The ID of the subscription that granted this benefit." - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id", - "description": "The ID of the order that granted this benefit." - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4", - "description": "The ID of the customer concerned by this grant." - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4", - "description": "The ID of the benefit concerned by this grant." - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitGrantDiscordProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantAdsProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantCustomProperties" - } - ], - "title": "Properties" - } - }, - "title": "BenefitGrant", - "required": [ - "created_at", - "modified_at", - "id", - "is_granted", - "is_revoked", - "subscription_id", - "order_id", - "customer_id", - "user_id", - "benefit_id", - "properties" - ] - }, - "BenefitGrantAdsProperties": { - "type": "object", - "properties": { - "advertisement_campaign_id": { - "type": "string", - "title": "Advertisement Campaign Id" - } - }, - "title": "BenefitGrantAdsProperties", - "required": [ - "advertisement_campaign_id" - ] - }, - "BenefitGrantCustomProperties": { - "type": "object", - "title": "BenefitGrantCustomProperties" - }, - "BenefitGrantDiscordProperties": { - "type": "object", - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - }, - "guild_id": { - "type": "string", - "title": "Guild Id" - }, - "role_id": { - "type": "string", - "title": "Role Id" - } - }, - "title": "BenefitGrantDiscordProperties" - }, - "BenefitGrantDownloadablesProperties": { - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Files" - } - }, - "title": "BenefitGrantDownloadablesProperties" - }, - "BenefitGrantGitHubRepositoryProperties": { - "type": "object", - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - }, - "repository_owner": { - "type": "string", - "title": "Repository Owner" - }, - "repository_name": { - "type": "string", - "title": "Repository Name" - }, - "permission": { - "type": "string", - "title": "Permission", - "enum": [ - "pull", - "triage", - "push", - "maintain", - "admin" - ] - } - }, - "title": "BenefitGrantGitHubRepositoryProperties" - }, - "BenefitGrantLicenseKeysProperties": { - "type": "object", - "properties": { - "license_key_id": { - "type": "string", - "title": "License Key Id" - }, - "display_key": { - "type": "string", - "title": "Display Key" - } - }, - "title": "BenefitGrantLicenseKeysProperties" - }, - "BenefitGrantWebhook": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the grant." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At", - "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted." - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted", - "description": "Whether the benefit is granted." - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At", - "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked." - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked", - "description": "Whether the benefit is revoked." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "The ID of the subscription that granted this benefit." - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id", - "description": "The ID of the order that granted this benefit." - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4", - "description": "The ID of the customer concerned by this grant." - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4", - "description": "The ID of the benefit concerned by this grant." - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitGrantDiscordProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantAdsProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantCustomProperties" - } - ], - "title": "Properties" - }, - "benefit": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - }, - "previous_properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitGrantDiscordProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantAdsProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantCustomProperties" - }, - { - "type": "null" - } - ], - "title": "Previous Properties" - } - }, - "title": "BenefitGrantWebhook", - "required": [ - "created_at", - "modified_at", - "id", - "is_granted", - "is_revoked", - "subscription_id", - "order_id", - "customer_id", - "user_id", - "benefit_id", - "properties", - "benefit" - ] - }, - "BenefitLicenseKeyActivationProperties": { - "type": "object", - "properties": { - "limit": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Limit", - "maximum": 50 - }, - "enable_customer_admin": { - "type": "boolean", - "title": "Enable Customer Admin" - } - }, - "title": "BenefitLicenseKeyActivationProperties", - "required": [ - "limit", - "enable_customer_admin" - ] - }, - "BenefitLicenseKeyExpirationProperties": { - "type": "object", - "properties": { - "ttl": { - "exclusiveMinimum": 0, - "type": "integer", - "title": "Ttl" - }, - "timeframe": { - "type": "string", - "title": "Timeframe", - "enum": [ - "year", - "month", - "day" - ] - } - }, - "title": "BenefitLicenseKeyExpirationProperties", - "required": [ - "ttl", - "timeframe" - ] - }, - "BenefitLicenseKeys": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "license_keys" - ], - "const": "license_keys" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitLicenseKeysProperties" - } - }, - "title": "BenefitLicenseKeys", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ] - }, - "BenefitLicenseKeysCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "license_keys" - ], - "const": "license_keys" - }, - "description": { - "type": "string", - "title": "Description", - "maxLength": 42, - "minLength": 3, - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitLicenseKeysCreateProperties" - } - }, - "title": "BenefitLicenseKeysCreate", - "required": [ - "type", - "description", - "properties" - ] - }, - "BenefitLicenseKeysCreateProperties": { - "type": "object", - "properties": { - "prefix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prefix" - }, - "expires": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties" - }, - { - "type": "null" - } - ] - }, - "activations": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties" - }, - { - "type": "null" - } - ] - }, - "limit_usage": { - "anyOf": [ - { - "exclusiveMinimum": 0, - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - } - }, - "title": "BenefitLicenseKeysCreateProperties" - }, - "BenefitLicenseKeysProperties": { - "type": "object", - "properties": { - "prefix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prefix" - }, - "expires": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties" - }, - { - "type": "null" - } - ] - }, - "activations": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties" - }, - { - "type": "null" - } - ] - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - } - }, - "title": "BenefitLicenseKeysProperties", - "required": [ - "prefix", - "expires", - "activations", - "limit_usage" - ] - }, - "BenefitLicenseKeysSubscriber": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "license_keys" - ], - "const": "license_keys" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitLicenseKeysSubscriberProperties" - } - }, - "title": "BenefitLicenseKeysSubscriber", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ] - }, - "BenefitLicenseKeysSubscriberProperties": { - "type": "object", - "properties": { - "prefix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prefix" - }, - "expires": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties" - }, - { - "type": "null" - } - ] - }, - "activations": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties" - }, - { - "type": "null" - } - ] - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - } - }, - "title": "BenefitLicenseKeysSubscriberProperties", - "required": [ - "prefix", - "expires", - "activations", - "limit_usage" - ] - }, - "BenefitLicenseKeysUpdate": { - "type": "object", - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "license_keys" - ], - "const": "license_keys" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeysCreateProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "BenefitLicenseKeysUpdate", - "required": [ - "type" - ] - }, - "BenefitType": { - "type": "string", - "title": "BenefitType", - "enum": [ - "custom", - "ads", - "discord", - "github_repository", - "downloadables", - "license_keys" - ] - }, - "Checkout": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "$ref": "#/components/schemas/PaymentProcessor", - "description": "Payment processor used." - }, - "status": { - "$ref": "#/components/schemas/CheckoutStatus", - "description": "Status of the checkout session." - }, - "client_secret": { - "type": "string", - "title": "Client Secret", - "description": "Client secret used to update and complete the checkout session from the client." - }, - "url": { - "type": "string", - "title": "Url", - "description": "URL where the customer can access the checkout session." - }, - "expires_at": { - "type": "string", - "title": "Expires At", - "format": "date-time", - "description": "Expiration date and time of the checkout session." - }, - "success_url": { - "type": "string", - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "tax_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Tax Amount", - "description": "Computed tax amount to pay in cents." - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency", - "description": "Currency code of the checkout session." - }, - "subtotal_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Subtotal Amount", - "description": "Subtotal amount in cents, including discounts and before tax." - }, - "total_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Amount", - "description": "Total amount to pay in cents, including discounts and after tax." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "ID of the product to checkout." - }, - "product_price_id": { - "type": "string", - "title": "Product Price Id", - "format": "uuid4", - "description": "ID of the product price to checkout." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount applied to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "is_discount_applicable": { - "type": "boolean", - "title": "Is Discount Applicable", - "description": "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable." - }, - "is_free_product_price": { - "type": "boolean", - "title": "Is Free Product Price", - "description": "Whether the product price is free, regardless of discounts." - }, - "is_payment_required": { - "type": "boolean", - "title": "Is Payment Required", - "description": "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount." - }, - "is_payment_setup_required": { - "type": "boolean", - "title": "Is Payment Setup Required", - "description": "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles." - }, - "is_payment_form_required": { - "type": "boolean", - "title": "Is Payment Form Required", - "description": "Whether the checkout requires a payment form, whether because of a payment or payment method setup." - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "payment_processor_metadata": { - "type": "object", - "title": "Payment Processor Metadata" - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "product": { - "$ref": "#/components/schemas/CheckoutProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration" - } - ] - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "attached_custom_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachedCustomField" - }, - "title": "Attached Custom Fields" - }, - "customer_metadata": { - "type": "object", - "title": "Customer Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - } - }, - "title": "Checkout", - "required": [ - "created_at", - "modified_at", - "id", - "payment_processor", - "status", - "client_secret", - "url", - "expires_at", - "success_url", - "embed_origin", - "amount", - "tax_amount", - "currency", - "subtotal_amount", - "total_amount", - "product_id", - "product_price_id", - "discount_id", - "allow_discount_codes", - "is_discount_applicable", - "is_free_product_price", - "is_payment_required", - "is_payment_setup_required", - "is_payment_form_required", - "customer_id", - "customer_name", - "customer_email", - "customer_ip_address", - "customer_billing_address", - "customer_tax_id", - "payment_processor_metadata", - "metadata", - "product", - "product_price", - "discount", - "subscription_id", - "attached_custom_fields", - "customer_metadata" - ], - "description": "Checkout session data retrieved using an access token." - }, - "CheckoutConfirmStripe": { - "type": "object", - "properties": { - "custom_field_data": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id", - "description": "ID of the product price to checkout. Must correspond to a price linked to the same product." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "discount_code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Discount Code", - "description": "Discount code to apply to the checkout." - }, - "confirmation_token_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Confirmation Token Id", - "description": "ID of the Stripe confirmation token. Required for fixed prices and custom prices." - } - }, - "title": "CheckoutConfirmStripe", - "description": "Confirm a checkout session using a Stripe confirmation token." - }, - "CheckoutCreate": { - "anyOf": [ - { - "$ref": "#/components/schemas/CheckoutProductCreate" - }, - { - "$ref": "#/components/schemas/CheckoutPriceCreate" - } - ] - }, - "CheckoutDiscountFixedOnceForeverDuration": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "name": { - "type": "string", - "title": "Name" - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code" - } - }, - "title": "CheckoutDiscountFixedOnceForeverDuration", - "required": [ - "duration", - "type", - "amount", - "currency", - "id", - "name", - "code" - ], - "description": "Schema for a fixed amount discount that is applied once or forever." - }, - "CheckoutDiscountFixedRepeatDuration": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "name": { - "type": "string", - "title": "Name" - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code" - } - }, - "title": "CheckoutDiscountFixedRepeatDuration", - "required": [ - "duration", - "duration_in_months", - "type", - "amount", - "currency", - "id", - "name", - "code" - ], - "description": "Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months." - }, - "CheckoutDiscountPercentageOnceForeverDuration": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "name": { - "type": "string", - "title": "Name" - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code" - } - }, - "title": "CheckoutDiscountPercentageOnceForeverDuration", - "required": [ - "duration", - "type", - "basis_points", - "id", - "name", - "code" - ], - "description": "Schema for a percentage discount that is applied once or forever." - }, - "CheckoutDiscountPercentageRepeatDuration": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "name": { - "type": "string", - "title": "Name" - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code" - } - }, - "title": "CheckoutDiscountPercentageRepeatDuration", - "required": [ - "duration", - "duration_in_months", - "type", - "basis_points", - "id", - "name", - "code" - ], - "description": "Schema for a percentage discount that is applied on every invoice\nfor a certain number of months." - }, - "CheckoutLegacy": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of the checkout." - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url", - "description": "URL the customer should be redirected to complete the purchase." - }, - "customer_email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "product": { - "$ref": "#/components/schemas/CheckoutProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - } - }, - "title": "CheckoutLegacy", - "required": [ - "id", - "customer_email", - "customer_name", - "product", - "product_price" - ], - "description": "A checkout session." - }, - "CheckoutLegacyCreate": { - "type": "object", - "properties": { - "product_price_id": { - "type": "string", - "title": "Product Price Id", - "format": "uuid4", - "description": "ID of the product price to subscribe to." - }, - "success_url": { - "type": "string", - "title": "Success Url", - "minLength": 1, - "format": "uri", - "description": "URL where the customer will be redirected after a successful subscription. You can add the `session_id={CHECKOUT_SESSION_ID}` query parameter to retrieve the checkout session id." - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email" - }, - { - "type": "null" - } - ], - "title": "Customer Email", - "description": "If you already know the email of your customer, you can set it. It'll be pre-filled on the checkout page." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "ID of the subscription to update. If not provided, a new subscription will be created." - } - }, - "title": "CheckoutLegacyCreate", - "required": [ - "product_price_id", - "success_url" - ] - }, - "CheckoutLink": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "payment_processor": { - "$ref": "#/components/schemas/PaymentProcessor", - "description": "Payment processor used." - }, - "client_secret": { - "type": "string", - "title": "Client Secret", - "description": "Client secret used to access the checkout link." - }, - "success_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment." - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Label", - "description": "Optional label to distinguish links internally" - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "ID of the product to checkout." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id", - "description": "ID of the product price to checkout. First available price will be selected unless an explicit price ID is set." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - }, - "product": { - "$ref": "#/components/schemas/CheckoutLinkProduct" - }, - "product_price": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPrice" - }, - { - "type": "null" - } - ] - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase" - } - ], - "title": "CheckoutLinkDiscount" - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "url": { - "type": "string", - "title": "Url", - "readOnly": true - } - }, - "title": "CheckoutLink", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "payment_processor", - "client_secret", - "success_url", - "label", - "allow_discount_codes", - "product_id", - "product_price_id", - "discount_id", - "product", - "product_price", - "discount", - "url" - ], - "description": "Checkout link data." - }, - "CheckoutLinkCreate": { - "anyOf": [ - { - "$ref": "#/components/schemas/CheckoutLinkProductCreate" - }, - { - "$ref": "#/components/schemas/CheckoutLinkPriceCreate" - } - ] - }, - "CheckoutLinkPriceCreate": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "payment_processor": { - "type": "string", - "title": "Payment Processor", - "enum": [ - "stripe" - ], - "description": "Payment processor to use. Currently only Stripe is supported.", - "const": "stripe" - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Label", - "description": "Optional label to distinguish links internally" - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.", - "default": true - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "product_price_id": { - "type": "string", - "title": "Product Price Id", - "format": "uuid4", - "description": "ID of the product price to checkout." - } - }, - "title": "CheckoutLinkPriceCreate", - "required": [ - "payment_processor", - "product_price_id" - ] - }, - "CheckoutLinkProduct": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the product." - }, - "prices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitBase" - }, - "title": "BenefitPublic", - "description": "List of benefits granted by the product." - }, - "medias": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "title": "Medias", - "description": "List of medias associated to the product." - } - }, - "title": "CheckoutLinkProduct", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "prices", - "benefits", - "medias" - ], - "description": "Product data for a checkout link." - }, - "CheckoutLinkProductCreate": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "payment_processor": { - "type": "string", - "title": "Payment Processor", - "enum": [ - "stripe" - ], - "description": "Payment processor to use. Currently only Stripe is supported.", - "const": "stripe" - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Label", - "description": "Optional label to distinguish links internally" - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.", - "default": true - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "ID of the product to checkout. First available price will be selected." - } - }, - "title": "CheckoutLinkProductCreate", - "required": [ - "payment_processor", - "product_id" - ] - }, - "CheckoutLinkSortProperty": { - "type": "string", - "title": "CheckoutLinkSortProperty", - "enum": [ - "created_at", - "-created_at" - ] - }, - "CheckoutLinkUpdate": { - "type": "object", - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Label" - }, - "allow_discount_codes": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - } - }, - "title": "CheckoutLinkUpdate", - "description": "Schema to update an existing checkout link." - }, - "CheckoutPriceCreate": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "type": "string", - "title": "Payment Processor", - "enum": [ - "stripe" - ], - "description": "Payment processor to use. Currently only Stripe is supported.", - "const": "stripe" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.", - "default": true - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id", - "description": "ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer." - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "customer_metadata": { - "type": "object", - "title": "Customer Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page." - }, - "product_price_id": { - "type": "string", - "title": "Product Price Id", - "format": "uuid4", - "description": "ID of the product price to checkout." - } - }, - "title": "CheckoutPriceCreate", - "required": [ - "payment_processor", - "product_price_id" - ], - "description": "Create a new checkout session from a product price.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription." - }, - "CheckoutProduct": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the product." - }, - "prices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitBase" - }, - "title": "BenefitPublic", - "description": "List of benefits granted by the product." - }, - "medias": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "title": "Medias", - "description": "List of medias associated to the product." - } - }, - "title": "CheckoutProduct", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "prices", - "benefits", - "medias" - ], - "description": "Product data for a checkout session." - }, - "CheckoutProductCreate": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "type": "string", - "title": "Payment Processor", - "enum": [ - "stripe" - ], - "description": "Payment processor to use. Currently only Stripe is supported.", - "const": "stripe" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.", - "default": true - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id", - "description": "ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer." - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "customer_metadata": { - "type": "object", - "title": "Customer Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "ID of the product to checkout. First available price will be selected." - } - }, - "title": "CheckoutProductCreate", - "required": [ - "payment_processor", - "product_id" - ], - "description": "Create a new checkout session from a product.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription." - }, - "CheckoutPublic": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "$ref": "#/components/schemas/PaymentProcessor", - "description": "Payment processor used." - }, - "status": { - "$ref": "#/components/schemas/CheckoutStatus", - "description": "Status of the checkout session." - }, - "client_secret": { - "type": "string", - "title": "Client Secret", - "description": "Client secret used to update and complete the checkout session from the client." - }, - "url": { - "type": "string", - "title": "Url", - "description": "URL where the customer can access the checkout session." - }, - "expires_at": { - "type": "string", - "title": "Expires At", - "format": "date-time", - "description": "Expiration date and time of the checkout session." - }, - "success_url": { - "type": "string", - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "tax_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Tax Amount", - "description": "Computed tax amount to pay in cents." - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency", - "description": "Currency code of the checkout session." - }, - "subtotal_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Subtotal Amount", - "description": "Subtotal amount in cents, including discounts and before tax." - }, - "total_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Amount", - "description": "Total amount to pay in cents, including discounts and after tax." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "ID of the product to checkout." - }, - "product_price_id": { - "type": "string", - "title": "Product Price Id", - "format": "uuid4", - "description": "ID of the product price to checkout." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount applied to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "is_discount_applicable": { - "type": "boolean", - "title": "Is Discount Applicable", - "description": "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable." - }, - "is_free_product_price": { - "type": "boolean", - "title": "Is Free Product Price", - "description": "Whether the product price is free, regardless of discounts." - }, - "is_payment_required": { - "type": "boolean", - "title": "Is Payment Required", - "description": "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount." - }, - "is_payment_setup_required": { - "type": "boolean", - "title": "Is Payment Setup Required", - "description": "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles." - }, - "is_payment_form_required": { - "type": "boolean", - "title": "Is Payment Form Required", - "description": "Whether the checkout requires a payment form, whether because of a payment or payment method setup." - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "payment_processor_metadata": { - "type": "object", - "title": "Payment Processor Metadata" - }, - "product": { - "$ref": "#/components/schemas/CheckoutProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration" - } - ] - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "attached_custom_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachedCustomField" - }, - "title": "Attached Custom Fields" - } - }, - "title": "CheckoutPublic", - "required": [ - "created_at", - "modified_at", - "id", - "payment_processor", - "status", - "client_secret", - "url", - "expires_at", - "success_url", - "embed_origin", - "amount", - "tax_amount", - "currency", - "subtotal_amount", - "total_amount", - "product_id", - "product_price_id", - "discount_id", - "allow_discount_codes", - "is_discount_applicable", - "is_free_product_price", - "is_payment_required", - "is_payment_setup_required", - "is_payment_form_required", - "customer_id", - "customer_name", - "customer_email", - "customer_ip_address", - "customer_billing_address", - "customer_tax_id", - "payment_processor_metadata", - "product", - "product_price", - "discount", - "organization", - "attached_custom_fields" - ], - "description": "Checkout session data retrieved using the client secret." - }, - "CheckoutPublicConfirmed": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "$ref": "#/components/schemas/PaymentProcessor", - "description": "Payment processor used." - }, - "status": { - "type": "string", - "title": "Status", - "enum": [ - "confirmed" - ], - "const": "confirmed" - }, - "client_secret": { - "type": "string", - "title": "Client Secret", - "description": "Client secret used to update and complete the checkout session from the client." - }, - "url": { - "type": "string", - "title": "Url", - "description": "URL where the customer can access the checkout session." - }, - "expires_at": { - "type": "string", - "title": "Expires At", - "format": "date-time", - "description": "Expiration date and time of the checkout session." - }, - "success_url": { - "type": "string", - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "tax_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Tax Amount", - "description": "Computed tax amount to pay in cents." - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency", - "description": "Currency code of the checkout session." - }, - "subtotal_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Subtotal Amount", - "description": "Subtotal amount in cents, including discounts and before tax." - }, - "total_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Amount", - "description": "Total amount to pay in cents, including discounts and after tax." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "ID of the product to checkout." - }, - "product_price_id": { - "type": "string", - "title": "Product Price Id", - "format": "uuid4", - "description": "ID of the product price to checkout." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount applied to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "is_discount_applicable": { - "type": "boolean", - "title": "Is Discount Applicable", - "description": "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable." - }, - "is_free_product_price": { - "type": "boolean", - "title": "Is Free Product Price", - "description": "Whether the product price is free, regardless of discounts." - }, - "is_payment_required": { - "type": "boolean", - "title": "Is Payment Required", - "description": "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount." - }, - "is_payment_setup_required": { - "type": "boolean", - "title": "Is Payment Setup Required", - "description": "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles." - }, - "is_payment_form_required": { - "type": "boolean", - "title": "Is Payment Form Required", - "description": "Whether the checkout requires a payment form, whether because of a payment or payment method setup." - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "payment_processor_metadata": { - "type": "object", - "title": "Payment Processor Metadata" - }, - "product": { - "$ref": "#/components/schemas/CheckoutProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration" - } - ] - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "attached_custom_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachedCustomField" - }, - "title": "Attached Custom Fields" - }, - "customer_session_token": { - "type": "string", - "title": "Customer Session Token" - } - }, - "title": "CheckoutPublicConfirmed", - "required": [ - "created_at", - "modified_at", - "id", - "payment_processor", - "status", - "client_secret", - "url", - "expires_at", - "success_url", - "embed_origin", - "amount", - "tax_amount", - "currency", - "subtotal_amount", - "total_amount", - "product_id", - "product_price_id", - "discount_id", - "allow_discount_codes", - "is_discount_applicable", - "is_free_product_price", - "is_payment_required", - "is_payment_setup_required", - "is_payment_form_required", - "customer_id", - "customer_name", - "customer_email", - "customer_ip_address", - "customer_billing_address", - "customer_tax_id", - "payment_processor_metadata", - "product", - "product_price", - "discount", - "organization", - "attached_custom_fields", - "customer_session_token" - ], - "description": "Checkout session data retrieved using the client secret after confirmation.\n\nIt contains a customer session token to retrieve order information\nright after the checkout." - }, - "CheckoutSortProperty": { - "type": "string", - "title": "CheckoutSortProperty", - "enum": [ - "created_at", - "-created_at", - "expires_at", - "-expires_at" - ] - }, - "CheckoutStatus": { - "type": "string", - "title": "CheckoutStatus", - "enum": [ - "open", - "expired", - "confirmed", - "succeeded", - "failed" - ] - }, - "CheckoutUpdate": { - "type": "object", - "properties": { - "custom_field_data": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id", - "description": "ID of the product price to checkout. Must correspond to a price linked to the same product." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout." - }, - "allow_discount_codes": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Customer Metadata", - "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page." - } - }, - "title": "CheckoutUpdate", - "description": "Update an existing checkout session using an access token." - }, - "CheckoutUpdatePublic": { - "type": "object", - "properties": { - "custom_field_data": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id", - "description": "ID of the product price to checkout. Must correspond to a price linked to the same product." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "discount_code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Discount Code", - "description": "Discount code to apply to the checkout." - } - }, - "title": "CheckoutUpdatePublic", - "description": "Update an existing checkout session using the client secret." - }, - "CurrencyAmount": { - "type": "object", - "properties": { - "currency": { - "type": "string", - "title": "Currency", - "description": "Three letter currency code (eg: USD)" - }, - "amount": { - "type": "integer", - "title": "Amount", - "description": "Amount in the currencies smallest unit (cents if currency is USD)" - } - }, - "title": "CurrencyAmount", - "required": [ - "currency", - "amount" - ] - }, - "CustomField": { - "oneOf": [ - { - "$ref": "#/components/schemas/CustomFieldText" - }, - { - "$ref": "#/components/schemas/CustomFieldNumber" - }, - { - "$ref": "#/components/schemas/CustomFieldDate" - }, - { - "$ref": "#/components/schemas/CustomFieldCheckbox" - }, - { - "$ref": "#/components/schemas/CustomFieldSelect" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "checkbox": "#/components/schemas/CustomFieldCheckbox", - "date": "#/components/schemas/CustomFieldDate", - "number": "#/components/schemas/CustomFieldNumber", - "select": "#/components/schemas/CustomFieldSelect", - "text": "#/components/schemas/CustomFieldText" - } - } - }, - "CustomFieldCheckbox": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "checkbox" - ], - "const": "checkbox" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldCheckboxProperties" - } - }, - "title": "CustomFieldCheckbox", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "description": "Schema for a custom field of type checkbox." - }, - "CustomFieldCheckboxProperties": { - "type": "object", - "properties": { - "form_label": { - "type": "string", - "title": "Form Label", - "minLength": 1 - }, - "form_help_text": { - "type": "string", - "title": "Form Help Text", - "minLength": 1 - }, - "form_placeholder": { - "type": "string", - "title": "Form Placeholder", - "minLength": 1 - } - }, - "title": "CustomFieldCheckboxProperties" - }, - "CustomFieldCreate": { - "oneOf": [ - { - "$ref": "#/components/schemas/CustomFieldCreateText" - }, - { - "$ref": "#/components/schemas/CustomFieldCreateNumber" - }, - { - "$ref": "#/components/schemas/CustomFieldCreateDate" - }, - { - "$ref": "#/components/schemas/CustomFieldCreateCheckbox" - }, - { - "$ref": "#/components/schemas/CustomFieldCreateSelect" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "checkbox": "#/components/schemas/CustomFieldCreateCheckbox", - "date": "#/components/schemas/CustomFieldCreateDate", - "number": "#/components/schemas/CustomFieldCreateNumber", - "select": "#/components/schemas/CustomFieldCreateSelect", - "text": "#/components/schemas/CustomFieldCreateText" - } - } - }, - "CustomFieldCreateCheckbox": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "checkbox" - ], - "const": "checkbox" - }, - "slug": { - "type": "string", - "title": "Slug", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 1, - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldCheckboxProperties" - } - }, - "title": "CustomFieldCreateCheckbox", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "description": "Schema to create a custom field of type checkbox." - }, - "CustomFieldCreateDate": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "date" - ], - "const": "date" - }, - "slug": { - "type": "string", - "title": "Slug", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 1, - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldDateProperties" - } - }, - "title": "CustomFieldCreateDate", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "description": "Schema to create a custom field of type date." - }, - "CustomFieldCreateNumber": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "number" - ], - "const": "number" - }, - "slug": { - "type": "string", - "title": "Slug", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 1, - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldNumberProperties" - } - }, - "title": "CustomFieldCreateNumber", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "description": "Schema to create a custom field of type number." - }, - "CustomFieldCreateSelect": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "select" - ], - "const": "select" - }, - "slug": { - "type": "string", - "title": "Slug", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 1, - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldSelectProperties" - } - }, - "title": "CustomFieldCreateSelect", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "description": "Schema to create a custom field of type select." - }, - "CustomFieldCreateText": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "text" - ], - "const": "text" - }, - "slug": { - "type": "string", - "title": "Slug", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 1, - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldTextProperties" - } - }, - "title": "CustomFieldCreateText", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "description": "Schema to create a custom field of type text." - }, - "CustomFieldDate": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "date" - ], - "const": "date" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldDateProperties" - } - }, - "title": "CustomFieldDate", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "description": "Schema for a custom field of type date." - }, - "CustomFieldDateProperties": { - "type": "object", - "properties": { - "form_label": { - "type": "string", - "title": "Form Label", - "minLength": 1 - }, - "form_help_text": { - "type": "string", - "title": "Form Help Text", - "minLength": 1 - }, - "form_placeholder": { - "type": "string", - "title": "Form Placeholder", - "minLength": 1 - }, - "ge": { - "type": "integer", - "title": "Ge" - }, - "le": { - "type": "integer", - "title": "Le" - } - }, - "title": "CustomFieldDateProperties" - }, - "CustomFieldNumber": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "number" - ], - "const": "number" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldNumberProperties" - } - }, - "title": "CustomFieldNumber", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "description": "Schema for a custom field of type number." - }, - "CustomFieldNumberProperties": { - "type": "object", - "properties": { - "form_label": { - "type": "string", - "title": "Form Label", - "minLength": 1 - }, - "form_help_text": { - "type": "string", - "title": "Form Help Text", - "minLength": 1 - }, - "form_placeholder": { - "type": "string", - "title": "Form Placeholder", - "minLength": 1 - }, - "ge": { - "type": "integer", - "title": "Ge" - }, - "le": { - "type": "integer", - "title": "Le" - } - }, - "title": "CustomFieldNumberProperties" - }, - "CustomFieldSelect": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "select" - ], - "const": "select" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldSelectProperties" - } - }, - "title": "CustomFieldSelect", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "description": "Schema for a custom field of type select." - }, - "CustomFieldSelectOption": { - "type": "object", - "properties": { - "value": { - "type": "string", - "title": "Value", - "minLength": 1 - }, - "label": { - "type": "string", - "title": "Label", - "minLength": 1 - } - }, - "title": "CustomFieldSelectOption", - "required": [ - "value", - "label" - ] - }, - "CustomFieldSelectProperties": { - "type": "object", - "properties": { - "form_label": { - "type": "string", - "title": "Form Label", - "minLength": 1 - }, - "form_help_text": { - "type": "string", - "title": "Form Help Text", - "minLength": 1 - }, - "form_placeholder": { - "type": "string", - "title": "Form Placeholder", - "minLength": 1 - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldSelectOption" - }, - "title": "Options" - } - }, - "title": "CustomFieldSelectProperties", - "required": [ - "options" - ] - }, - "CustomFieldSortProperty": { - "type": "string", - "title": "CustomFieldSortProperty", - "enum": [ - "created_at", - "-created_at", - "slug", - "-slug", - "name", - "-name", - "type", - "-type" - ] - }, - "CustomFieldText": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "text" - ], - "const": "text" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldTextProperties" - } - }, - "title": "CustomFieldText", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "description": "Schema for a custom field of type text." - }, - "CustomFieldTextProperties": { - "type": "object", - "properties": { - "form_label": { - "type": "string", - "title": "Form Label", - "minLength": 1 - }, - "form_help_text": { - "type": "string", - "title": "Form Help Text", - "minLength": 1 - }, - "form_placeholder": { - "type": "string", - "title": "Form Placeholder", - "minLength": 1 - }, - "textarea": { - "type": "boolean", - "title": "Textarea" - }, - "min_length": { - "type": "integer", - "title": "Min Length", - "minimum": 0 - }, - "max_length": { - "type": "integer", - "title": "Max Length", - "minimum": 0 - } - }, - "title": "CustomFieldTextProperties" - }, - "CustomFieldType": { - "type": "string", - "title": "CustomFieldType", - "enum": [ - "text", - "number", - "date", - "checkbox", - "select" - ] - }, - "CustomFieldUpdate": { - "oneOf": [ - { - "$ref": "#/components/schemas/CustomFieldUpdateText" - }, - { - "$ref": "#/components/schemas/CustomFieldUpdateNumber" - }, - { - "$ref": "#/components/schemas/CustomFieldUpdateDate" - }, - { - "$ref": "#/components/schemas/CustomFieldUpdateCheckbox" - }, - { - "$ref": "#/components/schemas/CustomFieldUpdateSelect" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "checkbox": "#/components/schemas/CustomFieldUpdateCheckbox", - "date": "#/components/schemas/CustomFieldUpdateDate", - "number": "#/components/schemas/CustomFieldUpdateNumber", - "select": "#/components/schemas/CustomFieldUpdateSelect", - "text": "#/components/schemas/CustomFieldUpdateText" - } - } - }, - "CustomFieldUpdateCheckbox": { - "type": "object", - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "checkbox" - ], - "const": "checkbox" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldCheckboxProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "CustomFieldUpdateCheckbox", - "required": [ - "type" - ], - "description": "Schema to update a custom field of type checkbox." - }, - "CustomFieldUpdateDate": { - "type": "object", - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "date" - ], - "const": "date" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldDateProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "CustomFieldUpdateDate", - "required": [ - "type" - ], - "description": "Schema to update a custom field of type date." - }, - "CustomFieldUpdateNumber": { - "type": "object", - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "number" - ], - "const": "number" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldNumberProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "CustomFieldUpdateNumber", - "required": [ - "type" - ], - "description": "Schema to update a custom field of type number." - }, - "CustomFieldUpdateSelect": { - "type": "object", - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "select" - ], - "const": "select" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldSelectProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "CustomFieldUpdateSelect", - "required": [ - "type" - ], - "description": "Schema to update a custom field of type select." - }, - "CustomFieldUpdateText": { - "type": "object", - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "text" - ], - "const": "text" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldTextProperties" - }, - { - "type": "null" - } - ] - } - }, - "title": "CustomFieldUpdateText", - "required": [ - "type" - ], - "description": "Schema to update a custom field of type text." - }, - "Customer": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "type": "array", - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "readOnly": true - } - }, - "title": "Customer", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "organization_id", - "avatar_url" - ], - "description": "A customer in an organization." - }, - "CustomerBenefitGrant": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomerBenefitGrantDiscord" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepository" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantDownloadables" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantLicenseKeys" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantAds" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantCustom" - } - ] - }, - "CustomerBenefitGrantAds": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitAdsSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantAdsProperties" - } - }, - "title": "CustomerBenefitGrantAds", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ] - }, - "CustomerBenefitGrantAdsUpdate": { - "type": "object", - "properties": { - "benefit_type": { - "type": "string", - "title": "Benefit Type", - "enum": [ - "ads" - ], - "const": "ads" - } - }, - "title": "CustomerBenefitGrantAdsUpdate", - "required": [ - "benefit_type" - ] - }, - "CustomerBenefitGrantCustom": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitCustomSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantCustomProperties" - } - }, - "title": "CustomerBenefitGrantCustom", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ] - }, - "CustomerBenefitGrantCustomUpdate": { - "type": "object", - "properties": { - "benefit_type": { - "type": "string", - "title": "Benefit Type", - "enum": [ - "custom" - ], - "const": "custom" - } - }, - "title": "CustomerBenefitGrantCustomUpdate", - "required": [ - "benefit_type" - ] - }, - "CustomerBenefitGrantDiscord": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitDiscordSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantDiscordProperties" - } - }, - "title": "CustomerBenefitGrantDiscord", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ] - }, - "CustomerBenefitGrantDiscordPropertiesUpdate": { - "type": "object", - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - } - }, - "title": "CustomerBenefitGrantDiscordPropertiesUpdate", - "required": [ - "account_id" - ] - }, - "CustomerBenefitGrantDiscordUpdate": { - "type": "object", - "properties": { - "benefit_type": { - "type": "string", - "title": "Benefit Type", - "enum": [ - "discord" - ], - "const": "discord" - }, - "properties": { - "$ref": "#/components/schemas/CustomerBenefitGrantDiscordPropertiesUpdate" - } - }, - "title": "CustomerBenefitGrantDiscordUpdate", - "required": [ - "benefit_type", - "properties" - ] - }, - "CustomerBenefitGrantDownloadables": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitDownloadablesSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties" - } - }, - "title": "CustomerBenefitGrantDownloadables", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ] - }, - "CustomerBenefitGrantDownloadablesUpdate": { - "type": "object", - "properties": { - "benefit_type": { - "type": "string", - "title": "Benefit Type", - "enum": [ - "downloadables" - ], - "const": "downloadables" - } - }, - "title": "CustomerBenefitGrantDownloadablesUpdate", - "required": [ - "benefit_type" - ] - }, - "CustomerBenefitGrantGitHubRepository": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitGitHubRepositorySubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties" - } - }, - "title": "CustomerBenefitGrantGitHubRepository", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ] - }, - "CustomerBenefitGrantGitHubRepositoryPropertiesUpdate": { - "type": "object", - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - } - }, - "title": "CustomerBenefitGrantGitHubRepositoryPropertiesUpdate", - "required": [ - "account_id" - ] - }, - "CustomerBenefitGrantGitHubRepositoryUpdate": { - "type": "object", - "properties": { - "benefit_type": { - "type": "string", - "title": "Benefit Type", - "enum": [ - "github_repository" - ], - "const": "github_repository" - }, - "properties": { - "$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryPropertiesUpdate" - } - }, - "title": "CustomerBenefitGrantGitHubRepositoryUpdate", - "required": [ - "benefit_type", - "properties" - ] - }, - "CustomerBenefitGrantLicenseKeys": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitLicenseKeysSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties" - } - }, - "title": "CustomerBenefitGrantLicenseKeys", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ] - }, - "CustomerBenefitGrantLicenseKeysUpdate": { - "type": "object", - "properties": { - "benefit_type": { - "type": "string", - "title": "Benefit Type", - "enum": [ - "license_keys" - ], - "const": "license_keys" - } - }, - "title": "CustomerBenefitGrantLicenseKeysUpdate", - "required": [ - "benefit_type" - ] - }, - "CustomerBenefitGrantSortProperty": { - "type": "string", - "title": "CustomerBenefitGrantSortProperty", - "enum": [ - "granted_at", - "-granted_at", - "type", - "-type", - "organization", - "-organization" - ] - }, - "CustomerBenefitGrantUpdate": { - "oneOf": [ - { - "$ref": "#/components/schemas/CustomerBenefitGrantDiscordUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantDownloadablesUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantAdsUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantCustomUpdate" - } - ], - "discriminator": { - "propertyName": "benefit_type", - "mapping": { - "ads": "#/components/schemas/CustomerBenefitGrantAdsUpdate", - "custom": "#/components/schemas/CustomerBenefitGrantCustomUpdate", - "discord": "#/components/schemas/CustomerBenefitGrantDiscordUpdate", - "downloadables": "#/components/schemas/CustomerBenefitGrantDownloadablesUpdate", - "github_repository": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate", - "license_keys": "#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate" - } - } - }, - "CustomerCreate": { - "type": "object", - "properties": { - "email": { - "type": "string", - "title": "Email", - "format": "email" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "type": "array", - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the customer. **Required unless you use an organization token.**" - } - }, - "title": "CustomerCreate", - "required": [ - "email" - ] - }, - "CustomerOrder": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "tax_amount": { - "type": "integer", - "title": "Tax Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4" - }, - "product_price_id": { - "type": "string", - "title": "Product Price Id", - "format": "uuid4" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - }, - "product": { - "$ref": "#/components/schemas/CustomerOrderProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "subscription": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomerOrderSubscription" - }, - { - "type": "null" - } - ] - } - }, - "title": "CustomerOrder", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "tax_amount", - "currency", - "customer_id", - "product_id", - "product_price_id", - "subscription_id", - "user_id", - "product", - "product_price", - "subscription" - ] - }, - "CustomerOrderInvoice": { - "type": "object", - "properties": { - "url": { - "type": "string", - "title": "Url", - "description": "The URL to the invoice." - } - }, - "title": "CustomerOrderInvoice", - "required": [ - "url" - ], - "description": "Order's invoice data." - }, - "CustomerOrderProduct": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the product." - }, - "prices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitBase" - }, - "title": "BenefitPublic", - "description": "List of benefits granted by the product." - }, - "medias": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "title": "Medias", - "description": "List of medias associated to the product." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - } - }, - "title": "CustomerOrderProduct", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "prices", - "benefits", - "medias", - "organization" - ] - }, - "CustomerOrderSortProperty": { - "type": "string", - "title": "CustomerOrderSortProperty", - "enum": [ - "created_at", - "-created_at", - "amount", - "-amount", - "organization", - "-organization", - "product", - "-product", - "subscription", - "-subscription" - ] - }, - "CustomerOrderSubscription": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval" - }, - "status": { - "$ref": "#/components/schemas/SubscriptionStatus" - }, - "current_period_start": { - "type": "string", - "title": "Current Period Start", - "format": "date-time" - }, - "current_period_end": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Current Period End" - }, - "cancel_at_period_end": { - "type": "boolean", - "title": "Cancel At Period End" - }, - "started_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Started At" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4" - }, - "price_id": { - "type": "string", - "title": "Price Id", - "format": "uuid4" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - } - }, - "title": "CustomerOrderSubscription", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "currency", - "recurring_interval", - "status", - "current_period_start", - "current_period_end", - "cancel_at_period_end", - "started_at", - "ended_at", - "customer_id", - "product_id", - "price_id", - "discount_id", - "checkout_id" - ] - }, - "CustomerPortalCustomer": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "type": "array", - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "oauth_accounts": { - "type": "object", - "title": "Oauth Accounts", - "additionalProperties": { - "$ref": "#/components/schemas/CustomerPortalOAuthAccount" - } - } - }, - "title": "CustomerPortalCustomer", - "required": [ - "created_at", - "modified_at", - "id", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "oauth_accounts" - ] - }, - "CustomerPortalOAuthAccount": { - "type": "object", - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - }, - "account_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Account Username" - } - }, - "title": "CustomerPortalOAuthAccount", - "required": [ - "account_id", - "account_username" - ] - }, - "CustomerSession": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "token": { - "type": "string", - "title": "Token" - }, - "expires_at": { - "type": "string", - "title": "Expires At", - "format": "date-time" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "customer": { - "$ref": "#/components/schemas/Customer" - } - }, - "title": "CustomerSession", - "required": [ - "created_at", - "modified_at", - "id", - "token", - "expires_at", - "customer_id", - "customer" - ], - "description": "A customer session that can be used to authenticate as a customer." - }, - "CustomerSessionCreate": { - "type": "object", - "properties": { - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4", - "description": "ID of the customer to create a session for." - } - }, - "title": "CustomerSessionCreate", - "required": [ - "customer_id" - ], - "description": "Schema for creating a customer session." - }, - "CustomerSortProperty": { - "type": "string", - "title": "CustomerSortProperty", - "enum": [ - "created_at", - "-created_at", - "email", - "-email", - "name", - "-name" - ] - }, - "CustomerSubscription": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval" - }, - "status": { - "$ref": "#/components/schemas/SubscriptionStatus" - }, - "current_period_start": { - "type": "string", - "title": "Current Period Start", - "format": "date-time" - }, - "current_period_end": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Current Period End" - }, - "cancel_at_period_end": { - "type": "boolean", - "title": "Cancel At Period End" - }, - "started_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Started At" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4" - }, - "price_id": { - "type": "string", - "title": "Price Id", - "format": "uuid4" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - }, - "product": { - "$ref": "#/components/schemas/CustomerSubscriptionProduct" - }, - "price": { - "$ref": "#/components/schemas/ProductPrice" - } - }, - "title": "CustomerSubscription", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "currency", - "recurring_interval", - "status", - "current_period_start", - "current_period_end", - "cancel_at_period_end", - "started_at", - "ended_at", - "customer_id", - "product_id", - "price_id", - "discount_id", - "checkout_id", - "user_id", - "product", - "price" - ] - }, - "CustomerSubscriptionProduct": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the product." - }, - "prices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitBase" - }, - "title": "BenefitPublic", - "description": "List of benefits granted by the product." - }, - "medias": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "title": "Medias", - "description": "List of medias associated to the product." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - } - }, - "title": "CustomerSubscriptionProduct", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "prices", - "benefits", - "medias", - "organization" - ] - }, - "CustomerSubscriptionSortProperty": { - "type": "string", - "title": "CustomerSubscriptionSortProperty", - "enum": [ - "started_at", - "-started_at", - "amount", - "-amount", - "status", - "-status", - "organization", - "-organization", - "product", - "-product" - ] - }, - "CustomerSubscriptionUpdate": { - "type": "object", - "properties": { - "product_price_id": { - "type": "string", - "title": "Product Price Id", - "format": "uuid4" - } - }, - "title": "CustomerSubscriptionUpdate", - "required": [ - "product_price_id" - ] - }, - "CustomerUpdate": { - "type": "object", - "properties": { - "email": { - "anyOf": [ - { - "type": "string", - "format": "email" - }, - { - "type": "null" - } - ], - "title": "Email" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "type": "array", - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - } - }, - "title": "CustomerUpdate" - }, - "Discount": { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDuration" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDuration" - } - ] - }, - "DiscountCreate": { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationCreate" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDurationCreate" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationCreate" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDurationCreate" - } - ] - }, - "DiscountDuration": { - "type": "string", - "title": "DiscountDuration", - "enum": [ - "once", - "forever", - "repeating" - ] - }, - "DiscountFixedOnceForeverDuration": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DiscountProduct" - }, - "title": "Products" - } - }, - "title": "DiscountFixedOnceForeverDuration", - "required": [ - "duration", - "type", - "amount", - "currency", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id", - "products" - ], - "description": "Schema for a fixed amount discount that is applied once or forever." - }, - "DiscountFixedOnceForeverDurationBase": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - } - }, - "title": "DiscountFixedOnceForeverDurationBase", - "required": [ - "duration", - "type", - "amount", - "currency", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id" - ] - }, - "DiscountFixedOnceForeverDurationCreate": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType", - "description": "Type of the discount." - }, - "amount": { - "type": "integer", - "title": "Amount", - "minimum": 0, - "description": "Fixed amount to discount from the invoice total." - }, - "currency": { - "type": "string", - "title": "Currency", - "pattern": "usd", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 1, - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Optional timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Optional maximum number of times the discount can be redeemed." - }, - "products": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - }, - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**" - } - }, - "title": "DiscountFixedOnceForeverDurationCreate", - "required": [ - "duration", - "type", - "amount", - "name" - ], - "description": "Schema to create a fixed amount discount that is applied once or forever." - }, - "DiscountFixedRepeatDuration": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DiscountProduct" - }, - "title": "Products" - } - }, - "title": "DiscountFixedRepeatDuration", - "required": [ - "duration", - "duration_in_months", - "type", - "amount", - "currency", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id", - "products" - ], - "description": "Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months." - }, - "DiscountFixedRepeatDurationBase": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - } - }, - "title": "DiscountFixedRepeatDurationBase", - "required": [ - "duration", - "duration_in_months", - "type", - "amount", - "currency", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id" - ] - }, - "DiscountFixedRepeatDurationCreate": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months", - "minimum": 1, - "description": "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24." - }, - "type": { - "$ref": "#/components/schemas/DiscountType", - "description": "Type of the discount." - }, - "amount": { - "type": "integer", - "title": "Amount", - "minimum": 0, - "description": "Fixed amount to discount from the invoice total." - }, - "currency": { - "type": "string", - "title": "Currency", - "pattern": "usd", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 1, - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Optional timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Optional maximum number of times the discount can be redeemed." - }, - "products": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - }, - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**" - } - }, - "title": "DiscountFixedRepeatDurationCreate", - "required": [ - "duration", - "duration_in_months", - "type", - "amount", - "name" - ], - "description": "Schema to create a fixed amount discount that is applied on every invoice\nfor a certain number of months." - }, - "DiscountPercentageOnceForeverDuration": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DiscountProduct" - }, - "title": "Products" - } - }, - "title": "DiscountPercentageOnceForeverDuration", - "required": [ - "duration", - "type", - "basis_points", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id", - "products" - ], - "description": "Schema for a percentage discount that is applied once or forever." - }, - "DiscountPercentageOnceForeverDurationBase": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - } - }, - "title": "DiscountPercentageOnceForeverDurationBase", - "required": [ - "duration", - "type", - "basis_points", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id" - ] - }, - "DiscountPercentageOnceForeverDurationCreate": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType", - "description": "Type of the discount." - }, - "basis_points": { - "type": "integer", - "title": "Basis Points", - "maximum": 10000, - "minimum": 1, - "description": "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 1, - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Optional timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Optional maximum number of times the discount can be redeemed." - }, - "products": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - }, - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**" - } - }, - "title": "DiscountPercentageOnceForeverDurationCreate", - "required": [ - "duration", - "type", - "basis_points", - "name" - ], - "description": "Schema to create a percentage discount that is applied once or forever." - }, - "DiscountPercentageRepeatDuration": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DiscountProduct" - }, - "title": "Products" - } - }, - "title": "DiscountPercentageRepeatDuration", - "required": [ - "duration", - "duration_in_months", - "type", - "basis_points", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id", - "products" - ], - "description": "Schema for a percentage discount that is applied on every invoice\nfor a certain number of months." - }, - "DiscountPercentageRepeatDurationBase": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - } - }, - "title": "DiscountPercentageRepeatDurationBase", - "required": [ - "duration", - "duration_in_months", - "type", - "basis_points", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id" - ] - }, - "DiscountPercentageRepeatDurationCreate": { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months", - "minimum": 1, - "description": "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24." - }, - "type": { - "$ref": "#/components/schemas/DiscountType", - "description": "Type of the discount." - }, - "basis_points": { - "type": "integer", - "title": "Basis Points", - "maximum": 10000, - "minimum": 1, - "description": "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 1, - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Optional timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Optional maximum number of times the discount can be redeemed." - }, - "products": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - }, - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**" - } - }, - "title": "DiscountPercentageRepeatDurationCreate", - "required": [ - "duration", - "duration_in_months", - "type", - "basis_points", - "name" - ], - "description": "Schema to create a percentage discount that is applied on every invoice\nfor a certain number of months." - }, - "DiscountProduct": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the product." - } - }, - "title": "DiscountProduct", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id" - ], - "description": "A product that a discount can be applied to." - }, - "DiscountSortProperty": { - "type": "string", - "title": "DiscountSortProperty", - "enum": [ - "created_at", - "-created_at", - "name", - "-name", - "code", - "-code", - "redemptions_count", - "-redemptions_count" - ] - }, - "DiscountType": { - "type": "string", - "title": "DiscountType", - "enum": [ - "fixed", - "percentage" - ] - }, - "DiscountUpdate": { - "type": "object", - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "code": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - { - "type": "null" - } - ], - "title": "Code" - }, - "starts_at": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "description": "Optional timestamp after which the discount is redeemable." - }, - { - "type": "null" - } - ], - "title": "Starts At" - }, - "ends_at": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - { - "type": "null" - } - ], - "title": "Ends At" - }, - "max_redemptions": { - "anyOf": [ - { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "description": "Optional maximum number of times the discount can be redeemed." - }, - { - "type": "null" - } - ], - "title": "Max Redemptions" - }, - "duration": { - "anyOf": [ - { - "$ref": "#/components/schemas/DiscountDuration" - }, - { - "type": "null" - } - ] - }, - "duration_in_months": { - "anyOf": [ - { - "type": "integer", - "minimum": 1, - "description": "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24." - }, - { - "type": "null" - } - ], - "title": "Duration In Months" - }, - "type": { - "anyOf": [ - { - "$ref": "#/components/schemas/DiscountType" - }, - { - "type": "null" - } - ] - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "minimum": 0, - "description": "Fixed amount to discount from the invoice total." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string", - "pattern": "usd", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "basis_points": { - "anyOf": [ - { - "type": "integer", - "maximum": 10000, - "minimum": 1, - "description": "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550." - }, - { - "type": "null" - } - ], - "title": "Basis Points" - }, - "products": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - }, - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - } - }, - "title": "DiscountUpdate", - "description": "Schema to update a discount." - }, - "DownloadableFileCreate": { - "type": "object", - "properties": { - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "upload": { - "$ref": "#/components/schemas/S3FileCreateMultipart" - }, - "service": { - "type": "string", - "title": "Service", - "enum": [ - "downloadable" - ], - "const": "downloadable" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - } - }, - "title": "DownloadableFileCreate", - "required": [ - "name", - "mime_type", - "size", - "upload", - "service" - ], - "description": "Schema to create a file to be associated with the downloadables benefit." - }, - "DownloadableFileRead": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "service": { - "type": "string", - "title": "Service", - "enum": [ - "downloadable" - ], - "const": "downloadable" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - } - }, - "title": "DownloadableFileRead", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "version", - "service", - "is_uploaded", - "created_at", - "size_readable" - ], - "description": "File to be associated with the downloadables benefit." - }, - "DownloadableRead": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4" - }, - "file": { - "$ref": "#/components/schemas/FileDownload" - } - }, - "title": "DownloadableRead", - "required": [ - "id", - "benefit_id", - "file" - ] - }, - "ExistingProductPrice": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - } - }, - "title": "ExistingProductPrice", - "required": [ - "id" - ], - "description": "A price that already exists for this product.\n\nUseful when updating a product if you want to keep an existing price." - }, - "ExternalOrganization": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid" - }, - "platform": { - "$ref": "#/components/schemas/Platforms" - }, - "name": { - "type": "string", - "title": "Name" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url" - }, - "is_personal": { - "type": "boolean", - "title": "Is Personal" - }, - "bio": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Bio" - }, - "pretty_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pretty Name" - }, - "company": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Company" - }, - "blog": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Blog" - }, - "location": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Location" - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Email" - }, - "twitter_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Twitter Username" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - } - }, - "title": "ExternalOrganization", - "required": [ - "id", - "platform", - "name", - "avatar_url", - "is_personal", - "bio", - "pretty_name", - "company", - "blog", - "location", - "email", - "twitter_username", - "organization_id" - ] - }, - "ExternalOrganizationSortProperty": { - "type": "string", - "title": "ExternalOrganizationSortProperty", - "enum": [ - "created_at", - "-created_at", - "name", - "-name" - ] - }, - "FileCreate": { - "oneOf": [ - { - "$ref": "#/components/schemas/DownloadableFileCreate" - }, - { - "$ref": "#/components/schemas/ProductMediaFileCreate" - }, - { - "$ref": "#/components/schemas/OrganizationAvatarFileCreate" - } - ], - "discriminator": { - "propertyName": "service", - "mapping": { - "downloadable": "#/components/schemas/DownloadableFileCreate", - "organization_avatar": "#/components/schemas/OrganizationAvatarFileCreate", - "product_media": "#/components/schemas/ProductMediaFileCreate" - } - } - }, - "FileDownload": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "download": { - "$ref": "#/components/schemas/S3DownloadURL" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded" - }, - "service": { - "$ref": "#/components/schemas/FileServiceTypes" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - } - }, - "title": "FileDownload", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "download", - "version", - "is_uploaded", - "service", - "size_readable" - ] - }, - "FilePatch": { - "type": "object", - "properties": { - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - } - }, - "title": "FilePatch" - }, - "FileServiceTypes": { - "type": "string", - "title": "FileServiceTypes", - "enum": [ - "downloadable", - "product_media", - "organization_avatar" - ] - }, - "FileUpload": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "upload": { - "$ref": "#/components/schemas/S3FileUploadMultipart" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded", - "default": false - }, - "service": { - "$ref": "#/components/schemas/FileServiceTypes" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - } - }, - "title": "FileUpload", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "upload", - "version", - "service", - "size_readable" - ] - }, - "FileUploadCompleted": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "path": { - "type": "string", - "title": "Path" - }, - "parts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/S3FileUploadCompletedPart" - }, - "title": "Parts" - } - }, - "title": "FileUploadCompleted", - "required": [ - "id", - "path", - "parts" - ] - }, - "Funding": { - "type": "object", - "properties": { - "funding_goal": { - "anyOf": [ - { - "$ref": "#/components/schemas/CurrencyAmount" - }, - { - "type": "null" - } - ] - }, - "pledges_sum": { - "anyOf": [ - { - "$ref": "#/components/schemas/CurrencyAmount" - }, - { - "type": "null" - } - ], - "description": "Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD." - } - }, - "title": "Funding" - }, - "HTTPValidationError": { - "type": "object", - "properties": { - "detail": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "title": "Detail" - } - }, - "title": "HTTPValidationError" - }, - "Interval": { - "type": "string", - "title": "Interval", - "enum": [ - "year", - "month", - "week", - "day", - "hour" - ] - }, - "IntrospectTokenResponse": { - "type": "object", - "properties": { - "active": { - "type": "boolean", - "title": "Active" - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "token_type": { - "type": "string", - "title": "Token Type", - "enum": [ - "access_token", - "refresh_token" - ] - }, - "scope": { - "type": "string", - "title": "Scope" - }, - "sub_type": { - "$ref": "#/components/schemas/SubType" - }, - "sub": { - "type": "string", - "title": "Sub" - }, - "aud": { - "type": "string", - "title": "Aud" - }, - "iss": { - "type": "string", - "title": "Iss" - }, - "exp": { - "type": "integer", - "title": "Exp" - }, - "iat": { - "type": "integer", - "title": "Iat" - } - }, - "title": "IntrospectTokenResponse", - "required": [ - "active", - "client_id", - "token_type", - "scope", - "sub_type", - "sub", - "aud", - "iss", - "exp", - "iat" - ] - }, - "Issue": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid" - }, - "platform": { - "$ref": "#/components/schemas/Platforms", - "description": "Issue platform (currently always GitHub)" - }, - "number": { - "type": "integer", - "title": "Number", - "description": "GitHub #number" - }, - "title": { - "type": "string", - "title": "Title", - "description": "GitHub issue title" - }, - "body": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Body", - "description": "GitHub issue body" - }, - "comments": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Comments", - "description": "Number of GitHub comments made on the issue" - }, - "labels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Label" - }, - "title": "Labels", - "default": [] - }, - "author": { - "anyOf": [ - { - "$ref": "#/components/schemas/Author" - }, - { - "type": "null" - } - ], - "description": "GitHub author" - }, - "assignees": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Assignee" - } - }, - { - "type": "null" - } - ], - "title": "Assignees", - "description": "GitHub assignees" - }, - "reactions": { - "anyOf": [ - { - "$ref": "#/components/schemas/Reactions" - }, - { - "type": "null" - } - ], - "description": "GitHub reactions" - }, - "state": { - "$ref": "#/components/schemas/State" - }, - "issue_closed_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Issue Closed At" - }, - "issue_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Issue Modified At" - }, - "issue_created_at": { - "type": "string", - "title": "Issue Created At", - "format": "date-time" - }, - "needs_confirmation_solved": { - "type": "boolean", - "title": "Needs Confirmation Solved", - "description": "If a maintainer needs to mark this issue as solved" - }, - "confirmed_solved_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Confirmed Solved At", - "description": "If this issue has been marked as confirmed solved through Polar" - }, - "funding": { - "$ref": "#/components/schemas/Funding" - }, - "repository": { - "$ref": "#/components/schemas/Repository", - "description": "The repository that the issue is in" - }, - "upfront_split_to_contributors": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Upfront Split To Contributors", - "description": "Share of rewrads that will be rewarded to contributors of this issue. A number between 0 and 100 (inclusive)." - }, - "pledge_badge_currently_embedded": { - "type": "boolean", - "title": "Pledge Badge Currently Embedded", - "description": "If this issue currently has the Polar badge SVG embedded" - }, - "badge_custom_content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Badge Custom Content", - "description": "Optional custom badge SVG promotional content" - } - }, - "title": "Issue", - "required": [ - "id", - "platform", - "number", - "title", - "state", - "issue_created_at", - "needs_confirmation_solved", - "funding", - "repository", - "pledge_badge_currently_embedded" - ] - }, - "Label": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "color": { - "type": "string", - "title": "Color" - } - }, - "title": "Label", - "required": [ - "name", - "color" - ] - }, - "LicenseKeyActivate": { - "type": "object", - "properties": { - "key": { - "type": "string", - "title": "Key" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "label": { - "type": "string", - "title": "Label" - }, - "conditions": { - "type": "object", - "title": "Conditions", - "default": {} - }, - "meta": { - "type": "object", - "title": "Meta", - "default": {} - } - }, - "title": "LicenseKeyActivate", - "required": [ - "key", - "organization_id", - "label" - ] - }, - "LicenseKeyActivationBase": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "license_key_id": { - "type": "string", - "title": "License Key Id", - "format": "uuid4" - }, - "label": { - "type": "string", - "title": "Label" - }, - "meta": { - "type": "object", - "title": "Meta" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time" - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At" - } - }, - "title": "LicenseKeyActivationBase", - "required": [ - "id", - "license_key_id", - "label", - "meta", - "created_at", - "modified_at" - ] - }, - "LicenseKeyActivationRead": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "license_key_id": { - "type": "string", - "title": "License Key Id", - "format": "uuid4" - }, - "label": { - "type": "string", - "title": "Label" - }, - "meta": { - "type": "object", - "title": "Meta" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time" - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At" - }, - "license_key": { - "$ref": "#/components/schemas/LicenseKeyRead" - } - }, - "title": "LicenseKeyActivationRead", - "required": [ - "id", - "license_key_id", - "label", - "meta", - "created_at", - "modified_at", - "license_key" - ] - }, - "LicenseKeyCustomer": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "type": "array", - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "readOnly": true - } - }, - "title": "LicenseKeyCustomer", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "organization_id", - "avatar_url" - ] - }, - "LicenseKeyDeactivate": { - "type": "object", - "properties": { - "key": { - "type": "string", - "title": "Key" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "activation_id": { - "type": "string", - "title": "Activation Id", - "format": "uuid4" - } - }, - "title": "LicenseKeyDeactivate", - "required": [ - "key", - "organization_id", - "activation_id" - ] - }, - "LicenseKeyRead": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "user": { - "$ref": "#/components/schemas/LicenseKeyUser", - "deprecated": true - }, - "customer": { - "$ref": "#/components/schemas/LicenseKeyCustomer" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - "key": { - "type": "string", - "title": "Key" - }, - "display_key": { - "type": "string", - "title": "Display Key" - }, - "status": { - "$ref": "#/components/schemas/LicenseKeyStatus" - }, - "limit_activations": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Activations" - }, - "usage": { - "type": "integer", - "title": "Usage" - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - }, - "validations": { - "type": "integer", - "title": "Validations" - }, - "last_validated_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Validated At" - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At" - } - }, - "title": "LicenseKeyRead", - "required": [ - "id", - "organization_id", - "user_id", - "customer_id", - "user", - "customer", - "benefit_id", - "key", - "display_key", - "status", - "limit_activations", - "usage", - "limit_usage", - "validations", - "last_validated_at", - "expires_at" - ] - }, - "LicenseKeyStatus": { - "type": "string", - "title": "LicenseKeyStatus", - "enum": [ - "granted", - "revoked", - "disabled" - ] - }, - "LicenseKeyUpdate": { - "type": "object", - "properties": { - "status": { - "anyOf": [ - { - "$ref": "#/components/schemas/LicenseKeyStatus" - }, - { - "type": "null" - } - ] - }, - "usage": { - "type": "integer", - "title": "Usage", - "default": 0 - }, - "limit_activations": { - "anyOf": [ - { - "exclusiveMinimum": 0, - "type": "integer", - "maximum": 50 - }, - { - "type": "null" - } - ], - "title": "Limit Activations" - }, - "limit_usage": { - "anyOf": [ - { - "exclusiveMinimum": 0, - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At" - } - }, - "title": "LicenseKeyUpdate" - }, - "LicenseKeyUser": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "email": { - "type": "string", - "title": "Email" - }, - "public_name": { - "type": "string", - "title": "Public Name" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - } - }, - "title": "LicenseKeyUser", - "required": [ - "id", - "email", - "public_name" - ] - }, - "LicenseKeyValidate": { - "type": "object", - "properties": { - "key": { - "type": "string", - "title": "Key" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "activation_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Activation Id" - }, - "benefit_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - { - "type": "null" - } - ], - "title": "Benefit Id" - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id" - }, - "increment_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Increment Usage" - }, - "conditions": { - "type": "object", - "title": "Conditions", - "default": {} - } - }, - "title": "LicenseKeyValidate", - "required": [ - "key", - "organization_id" - ] - }, - "LicenseKeyWithActivations": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "user": { - "$ref": "#/components/schemas/LicenseKeyUser", - "deprecated": true - }, - "customer": { - "$ref": "#/components/schemas/LicenseKeyCustomer" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - "key": { - "type": "string", - "title": "Key" - }, - "display_key": { - "type": "string", - "title": "Display Key" - }, - "status": { - "$ref": "#/components/schemas/LicenseKeyStatus" - }, - "limit_activations": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Activations" - }, - "usage": { - "type": "integer", - "title": "Usage" - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - }, - "validations": { - "type": "integer", - "title": "Validations" - }, - "last_validated_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Validated At" - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At" - }, - "activations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LicenseKeyActivationBase" - }, - "title": "Activations" - } - }, - "title": "LicenseKeyWithActivations", - "required": [ - "id", - "organization_id", - "user_id", - "customer_id", - "user", - "customer", - "benefit_id", - "key", - "display_key", - "status", - "limit_activations", - "usage", - "limit_usage", - "validations", - "last_validated_at", - "expires_at", - "activations" - ] - }, - "ListResource_BenefitGrant_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitGrant" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[BenefitGrant]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_Benefit_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[Benefit]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_CheckoutLink_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CheckoutLink" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[CheckoutLink]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_Checkout_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Checkout" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[Checkout]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_CustomField_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[CustomField]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_CustomerBenefitGrant_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerBenefitGrant", - "title": "CustomerBenefitGrant" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[CustomerBenefitGrant]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_CustomerOrder_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerOrder" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[CustomerOrder]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_CustomerSubscription_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerSubscription" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[CustomerSubscription]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_Customer_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Customer" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[Customer]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_Discount_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Discount", - "title": "Discount" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[Discount]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_DownloadableRead_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DownloadableRead" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[DownloadableRead]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_ExternalOrganization_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExternalOrganization" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[ExternalOrganization]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_FileRead_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/DownloadableFileRead" - }, - { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - { - "$ref": "#/components/schemas/OrganizationAvatarFileRead" - } - ], - "discriminator": { - "propertyName": "service", - "mapping": { - "downloadable": "#/components/schemas/DownloadableFileRead", - "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead", - "product_media": "#/components/schemas/ProductMediaFileRead" - } - }, - "title": "FileRead" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[FileRead]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_LicenseKeyRead_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LicenseKeyRead" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[LicenseKeyRead]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_OAuth2Client_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OAuth2Client" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[OAuth2Client]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_Order_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Order" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[Order]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_Organization_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Organization" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[Organization]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_Product_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[Product]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_Repository_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Repository" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[Repository]", - "required": [ - "items", - "pagination" - ] - }, - "ListResource_Subscription_": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Subscription" - }, - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "title": "ListResource[Subscription]", - "required": [ - "items", - "pagination" - ] - }, - "Metric": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "title": "Slug", - "description": "Unique identifier for the metric." - }, - "display_name": { - "type": "string", - "title": "Display Name", - "description": "Human-readable name for the metric." - }, - "type": { - "$ref": "#/components/schemas/MetricType", - "description": "Type of the metric, useful to know the unit or format of the value." - } - }, - "title": "Metric", - "required": [ - "slug", - "display_name", - "type" - ], - "description": "Information about a metric." - }, - "MetricPeriod": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "title": "Timestamp", - "format": "date-time", - "description": "Timestamp of this period data." - }, - "orders": { - "type": "integer", - "title": "Orders" - }, - "revenue": { - "type": "integer", - "title": "Revenue" - }, - "average_order_value": { - "type": "integer", - "title": "Average Order Value" - }, - "one_time_products": { - "type": "integer", - "title": "One Time Products" - }, - "one_time_products_revenue": { - "type": "integer", - "title": "One Time Products Revenue" - }, - "new_subscriptions": { - "type": "integer", - "title": "New Subscriptions" - }, - "new_subscriptions_revenue": { - "type": "integer", - "title": "New Subscriptions Revenue" - }, - "renewed_subscriptions": { - "type": "integer", - "title": "Renewed Subscriptions" - }, - "renewed_subscriptions_revenue": { - "type": "integer", - "title": "Renewed Subscriptions Revenue" - }, - "active_subscriptions": { - "type": "integer", - "title": "Active Subscriptions" - }, - "monthly_recurring_revenue": { - "type": "integer", - "title": "Monthly Recurring Revenue" - } - }, - "title": "MetricPeriod", - "required": [ - "timestamp", - "orders", - "revenue", - "average_order_value", - "one_time_products", - "one_time_products_revenue", - "new_subscriptions", - "new_subscriptions_revenue", - "renewed_subscriptions", - "renewed_subscriptions_revenue", - "active_subscriptions", - "monthly_recurring_revenue" - ] - }, - "MetricType": { - "type": "string", - "title": "MetricType", - "enum": [ - "scalar", - "currency" - ] - }, - "Metrics": { - "type": "object", - "properties": { - "orders": { - "$ref": "#/components/schemas/Metric" - }, - "revenue": { - "$ref": "#/components/schemas/Metric" - }, - "average_order_value": { - "$ref": "#/components/schemas/Metric" - }, - "one_time_products": { - "$ref": "#/components/schemas/Metric" - }, - "one_time_products_revenue": { - "$ref": "#/components/schemas/Metric" - }, - "new_subscriptions": { - "$ref": "#/components/schemas/Metric" - }, - "new_subscriptions_revenue": { - "$ref": "#/components/schemas/Metric" - }, - "renewed_subscriptions": { - "$ref": "#/components/schemas/Metric" - }, - "renewed_subscriptions_revenue": { - "$ref": "#/components/schemas/Metric" - }, - "active_subscriptions": { - "$ref": "#/components/schemas/Metric" - }, - "monthly_recurring_revenue": { - "$ref": "#/components/schemas/Metric" - } - }, - "title": "Metrics", - "required": [ - "orders", - "revenue", - "average_order_value", - "one_time_products", - "one_time_products_revenue", - "new_subscriptions", - "new_subscriptions_revenue", - "renewed_subscriptions", - "renewed_subscriptions_revenue", - "active_subscriptions", - "monthly_recurring_revenue" - ] - }, - "MetricsIntervalLimit": { - "type": "object", - "properties": { - "max_days": { - "type": "integer", - "title": "Max Days", - "description": "Maximum number of days for this interval." - } - }, - "title": "MetricsIntervalLimit", - "required": [ - "max_days" - ], - "description": "Date interval limit to get metrics for a given interval." - }, - "MetricsIntervalsLimits": { - "type": "object", - "properties": { - "hour": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the hour interval." - }, - "day": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the day interval." - }, - "week": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the week interval." - }, - "month": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the month interval." - }, - "year": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the year interval." - } - }, - "title": "MetricsIntervalsLimits", - "required": [ - "hour", - "day", - "week", - "month", - "year" - ], - "description": "Date interval limits to get metrics for each interval." - }, - "MetricsLimits": { - "type": "object", - "properties": { - "min_date": { - "type": "string", - "title": "Min Date", - "format": "date", - "description": "Minimum date to get metrics." - }, - "intervals": { - "$ref": "#/components/schemas/MetricsIntervalsLimits", - "description": "Limits for each interval." - } - }, - "title": "MetricsLimits", - "required": [ - "min_date", - "intervals" - ], - "description": "Date limits to get metrics." - }, - "MetricsResponse": { - "type": "object", - "properties": { - "periods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MetricPeriod" - }, - "title": "Periods", - "description": "List of data for each timestamp." - }, - "metrics": { - "$ref": "#/components/schemas/Metrics", - "description": "Information about the returned metrics." - } - }, - "title": "MetricsResponse", - "required": [ - "periods", - "metrics" - ], - "description": "Metrics response schema." - }, - "NotPermitted": { - "type": "object", - "properties": { - "error": { - "type": "string", - "title": "Error", - "enum": [ - "NotPermitted" - ], - "const": "NotPermitted" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "title": "NotPermitted", - "required": [ - "error", - "detail" - ] - }, - "OAuth2Client": { - "type": "object", - "properties": { - "redirect_uris": { - "type": "array", - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "title": "Redirect Uris" - }, - "token_endpoint_auth_method": { - "type": "string", - "title": "Token Endpoint Auth Method", - "enum": [ - "client_secret_basic", - "client_secret_post", - "none" - ], - "default": "client_secret_post" - }, - "grant_types": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "authorization_code", - "refresh_token" - ] - }, - "title": "Grant Types", - "default": [ - "authorization_code", - "refresh_token" - ] - }, - "response_types": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "code" - ], - "const": "code" - }, - "title": "Response Types", - "default": [ - "code" - ] - }, - "scope": { - "type": "string", - "title": "Scope", - "default": "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write" - }, - "client_name": { - "type": "string", - "title": "Client Name" - }, - "client_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Uri" - }, - "logo_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Uri" - }, - "tos_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Tos Uri" - }, - "policy_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Policy Uri" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "client_secret": { - "type": "string", - "title": "Client Secret" - }, - "client_id_issued_at": { - "type": "integer", - "title": "Client Id Issued At" - }, - "client_secret_expires_at": { - "type": "integer", - "title": "Client Secret Expires At" - } - }, - "title": "OAuth2Client", - "required": [ - "redirect_uris", - "client_name", - "created_at", - "modified_at", - "client_id", - "client_secret", - "client_id_issued_at", - "client_secret_expires_at" - ] - }, - "OAuth2ClientConfiguration": { - "type": "object", - "properties": { - "redirect_uris": { - "type": "array", - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "title": "Redirect Uris" - }, - "token_endpoint_auth_method": { - "type": "string", - "title": "Token Endpoint Auth Method", - "enum": [ - "client_secret_basic", - "client_secret_post", - "none" - ], - "default": "client_secret_post" - }, - "grant_types": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "authorization_code", - "refresh_token" - ] - }, - "title": "Grant Types", - "default": [ - "authorization_code", - "refresh_token" - ] - }, - "response_types": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "code" - ], - "const": "code" - }, - "title": "Response Types", - "default": [ - "code" - ] - }, - "scope": { - "type": "string", - "title": "Scope", - "default": "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write" - }, - "client_name": { - "type": "string", - "title": "Client Name" - }, - "client_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Uri" - }, - "logo_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Uri" - }, - "tos_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Tos Uri" - }, - "policy_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Policy Uri" - } - }, - "title": "OAuth2ClientConfiguration", - "required": [ - "redirect_uris", - "client_name" - ] - }, - "OAuth2ClientConfigurationUpdate": { - "type": "object", - "properties": { - "redirect_uris": { - "type": "array", - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "title": "Redirect Uris" - }, - "token_endpoint_auth_method": { - "type": "string", - "title": "Token Endpoint Auth Method", - "enum": [ - "client_secret_basic", - "client_secret_post", - "none" - ], - "default": "client_secret_post" - }, - "grant_types": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "authorization_code", - "refresh_token" - ] - }, - "title": "Grant Types", - "default": [ - "authorization_code", - "refresh_token" - ] - }, - "response_types": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "code" - ], - "const": "code" - }, - "title": "Response Types", - "default": [ - "code" - ] - }, - "scope": { - "type": "string", - "title": "Scope", - "default": "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write" - }, - "client_name": { - "type": "string", - "title": "Client Name" - }, - "client_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Uri" - }, - "logo_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Uri" - }, - "tos_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Tos Uri" - }, - "policy_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Policy Uri" - }, - "client_id": { - "type": "string", - "title": "Client Id" - } - }, - "title": "OAuth2ClientConfigurationUpdate", - "required": [ - "redirect_uris", - "client_name", - "client_id" - ] - }, - "OAuth2ClientPublic": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "client_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Name" - }, - "client_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Uri" - }, - "logo_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Logo Uri" - }, - "tos_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Tos Uri" - }, - "policy_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Policy Uri" - } - }, - "title": "OAuth2ClientPublic", - "required": [ - "created_at", - "modified_at", - "client_id", - "client_name", - "client_uri", - "logo_uri", - "tos_uri", - "policy_uri" - ] - }, - "Order": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "tax_amount": { - "type": "integer", - "title": "Tax Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "billing_reason": { - "$ref": "#/components/schemas/OrderBillingReason" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4" - }, - "product_price_id": { - "type": "string", - "title": "Product Price Id", - "format": "uuid4" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - }, - "customer": { - "$ref": "#/components/schemas/OrderCustomer" - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - }, - "user": { - "$ref": "#/components/schemas/OrderUser", - "deprecated": true - }, - "product": { - "$ref": "#/components/schemas/OrderProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase" - } - ], - "title": "OrderDiscount" - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "subscription": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrderSubscription" - }, - { - "type": "null" - } - ] - } - }, - "title": "Order", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "amount", - "tax_amount", - "currency", - "billing_reason", - "billing_address", - "customer_id", - "product_id", - "product_price_id", - "discount_id", - "subscription_id", - "checkout_id", - "customer", - "user_id", - "user", - "product", - "product_price", - "discount", - "subscription" - ] - }, - "OrderBillingReason": { - "type": "string", - "title": "OrderBillingReason", - "enum": [ - "purchase", - "subscription_create", - "subscription_cycle", - "subscription_update" - ] - }, - "OrderCustomer": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "type": "array", - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "readOnly": true - } - }, - "title": "OrderCustomer", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "organization_id", - "avatar_url" - ] - }, - "OrderInvoice": { - "type": "object", - "properties": { - "url": { - "type": "string", - "title": "Url", - "description": "The URL to the invoice." - } - }, - "title": "OrderInvoice", - "required": [ - "url" - ], - "description": "Order's invoice data." - }, - "OrderProduct": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the product." - } - }, - "title": "OrderProduct", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id" - ] - }, - "OrderSortProperty": { - "type": "string", - "title": "OrderSortProperty", - "enum": [ - "created_at", - "-created_at", - "amount", - "-amount", - "customer", - "-customer", - "product", - "-product", - "discount", - "-discount", - "subscription", - "-subscription" - ] - }, - "OrderSubscription": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval" - }, - "status": { - "$ref": "#/components/schemas/SubscriptionStatus" - }, - "current_period_start": { - "type": "string", - "title": "Current Period Start", - "format": "date-time" - }, - "current_period_end": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Current Period End" - }, - "cancel_at_period_end": { - "type": "boolean", - "title": "Cancel At Period End" - }, - "started_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Started At" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4" - }, - "price_id": { - "type": "string", - "title": "Price Id", - "format": "uuid4" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - } - }, - "title": "OrderSubscription", - "required": [ - "metadata", - "created_at", - "modified_at", - "id", - "amount", - "currency", - "recurring_interval", - "status", - "current_period_start", - "current_period_end", - "cancel_at_period_end", - "started_at", - "ended_at", - "customer_id", - "product_id", - "price_id", - "discount_id", - "checkout_id", - "user_id" - ] - }, - "OrderUser": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "email": { - "type": "string", - "title": "Email" - }, - "public_name": { - "type": "string", - "title": "Public Name" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "github_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Github Username" - } - }, - "title": "OrderUser", - "required": [ - "id", - "email", - "public_name" - ] - }, - "Organization": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "name": { - "type": "string", - "title": "Name" - }, - "slug": { - "type": "string", - "title": "Slug" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "bio": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Bio" - }, - "company": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Company" - }, - "blog": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Blog" - }, - "location": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Location" - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Email" - }, - "twitter_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Twitter Username" - }, - "pledge_minimum_amount": { - "type": "integer", - "title": "Pledge Minimum Amount" - }, - "pledge_badge_show_amount": { - "type": "boolean", - "title": "Pledge Badge Show Amount" - }, - "default_upfront_split_to_contributors": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Default Upfront Split To Contributors" - }, - "profile_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationProfileSettings" - }, - { - "type": "null" - } - ], - "description": "Settings for the organization profile" - }, - "feature_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationFeatureSettings" - }, - { - "type": "null" - } - ], - "description": "Settings for the organization features" - } - }, - "title": "Organization", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "slug", - "avatar_url", - "bio", - "company", - "blog", - "location", - "email", - "twitter_username", - "pledge_minimum_amount", - "pledge_badge_show_amount", - "default_upfront_split_to_contributors", - "profile_settings", - "feature_settings" - ] - }, - "OrganizationAvatarFileCreate": { - "type": "object", - "properties": { - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "mime_type": { - "type": "string", - "title": "Mime Type", - "pattern": "^image\\/(jpeg|png|gif|webp|svg\\+xml)$", - "description": "MIME type of the file. Only images are supported for this type of file." - }, - "size": { - "type": "integer", - "title": "Size", - "maximum": 1048576, - "description": "Size of the file. A maximum of 1 MB is allowed for this type of file." - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "upload": { - "$ref": "#/components/schemas/S3FileCreateMultipart" - }, - "service": { - "type": "string", - "title": "Service", - "enum": [ - "organization_avatar" - ], - "const": "organization_avatar" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - } - }, - "title": "OrganizationAvatarFileCreate", - "required": [ - "name", - "mime_type", - "size", - "upload", - "service" - ], - "description": "Schema to create a file to be used as an organization avatar." - }, - "OrganizationAvatarFileRead": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "service": { - "type": "string", - "title": "Service", - "enum": [ - "organization_avatar" - ], - "const": "organization_avatar" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - }, - "public_url": { - "type": "string", - "title": "Public Url", - "readOnly": true - } - }, - "title": "OrganizationAvatarFileRead", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "version", - "service", - "is_uploaded", - "created_at", - "size_readable", - "public_url" - ], - "description": "File to be used as an organization avatar." - }, - "OrganizationCreate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Name", - "minLength": 3 - }, - "slug": { - "type": "string", - "title": "Slug", - "minLength": 3 - }, - "avatar_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "feature_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationFeatureSettings" - }, - { - "type": "null" - } - ] - } - }, - "title": "OrganizationCreate", - "required": [ - "name", - "slug" - ] - }, - "OrganizationFeatureSettings": { - "type": "object", - "properties": { - "issue_funding_enabled": { - "type": "boolean", - "title": "Issue Funding Enabled", - "description": "If this organization has issue funding enabled", - "default": false - } - }, - "title": "OrganizationFeatureSettings" - }, - "OrganizationProfileSettings": { - "type": "object", - "properties": { - "enabled": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Enabled", - "description": "If this organization has a profile enabled" - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 160 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "A description of the organization" - }, - "featured_projects": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "Featured Projects", - "description": "A list of featured projects" - }, - "featured_organizations": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "Featured Organizations", - "description": "A list of featured organizations" - }, - "links": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - } - }, - { - "type": "null" - } - ], - "title": "Links", - "description": "A list of links associated with the organization" - }, - "subscribe": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationSubscribePromoteSettings" - }, - { - "type": "null" - } - ], - "description": "Subscription promotion settings", - "default": { - "promote": true, - "show_count": true, - "count_free": true - } - }, - "accent_color": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Accent Color", - "description": "Accent color for the organization" - } - }, - "title": "OrganizationProfileSettings" - }, - "OrganizationSortProperty": { - "type": "string", - "title": "OrganizationSortProperty", - "enum": [ - "created_at", - "-created_at", - "name", - "-name" - ] - }, - "OrganizationSubscribePromoteSettings": { - "type": "object", - "properties": { - "promote": { - "type": "boolean", - "title": "Promote", - "description": "Promote email subscription (free)", - "default": true - }, - "show_count": { - "type": "boolean", - "title": "Show Count", - "description": "Show subscription count publicly", - "default": true - }, - "count_free": { - "type": "boolean", - "title": "Count Free", - "description": "Include free subscribers in total count", - "default": true - } - }, - "title": "OrganizationSubscribePromoteSettings" - }, - "OrganizationUpdate": { - "type": "object", - "properties": { - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "default_upfront_split_to_contributors": { - "anyOf": [ - { - "type": "integer", - "maximum": 100, - "minimum": 0 - }, - { - "type": "null" - } - ], - "title": "Default Upfront Split To Contributors" - }, - "pledge_badge_show_amount": { - "type": "boolean", - "title": "Pledge Badge Show Amount", - "default": false - }, - "billing_email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Billing Email" - }, - "default_badge_custom_content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Default Badge Custom Content" - }, - "pledge_minimum_amount": { - "type": "integer", - "title": "Pledge Minimum Amount", - "default": 2000 - }, - "total_monthly_spending_limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Monthly Spending Limit" - }, - "per_user_monthly_spending_limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Per User Monthly Spending Limit" - }, - "profile_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationProfileSettings" - }, - { - "type": "null" - } - ] - }, - "feature_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationFeatureSettings" - }, - { - "type": "null" - } - ] - } - }, - "title": "OrganizationUpdate" - }, - "Pagination": { - "type": "object", - "properties": { - "total_count": { - "type": "integer", - "title": "Total Count" - }, - "max_page": { - "type": "integer", - "title": "Max Page" - } - }, - "title": "Pagination", - "required": [ - "total_count", - "max_page" - ] - }, - "PaymentProcessor": { - "type": "string", - "title": "PaymentProcessor", - "enum": [ - "stripe" - ], - "const": "stripe" - }, - "Platforms": { - "type": "string", - "title": "Platforms", - "enum": [ - "github" - ], - "const": "github" - }, - "Pledge": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "amount": { - "type": "integer", - "title": "Amount", - "description": "Amount pledged towards the issue" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "state": { - "$ref": "#/components/schemas/PledgeState", - "description": "Current state of the pledge" - }, - "type": { - "$ref": "#/components/schemas/PledgeType", - "description": "Type of pledge" - }, - "refunded_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Refunded At", - "description": "If and when the pledge was refunded to the pledger" - }, - "scheduled_payout_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Scheduled Payout At", - "description": "When the payout is scheduled to be made to the maintainers behind the issue. Disputes must be made before this date." - }, - "issue": { - "$ref": "#/components/schemas/Issue", - "description": "The issue that the pledge was made towards" - }, - "pledger": { - "anyOf": [ - { - "$ref": "#/components/schemas/Pledger" - }, - { - "type": "null" - } - ], - "description": "The user or organization that made this pledge" - }, - "hosted_invoice_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Hosted Invoice Url", - "description": "URL of invoice for this pledge" - }, - "authed_can_admin_sender": { - "type": "boolean", - "title": "Authed Can Admin Sender", - "description": "If the currently authenticated subject can perform admin actions on behalf of the maker of the peldge", - "default": false - }, - "authed_can_admin_received": { - "type": "boolean", - "title": "Authed Can Admin Received", - "description": "If the currently authenticated subject can perform admin actions on behalf of the receiver of the peldge", - "default": false - }, - "created_by": { - "anyOf": [ - { - "$ref": "#/components/schemas/Pledger" - }, - { - "type": "null" - } - ], - "description": "For pledges made by an organization, or on behalf of an organization. This is the user that made the pledge. Only visible for members of said organization." - } - }, - "title": "Pledge", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "currency", - "state", - "type", - "issue" - ] - }, - "PledgeState": { - "type": "string", - "title": "PledgeState", - "enum": [ - "initiated", - "created", - "pending", - "refunded", - "disputed", - "charge_disputed", - "cancelled" - ] - }, - "PledgeType": { - "type": "string", - "title": "PledgeType", - "enum": [ - "pay_upfront", - "pay_on_completion", - "pay_directly" - ] - }, - "Pledger": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "github_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Github Username" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - } - }, - "title": "Pledger", - "required": [ - "name", - "github_username", - "avatar_url" - ] - }, - "Product": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4", - "description": "The ID of the organization owning the product." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "prices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - }, - "title": "Benefits", - "description": "List of benefits granted by the product." - }, - "medias": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "title": "Medias", - "description": "List of medias associated to the product." - }, - "attached_custom_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachedCustomField" - }, - "title": "Attached Custom Fields", - "description": "List of custom fields attached to the product." - } - }, - "title": "Product", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "metadata", - "prices", - "benefits", - "medias", - "attached_custom_fields" - ], - "description": "A product." - }, - "ProductBenefitsUpdate": { - "type": "object", - "properties": { - "benefits": { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - "title": "Benefits", - "description": "List of benefit IDs. Each one must be on the same organization as the product." - } - }, - "title": "ProductBenefitsUpdate", - "required": [ - "benefits" - ], - "description": "Schema to update the benefits granted by a product." - }, - "ProductCreate": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductRecurringCreate" - }, - { - "$ref": "#/components/schemas/ProductOneTimeCreate" - } - ] - }, - "ProductMediaFileCreate": { - "type": "object", - "properties": { - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "mime_type": { - "type": "string", - "title": "Mime Type", - "pattern": "^image\\/(jpeg|png|gif|webp|svg\\+xml)$", - "description": "MIME type of the file. Only images are supported for this type of file." - }, - "size": { - "type": "integer", - "title": "Size", - "maximum": 10485760, - "description": "Size of the file. A maximum of 10 MB is allowed for this type of file." - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "upload": { - "$ref": "#/components/schemas/S3FileCreateMultipart" - }, - "service": { - "type": "string", - "title": "Service", - "enum": [ - "product_media" - ], - "const": "product_media" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - } - }, - "title": "ProductMediaFileCreate", - "required": [ - "name", - "mime_type", - "size", - "upload", - "service" - ], - "description": "Schema to create a file to be used as a product media file." - }, - "ProductMediaFileRead": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "service": { - "type": "string", - "title": "Service", - "enum": [ - "product_media" - ], - "const": "product_media" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded" - }, - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - }, - "public_url": { - "type": "string", - "title": "Public Url", - "readOnly": true - } - }, - "title": "ProductMediaFileRead", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "version", - "service", - "is_uploaded", - "created_at", - "size_readable", - "public_url" - ], - "description": "File to be used as a product media file." - }, - "ProductOneTimeCreate": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 3, - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "prices": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPriceOneTimeFixedCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeCustomCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeFreeCreate" - } - ] - }, - "title": "ProductPriceOneTimeCreate", - "maxItems": 1, - "minItems": 1, - "description": "List of available prices for this product." - }, - "medias": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "Medias", - "description": "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded." - }, - "attached_custom_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachedCustomFieldCreate" - }, - "title": "Attached Custom Fields", - "description": "List of custom fields to attach." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the product. **Required unless you use an organization token.**" - } - }, - "title": "ProductOneTimeCreate", - "required": [ - "name", - "prices" - ], - "description": "Schema to create a one-time product." - }, - "ProductPrice": { - "oneOf": [ - { - "$ref": "#/components/schemas/ProductPriceRecurring" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTime" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "one_time": "#/components/schemas/ProductPriceOneTime", - "recurring": "#/components/schemas/ProductPriceRecurring" - } - } - }, - "ProductPriceOneTime": { - "oneOf": [ - { - "$ref": "#/components/schemas/ProductPriceOneTimeFixed" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeCustom" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeFree" - } - ], - "discriminator": { - "propertyName": "amount_type", - "mapping": { - "custom": "#/components/schemas/ProductPriceOneTimeCustom", - "fixed": "#/components/schemas/ProductPriceOneTimeFixed", - "free": "#/components/schemas/ProductPriceOneTimeFree" - } - } - }, - "ProductPriceOneTimeCustom": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "custom" - ], - "const": "custom" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "The ID of the product owning the price." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "description": "The currency." - }, - "minimum_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Minimum Amount", - "description": "The minimum amount the customer can pay." - }, - "maximum_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Maximum Amount", - "description": "The maximum amount the customer can pay." - }, - "preset_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Preset Amount", - "description": "The initial amount shown to the customer." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "one_time" - ], - "description": "The type of the price.", - "const": "one_time" - } - }, - "title": "ProductPriceOneTimeCustom", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "price_currency", - "minimum_amount", - "maximum_amount", - "preset_amount", - "type" - ], - "description": "A pay-what-you-want price for a one-time product." - }, - "ProductPriceOneTimeCustomCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "one_time" - ], - "const": "one_time" - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "custom" - ], - "const": "custom" - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "pattern": "usd", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - "minimum_amount": { - "anyOf": [ - { - "type": "integer", - "maximum": 99999999, - "minimum": 50, - "description": "The price in cents." - }, - { - "type": "null" - } - ], - "title": "Minimum Amount", - "description": "The minimum amount the customer can pay." - }, - "maximum_amount": { - "anyOf": [ - { - "type": "integer", - "maximum": 99999999, - "minimum": 50, - "description": "The price in cents." - }, - { - "type": "null" - } - ], - "title": "Maximum Amount", - "description": "The maximum amount the customer can pay." - }, - "preset_amount": { - "anyOf": [ - { - "type": "integer", - "maximum": 99999999, - "minimum": 50, - "description": "The price in cents." - }, - { - "type": "null" - } - ], - "title": "Preset Amount", - "description": "The initial amount shown to the customer." - } - }, - "title": "ProductPriceOneTimeCustomCreate", - "required": [ - "type", - "amount_type" - ], - "description": "Schema to create a pay-what-you-want price for a one-time product." - }, - "ProductPriceOneTimeFixed": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "fixed" - ], - "const": "fixed" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "The ID of the product owning the price." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "description": "The currency." - }, - "price_amount": { - "type": "integer", - "title": "Price Amount", - "description": "The price in cents." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "one_time" - ], - "description": "The type of the price.", - "const": "one_time" - } - }, - "title": "ProductPriceOneTimeFixed", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "price_currency", - "price_amount", - "type" - ], - "description": "A one-time price for a product." - }, - "ProductPriceOneTimeFixedCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "one_time" - ], - "const": "one_time" - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "fixed" - ], - "const": "fixed" - }, - "price_amount": { - "type": "integer", - "title": "Price Amount", - "maximum": 99999999, - "minimum": 50, - "description": "The price in cents." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "pattern": "usd", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - } - }, - "title": "ProductPriceOneTimeFixedCreate", - "required": [ - "type", - "amount_type", - "price_amount" - ], - "description": "Schema to create a one-time product price." - }, - "ProductPriceOneTimeFree": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "free" - ], - "const": "free" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "The ID of the product owning the price." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "one_time" - ], - "description": "The type of the price.", - "const": "one_time" - } - }, - "title": "ProductPriceOneTimeFree", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "type" - ], - "description": "A free one-time price for a product." - }, - "ProductPriceOneTimeFreeCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "one_time" - ], - "const": "one_time" - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "free" - ], - "const": "free" - } - }, - "title": "ProductPriceOneTimeFreeCreate", - "required": [ - "type", - "amount_type" - ], - "description": "Schema to create a free one-time product price." - }, - "ProductPriceRecurring": { - "oneOf": [ - { - "$ref": "#/components/schemas/ProductPriceRecurringFixed" - }, - { - "$ref": "#/components/schemas/ProductPriceRecurringCustom" - }, - { - "$ref": "#/components/schemas/ProductPriceRecurringFree" - } - ], - "discriminator": { - "propertyName": "amount_type", - "mapping": { - "custom": "#/components/schemas/ProductPriceRecurringCustom", - "fixed": "#/components/schemas/ProductPriceRecurringFixed", - "free": "#/components/schemas/ProductPriceRecurringFree" - } - } - }, - "ProductPriceRecurringCustom": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "custom" - ], - "const": "custom" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "The ID of the product owning the price." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "description": "The currency." - }, - "minimum_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Minimum Amount", - "description": "The minimum amount the customer can pay." - }, - "maximum_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Maximum Amount", - "description": "The maximum amount the customer can pay." - }, - "preset_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Preset Amount", - "description": "The initial amount shown to the customer." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "recurring" - ], - "description": "The type of the price.", - "const": "recurring" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "title": "ProductPriceRecurringCustom", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "price_currency", - "minimum_amount", - "maximum_amount", - "preset_amount", - "type", - "recurring_interval" - ], - "description": "A pay-what-you-want recurring price for a product, i.e. a subscription." - }, - "ProductPriceRecurringFixed": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "fixed" - ], - "const": "fixed" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "The ID of the product owning the price." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "description": "The currency." - }, - "price_amount": { - "type": "integer", - "title": "Price Amount", - "description": "The price in cents." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "recurring" - ], - "description": "The type of the price.", - "const": "recurring" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "title": "ProductPriceRecurringFixed", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "price_currency", - "price_amount", - "type", - "recurring_interval" - ], - "description": "A recurring price for a product, i.e. a subscription." - }, - "ProductPriceRecurringFixedCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "recurring" - ], - "const": "recurring" - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "fixed" - ], - "const": "fixed" - }, - "price_amount": { - "type": "integer", - "title": "Price Amount", - "maximum": 99999999, - "minimum": 50, - "description": "The price in cents." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "pattern": "usd", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "title": "ProductPriceRecurringFixedCreate", - "required": [ - "type", - "amount_type", - "price_amount", - "recurring_interval" - ], - "description": "Schema to create a recurring product price, i.e. a subscription." - }, - "ProductPriceRecurringFree": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "free" - ], - "const": "free" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4", - "description": "The ID of the product owning the price." - }, - "type": { - "type": "string", - "title": "Type", - "enum": [ - "recurring" - ], - "description": "The type of the price.", - "const": "recurring" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "title": "ProductPriceRecurringFree", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "type", - "recurring_interval" - ], - "description": "A free recurring price for a product, i.e. a subscription." - }, - "ProductPriceRecurringFreeCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "recurring" - ], - "const": "recurring" - }, - "amount_type": { - "type": "string", - "title": "Amount Type", - "enum": [ - "free" - ], - "const": "free" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "title": "ProductPriceRecurringFreeCreate", - "required": [ - "type", - "amount_type", - "recurring_interval" - ], - "description": "Schema to create a free recurring product price, i.e. a subscription." - }, - "ProductPriceType": { - "type": "string", - "title": "ProductPriceType", - "enum": [ - "one_time", - "recurring" - ] - }, - "ProductRecurringCreate": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "title": "Metadata", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "title": "Name", - "minLength": 3, - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "prices": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPriceRecurringFixedCreate" - }, - "title": "ProductPriceRecurringFixedCreate", - "maxItems": 2, - "minItems": 1, - "description": "List of recurring prices. Only one price per interval (one monthly and one yearly) is allowed." - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPriceRecurringFreeCreate" - }, - "title": "ProductPriceRecurringFreeCreate", - "maxItems": 1, - "minItems": 1, - "description": "List with a single free recurring price." - } - ], - "title": "Prices", - "description": "List of available prices for this product." - }, - "medias": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "Medias", - "description": "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded." - }, - "attached_custom_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachedCustomFieldCreate" - }, - "title": "Attached Custom Fields", - "description": "List of custom fields to attach." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the product. **Required unless you use an organization token.**" - } - }, - "title": "ProductRecurringCreate", - "required": [ - "name", - "prices" - ], - "description": "Schema to create a recurring product, i.e. a subscription." - }, - "ProductSortProperty": { - "type": "string", - "title": "ProductSortProperty", - "enum": [ - "created_at", - "-created_at", - "name", - "-name", - "price_type", - "-price_type", - "price_amount_type", - "-price_amount_type", - "price_amount", - "-price_amount" - ] - }, - "ProductUpdate": { - "type": "object", - "properties": { - "metadata": { - "anyOf": [ - { - "type": "object", - "maxProperties": 50, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 3, - "description": "The name of the product." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_archived": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Is Archived", - "description": "Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally." - }, - "prices": { - "anyOf": [ - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/ExistingProductPrice" - }, - { - "$ref": "#/components/schemas/ProductPriceRecurringFixedCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceRecurringFreeCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeFixedCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeCustomCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeFreeCreate" - } - ] - } - }, - { - "type": "null" - } - ], - "title": "Prices", - "description": "List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object." - }, - "medias": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "Medias", - "description": "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded." - }, - "attached_custom_fields": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachedCustomFieldCreate" - }, - "description": "List of custom fields to attach." - }, - { - "type": "null" - } - ], - "title": "Attached Custom Fields" - } - }, - "title": "ProductUpdate", - "description": "Schema to update a product." - }, - "Reactions": { - "type": "object", - "properties": { - "total_count": { - "type": "integer", - "title": "Total Count" - }, - "plus_one": { - "type": "integer", - "title": "Plus One" - }, - "minus_one": { - "type": "integer", - "title": "Minus One" - }, - "laugh": { - "type": "integer", - "title": "Laugh" - }, - "hooray": { - "type": "integer", - "title": "Hooray" - }, - "confused": { - "type": "integer", - "title": "Confused" - }, - "heart": { - "type": "integer", - "title": "Heart" - }, - "rocket": { - "type": "integer", - "title": "Rocket" - }, - "eyes": { - "type": "integer", - "title": "Eyes" - } - }, - "title": "Reactions", - "required": [ - "total_count", - "plus_one", - "minus_one", - "laugh", - "hooray", - "confused", - "heart", - "rocket", - "eyes" - ] - }, - "Repository": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid" - }, - "platform": { - "$ref": "#/components/schemas/Platforms" - }, - "is_private": { - "type": "boolean", - "title": "Is Private" - }, - "name": { - "type": "string", - "examples": [ - "MyOrg" - ], - "title": "Name" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "stars": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "examples": [ - 1337 - ], - "title": "Stars" - }, - "license": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "License" - }, - "homepage": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Homepage" - }, - "profile_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/RepositoryProfileSettings" - }, - { - "type": "null" - } - ], - "description": "Settings for the repository profile" - }, - "organization": { - "$ref": "#/components/schemas/ExternalOrganization" - }, - "internal_organization": { - "anyOf": [ - { - "$ref": "#/components/schemas/Organization" - }, - { - "type": "null" - } - ] - } - }, - "title": "Repository", - "required": [ - "id", - "platform", - "is_private", - "name", - "description", - "stars", - "license", - "homepage", - "profile_settings", - "organization", - "internal_organization" - ] - }, - "RepositoryProfileSettings": { - "type": "object", - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 240 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "A description of the repository" - }, - "cover_image_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cover Image Url", - "description": "A URL to a cover image" - }, - "featured_organizations": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "Featured Organizations", - "description": "A list of featured organizations" - }, - "highlighted_subscription_tiers": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "Highlighted Subscription Tiers", - "description": "A list of highlighted subscription tiers" - }, - "links": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - } - }, - { - "type": "null" - } - ], - "title": "Links", - "description": "A list of links related to the repository" - } - }, - "title": "RepositoryProfileSettings" - }, - "RepositoryProfileSettingsUpdate": { - "type": "object", - "properties": { - "set_description": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Set Description" - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 240 - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "set_cover_image_url": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Set Cover Image Url" - }, - "cover_image_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cover Image Url" - }, - "featured_organizations": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "Featured Organizations" - }, - "highlighted_subscription_tiers": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - }, - "maxItems": 3 - }, - { - "type": "null" - } - ], - "title": "Highlighted Subscription Tiers" - }, - "links": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - } - }, - { - "type": "null" - } - ], - "title": "Links" - } - }, - "title": "RepositoryProfileSettingsUpdate" - }, - "RepositorySortProperty": { - "type": "string", - "title": "RepositorySortProperty", - "enum": [ - "created_at", - "-created_at", - "name", - "-name", - "stars", - "-stars" - ] - }, - "RepositoryUpdate": { - "type": "object", - "properties": { - "profile_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/RepositoryProfileSettingsUpdate" - }, - { - "type": "null" - } - ] - } - }, - "title": "RepositoryUpdate" - }, - "ResourceNotFound": { - "type": "object", - "properties": { - "error": { - "type": "string", - "title": "Error", - "enum": [ - "ResourceNotFound" - ], - "const": "ResourceNotFound" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "title": "ResourceNotFound", - "required": [ - "error", - "detail" - ] - }, - "RevokeTokenResponse": { - "type": "object", - "title": "RevokeTokenResponse" - }, - "S3DownloadURL": { - "type": "object", - "properties": { - "url": { - "type": "string", - "title": "Url" - }, - "headers": { - "type": "object", - "title": "Headers", - "additionalProperties": { - "type": "string" - }, - "default": {} - }, - "expires_at": { - "type": "string", - "title": "Expires At", - "format": "date-time" - } - }, - "title": "S3DownloadURL", - "required": [ - "url", - "expires_at" - ] - }, - "S3FileCreateMultipart": { - "type": "object", - "properties": { - "parts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/S3FileCreatePart" - }, - "title": "Parts" - } - }, - "title": "S3FileCreateMultipart", - "required": [ - "parts" - ] - }, - "S3FileCreatePart": { - "type": "object", - "properties": { - "number": { - "type": "integer", - "title": "Number" - }, - "chunk_start": { - "type": "integer", - "title": "Chunk Start" - }, - "chunk_end": { - "type": "integer", - "title": "Chunk End" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - } - }, - "title": "S3FileCreatePart", - "required": [ - "number", - "chunk_start", - "chunk_end" - ] - }, - "S3FileUploadCompletedPart": { - "type": "object", - "properties": { - "number": { - "type": "integer", - "title": "Number" - }, - "checksum_etag": { - "type": "string", - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - } - }, - "title": "S3FileUploadCompletedPart", - "required": [ - "number", - "checksum_etag", - "checksum_sha256_base64" - ] - }, - "S3FileUploadMultipart": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "path": { - "type": "string", - "title": "Path" - }, - "parts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/S3FileUploadPart" - }, - "title": "Parts" - } - }, - "title": "S3FileUploadMultipart", - "required": [ - "id", - "path", - "parts" - ] - }, - "S3FileUploadPart": { - "type": "object", - "properties": { - "number": { - "type": "integer", - "title": "Number" - }, - "chunk_start": { - "type": "integer", - "title": "Chunk Start" - }, - "chunk_end": { - "type": "integer", - "title": "Chunk End" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "url": { - "type": "string", - "title": "Url" - }, - "expires_at": { - "type": "string", - "title": "Expires At", - "format": "date-time" - }, - "headers": { - "type": "object", - "title": "Headers", - "additionalProperties": { - "type": "string" - }, - "default": {} - } - }, - "title": "S3FileUploadPart", - "required": [ - "number", - "chunk_start", - "chunk_end", - "url", - "expires_at" - ] - }, - "Scope": { - "type": "string", - "title": "Scope", - "enum": [ - "openid", - "profile", - "email", - "user:read", - "admin", - "web_default", - "organizations:read", - "organizations:write", - "custom_fields:read", - "custom_fields:write", - "discounts:read", - "discounts:write", - "checkout_links:read", - "checkout_links:write", - "checkouts:read", - "checkouts:write", - "products:read", - "products:write", - "benefits:read", - "benefits:write", - "files:read", - "files:write", - "subscriptions:read", - "subscriptions:write", - "customers:read", - "customers:write", - "customer_sessions:write", - "orders:read", - "metrics:read", - "webhooks:read", - "webhooks:write", - "external_organizations:read", - "license_keys:read", - "license_keys:write", - "repositories:read", - "repositories:write", - "issues:read", - "issues:write", - "customer_portal:read", - "customer_portal:write" - ] - }, - "State": { - "type": "string", - "title": "State", - "enum": [ - "open", - "closed" - ] - }, - "SubType": { - "type": "string", - "title": "SubType", - "enum": [ - "user", - "organization" - ] - }, - "Subscription": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval" - }, - "status": { - "$ref": "#/components/schemas/SubscriptionStatus" - }, - "current_period_start": { - "type": "string", - "title": "Current Period Start", - "format": "date-time" - }, - "current_period_end": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Current Period End" - }, - "cancel_at_period_end": { - "type": "boolean", - "title": "Cancel At Period End" - }, - "started_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Started At" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "product_id": { - "type": "string", - "title": "Product Id", - "format": "uuid4" - }, - "price_id": { - "type": "string", - "title": "Price Id", - "format": "uuid4" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "customer": { - "$ref": "#/components/schemas/SubscriptionCustomer" - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - }, - "user": { - "$ref": "#/components/schemas/SubscriptionUser", - "deprecated": true - }, - "product": { - "$ref": "#/components/schemas/Product" - }, - "price": { - "$ref": "#/components/schemas/ProductPriceRecurring" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase" - } - ], - "title": "SubscriptionDiscount" - }, - { - "type": "null" - } - ], - "title": "Discount" - } - }, - "title": "Subscription", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "currency", - "recurring_interval", - "status", - "current_period_start", - "current_period_end", - "cancel_at_period_end", - "started_at", - "ended_at", - "customer_id", - "product_id", - "price_id", - "discount_id", - "checkout_id", - "metadata", - "customer", - "user_id", - "user", - "product", - "price", - "discount" - ] - }, - "SubscriptionCustomer": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "title": "Created At", - "format": "date-time", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "title": "Id", - "format": "uuid4", - "description": "The ID of the object." - }, - "metadata": { - "type": "object", - "title": "Metadata", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - } - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "type": "array", - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "readOnly": true - } - }, - "title": "SubscriptionCustomer", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "organization_id", - "avatar_url" - ] - }, - "SubscriptionRecurringInterval": { - "type": "string", - "title": "SubscriptionRecurringInterval", - "enum": [ - "month", - "year" - ] - }, - "SubscriptionSortProperty": { - "type": "string", - "title": "SubscriptionSortProperty", - "enum": [ - "customer", - "-customer", - "status", - "-status", - "started_at", - "-started_at", - "current_period_end", - "-current_period_end", - "amount", - "-amount", - "product", - "-product", - "discount", - "-discount" - ] - }, - "SubscriptionStatus": { - "type": "string", - "title": "SubscriptionStatus", - "enum": [ - "incomplete", - "incomplete_expired", - "trialing", - "active", - "past_due", - "canceled", - "unpaid" - ] - }, - "SubscriptionUser": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "email": { - "type": "string", - "title": "Email" - }, - "public_name": { - "type": "string", - "title": "Public Name" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "github_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Github Username" - } - }, - "title": "SubscriptionUser", - "required": [ - "id", - "email", - "public_name" - ] - }, - "TaxIDFormat": { - "type": "string", - "title": "TaxIDFormat", - "enum": [ - "ad_nrt", - "ae_trn", - "ar_cuit", - "au_abn", - "au_arn", - "bg_uic", - "bh_vat", - "bo_tin", - "br_cnpj", - "br_cpf", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "ch_uid", - "ch_vat", - "cl_tin", - "cn_tin", - "co_nit", - "cr_tin", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kr_brn", - "kz_bin", - "li_uid", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sv_nit", - "th_vat", - "tr_tin", - "tw_vat", - "ua_vat", - "us_ein", - "uy_ruc", - "ve_rif", - "vn_tin", - "za_vat" - ], - "description": "List of supported tax ID formats.\n\nRef: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id" - }, - "TokenResponse": { - "type": "object", - "properties": { - "access_token": { - "type": "string", - "title": "Access Token" - }, - "token_type": { - "type": "string", - "title": "Token Type", - "enum": [ - "Bearer" - ], - "const": "Bearer" - }, - "expires_in": { - "type": "integer", - "title": "Expires In" - }, - "refresh_token": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Refresh Token" - }, - "scope": { - "type": "string", - "title": "Scope" - }, - "id_token": { - "type": "string", - "title": "Id Token" - } - }, - "title": "TokenResponse", - "required": [ - "access_token", - "token_type", - "expires_in", - "refresh_token", - "scope", - "id_token" - ] - }, - "Unauthorized": { - "type": "object", - "properties": { - "error": { - "type": "string", - "title": "Error", - "enum": [ - "Unauthorized" - ], - "const": "Unauthorized" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "title": "Unauthorized", - "required": [ - "error", - "detail" - ] - }, - "UserInfoOrganization": { - "type": "object", - "properties": { - "sub": { - "type": "string", - "title": "Sub" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - } - }, - "title": "UserInfoOrganization", - "required": [ - "sub" - ] - }, - "UserInfoUser": { - "type": "object", - "properties": { - "sub": { - "type": "string", - "title": "Sub" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Email" - }, - "email_verified": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Email Verified" - } - }, - "title": "UserInfoUser", - "required": [ - "sub" - ] - }, - "ValidatedLicenseKey": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Id", - "format": "uuid4" - }, - "organization_id": { - "type": "string", - "title": "Organization Id", - "format": "uuid4" - }, - "user_id": { - "type": "string", - "title": "User Id", - "format": "uuid4", - "deprecated": true - }, - "customer_id": { - "type": "string", - "title": "Customer Id", - "format": "uuid4" - }, - "user": { - "$ref": "#/components/schemas/LicenseKeyUser", - "deprecated": true - }, - "customer": { - "$ref": "#/components/schemas/LicenseKeyCustomer" - }, - "benefit_id": { - "type": "string", - "title": "Benefit Id", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - "key": { - "type": "string", - "title": "Key" - }, - "display_key": { - "type": "string", - "title": "Display Key" - }, - "status": { - "$ref": "#/components/schemas/LicenseKeyStatus" - }, - "limit_activations": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Activations" - }, - "usage": { - "type": "integer", - "title": "Usage" - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - }, - "validations": { - "type": "integer", - "title": "Validations" - }, - "last_validated_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Validated At" - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At" - }, - "activation": { - "anyOf": [ - { - "$ref": "#/components/schemas/LicenseKeyActivationBase" - }, - { - "type": "null" - } - ] - } - }, - "title": "ValidatedLicenseKey", - "required": [ - "id", - "organization_id", - "user_id", - "customer_id", - "user", - "customer", - "benefit_id", - "key", - "display_key", - "status", - "limit_activations", - "usage", - "limit_usage", - "validations", - "last_validated_at", - "expires_at" - ] - }, - "ValidationError": { - "type": "object", - "properties": { - "loc": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } - }, - "title": "ValidationError", - "required": [ - "loc", - "msg", - "type" - ] - }, - "WebhookBenefitCreatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "benefit.created" - ], - "const": "benefit.created" - }, - "data": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - }, - "title": "WebhookBenefitCreatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a new benefit is created.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookBenefitGrantCreatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "benefit_grant.created" - ], - "const": "benefit_grant.created" - }, - "data": { - "$ref": "#/components/schemas/BenefitGrantWebhook" - } - }, - "title": "WebhookBenefitGrantCreatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a new benefit grant is created.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookBenefitGrantRevokedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "benefit_grant.revoked" - ], - "const": "benefit_grant.revoked" - }, - "data": { - "$ref": "#/components/schemas/BenefitGrantWebhook" - } - }, - "title": "WebhookBenefitGrantRevokedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a new benefit grant is revoked.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookBenefitGrantUpdatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "benefit_grant.updated" - ], - "const": "benefit_grant.updated" - }, - "data": { - "$ref": "#/components/schemas/BenefitGrantWebhook" - } - }, - "title": "WebhookBenefitGrantUpdatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a new benefit grant is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookBenefitUpdatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "benefit.updated" - ], - "const": "benefit.updated" - }, - "data": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - }, - "title": "WebhookBenefitUpdatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a benefit is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookCheckoutCreatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "checkout.created" - ], - "const": "checkout.created" - }, - "data": { - "$ref": "#/components/schemas/Checkout" - } - }, - "title": "WebhookCheckoutCreatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a new checkout is created.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookCheckoutUpdatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "checkout.updated" - ], - "const": "checkout.updated" - }, - "data": { - "$ref": "#/components/schemas/Checkout" - } - }, - "title": "WebhookCheckoutUpdatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a checkout is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookOrderCreatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "order.created" - ], - "const": "order.created" - }, - "data": { - "$ref": "#/components/schemas/Order" - } - }, - "title": "WebhookOrderCreatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a new order is created.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookOrganizationUpdatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "organization.updated" - ], - "const": "organization.updated" - }, - "data": { - "$ref": "#/components/schemas/Organization" - } - }, - "title": "WebhookOrganizationUpdatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a organization is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookPledgeCreatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "pledge.created" - ], - "const": "pledge.created" - }, - "data": { - "$ref": "#/components/schemas/Pledge" - } - }, - "title": "WebhookPledgeCreatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookPledgeUpdatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "pledge.updated" - ], - "const": "pledge.updated" - }, - "data": { - "$ref": "#/components/schemas/Pledge" - } - }, - "title": "WebhookPledgeUpdatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a pledge is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookProductCreatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "product.created" - ], - "const": "product.created" - }, - "data": { - "$ref": "#/components/schemas/Product" - } - }, - "title": "WebhookProductCreatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a new product is created.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookProductUpdatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "product.updated" - ], - "const": "product.updated" - }, - "data": { - "$ref": "#/components/schemas/Product" - } - }, - "title": "WebhookProductUpdatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a product is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookSubscriptionActivePayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "subscription.active" - ], - "const": "subscription.active" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "title": "WebhookSubscriptionActivePayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookSubscriptionCanceledPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "subscription.canceled" - ], - "const": "subscription.canceled" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "title": "WebhookSubscriptionCanceledPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookSubscriptionCreatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "subscription.created" - ], - "const": "subscription.created" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "title": "WebhookSubscriptionCreatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a new subscription is created.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookSubscriptionRevokedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "subscription.revoked" - ], - "const": "subscription.revoked" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "title": "WebhookSubscriptionRevokedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookSubscriptionUpdatedPayload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Type", - "enum": [ - "subscription.updated" - ], - "const": "subscription.updated" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "title": "WebhookSubscriptionUpdatedPayload", - "required": [ - "type", - "data" - ], - "description": "Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord \u0026 Slack support:** On cancellation and revocation. Renewals are skipped." - } - }, - "securitySchemes": { - "oidc": { - "type": "openIdConnect", - "openIdConnectUrl": "/.well-known/openid-configuration" - }, - "pat": { - "type": "http", - "description": "You can generate a **Personal Access Token** from your [settings](https://polar.sh/settings).", - "scheme": "bearer" - }, - "customer_session": { - "type": "http", - "scheme": "bearer" - } - } - }, - "tags": [ - { - "name": "private", - "description": "Endpoints that should appear in the schema only in development to generate our internal JS SDK." - }, - { - "name": "documented", - "description": "Endpoints shown and documented in the Polar API documentation." - }, - { - "name": "featured", - "description": "Endpoints featured in the Polar API documentation for their interest in common use-cases." - }, - { - "name": "issue_funding", - "description": "Endpoints related to issue funding and rewards in the Polar API." - } - ], - "webhooks": { - "checkout.created": { - "post": { - "summary": "checkout.created", - "description": "Sent when a new checkout is created.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointcheckout_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookCheckoutCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "checkout.updated": { - "post": { - "summary": "checkout.updated", - "description": "Sent when a checkout is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointcheckout_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookCheckoutUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "order.created": { - "post": { - "summary": "order.created", - "description": "Sent when a new order is created.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointorder_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookOrderCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.created": { - "post": { - "summary": "subscription.created", - "description": "Sent when a new subscription is created.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointsubscription_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.updated": { - "post": { - "summary": "subscription.updated", - "description": "Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord \u0026 Slack support:** On cancellation and revocation. Renewals are skipped.", - "operationId": "_endpointsubscription_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.active": { - "post": { - "summary": "subscription.active", - "description": "Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointsubscription_active_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionActivePayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.canceled": { - "post": { - "summary": "subscription.canceled", - "description": "Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointsubscription_canceled_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionCanceledPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.revoked": { - "post": { - "summary": "subscription.revoked", - "description": "Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointsubscription_revoked_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionRevokedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "product.created": { - "post": { - "summary": "product.created", - "description": "Sent when a new product is created.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointproduct_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookProductCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "product.updated": { - "post": { - "summary": "product.updated", - "description": "Sent when a product is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointproduct_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookProductUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "pledge.created": { - "post": { - "summary": "pledge.created", - "description": "Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointpledge_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookPledgeCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "pledge.updated": { - "post": { - "summary": "pledge.updated", - "description": "Sent when a pledge is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointpledge_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookPledgeUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "organization.updated": { - "post": { - "summary": "organization.updated", - "description": "Sent when a organization is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointorganization_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookOrganizationUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit.created": { - "post": { - "summary": "benefit.created", - "description": "Sent when a new benefit is created.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit.updated": { - "post": { - "summary": "benefit.updated", - "description": "Sent when a benefit is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit_grant.created": { - "post": { - "summary": "benefit_grant.created", - "description": "Sent when a new benefit grant is created.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_grant_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitGrantCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit_grant.updated": { - "post": { - "summary": "benefit_grant.updated", - "description": "Sent when a new benefit grant is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_grant_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitGrantUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit_grant.revoked": { - "post": { - "summary": "benefit_grant.revoked", - "description": "Sent when a new benefit grant is revoked.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_grant_revoked_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitGrantRevokedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/.speakeasy/temp/reformatted3502244202.json b/.speakeasy/temp/reformatted3502244202.json deleted file mode 100644 index c76b58a..0000000 --- a/.speakeasy/temp/reformatted3502244202.json +++ /dev/null @@ -1,30678 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Polar API", - "summary": "Polar HTTP and Webhooks API", - "description": "Read the docs at https://docs.polar.sh/api", - "version": "0.1.0" - }, - "servers": [ - { - "url": "https://api.polar.sh", - "description": "Production environment", - "x-speakeasy-server-id": "production" - }, - { - "url": "https://sandbox-api.polar.sh", - "description": "Sandbox environment", - "x-speakeasy-server-id": "sandbox" - } - ], - "paths": { - "/v1/external_organizations/": { - "get": { - "tags": [ - "external_organizations", - "documented", - "issue_funding" - ], - "summary": "List External Organizations", - "description": "List external organizations.", - "operationId": "external_organizations:list", - "security": [ - { - "oidc": [ - "external_organizations:read" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "platform", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Platforms" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Platforms" - } - }, - { - "type": "null" - } - ], - "title": "Platform Filter", - "description": "Filter by platform." - }, - "description": "Filter by platform." - }, - { - "name": "name", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "title": "RepositoryName Filter", - "description": "Filter by name." - }, - "description": "Filter by name." - }, - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExternalOrganizationSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_ExternalOrganization_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Anonymous", - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "external_organizations", - "x-speakeasy-name-override": "list" - } - }, - "/v1/repositories/": { - "get": { - "tags": [ - "repositories", - "documented", - "issue_funding" - ], - "summary": "List Repositories", - "description": "List repositories.", - "operationId": "repositories:list", - "security": [ - { - "oidc": [ - "repositories:read", - "repositories:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "platform", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Platforms" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/Platforms" - } - }, - { - "type": "null" - } - ], - "title": "Platform Filter", - "description": "Filter by platform." - }, - "description": "Filter by platform." - }, - { - "name": "name", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "title": "RepositoryName Filter", - "description": "Filter by name." - }, - "description": "Filter by name." - }, - { - "name": "external_organization_name", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "title": "ExternalOrganizationName Filter", - "description": "Filter by external organization name." - }, - "description": "Filter by external organization name." - }, - { - "name": "is_private", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Filter by private status.", - "title": "Is Private" - }, - "description": "Filter by private status." - }, - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/RepositorySortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Repository_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Anonymous", - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "repositories", - "x-speakeasy-name-override": "list" - } - }, - "/v1/repositories/{id}": { - "get": { - "tags": [ - "repositories", - "documented", - "issue_funding" - ], - "summary": "Get Repository", - "description": "Get a repository by ID.", - "operationId": "repositories:get", - "security": [ - { - "oidc": [ - "repositories:read", - "repositories:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The repository ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/repositories", - "resourceName": "Repository", - "displayProperty": "name" - }, - "title": "Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Repository" - } - } - } - }, - "404": { - "description": "Repository not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Anonymous", - "Organization", - "User" - ], - "x-speakeasy-group": "repositories", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "repositories", - "documented", - "issue_funding" - ], - "summary": "Update Repository", - "description": "Update a repository.", - "operationId": "repositories:update", - "security": [ - { - "oidc": [ - "repositories:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The repository ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/repositories", - "resourceName": "Repository", - "displayProperty": "name" - }, - "title": "Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RepositoryUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Repository updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Repository" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this repository.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Repository not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "repositories", - "x-speakeasy-name-override": "update" - } - }, - "/v1/organizations/": { - "get": { - "tags": [ - "organizations", - "documented", - "featured" - ], - "summary": "List Organizations", - "description": "List organizations.", - "operationId": "organizations:list", - "security": [ - { - "oidc": [ - "organizations:read", - "organizations:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "slug", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Filter by slug.", - "title": "Slug" - }, - "description": "Filter by slug." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrganizationSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Organization_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "organizations", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "organizations", - "documented", - "featured" - ], - "summary": "Create Organization", - "description": "Create an organization.", - "operationId": "organizations:create", - "security": [ - { - "oidc": [ - "organizations:write" - ] - }, - { - "pat": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Organization created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "User" - ], - "x-speakeasy-group": "organizations", - "x-speakeasy-name-override": "create" - } - }, - "/v1/organizations/{id}": { - "get": { - "tags": [ - "organizations", - "documented", - "featured" - ], - "summary": "Get Organization", - "description": "Get an organization by ID.", - "operationId": "organizations:get", - "security": [ - { - "oidc": [ - "organizations:read", - "organizations:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - }, - "title": "Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "404": { - "description": "Organization not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "organizations", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "organizations", - "documented", - "featured" - ], - "summary": "Update Organization", - "description": "Update an organization.", - "operationId": "organizations:update", - "security": [ - { - "oidc": [ - "organizations:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - }, - "title": "Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Organization updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this organization.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Organization not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "organizations", - "x-speakeasy-name-override": "update" - } - }, - "/v1/subscriptions/": { - "get": { - "tags": [ - "subscriptions", - "documented" - ], - "summary": "List Subscriptions", - "description": "List subscriptions.", - "operationId": "subscriptions:list", - "security": [ - { - "oidc": [ - "subscriptions:read", - "subscriptions:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "product_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - }, - "description": "Filter by product ID." - }, - { - "name": "customer_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "CustomerID Filter", - "description": "Filter by customer ID." - }, - "description": "Filter by customer ID." - }, - { - "name": "discount_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "DiscountID Filter", - "description": "Filter by discount ID." - }, - "description": "Filter by discount ID." - }, - { - "name": "active", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Filter by active or inactive subscription.", - "title": "Active" - }, - "description": "Filter by active or inactive subscription." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubscriptionSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-started_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Subscription_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "subscriptions", - "x-speakeasy-name-override": "list" - } - }, - "/v1/subscriptions/export": { - "get": { - "tags": [ - "subscriptions", - "documented" - ], - "summary": "Export Subscriptions", - "description": "Export subscriptions as a CSV file.", - "operationId": "subscriptions:export", - "security": [ - { - "oidc": [ - "subscriptions:read", - "subscriptions:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "description": "Filter by organization ID.", - "title": "Organization Id" - }, - "description": "Filter by organization ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "subscriptions", - "x-speakeasy-name-override": "export" - } - }, - "/v1/advertisements/": { - "get": { - "tags": [ - "advertisements", - "documented" - ], - "summary": "List Campaigns", - "description": "List active advertisement campaigns for a benefit.", - "operationId": "advertisements:list", - "parameters": [ - { - "name": "benefit_id", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - }, - "title": "Benefit Id" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/AdvertisementSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "granted_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdvertisementCampaignListResource" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "advertisements", - "x-speakeasy-name-override": "list" - } - }, - "/v1/advertisements/{id}": { - "get": { - "tags": [ - "advertisements", - "documented" - ], - "summary": "Get Campaign", - "description": "Get an advertisement campaign by ID.", - "operationId": "advertisements:get", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The advertisement campaign ID.", - "title": "Id" - }, - "description": "The advertisement campaign ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdvertisementCampaign" - } - } - } - }, - "404": { - "description": "Advertisement campaign not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "advertisements", - "x-speakeasy-name-override": "get" - } - }, - "/v1/oauth2/": { - "get": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "List Clients", - "description": "List OAuth2 clients.", - "operationId": "oauth2:clients:list", - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_OAuth2Client_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "list" - } - }, - "/v1/oauth2/register": { - "post": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "Create Client", - "description": "Create an OAuth2 client.", - "operationId": "oauth2:clients:oauth2:create_client", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2ClientConfiguration" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "User" - ], - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "create" - } - }, - "/v1/oauth2/register/{client_id}": { - "get": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "Get Client", - "description": "Get an OAuth2 client by Client ID.", - "operationId": "oauth2:clients:oauth2:get_client", - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Client Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "get" - }, - "put": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "Update Client", - "description": "Update an OAuth2 client.", - "operationId": "oauth2:clients:oauth2:update_client", - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Client Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2ClientConfigurationUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "update" - }, - "delete": { - "tags": [ - "oauth2", - "clients", - "documented" - ], - "summary": "Delete Client", - "description": "Delete an OAuth2 client.", - "operationId": "oauth2:clients:oauth2:delete_client", - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Client Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "oauth2.clients", - "x-speakeasy-name-override": "delete" - } - }, - "/v1/oauth2/authorize": { - "get": { - "tags": [ - "oauth2", - "documented" - ], - "summary": "Authorize", - "operationId": "oauth2:authorize", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AuthorizeResponseUser" - }, - { - "$ref": "#/components/schemas/AuthorizeResponseOrganization" - } - ], - "title": "Response Oauth2:Authorize", - "discriminator": { - "propertyName": "sub_type", - "mapping": { - "user": "#/components/schemas/AuthorizeResponseUser", - "organization": "#/components/schemas/AuthorizeResponseOrganization" - } - } - } - } - } - } - }, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "oauth2", - "x-speakeasy-name-override": "authorize" - } - }, - "/v1/oauth2/token": { - "post": { - "tags": [ - "oauth2", - "featured", - "documented" - ], - "summary": "Request Token", - "description": "Request an access token using a valid grant.", - "operationId": "oauth2:request_token", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "oneOf": [ - { - "$ref": "#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest" - }, - { - "$ref": "#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest" - } - ], - "discriminator": { - "propertyName": "grant_type", - "mapping": { - "authorization_code": "#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest", - "refresh_token": "#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest" - } - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenResponse" - } - } - } - } - }, - "x-components": { - "AuthorizationCodeTokenRequest": { - "properties": { - "grant_type": { - "const": "authorization_code", - "enum": [ - "authorization_code" - ], - "title": "Grant Type", - "type": "string" - }, - "client_id": { - "title": "Client Id", - "type": "string" - }, - "client_secret": { - "title": "Client Secret", - "type": "string" - }, - "code": { - "title": "Code", - "type": "string" - }, - "redirect_uri": { - "format": "uri", - "maxLength": 2083, - "minLength": 1, - "title": "Redirect Uri", - "type": "string" - } - }, - "required": [ - "grant_type", - "client_id", - "client_secret", - "code", - "redirect_uri" - ], - "title": "AuthorizationCodeTokenRequest", - "type": "object" - }, - "RefreshTokenRequest": { - "properties": { - "grant_type": { - "const": "refresh_token", - "enum": [ - "refresh_token" - ], - "title": "Grant Type", - "type": "string" - }, - "client_id": { - "title": "Client Id", - "type": "string" - }, - "client_secret": { - "title": "Client Secret", - "type": "string" - }, - "refresh_token": { - "title": "Refresh Token", - "type": "string" - } - }, - "required": [ - "grant_type", - "client_id", - "client_secret", - "refresh_token" - ], - "title": "RefreshTokenRequest", - "type": "object" - } - }, - "x-speakeasy-group": "oauth2", - "x-speakeasy-name-override": "token" - } - }, - "/v1/oauth2/revoke": { - "post": { - "tags": [ - "oauth2", - "featured", - "documented" - ], - "summary": "Revoke Token", - "description": "Revoke an access token or a refresh token.", - "operationId": "oauth2:revoke_token", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "token": { - "type": "string", - "title": "Token" - }, - "token_type_hint": { - "anyOf": [ - { - "type": "string", - "enum": [ - "access_token", - "refresh_token" - ] - }, - { - "type": "null" - } - ], - "title": "Token Type Hint" - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "client_secret": { - "type": "string", - "title": "Client Secret" - } - }, - "type": "object", - "required": [ - "token", - "client_id", - "client_secret" - ], - "title": "RevokeTokenRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RevokeTokenResponse" - } - } - } - } - }, - "x-speakeasy-group": "oauth2", - "x-speakeasy-name-override": "revoke" - } - }, - "/v1/oauth2/introspect": { - "post": { - "tags": [ - "oauth2", - "featured", - "documented" - ], - "summary": "Introspect Token", - "description": "Get information about an access token.", - "operationId": "oauth2:introspect_token", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "token": { - "type": "string", - "title": "Token" - }, - "token_type_hint": { - "anyOf": [ - { - "type": "string", - "enum": [ - "access_token", - "refresh_token" - ] - }, - { - "type": "null" - } - ], - "title": "Token Type Hint" - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "client_secret": { - "type": "string", - "title": "Client Secret" - } - }, - "type": "object", - "required": [ - "token", - "client_id", - "client_secret" - ], - "title": "IntrospectTokenRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntrospectTokenResponse" - } - } - } - } - }, - "x-speakeasy-group": "oauth2", - "x-speakeasy-name-override": "introspect" - } - }, - "/v1/oauth2/userinfo": { - "get": { - "tags": [ - "oauth2", - "featured", - "documented" - ], - "summary": "Get User Info", - "description": "Get information about the authenticated user.", - "operationId": "oauth2:userinfo", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/UserInfoUser" - }, - { - "$ref": "#/components/schemas/UserInfoOrganization" - } - ], - "title": "Response Oauth2:Userinfo" - } - } - } - } - }, - "security": [ - { - "oidc": [] - } - ], - "x-speakeasy-name-override": "userinfo", - "x-speakeasy-group": "oauth2" - } - }, - "/v1/benefits/": { - "get": { - "tags": [ - "benefits", - "documented" - ], - "summary": "List Benefits", - "description": "List benefits.", - "operationId": "benefits:list", - "security": [ - { - "oidc": [ - "benefits:read", - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "type", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitType" - } - }, - { - "type": "null" - } - ], - "title": "BenefitType Filter", - "description": "Filter by benefit type." - }, - "description": "Filter by benefit type." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Benefit_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "benefits", - "documented" - ], - "summary": "Create Benefit", - "description": "Create a benefit.", - "operationId": "benefits:create", - "security": [ - { - "oidc": [ - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BenefitCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Benefit created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "create" - } - }, - "/v1/benefits/{id}": { - "get": { - "tags": [ - "benefits", - "documented" - ], - "summary": "Get Benefit", - "description": "Get a benefit by ID.", - "operationId": "benefits:get", - "security": [ - { - "oidc": [ - "benefits:read", - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - }, - "title": "Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - } - } - }, - "404": { - "description": "Benefit not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "benefits", - "documented" - ], - "summary": "Update Benefit", - "description": "Update a benefit.", - "operationId": "benefits:update", - "security": [ - { - "oidc": [ - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - }, - "title": "Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitAdsUpdate" - }, - { - "$ref": "#/components/schemas/BenefitCustomUpdate" - }, - { - "$ref": "#/components/schemas/BenefitDiscordUpdate" - }, - { - "$ref": "#/components/schemas/BenefitGitHubRepositoryUpdate" - }, - { - "$ref": "#/components/schemas/BenefitDownloadablesUpdate" - }, - { - "$ref": "#/components/schemas/BenefitLicenseKeysUpdate" - } - ], - "title": "Benefit Update" - } - } - } - }, - "responses": { - "200": { - "description": "Benefit updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this benefit.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Benefit not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "update" - }, - "delete": { - "tags": [ - "benefits", - "documented" - ], - "summary": "Delete Benefit", - "description": "Delete a benefit.\n\n\u003e [!WARNING]\n\u003e Every grants associated with the benefit will be revoked.\n\u003e Users will lose access to the benefit.", - "operationId": "benefits:delete", - "security": [ - { - "oidc": [ - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - }, - "title": "Id" - } - } - ], - "responses": { - "204": { - "description": "Benefit deleted." - }, - "403": { - "description": "You don't have the permission to update this benefit or it's not deletable.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Benefit not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "delete" - } - }, - "/v1/benefits/{id}/grants": { - "get": { - "tags": [ - "benefits", - "documented" - ], - "summary": "List Benefit Grants", - "description": "List the individual grants for a benefit.\n\nIt's especially useful to check if a user has been granted a benefit.", - "operationId": "benefits:grants", - "security": [ - { - "oidc": [ - "benefits:read", - "benefits:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - }, - "title": "Id" - } - }, - { - "name": "is_granted", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. ", - "title": "Is Granted" - }, - "description": "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. " - }, - { - "name": "customer_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "CustomerID Filter", - "description": "Filter by customer." - }, - "description": "Filter by customer." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_BenefitGrant_" - } - } - } - }, - "404": { - "description": "Benefit not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "benefits", - "x-speakeasy-name-override": "grants" - } - }, - "/v1/products/": { - "get": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "List Products", - "description": "List products.", - "operationId": "products:list", - "security": [ - { - "oidc": [ - "products:read", - "products:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "query", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Filter by product name.", - "title": "Query" - }, - "description": "Filter by product name." - }, - { - "name": "is_archived", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Filter on archived products.", - "title": "Is Archived" - }, - "description": "Filter on archived products." - }, - { - "name": "is_recurring", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. ", - "title": "Is Recurring" - }, - "description": "Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. " - }, - { - "name": "benefit_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - }, - { - "type": "null" - } - ], - "title": "BenefitID Filter", - "description": "Filter products granting specific benefit." - }, - "description": "Filter products granting specific benefit." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Product_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "Create Product", - "description": "Create a product.", - "operationId": "products:create", - "security": [ - { - "oidc": [ - "products:write" - ] - }, - { - "pat": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductCreate", - "title": "ProductCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Product created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "create" - } - }, - "/v1/products/{id}": { - "get": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "Get Product", - "description": "Get a product by ID.", - "operationId": "products:get", - "security": [ - { - "oidc": [ - "products:read", - "products:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - }, - "title": "Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "404": { - "description": "Product not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "Update Product", - "description": "Update a product.", - "operationId": "products:update", - "security": [ - { - "oidc": [ - "products:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - }, - "title": "Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Product updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this product.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Product not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "update" - } - }, - "/v1/products/{id}/benefits": { - "post": { - "tags": [ - "products", - "documented", - "featured" - ], - "summary": "Update Product Benefits", - "description": "Update benefits granted by a product.", - "operationId": "products:update_benefits", - "security": [ - { - "oidc": [ - "products:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - }, - "title": "Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductBenefitsUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Product benefits updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this product.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Product not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "products", - "x-speakeasy-name-override": "update_benefits" - } - }, - "/v1/orders/": { - "get": { - "tags": [ - "orders", - "documented" - ], - "summary": "List Orders", - "description": "List orders.", - "operationId": "orders:list", - "security": [ - { - "oidc": [ - "orders:read" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "product_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - }, - "description": "Filter by product ID." - }, - { - "name": "product_price_type", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPriceType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPriceType" - } - }, - { - "type": "null" - } - ], - "title": "ProductPriceType Filter", - "description": "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - }, - "description": "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - }, - { - "name": "discount_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "DiscountID Filter", - "description": "Filter by discount ID." - }, - "description": "Filter by discount ID." - }, - { - "name": "customer_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "CustomerID Filter", - "description": "Filter by customer ID." - }, - "description": "Filter by customer ID." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrderSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Order_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "orders", - "x-speakeasy-name-override": "list" - } - }, - "/v1/orders/{id}": { - "get": { - "tags": [ - "orders", - "documented" - ], - "summary": "Get Order", - "description": "Get an order by ID.", - "operationId": "orders:get", - "security": [ - { - "oidc": [ - "orders:read" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The order ID.", - "title": "Id" - }, - "description": "The order ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Order" - } - } - } - }, - "404": { - "description": "Order not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "orders", - "x-speakeasy-name-override": "get" - } - }, - "/v1/orders/{id}/invoice": { - "get": { - "tags": [ - "orders", - "documented" - ], - "summary": "Get Order Invoice", - "description": "Get an order's invoice data.", - "operationId": "orders:invoice", - "security": [ - { - "oidc": [ - "orders:read" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The order ID.", - "title": "Id" - }, - "description": "The order ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrderInvoice" - } - } - } - }, - "404": { - "description": "Order not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "orders", - "x-speakeasy-name-override": "invoice" - } - }, - "/v1/checkouts/custom/": { - "get": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "List Checkout Sessions", - "description": "List checkout sessions.", - "operationId": "checkouts:custom:list", - "security": [ - { - "oidc": [ - "checkouts:read", - "checkouts:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "product_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - }, - "description": "Filter by product ID." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CheckoutSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Checkout_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Create Checkout Session", - "description": "Create a checkout session.", - "operationId": "checkouts:custom:create", - "security": [ - { - "oidc": [ - "checkouts:write" - ] - }, - { - "pat": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Checkout session created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Checkout" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "create" - } - }, - "/v1/checkouts/custom/{id}": { - "get": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Get Checkout Session", - "description": "Get a checkout session by ID.", - "operationId": "checkouts:custom:get", - "security": [ - { - "oidc": [ - "checkouts:read", - "checkouts:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The checkout session ID.", - "title": "Id" - }, - "description": "The checkout session ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Checkout" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Update Checkout Session", - "description": "Update a checkout session.", - "operationId": "checkouts:custom:update", - "security": [ - { - "oidc": [ - "checkouts:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The checkout session ID.", - "title": "Id" - }, - "description": "The checkout session ID." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Checkout session updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Checkout" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "update" - } - }, - "/v1/checkouts/custom/client/{client_secret}": { - "get": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Get Checkout Session from Client", - "description": "Get a checkout session by client secret.", - "operationId": "checkouts:custom:client_get", - "parameters": [ - { - "name": "client_secret", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The checkout session client secret.", - "title": "Client Secret" - }, - "description": "The checkout session client secret." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPublic" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "client_get" - }, - "patch": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Update Checkout Session from Client", - "description": "Update a checkout session by client secret.", - "operationId": "checkouts:custom:client_update", - "parameters": [ - { - "name": "client_secret", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The checkout session client secret.", - "title": "Client Secret" - }, - "description": "The checkout session client secret." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutUpdatePublic" - } - } - } - }, - "responses": { - "200": { - "description": "Checkout session updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPublic" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "client_update" - } - }, - "/v1/checkouts/custom/client/{client_secret}/confirm": { - "post": { - "tags": [ - "checkouts", - "custom", - "documented", - "featured" - ], - "summary": "Confirm Checkout Session from Client", - "description": "Confirm a checkout session by client secret.\n\nOrders and subscriptions will be processed.", - "operationId": "checkouts:custom:client_confirm", - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "client_secret", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The checkout session client secret.", - "title": "Client Secret" - }, - "description": "The checkout session client secret." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutConfirmStripe" - } - } - } - }, - "responses": { - "200": { - "description": "Checkout session confirmed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutPublicConfirmed" - } - } - } - }, - "404": { - "description": "Checkout session not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-group": "checkouts.custom", - "x-speakeasy-name-override": "client_confirm" - } - }, - "/v1/checkouts/": { - "post": { - "tags": [ - "checkouts", - "documented" - ], - "summary": "Create Checkout", - "description": "Create a checkout session.", - "operationId": "checkouts:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLegacyCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLegacy" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "oidc": [] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Anonymous", - "User" - ], - "x-speakeasy-deprecation-replacement": "checkouts:custom:create", - "x-speakeasy-deprecation-message": "This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information.", - "x-speakeasy-group": "checkouts", - "x-speakeasy-name-override": "create" - } - }, - "/v1/checkouts/{id}": { - "get": { - "tags": [ - "checkouts", - "documented" - ], - "summary": "Get Checkout", - "description": "Get an active checkout session by ID.", - "operationId": "checkouts:get", - "deprecated": true, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLegacy" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-deprecation-message": "This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information.", - "x-speakeasy-group": "checkouts", - "x-speakeasy-name-override": "get" - } - }, - "/v1/files/": { - "get": { - "tags": [ - "files", - "documented" - ], - "summary": "List Files", - "description": "List files.", - "operationId": "files:list", - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - } - }, - { - "name": "ids", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "description": "List of file IDs to get. ", - "title": "Ids" - }, - "description": "List of file IDs to get. " - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_FileRead_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "files", - "documented" - ], - "summary": "Create File", - "description": "Create a file.", - "operationId": "files:create", - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileCreate" - } - } - } - }, - "responses": { - "201": { - "description": "File created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileUpload" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "create" - } - }, - "/v1/files/{id}/uploaded": { - "post": { - "tags": [ - "files", - "documented" - ], - "summary": "Complete File Upload", - "description": "Complete a file upload.", - "operationId": "files:uploaded", - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The file ID.", - "title": "Id" - }, - "description": "The file ID." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileUploadCompleted" - } - } - } - }, - "responses": { - "200": { - "description": "File upload completed.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/DownloadableFileRead" - }, - { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - { - "$ref": "#/components/schemas/OrganizationAvatarFileRead" - } - ], - "discriminator": { - "propertyName": "service", - "mapping": { - "downloadable": "#/components/schemas/DownloadableFileRead", - "product_media": "#/components/schemas/ProductMediaFileRead", - "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead" - } - }, - "title": "Response Files:Uploaded" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "File not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "uploaded" - } - }, - "/v1/files/{id}": { - "patch": { - "tags": [ - "files", - "documented" - ], - "summary": "Update File", - "description": "Update a file.", - "operationId": "files:update", - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The file ID.", - "title": "Id" - }, - "description": "The file ID." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FilePatch" - } - } - } - }, - "responses": { - "200": { - "description": "File updated.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/DownloadableFileRead" - }, - { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - { - "$ref": "#/components/schemas/OrganizationAvatarFileRead" - } - ], - "discriminator": { - "propertyName": "service", - "mapping": { - "downloadable": "#/components/schemas/DownloadableFileRead", - "product_media": "#/components/schemas/ProductMediaFileRead", - "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead" - } - }, - "title": "Response Files:Update" - } - } - } - }, - "403": { - "description": "You don't have the permission to update this file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "File not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "update" - }, - "delete": { - "tags": [ - "files", - "documented" - ], - "summary": "Delete File", - "description": "Delete a file.", - "operationId": "files:delete", - "security": [ - { - "oidc": [ - "files:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "title": "Id" - } - } - ], - "responses": { - "204": { - "description": "File deleted." - }, - "403": { - "description": "You don't have the permission to delete this file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "File not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "files", - "x-speakeasy-name-override": "delete" - } - }, - "/v1/metrics/": { - "get": { - "tags": [ - "metrics", - "documented" - ], - "summary": "Get Metrics", - "description": "Get metrics about your orders and subscriptions.", - "operationId": "metrics:get", - "security": [ - { - "oidc": [ - "metrics:read" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "start_date", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date", - "description": "Start date.", - "title": "Start Date" - }, - "description": "Start date." - }, - { - "name": "end_date", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date", - "description": "End date.", - "title": "End Date" - }, - "description": "End date." - }, - { - "name": "interval", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/Interval", - "description": "Interval between two timestamps." - }, - "description": "Interval between two timestamps." - }, - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "product_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - }, - "description": "Filter by product ID." - }, - { - "name": "product_price_type", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPriceType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPriceType" - } - }, - { - "type": "null" - } - ], - "title": "ProductPriceType Filter", - "description": "Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases." - }, - "description": "Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricsResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "metrics", - "x-speakeasy-name-override": "get" - } - }, - "/v1/metrics/limits": { - "get": { - "tags": [ - "metrics", - "documented" - ], - "summary": "Get Metrics Limits", - "description": "Get the interval limits for the metrics endpoint.", - "operationId": "metrics:limits", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricsLimits" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "metrics:read" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "metrics", - "x-speakeasy-name-override": "limits" - } - }, - "/v1/license-keys": { - "get": { - "tags": [ - "license_keys", - "documented", - "featured" - ], - "summary": "List License Keys", - "description": "Get license keys connected to the given organization \u0026 filters.", - "operationId": "license_keys:list", - "security": [ - { - "oidc": [ - "license_keys:read", - "license_keys:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "benefit_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - }, - { - "type": "null" - } - ], - "title": "BenefitID Filter", - "description": "Filter by benefit ID." - }, - "description": "Filter by benefit ID." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_LicenseKeyRead_" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "license_keys", - "x-speakeasy-name-override": "list" - } - }, - "/v1/license-keys/{id}": { - "get": { - "tags": [ - "license_keys", - "documented", - "featured" - ], - "summary": "Get License Key", - "description": "Get a license key.", - "operationId": "license_keys:get", - "security": [ - { - "oidc": [ - "license_keys:read", - "license_keys:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "title": "Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyWithActivations" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "license_keys", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "license_keys", - "documented", - "featured" - ], - "summary": "Update License Key", - "description": "Update a license key.", - "operationId": "license_keys:update", - "security": [ - { - "oidc": [ - "license_keys:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "title": "Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyRead" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "license_keys", - "x-speakeasy-name-override": "update" - } - }, - "/v1/license-keys/{id}/activations/{activation_id}": { - "get": { - "tags": [ - "license_keys", - "documented", - "featured" - ], - "summary": "Get Activation", - "description": "Get a license key activation.", - "operationId": "license_keys:get_activation", - "security": [ - { - "oidc": [ - "license_keys:read", - "license_keys:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "title": "Id" - } - }, - { - "name": "activation_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "title": "Activation Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyActivationRead" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "license_keys", - "x-speakeasy-name-override": "get_activation" - } - }, - "/v1/checkout-links/": { - "get": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "List Checkout Links", - "description": "List checkout links.", - "operationId": "checkout-links:list", - "security": [ - { - "oidc": [ - "checkout_links:read", - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "product_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - }, - "description": "Filter by product ID." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CheckoutLinkSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CheckoutLink_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "Create Checkout Link", - "description": "Create a checkout link.", - "operationId": "checkout-links:create", - "security": [ - { - "oidc": [ - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLinkCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Checkout link created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLink" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "create" - } - }, - "/v1/checkout-links/{id}": { - "get": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "Get Checkout Link", - "description": "Get a checkout link by ID.", - "operationId": "checkout-links:get", - "security": [ - { - "oidc": [ - "checkout_links:read", - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The checkout link ID.", - "title": "Id" - }, - "description": "The checkout link ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLink" - } - } - } - }, - "404": { - "description": "Checkout link not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "Update Checkout Link", - "description": "Update a checkout link.", - "operationId": "checkout-links:update", - "security": [ - { - "oidc": [ - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The checkout link ID.", - "title": "Id" - }, - "description": "The checkout link ID." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLinkUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Checkout link updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckoutLink" - } - } - } - }, - "404": { - "description": "Checkout link not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "update" - }, - "delete": { - "tags": [ - "checkout-links", - "documented" - ], - "summary": "Delete Checkout Link", - "description": "Delete a checkout link.", - "operationId": "checkout-links:delete", - "security": [ - { - "oidc": [ - "checkout_links:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The checkout link ID.", - "title": "Id" - }, - "description": "The checkout link ID." - } - ], - "responses": { - "204": { - "description": "Checkout link deleted." - }, - "404": { - "description": "Checkout link not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "checkout-links", - "x-speakeasy-name-override": "delete" - } - }, - "/v1/custom-fields/": { - "get": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "List Custom Fields", - "description": "List custom fields.", - "operationId": "custom-fields:list", - "security": [ - { - "oidc": [ - "custom_fields:read", - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "query", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Filter by custom field name or slug.", - "title": "Query" - }, - "description": "Filter by custom field name or slug." - }, - { - "name": "type", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldType" - } - }, - { - "type": "null" - } - ], - "title": "CustomFieldType Filter", - "description": "Filter by custom field type." - }, - "description": "Filter by custom field type." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomFieldSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "slug" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CustomField_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "Create Custom Field", - "description": "Create a custom field.", - "operationId": "custom-fields:create", - "security": [ - { - "oidc": [ - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomFieldCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Custom field created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "create" - } - }, - "/v1/custom-fields/{id}": { - "get": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "Get Custom Field", - "description": "Get a custom field by ID.", - "operationId": "custom-fields:get", - "security": [ - { - "oidc": [ - "custom_fields:read", - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The custom field ID.", - "title": "Id" - }, - "description": "The custom field ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - } - } - } - }, - "404": { - "description": "Custom field not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "Update Custom Field", - "description": "Update a custom field.", - "operationId": "custom-fields:update", - "security": [ - { - "oidc": [ - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The custom field ID.", - "title": "Id" - }, - "description": "The custom field ID." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomFieldUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Custom field updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - } - } - } - }, - "404": { - "description": "Custom field not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "update" - }, - "delete": { - "tags": [ - "custom-fields", - "documented" - ], - "summary": "Delete Custom Field", - "description": "Delete a custom field.", - "operationId": "custom-fields:delete", - "security": [ - { - "oidc": [ - "custom_fields:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The custom field ID.", - "title": "Id" - }, - "description": "The custom field ID." - } - ], - "responses": { - "204": { - "description": "Custom field deleted." - }, - "404": { - "description": "Custom field not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "custom-fields", - "x-speakeasy-name-override": "delete" - } - }, - "/v1/discounts/": { - "get": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "List Discounts", - "description": "List discounts.", - "operationId": "discounts:list", - "security": [ - { - "oidc": [ - "discounts:read", - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "query", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Filter by name.", - "title": "Query" - }, - "description": "Filter by name." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/DiscountSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Discount_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "Create Discount", - "description": "Create a discount.", - "operationId": "discounts:create", - "security": [ - { - "oidc": [ - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiscountCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Discount created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Discount", - "title": "Discount" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "create" - } - }, - "/v1/discounts/{id}": { - "get": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "Get Discount", - "description": "Get a discount by ID.", - "operationId": "discounts:get", - "security": [ - { - "oidc": [ - "discounts:read", - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The discount ID.", - "title": "Id" - }, - "description": "The discount ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Discount", - "title": "Discount" - } - } - } - }, - "404": { - "description": "Discount not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "Update Discount", - "description": "Update a discount.", - "operationId": "discounts:update", - "security": [ - { - "oidc": [ - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The discount ID.", - "title": "Id" - }, - "description": "The discount ID." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiscountUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Discount updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Discount", - "title": "Discount" - } - } - } - }, - "404": { - "description": "Discount not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "update" - }, - "delete": { - "tags": [ - "discounts", - "featured", - "documented" - ], - "summary": "Delete Discount", - "description": "Delete a discount.", - "operationId": "discounts:delete", - "security": [ - { - "oidc": [ - "discounts:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The discount ID.", - "title": "Id" - }, - "description": "The discount ID." - } - ], - "responses": { - "204": { - "description": "Discount deleted." - }, - "404": { - "description": "Discount not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "discounts", - "x-speakeasy-name-override": "delete" - } - }, - "/v1/customers/": { - "get": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "List Customers", - "description": "List customers.", - "operationId": "customers:list", - "security": [ - { - "oidc": [ - "customers:read", - "customers:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "query", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Filter by name or email.", - "title": "Query" - }, - "description": "Filter by name or email." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_Customer_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "list" - }, - "post": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "Create Customer", - "description": "Create a customer.", - "operationId": "customers:create", - "security": [ - { - "oidc": [ - "customers:write" - ] - }, - { - "pat": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Customer created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "create" - } - }, - "/v1/customers/{id}": { - "get": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "Get Customer", - "description": "Get a customer by ID.", - "operationId": "customers:get", - "security": [ - { - "oidc": [ - "customers:read", - "customers:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The customer ID.", - "title": "Id" - }, - "description": "The customer ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "404": { - "description": "Customer not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "Update Customer", - "description": "Update a customer.", - "operationId": "customers:update", - "security": [ - { - "oidc": [ - "customers:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The customer ID.", - "title": "Id" - }, - "description": "The customer ID." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Customer updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "404": { - "description": "Customer not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "update" - }, - "delete": { - "tags": [ - "customers", - "documented", - "featured" - ], - "summary": "Delete Customer", - "description": "Delete a customer.\n\nImmediately cancels any active subscriptions and revokes any active benefits.", - "operationId": "customers:delete", - "security": [ - { - "oidc": [ - "customers:write" - ] - }, - { - "pat": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The customer ID.", - "title": "Id" - }, - "description": "The customer ID." - } - ], - "responses": { - "204": { - "description": "Customer deleted." - }, - "404": { - "description": "Customer not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customers", - "x-speakeasy-name-override": "delete" - } - }, - "/v1/customer-portal/benefit-grants/": { - "get": { - "tags": [ - "customer_portal", - "benefit-grants", - "documented" - ], - "summary": "List Benefit Grants", - "description": "List benefits grants of the authenticated customer or user.", - "operationId": "customer_portal:benefit-grants:list", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "type", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/BenefitType" - } - }, - { - "type": "null" - } - ], - "title": "BenefitType Filter", - "description": "Filter by benefit type." - }, - "description": "Filter by benefit type." - }, - { - "name": "benefit_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "BenefitID Filter", - "description": "Filter by benefit ID." - }, - "description": "Filter by benefit ID." - }, - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "checkout_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "CheckoutID Filter", - "description": "Filter by checkout ID." - }, - "description": "Filter by checkout ID." - }, - { - "name": "order_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "OrderID Filter", - "description": "Filter by order ID." - }, - "description": "Filter by order ID." - }, - { - "name": "subscription_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "SubscriptionID Filter", - "description": "Filter by subscription ID." - }, - "description": "Filter by subscription ID." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerBenefitGrantSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-granted_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CustomerBenefitGrant_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.benefit-grants", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/benefit-grants/{id}": { - "get": { - "tags": [ - "customer_portal", - "benefit-grants", - "documented" - ], - "summary": "Get Benefit Grant", - "description": "Get a benefit grant by ID for the authenticated customer or user.", - "operationId": "customer_portal:benefit-grants:get", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The benefit grant ID.", - "title": "Id" - }, - "description": "The benefit grant ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerBenefitGrant", - "title": "CustomerBenefitGrant" - } - } - } - }, - "404": { - "description": "Benefit grant not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.benefit-grants", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "customer_portal", - "benefit-grants", - "documented" - ], - "summary": "Update Benefit Grant", - "description": "Update a benefit grant for the authenticated customer or user.", - "operationId": "customer_portal:benefit-grants:update", - "security": [ - { - "oidc": [ - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The benefit grant ID.", - "title": "Id" - }, - "description": "The benefit grant ID." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerBenefitGrantUpdate", - "title": "CustomerBenefitGrantUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Benefit grant updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerBenefitGrant", - "title": "CustomerBenefitGrant" - } - } - } - }, - "403": { - "description": "The benefit grant is revoked and cannot be updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "Benefit grant not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.benefit-grants", - "x-speakeasy-name-override": "update" - } - }, - "/v1/customer-portal/customers/{id}": { - "get": { - "tags": [ - "customer_portal", - "customers", - "documented" - ], - "summary": "Get Customer", - "description": "Get a customer by ID for the authenticated customer or user.", - "operationId": "customer_portal:customers:get", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The customer ID.", - "title": "Id" - }, - "description": "The customer ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerPortalCustomer" - } - } - } - }, - "404": { - "description": "Customer not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.customers", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/downloadables/": { - "get": { - "tags": [ - "customer_portal", - "downloadables", - "documented" - ], - "summary": "List Downloadables", - "operationId": "customer_portal:downloadables:list", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "benefit_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - } - }, - { - "type": "null" - } - ], - "title": "BenefitID Filter", - "description": "Filter by benefit ID." - }, - "description": "Filter by benefit ID." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_DownloadableRead_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.downloadables", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/downloadables/{token}": { - "get": { - "tags": [ - "customer_portal", - "downloadables", - "documented" - ], - "summary": "Get Downloadable", - "operationId": "customer_portal:downloadables:customer_portal.downloadables.get", - "parameters": [ - { - "name": "token", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Token" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "302": { - "description": "Redirected to download" - }, - "400": { - "description": "Invalid signature" - }, - "404": { - "description": "Downloadable not found" - }, - "410": { - "description": "Expired signature" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.downloadables", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/license-keys/": { - "get": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "List License Keys", - "operationId": "customer_portal:license_keys:list", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "benefit_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/benefits", - "resourceName": "Benefit", - "displayProperty": "description" - } - }, - { - "type": "null" - } - ], - "description": "Filter by a specific benefit", - "title": "Benefit Id" - }, - "description": "Filter by a specific benefit" - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_LicenseKeyRead_" - } - } - } - }, - "401": { - "description": "Not authorized to manage license key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/license-keys/{id}": { - "get": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "Get License Key", - "description": "Get a license key.", - "operationId": "customer_portal:license_keys:get", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "title": "Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyWithActivations" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/license-keys/validate": { - "post": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "Validate License Key", - "description": "Validate a license key.", - "operationId": "customer_portal:license_keys:validate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyValidate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidatedLicenseKey" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "validate" - } - }, - "/v1/customer-portal/license-keys/activate": { - "post": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "Activate License Key", - "description": "Activate a license key instance.", - "operationId": "customer_portal:license_keys:activate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyActivate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyActivationRead" - } - } - } - }, - "403": { - "description": "License key activation not required or permitted (limit reached).", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotPermitted" - } - } - } - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "activate" - } - }, - "/v1/customer-portal/license-keys/deactivate": { - "post": { - "tags": [ - "customer_portal", - "license_keys", - "documented", - "featured" - ], - "summary": "Deactivate License Key", - "description": "Deactivate a license key instance.", - "operationId": "customer_portal:license_keys:deactivate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseKeyDeactivate" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "License key activation deactivated." - }, - "404": { - "description": "License key not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.license_keys", - "x-speakeasy-name-override": "deactivate" - } - }, - "/v1/customer-portal/orders/": { - "get": { - "tags": [ - "customer_portal", - "orders", - "documented" - ], - "summary": "List Orders", - "description": "List orders of the authenticated customer or user.", - "operationId": "customer_portal:orders:list", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "product_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - }, - "description": "Filter by product ID." - }, - { - "name": "product_price_type", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPriceType" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductPriceType" - } - }, - { - "type": "null" - } - ], - "title": "ProductPriceType Filter", - "description": "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - }, - "description": "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - }, - { - "name": "subscription_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4" - } - }, - { - "type": "null" - } - ], - "title": "SubscriptionID Filter", - "description": "Filter by subscription ID." - }, - "description": "Filter by subscription ID." - }, - { - "name": "query", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Search by product or organization name.", - "title": "Query" - }, - "description": "Search by product or organization name." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerOrderSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-created_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CustomerOrder_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.orders", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/orders/{id}": { - "get": { - "tags": [ - "customer_portal", - "orders", - "documented" - ], - "summary": "Get Order", - "description": "Get an order by ID for the authenticated customer or user.", - "operationId": "customer_portal:orders:get", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The order ID.", - "title": "Id" - }, - "description": "The order ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerOrder" - } - } - } - }, - "404": { - "description": "Order not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.orders", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/orders/{id}/invoice": { - "get": { - "tags": [ - "customer_portal", - "orders", - "documented" - ], - "summary": "Get Order Invoice", - "description": "Get an order's invoice data.", - "operationId": "customer_portal:orders:invoice", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The order ID.", - "title": "Id" - }, - "description": "The order ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerOrderInvoice" - } - } - } - }, - "404": { - "description": "Order not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.orders", - "x-speakeasy-name-override": "invoice" - } - }, - "/v1/customer-portal/organizations/{slug}": { - "get": { - "tags": [ - "customer_portal", - "organizations", - "documented" - ], - "summary": "Get Organization", - "description": "Get a customer portal's organization by slug.", - "operationId": "customer_portal:organizations:get", - "parameters": [ - { - "name": "slug", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The organization slug.", - "title": "Slug" - }, - "description": "The organization slug." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "404": { - "description": "Organization not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-speakeasy-group": "customer_portal.organizations", - "x-speakeasy-name-override": "get" - } - }, - "/v1/customer-portal/subscriptions/": { - "get": { - "tags": [ - "customer_portal", - "subscriptions", - "documented", - "featured" - ], - "summary": "List Subscriptions", - "description": "List subscriptions of the authenticated customer or user.", - "operationId": "customer_portal:subscriptions:list", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "organization_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/organizations", - "resourceName": "Organization", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "OrganizationID Filter", - "description": "Filter by organization ID." - }, - "description": "Filter by organization ID." - }, - { - "name": "product_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid4", - "description": "The product ID.", - "x-polar-selector-widget": { - "resourceRoot": "/v1/products", - "resourceName": "Product", - "displayProperty": "name" - } - } - }, - { - "type": "null" - } - ], - "title": "ProductID Filter", - "description": "Filter by product ID." - }, - "description": "Filter by product ID." - }, - { - "name": "active", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Filter by active or cancelled subscription.", - "title": "Active" - }, - "description": "Filter by active or cancelled subscription." - }, - { - "name": "query", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Search by product or organization name.", - "title": "Query" - }, - "description": "Search by product or organization name." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Page number, defaults to 1.", - "default": 1, - "title": "Page" - }, - "description": "Page number, defaults to 1." - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "exclusiveMinimum": 0, - "description": "Size of a page, defaults to 10. Maximum is 100.", - "default": 10, - "title": "Limit" - }, - "description": "Size of a page, defaults to 10. Maximum is 100." - }, - { - "name": "sorting", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerSubscriptionSortProperty" - } - }, - { - "type": "null" - } - ], - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.", - "default": [ - "-started_at" - ], - "title": "Sorting" - }, - "description": "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListResource_CustomerSubscription_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "limit", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.items", - "numPages": "$.pagination.max_page" - } - }, - "x-speakeasy-group": "customer_portal.subscriptions", - "x-speakeasy-name-override": "list" - } - }, - "/v1/customer-portal/subscriptions/{id}": { - "get": { - "tags": [ - "customer_portal", - "subscriptions", - "documented", - "featured" - ], - "summary": "Get Subscription", - "description": "Get a subscription for the authenticated customer or user.", - "operationId": "customer_portal:subscriptions:get", - "security": [ - { - "oidc": [ - "customer_portal:read", - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The subscription ID.", - "title": "Id" - }, - "description": "The subscription ID." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSubscription" - } - } - } - }, - "404": { - "description": "Subscription not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.subscriptions", - "x-speakeasy-name-override": "get" - }, - "patch": { - "tags": [ - "customer_portal", - "subscriptions", - "documented", - "featured" - ], - "summary": "Update Subscription", - "description": "Update a subscription of the authenticated customer or user.", - "operationId": "customer_portal:subscriptions:update", - "security": [ - { - "oidc": [ - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The subscription ID.", - "title": "Id" - }, - "description": "The subscription ID." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSubscriptionUpdate" - } - } - } - }, - "responses": { - "200": { - "description": "Subscription updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSubscription" - } - } - } - }, - "404": { - "description": "Subscription not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.subscriptions", - "x-speakeasy-name-override": "update" - }, - "delete": { - "tags": [ - "customer_portal", - "subscriptions", - "documented", - "featured" - ], - "summary": "Cancel Subscription", - "description": "Cancel a subscription of the authenticated customer or user.", - "operationId": "customer_portal:subscriptions:cancel", - "security": [ - { - "oidc": [ - "customer_portal:write" - ] - }, - { - "pat": [] - }, - { - "customer_session": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid4", - "description": "The subscription ID.", - "title": "Id" - }, - "description": "The subscription ID." - } - ], - "responses": { - "200": { - "description": "Subscription canceled.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSubscription" - } - } - } - }, - "403": { - "description": "This subscription is already canceled or will be at the end of the period.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlreadyCanceledSubscription" - } - } - } - }, - "404": { - "description": "Subscription not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceNotFound" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "x-polar-allowed-subjects": [ - "Customer", - "User" - ], - "x-speakeasy-group": "customer_portal.subscriptions", - "x-speakeasy-name-override": "cancel" - } - }, - "/v1/customer-sessions/": { - "post": { - "tags": [ - "customer-sessions", - "documented", - "featured" - ], - "summary": "Create Customer Session", - "description": "Create a customer session.", - "operationId": "customer-sessions:create", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSessionCreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Customer session created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerSession" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "oidc": [ - "customer_sessions:write" - ] - }, - { - "pat": [] - } - ], - "x-polar-allowed-subjects": [ - "Organization", - "User" - ], - "x-speakeasy-group": "customer-sessions", - "x-speakeasy-name-override": "create" - } - } - }, - "webhooks": { - "checkout.created": { - "post": { - "summary": "checkout.created", - "description": "Sent when a new checkout is created.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointcheckout_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookCheckoutCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "checkout.updated": { - "post": { - "summary": "checkout.updated", - "description": "Sent when a checkout is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointcheckout_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookCheckoutUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "order.created": { - "post": { - "summary": "order.created", - "description": "Sent when a new order is created.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointorder_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookOrderCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.created": { - "post": { - "summary": "subscription.created", - "description": "Sent when a new subscription is created.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointsubscription_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.updated": { - "post": { - "summary": "subscription.updated", - "description": "Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord \u0026 Slack support:** On cancellation and revocation. Renewals are skipped.", - "operationId": "_endpointsubscription_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.active": { - "post": { - "summary": "subscription.active", - "description": "Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointsubscription_active_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionActivePayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.canceled": { - "post": { - "summary": "subscription.canceled", - "description": "Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointsubscription_canceled_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionCanceledPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "subscription.revoked": { - "post": { - "summary": "subscription.revoked", - "description": "Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointsubscription_revoked_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookSubscriptionRevokedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "product.created": { - "post": { - "summary": "product.created", - "description": "Sent when a new product is created.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointproduct_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookProductCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "product.updated": { - "post": { - "summary": "product.updated", - "description": "Sent when a product is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointproduct_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookProductUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "pledge.created": { - "post": { - "summary": "pledge.created", - "description": "Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord \u0026 Slack support:** Full", - "operationId": "_endpointpledge_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookPledgeCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "pledge.updated": { - "post": { - "summary": "pledge.updated", - "description": "Sent when a pledge is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointpledge_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookPledgeUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "organization.updated": { - "post": { - "summary": "organization.updated", - "description": "Sent when a organization is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointorganization_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookOrganizationUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit.created": { - "post": { - "summary": "benefit.created", - "description": "Sent when a new benefit is created.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit.updated": { - "post": { - "summary": "benefit.updated", - "description": "Sent when a benefit is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit_grant.created": { - "post": { - "summary": "benefit_grant.created", - "description": "Sent when a new benefit grant is created.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_grant_created_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitGrantCreatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit_grant.updated": { - "post": { - "summary": "benefit_grant.updated", - "description": "Sent when a new benefit grant is updated.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_grant_updated_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitGrantUpdatedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "benefit_grant.revoked": { - "post": { - "summary": "benefit_grant.revoked", - "description": "Sent when a new benefit grant is revoked.\n\n**Discord \u0026 Slack support:** Basic", - "operationId": "_endpointbenefit_grant_revoked_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookBenefitGrantRevokedPayload" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Address": { - "properties": { - "line1": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Line1" - }, - "line2": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Line2" - }, - "postal_code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Postal Code" - }, - "city": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "City" - }, - "state": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "State" - }, - "country": { - "type": "string", - "pattern": "^\\w{2}$", - "title": "Country" - } - }, - "type": "object", - "required": [ - "country" - ], - "title": "Address" - }, - "AdvertisementCampaign": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "image_url": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri", - "title": "Image Url" - }, - "image_url_dark": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Image Url Dark" - }, - "text": { - "type": "string", - "title": "Text" - }, - "link_url": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri", - "title": "Link Url" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "image_url", - "image_url_dark", - "text", - "link_url" - ], - "title": "AdvertisementCampaign" - }, - "AdvertisementCampaignListResource": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AdvertisementCampaign" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - }, - "dimensions": { - "prefixItems": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], - "items": { - "type": "integer" - }, - "type": "array", - "maxItems": 2, - "minItems": 2, - "title": "Dimensions", - "description": "The dimensions (width, height) in pixels of the advertisement images." - } - }, - "type": "object", - "required": [ - "items", - "pagination", - "dimensions" - ], - "title": "AdvertisementCampaignListResource" - }, - "AdvertisementSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "granted_at", - "-granted_at", - "views", - "-views", - "clicks", - "-clicks" - ], - "title": "AdvertisementSortProperty" - }, - "AlreadyCanceledSubscription": { - "properties": { - "error": { - "type": "string", - "enum": [ - "AlreadyCanceledSubscription" - ], - "const": "AlreadyCanceledSubscription", - "title": "Error" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "error", - "detail" - ], - "title": "AlreadyCanceledSubscription" - }, - "Assignee": { - "properties": { - "id": { - "type": "integer", - "title": "Id" - }, - "login": { - "type": "string", - "title": "Login" - }, - "html_url": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri", - "title": "Html Url" - }, - "avatar_url": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri", - "title": "Avatar Url" - } - }, - "type": "object", - "required": [ - "id", - "login", - "html_url", - "avatar_url" - ], - "title": "Assignee" - }, - "AttachedCustomField": { - "properties": { - "custom_field_id": { - "type": "string", - "format": "uuid4", - "title": "Custom Field Id", - "description": "ID of the custom field." - }, - "custom_field": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - }, - "order": { - "type": "integer", - "title": "Order", - "description": "Order of the custom field in the resource." - }, - "required": { - "type": "boolean", - "title": "Required", - "description": "Whether the value is required for this custom field." - } - }, - "type": "object", - "required": [ - "custom_field_id", - "custom_field", - "order", - "required" - ], - "title": "AttachedCustomField", - "description": "Schema of a custom field attached to a resource." - }, - "AttachedCustomFieldCreate": { - "properties": { - "custom_field_id": { - "type": "string", - "format": "uuid4", - "title": "Custom Field Id", - "description": "ID of the custom field to attach." - }, - "required": { - "type": "boolean", - "title": "Required", - "description": "Whether the value is required for this custom field." - } - }, - "type": "object", - "required": [ - "custom_field_id", - "required" - ], - "title": "AttachedCustomFieldCreate", - "description": "Schema to attach a custom field to a resource." - }, - "Author": { - "properties": { - "id": { - "type": "integer", - "title": "Id" - }, - "login": { - "type": "string", - "title": "Login" - }, - "html_url": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri", - "title": "Html Url" - }, - "avatar_url": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri", - "title": "Avatar Url" - } - }, - "type": "object", - "required": [ - "id", - "login", - "html_url", - "avatar_url" - ], - "title": "Author" - }, - "AuthorizeOrganization": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "slug": { - "type": "string", - "title": "Slug" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - } - }, - "type": "object", - "required": [ - "id", - "slug", - "avatar_url" - ], - "title": "AuthorizeOrganization" - }, - "AuthorizeResponseOrganization": { - "properties": { - "client": { - "$ref": "#/components/schemas/OAuth2ClientPublic" - }, - "sub_type": { - "type": "string", - "enum": [ - "organization" - ], - "const": "organization", - "title": "Sub Type" - }, - "sub": { - "anyOf": [ - { - "$ref": "#/components/schemas/AuthorizeOrganization" - }, - { - "type": "null" - } - ] - }, - "scopes": { - "items": { - "$ref": "#/components/schemas/Scope" - }, - "type": "array", - "title": "Scopes" - }, - "organizations": { - "items": { - "$ref": "#/components/schemas/AuthorizeOrganization" - }, - "type": "array", - "title": "Organizations" - } - }, - "type": "object", - "required": [ - "client", - "sub_type", - "sub", - "scopes", - "organizations" - ], - "title": "AuthorizeResponseOrganization" - }, - "AuthorizeResponseUser": { - "properties": { - "client": { - "$ref": "#/components/schemas/OAuth2ClientPublic" - }, - "sub_type": { - "type": "string", - "enum": [ - "user" - ], - "const": "user", - "title": "Sub Type" - }, - "sub": { - "anyOf": [ - { - "$ref": "#/components/schemas/AuthorizeUser" - }, - { - "type": "null" - } - ] - }, - "scopes": { - "items": { - "$ref": "#/components/schemas/Scope" - }, - "type": "array", - "title": "Scopes" - } - }, - "type": "object", - "required": [ - "client", - "sub_type", - "sub", - "scopes" - ], - "title": "AuthorizeResponseUser" - }, - "AuthorizeUser": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "email": { - "type": "string", - "format": "email", - "title": "Email" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - } - }, - "type": "object", - "required": [ - "id", - "email", - "avatar_url" - ], - "title": "AuthorizeUser" - }, - "Benefit": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitAds" - }, - { - "$ref": "#/components/schemas/BenefitCustom" - }, - { - "$ref": "#/components/schemas/BenefitDiscord" - }, - { - "$ref": "#/components/schemas/BenefitGitHubRepository" - }, - { - "$ref": "#/components/schemas/BenefitDownloadables" - }, - { - "$ref": "#/components/schemas/BenefitLicenseKeys" - } - ] - }, - "BenefitAds": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "ads" - ], - "const": "ads", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitAdsProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ], - "title": "BenefitAds", - "description": "A benefit of type `ads`.\n\nUse it so your backers can display ads on your README, website, etc." - }, - "BenefitAdsCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "ads" - ], - "const": "ads", - "title": "Type" - }, - "description": { - "type": "string", - "maxLength": 42, - "minLength": 3, - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitAdsProperties" - } - }, - "type": "object", - "required": [ - "type", - "description", - "properties" - ], - "title": "BenefitAdsCreate" - }, - "BenefitAdsProperties": { - "properties": { - "image_height": { - "type": "integer", - "title": "Image Height", - "description": "The height of the displayed ad.", - "default": 400 - }, - "image_width": { - "type": "integer", - "title": "Image Width", - "description": "The width of the displayed ad.", - "default": 400 - } - }, - "type": "object", - "title": "BenefitAdsProperties", - "description": "Properties for a benefit of type `ads`." - }, - "BenefitAdsSubscriber": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "ads" - ], - "const": "ads", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitAdsProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ], - "title": "BenefitAdsSubscriber" - }, - "BenefitAdsUpdate": { - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "enum": [ - "ads" - ], - "const": "ads", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitAdsProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "BenefitAdsUpdate" - }, - "BenefitBase": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "$ref": "#/components/schemas/BenefitType", - "description": "The type of the benefit." - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id" - ], - "title": "BenefitBase" - }, - "BenefitCreate": { - "oneOf": [ - { - "$ref": "#/components/schemas/BenefitCustomCreate" - }, - { - "$ref": "#/components/schemas/BenefitAdsCreate" - }, - { - "$ref": "#/components/schemas/BenefitDiscordCreate" - }, - { - "$ref": "#/components/schemas/BenefitGitHubRepositoryCreate" - }, - { - "$ref": "#/components/schemas/BenefitDownloadablesCreate" - }, - { - "$ref": "#/components/schemas/BenefitLicenseKeysCreate" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "ads": "#/components/schemas/BenefitAdsCreate", - "custom": "#/components/schemas/BenefitCustomCreate", - "discord": "#/components/schemas/BenefitDiscordCreate", - "downloadables": "#/components/schemas/BenefitDownloadablesCreate", - "github_repository": "#/components/schemas/BenefitGitHubRepositoryCreate", - "license_keys": "#/components/schemas/BenefitLicenseKeysCreate" - } - } - }, - "BenefitCustom": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "custom" - ], - "const": "custom", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitCustomProperties" - }, - "is_tax_applicable": { - "type": "boolean", - "title": "Is Tax Applicable", - "deprecated": true - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties", - "is_tax_applicable" - ], - "title": "BenefitCustom", - "description": "A benefit of type `custom`.\n\nUse it to grant any kind of benefit that doesn't fit in the other types." - }, - "BenefitCustomCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "custom" - ], - "const": "custom", - "title": "Type" - }, - "description": { - "type": "string", - "maxLength": 42, - "minLength": 3, - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitCustomCreateProperties" - } - }, - "type": "object", - "required": [ - "type", - "description", - "properties" - ], - "title": "BenefitCustomCreate", - "description": "Schema to create a benefit of type `custom`." - }, - "BenefitCustomCreateProperties": { - "properties": { - "note": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Private note to be shared with customers who have this benefit granted." - }, - { - "type": "null" - } - ], - "title": "Note" - } - }, - "type": "object", - "title": "BenefitCustomCreateProperties", - "description": "Properties for creating a benefit of type `custom`." - }, - "BenefitCustomProperties": { - "properties": { - "note": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Private note to be shared with customers who have this benefit granted." - }, - { - "type": "null" - } - ], - "title": "Note" - } - }, - "type": "object", - "required": [ - "note" - ], - "title": "BenefitCustomProperties", - "description": "Properties for a benefit of type `custom`." - }, - "BenefitCustomSubscriber": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "custom" - ], - "const": "custom", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitCustomSubscriberProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ], - "title": "BenefitCustomSubscriber" - }, - "BenefitCustomSubscriberProperties": { - "properties": { - "note": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Private note to be shared with customers who have this benefit granted." - }, - { - "type": "null" - } - ], - "title": "Note" - } - }, - "type": "object", - "required": [ - "note" - ], - "title": "BenefitCustomSubscriberProperties", - "description": "Properties available to subscribers for a benefit of type `custom`." - }, - "BenefitCustomUpdate": { - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "enum": [ - "custom" - ], - "const": "custom", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitCustomProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "BenefitCustomUpdate" - }, - "BenefitDiscord": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "discord" - ], - "const": "discord", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitDiscordProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ], - "title": "BenefitDiscord", - "description": "A benefit of type `discord`.\n\nUse it to automatically invite your backers to a Discord server." - }, - "BenefitDiscordCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "discord" - ], - "const": "discord", - "title": "Type" - }, - "description": { - "type": "string", - "maxLength": 42, - "minLength": 3, - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitDiscordCreateProperties" - } - }, - "type": "object", - "required": [ - "type", - "description", - "properties" - ], - "title": "BenefitDiscordCreate" - }, - "BenefitDiscordCreateProperties": { - "properties": { - "guild_token": { - "type": "string", - "title": "Guild Token" - }, - "role_id": { - "type": "string", - "title": "Role Id", - "description": "The ID of the Discord role to grant." - } - }, - "type": "object", - "required": [ - "guild_token", - "role_id" - ], - "title": "BenefitDiscordCreateProperties", - "description": "Properties to create a benefit of type `discord`." - }, - "BenefitDiscordProperties": { - "properties": { - "guild_id": { - "type": "string", - "title": "Guild Id", - "description": "The ID of the Discord server." - }, - "role_id": { - "type": "string", - "title": "Role Id", - "description": "The ID of the Discord role to grant." - }, - "guild_token": { - "type": "string", - "title": "Guild Token", - "readOnly": true - } - }, - "type": "object", - "required": [ - "guild_id", - "role_id", - "guild_token" - ], - "title": "BenefitDiscordProperties", - "description": "Properties for a benefit of type `discord`." - }, - "BenefitDiscordSubscriber": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "discord" - ], - "const": "discord", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitDiscordSubscriberProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ], - "title": "BenefitDiscordSubscriber" - }, - "BenefitDiscordSubscriberProperties": { - "properties": { - "guild_id": { - "type": "string", - "title": "Guild Id", - "description": "The ID of the Discord server." - } - }, - "type": "object", - "required": [ - "guild_id" - ], - "title": "BenefitDiscordSubscriberProperties", - "description": "Properties available to subscribers for a benefit of type `discord`." - }, - "BenefitDiscordUpdate": { - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "enum": [ - "discord" - ], - "const": "discord", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitDiscordCreateProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "BenefitDiscordUpdate" - }, - "BenefitDownloadables": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "downloadables" - ], - "const": "downloadables", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitDownloadablesProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ], - "title": "BenefitDownloadables" - }, - "BenefitDownloadablesCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "downloadables" - ], - "const": "downloadables", - "title": "Type" - }, - "description": { - "type": "string", - "maxLength": 42, - "minLength": 3, - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitDownloadablesCreateProperties" - } - }, - "type": "object", - "required": [ - "type", - "description", - "properties" - ], - "title": "BenefitDownloadablesCreate" - }, - "BenefitDownloadablesCreateProperties": { - "properties": { - "archived": { - "additionalProperties": { - "type": "boolean" - }, - "type": "object", - "title": "Archived", - "default": {} - }, - "files": { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array", - "minItems": 1, - "title": "Files" - } - }, - "type": "object", - "required": [ - "files" - ], - "title": "BenefitDownloadablesCreateProperties" - }, - "BenefitDownloadablesProperties": { - "properties": { - "archived": { - "additionalProperties": { - "type": "boolean" - }, - "type": "object", - "title": "Archived" - }, - "files": { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array", - "title": "Files" - } - }, - "type": "object", - "required": [ - "archived", - "files" - ], - "title": "BenefitDownloadablesProperties" - }, - "BenefitDownloadablesSubscriber": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "downloadables" - ], - "const": "downloadables", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitDownloadablesSubscriberProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ], - "title": "BenefitDownloadablesSubscriber" - }, - "BenefitDownloadablesSubscriberProperties": { - "properties": { - "active_files": { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array", - "title": "Active Files" - } - }, - "type": "object", - "required": [ - "active_files" - ], - "title": "BenefitDownloadablesSubscriberProperties" - }, - "BenefitDownloadablesUpdate": { - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "enum": [ - "downloadables" - ], - "const": "downloadables", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitDownloadablesCreateProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "BenefitDownloadablesUpdate" - }, - "BenefitGitHubRepository": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "github_repository" - ], - "const": "github_repository", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitGitHubRepositoryProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ], - "title": "BenefitGitHubRepository", - "description": "A benefit of type `github_repository`.\n\nUse it to automatically invite your backers to a private GitHub repository." - }, - "BenefitGitHubRepositoryCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "github_repository" - ], - "const": "github_repository", - "title": "Type" - }, - "description": { - "type": "string", - "maxLength": 42, - "minLength": 3, - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGitHubRepositoryCreateProperties" - } - }, - "type": "object", - "required": [ - "type", - "description", - "properties" - ], - "title": "BenefitGitHubRepositoryCreate" - }, - "BenefitGitHubRepositoryCreateProperties": { - "properties": { - "repository_owner": { - "type": "string", - "title": "Repository Owner", - "description": "The owner of the repository.", - "examples": [ - "polarsource" - ] - }, - "repository_name": { - "type": "string", - "title": "Repository Name", - "description": "The name of the repository.", - "examples": [ - "private_repo" - ] - }, - "permission": { - "type": "string", - "enum": [ - "pull", - "triage", - "push", - "maintain", - "admin" - ], - "title": "Permission", - "description": "The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)." - } - }, - "type": "object", - "required": [ - "repository_owner", - "repository_name", - "permission" - ], - "title": "BenefitGitHubRepositoryCreateProperties", - "description": "Properties to create a benefit of type `github_repository`." - }, - "BenefitGitHubRepositoryProperties": { - "properties": { - "repository_owner": { - "type": "string", - "title": "Repository Owner", - "description": "The owner of the repository.", - "examples": [ - "polarsource" - ] - }, - "repository_name": { - "type": "string", - "title": "Repository Name", - "description": "The name of the repository.", - "examples": [ - "private_repo" - ] - }, - "permission": { - "type": "string", - "enum": [ - "pull", - "triage", - "push", - "maintain", - "admin" - ], - "title": "Permission", - "description": "The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)." - }, - "repository_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Repository Id", - "deprecated": true - } - }, - "type": "object", - "required": [ - "repository_owner", - "repository_name", - "permission" - ], - "title": "BenefitGitHubRepositoryProperties", - "description": "Properties for a benefit of type `github_repository`." - }, - "BenefitGitHubRepositorySubscriber": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "github_repository" - ], - "const": "github_repository", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGitHubRepositorySubscriberProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ], - "title": "BenefitGitHubRepositorySubscriber" - }, - "BenefitGitHubRepositorySubscriberProperties": { - "properties": { - "repository_owner": { - "type": "string", - "title": "Repository Owner", - "description": "The owner of the repository.", - "examples": [ - "polarsource" - ] - }, - "repository_name": { - "type": "string", - "title": "Repository Name", - "description": "The name of the repository.", - "examples": [ - "private_repo" - ] - } - }, - "type": "object", - "required": [ - "repository_owner", - "repository_name" - ], - "title": "BenefitGitHubRepositorySubscriberProperties", - "description": "Properties available to subscribers for a benefit of type `github_repository`." - }, - "BenefitGitHubRepositoryUpdate": { - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "enum": [ - "github_repository" - ], - "const": "github_repository", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitGitHubRepositoryCreateProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "BenefitGitHubRepositoryUpdate" - }, - "BenefitGrant": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the grant." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At", - "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted." - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted", - "description": "Whether the benefit is granted." - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At", - "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked." - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked", - "description": "Whether the benefit is revoked." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "The ID of the subscription that granted this benefit." - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id", - "description": "The ID of the order that granted this benefit." - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id", - "description": "The ID of the customer concerned by this grant." - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id", - "description": "The ID of the benefit concerned by this grant." - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitGrantDiscordProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantAdsProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantCustomProperties" - } - ], - "title": "Properties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "is_granted", - "is_revoked", - "subscription_id", - "order_id", - "customer_id", - "user_id", - "benefit_id", - "properties" - ], - "title": "BenefitGrant" - }, - "BenefitGrantAdsProperties": { - "properties": { - "advertisement_campaign_id": { - "type": "string", - "title": "Advertisement Campaign Id" - } - }, - "type": "object", - "required": [ - "advertisement_campaign_id" - ], - "title": "BenefitGrantAdsProperties" - }, - "BenefitGrantCustomProperties": { - "properties": {}, - "type": "object", - "title": "BenefitGrantCustomProperties" - }, - "BenefitGrantDiscordProperties": { - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - }, - "guild_id": { - "type": "string", - "title": "Guild Id" - }, - "role_id": { - "type": "string", - "title": "Role Id" - } - }, - "type": "object", - "title": "BenefitGrantDiscordProperties" - }, - "BenefitGrantDownloadablesProperties": { - "properties": { - "files": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Files" - } - }, - "type": "object", - "title": "BenefitGrantDownloadablesProperties" - }, - "BenefitGrantGitHubRepositoryProperties": { - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - }, - "repository_owner": { - "type": "string", - "title": "Repository Owner" - }, - "repository_name": { - "type": "string", - "title": "Repository Name" - }, - "permission": { - "type": "string", - "enum": [ - "pull", - "triage", - "push", - "maintain", - "admin" - ], - "title": "Permission" - } - }, - "type": "object", - "title": "BenefitGrantGitHubRepositoryProperties" - }, - "BenefitGrantLicenseKeysProperties": { - "properties": { - "license_key_id": { - "type": "string", - "title": "License Key Id" - }, - "display_key": { - "type": "string", - "title": "Display Key" - } - }, - "type": "object", - "title": "BenefitGrantLicenseKeysProperties" - }, - "BenefitGrantWebhook": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the grant." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At", - "description": "The timestamp when the benefit was granted. If `None`, the benefit is not granted." - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted", - "description": "Whether the benefit is granted." - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At", - "description": "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked." - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked", - "description": "Whether the benefit is revoked." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "The ID of the subscription that granted this benefit." - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id", - "description": "The ID of the order that granted this benefit." - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id", - "description": "The ID of the customer concerned by this grant." - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id", - "description": "The ID of the benefit concerned by this grant." - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitGrantDiscordProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantAdsProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantCustomProperties" - } - ], - "title": "Properties" - }, - "benefit": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - }, - "previous_properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitGrantDiscordProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantAdsProperties" - }, - { - "$ref": "#/components/schemas/BenefitGrantCustomProperties" - }, - { - "type": "null" - } - ], - "title": "Previous Properties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "is_granted", - "is_revoked", - "subscription_id", - "order_id", - "customer_id", - "user_id", - "benefit_id", - "properties", - "benefit" - ], - "title": "BenefitGrantWebhook" - }, - "BenefitLicenseKeyActivationProperties": { - "properties": { - "limit": { - "type": "integer", - "maximum": 50, - "exclusiveMinimum": 0, - "title": "Limit" - }, - "enable_customer_admin": { - "type": "boolean", - "title": "Enable Customer Admin" - } - }, - "type": "object", - "required": [ - "limit", - "enable_customer_admin" - ], - "title": "BenefitLicenseKeyActivationProperties" - }, - "BenefitLicenseKeyExpirationProperties": { - "properties": { - "ttl": { - "type": "integer", - "exclusiveMinimum": 0, - "title": "Ttl" - }, - "timeframe": { - "type": "string", - "enum": [ - "year", - "month", - "day" - ], - "title": "Timeframe" - } - }, - "type": "object", - "required": [ - "ttl", - "timeframe" - ], - "title": "BenefitLicenseKeyExpirationProperties" - }, - "BenefitLicenseKeys": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "license_keys" - ], - "const": "license_keys", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "properties": { - "$ref": "#/components/schemas/BenefitLicenseKeysProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "properties" - ], - "title": "BenefitLicenseKeys" - }, - "BenefitLicenseKeysCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "license_keys" - ], - "const": "license_keys", - "title": "Type" - }, - "description": { - "type": "string", - "maxLength": 42, - "minLength": 3, - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/BenefitLicenseKeysCreateProperties" - } - }, - "type": "object", - "required": [ - "type", - "description", - "properties" - ], - "title": "BenefitLicenseKeysCreate" - }, - "BenefitLicenseKeysCreateProperties": { - "properties": { - "prefix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prefix" - }, - "expires": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties" - }, - { - "type": "null" - } - ] - }, - "activations": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties" - }, - { - "type": "null" - } - ] - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer", - "exclusiveMinimum": 0 - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - } - }, - "type": "object", - "title": "BenefitLicenseKeysCreateProperties" - }, - "BenefitLicenseKeysProperties": { - "properties": { - "prefix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prefix" - }, - "expires": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties" - }, - { - "type": "null" - } - ] - }, - "activations": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties" - }, - { - "type": "null" - } - ] - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - } - }, - "type": "object", - "required": [ - "prefix", - "expires", - "activations", - "limit_usage" - ], - "title": "BenefitLicenseKeysProperties" - }, - "BenefitLicenseKeysSubscriber": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the benefit." - }, - "type": { - "type": "string", - "enum": [ - "license_keys" - ], - "const": "license_keys", - "title": "Type" - }, - "description": { - "type": "string", - "title": "Description", - "description": "The description of the benefit." - }, - "selectable": { - "type": "boolean", - "title": "Selectable", - "description": "Whether the benefit is selectable when creating a product." - }, - "deletable": { - "type": "boolean", - "title": "Deletable", - "description": "Whether the benefit is deletable." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the benefit." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "properties": { - "$ref": "#/components/schemas/BenefitLicenseKeysSubscriberProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "type", - "description", - "selectable", - "deletable", - "organization_id", - "organization", - "properties" - ], - "title": "BenefitLicenseKeysSubscriber" - }, - "BenefitLicenseKeysSubscriberProperties": { - "properties": { - "prefix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prefix" - }, - "expires": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties" - }, - { - "type": "null" - } - ] - }, - "activations": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties" - }, - { - "type": "null" - } - ] - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - } - }, - "type": "object", - "required": [ - "prefix", - "expires", - "activations", - "limit_usage" - ], - "title": "BenefitLicenseKeysSubscriberProperties" - }, - "BenefitLicenseKeysUpdate": { - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 42, - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the benefit. Will be displayed on products having this benefit." - }, - "type": { - "type": "string", - "enum": [ - "license_keys" - ], - "const": "license_keys", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/BenefitLicenseKeysCreateProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "BenefitLicenseKeysUpdate" - }, - "BenefitType": { - "type": "string", - "enum": [ - "custom", - "ads", - "discord", - "github_repository", - "downloadables", - "license_keys" - ], - "title": "BenefitType" - }, - "Checkout": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "$ref": "#/components/schemas/PaymentProcessor", - "description": "Payment processor used." - }, - "status": { - "$ref": "#/components/schemas/CheckoutStatus", - "description": "Status of the checkout session." - }, - "client_secret": { - "type": "string", - "title": "Client Secret", - "description": "Client secret used to update and complete the checkout session from the client." - }, - "url": { - "type": "string", - "title": "Url", - "description": "URL where the customer can access the checkout session." - }, - "expires_at": { - "type": "string", - "format": "date-time", - "title": "Expires At", - "description": "Expiration date and time of the checkout session." - }, - "success_url": { - "type": "string", - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "tax_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Tax Amount", - "description": "Computed tax amount to pay in cents." - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency", - "description": "Currency code of the checkout session." - }, - "subtotal_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Subtotal Amount", - "description": "Subtotal amount in cents, including discounts and before tax." - }, - "total_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Amount", - "description": "Total amount to pay in cents, including discounts and after tax." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "ID of the product to checkout." - }, - "product_price_id": { - "type": "string", - "format": "uuid4", - "title": "Product Price Id", - "description": "ID of the product price to checkout." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount applied to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "is_discount_applicable": { - "type": "boolean", - "title": "Is Discount Applicable", - "description": "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable." - }, - "is_free_product_price": { - "type": "boolean", - "title": "Is Free Product Price", - "description": "Whether the product price is free, regardless of discounts." - }, - "is_payment_required": { - "type": "boolean", - "title": "Is Payment Required", - "description": "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount." - }, - "is_payment_setup_required": { - "type": "boolean", - "title": "Is Payment Setup Required", - "description": "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles." - }, - "is_payment_form_required": { - "type": "boolean", - "title": "Is Payment Form Required", - "description": "Whether the checkout requires a payment form, whether because of a payment or payment method setup." - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "payment_processor_metadata": { - "type": "object", - "title": "Payment Processor Metadata" - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "product": { - "$ref": "#/components/schemas/CheckoutProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration" - } - ] - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "attached_custom_fields": { - "items": { - "$ref": "#/components/schemas/AttachedCustomField" - }, - "type": "array", - "title": "Attached Custom Fields" - }, - "customer_metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Customer Metadata" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "payment_processor", - "status", - "client_secret", - "url", - "expires_at", - "success_url", - "embed_origin", - "amount", - "tax_amount", - "currency", - "subtotal_amount", - "total_amount", - "product_id", - "product_price_id", - "discount_id", - "allow_discount_codes", - "is_discount_applicable", - "is_free_product_price", - "is_payment_required", - "is_payment_setup_required", - "is_payment_form_required", - "customer_id", - "customer_name", - "customer_email", - "customer_ip_address", - "customer_billing_address", - "customer_tax_id", - "payment_processor_metadata", - "metadata", - "product", - "product_price", - "discount", - "subscription_id", - "attached_custom_fields", - "customer_metadata" - ], - "title": "Checkout", - "description": "Checkout session data retrieved using an access token." - }, - "CheckoutConfirmStripe": { - "properties": { - "custom_field_data": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id", - "description": "ID of the product price to checkout. Must correspond to a price linked to the same product." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "discount_code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Discount Code", - "description": "Discount code to apply to the checkout." - }, - "confirmation_token_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Confirmation Token Id", - "description": "ID of the Stripe confirmation token. Required for fixed prices and custom prices." - } - }, - "type": "object", - "title": "CheckoutConfirmStripe", - "description": "Confirm a checkout session using a Stripe confirmation token." - }, - "CheckoutCreate": { - "anyOf": [ - { - "$ref": "#/components/schemas/CheckoutProductCreate" - }, - { - "$ref": "#/components/schemas/CheckoutPriceCreate" - } - ] - }, - "CheckoutDiscountFixedOnceForeverDuration": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "name": { - "type": "string", - "title": "Name" - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code" - } - }, - "type": "object", - "required": [ - "duration", - "type", - "amount", - "currency", - "id", - "name", - "code" - ], - "title": "CheckoutDiscountFixedOnceForeverDuration", - "description": "Schema for a fixed amount discount that is applied once or forever." - }, - "CheckoutDiscountFixedRepeatDuration": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "name": { - "type": "string", - "title": "Name" - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code" - } - }, - "type": "object", - "required": [ - "duration", - "duration_in_months", - "type", - "amount", - "currency", - "id", - "name", - "code" - ], - "title": "CheckoutDiscountFixedRepeatDuration", - "description": "Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months." - }, - "CheckoutDiscountPercentageOnceForeverDuration": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "name": { - "type": "string", - "title": "Name" - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code" - } - }, - "type": "object", - "required": [ - "duration", - "type", - "basis_points", - "id", - "name", - "code" - ], - "title": "CheckoutDiscountPercentageOnceForeverDuration", - "description": "Schema for a percentage discount that is applied once or forever." - }, - "CheckoutDiscountPercentageRepeatDuration": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "name": { - "type": "string", - "title": "Name" - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code" - } - }, - "type": "object", - "required": [ - "duration", - "duration_in_months", - "type", - "basis_points", - "id", - "name", - "code" - ], - "title": "CheckoutDiscountPercentageRepeatDuration", - "description": "Schema for a percentage discount that is applied on every invoice\nfor a certain number of months." - }, - "CheckoutLegacy": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "The ID of the checkout." - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url", - "description": "URL the customer should be redirected to complete the purchase." - }, - "customer_email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "product": { - "$ref": "#/components/schemas/CheckoutProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - } - }, - "type": "object", - "required": [ - "id", - "customer_email", - "customer_name", - "product", - "product_price" - ], - "title": "CheckoutLegacy", - "description": "A checkout session." - }, - "CheckoutLegacyCreate": { - "properties": { - "product_price_id": { - "type": "string", - "format": "uuid4", - "title": "Product Price Id", - "description": "ID of the product price to subscribe to." - }, - "success_url": { - "type": "string", - "minLength": 1, - "format": "uri", - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful subscription. You can add the `session_id={CHECKOUT_SESSION_ID}` query parameter to retrieve the checkout session id." - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email" - }, - { - "type": "null" - } - ], - "title": "Customer Email", - "description": "If you already know the email of your customer, you can set it. It'll be pre-filled on the checkout page." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "ID of the subscription to update. If not provided, a new subscription will be created." - } - }, - "type": "object", - "required": [ - "product_price_id", - "success_url" - ], - "title": "CheckoutLegacyCreate" - }, - "CheckoutLink": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "payment_processor": { - "$ref": "#/components/schemas/PaymentProcessor", - "description": "Payment processor used." - }, - "client_secret": { - "type": "string", - "title": "Client Secret", - "description": "Client secret used to access the checkout link." - }, - "success_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment." - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Label", - "description": "Optional label to distinguish links internally" - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "ID of the product to checkout." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id", - "description": "ID of the product price to checkout. First available price will be selected unless an explicit price ID is set." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - }, - "product": { - "$ref": "#/components/schemas/CheckoutLinkProduct" - }, - "product_price": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPrice" - }, - { - "type": "null" - } - ] - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase" - } - ], - "title": "CheckoutLinkDiscount" - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "url": { - "type": "string", - "title": "Url", - "readOnly": true - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "payment_processor", - "client_secret", - "success_url", - "label", - "allow_discount_codes", - "product_id", - "product_price_id", - "discount_id", - "product", - "product_price", - "discount", - "url" - ], - "title": "CheckoutLink", - "description": "Checkout link data." - }, - "CheckoutLinkCreate": { - "anyOf": [ - { - "$ref": "#/components/schemas/CheckoutLinkProductCreate" - }, - { - "$ref": "#/components/schemas/CheckoutLinkPriceCreate" - } - ] - }, - "CheckoutLinkPriceCreate": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "payment_processor": { - "type": "string", - "enum": [ - "stripe" - ], - "const": "stripe", - "title": "Payment Processor", - "description": "Payment processor to use. Currently only Stripe is supported." - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Label", - "description": "Optional label to distinguish links internally" - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.", - "default": true - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "product_price_id": { - "type": "string", - "format": "uuid4", - "title": "Product Price Id", - "description": "ID of the product price to checkout." - } - }, - "type": "object", - "required": [ - "payment_processor", - "product_price_id" - ], - "title": "CheckoutLinkPriceCreate" - }, - "CheckoutLinkProduct": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the product." - }, - "prices": { - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "type": "array", - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "items": { - "$ref": "#/components/schemas/BenefitBase" - }, - "type": "array", - "title": "BenefitPublic", - "description": "List of benefits granted by the product." - }, - "medias": { - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "type": "array", - "title": "Medias", - "description": "List of medias associated to the product." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "prices", - "benefits", - "medias" - ], - "title": "CheckoutLinkProduct", - "description": "Product data for a checkout link." - }, - "CheckoutLinkProductCreate": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "payment_processor": { - "type": "string", - "enum": [ - "stripe" - ], - "const": "stripe", - "title": "Payment Processor", - "description": "Payment processor to use. Currently only Stripe is supported." - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Label", - "description": "Optional label to distinguish links internally" - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.", - "default": true - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "ID of the product to checkout. First available price will be selected." - } - }, - "type": "object", - "required": [ - "payment_processor", - "product_id" - ], - "title": "CheckoutLinkProductCreate" - }, - "CheckoutLinkSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at" - ], - "title": "CheckoutLinkSortProperty" - }, - "CheckoutLinkUpdate": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Label" - }, - "allow_discount_codes": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - } - }, - "type": "object", - "title": "CheckoutLinkUpdate", - "description": "Schema to update an existing checkout link." - }, - "CheckoutPriceCreate": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "type": "string", - "enum": [ - "stripe" - ], - "const": "stripe", - "title": "Payment Processor", - "description": "Payment processor to use. Currently only Stripe is supported." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.", - "default": true - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id", - "description": "ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer." - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "customer_metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Customer Metadata", - "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page." - }, - "product_price_id": { - "type": "string", - "format": "uuid4", - "title": "Product Price Id", - "description": "ID of the product price to checkout." - } - }, - "type": "object", - "required": [ - "payment_processor", - "product_price_id" - ], - "title": "CheckoutPriceCreate", - "description": "Create a new checkout session from a product price.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription." - }, - "CheckoutProduct": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the product." - }, - "prices": { - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "type": "array", - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "items": { - "$ref": "#/components/schemas/BenefitBase" - }, - "type": "array", - "title": "BenefitPublic", - "description": "List of benefits granted by the product." - }, - "medias": { - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "type": "array", - "title": "Medias", - "description": "List of medias associated to the product." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "prices", - "benefits", - "medias" - ], - "title": "CheckoutProduct", - "description": "Product data for a checkout session." - }, - "CheckoutProductCreate": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "type": "string", - "enum": [ - "stripe" - ], - "const": "stripe", - "title": "Payment Processor", - "description": "Payment processor to use. Currently only Stripe is supported." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.", - "default": true - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id", - "description": "ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer." - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "customer_metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Customer Metadata", - "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id", - "description": "ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "ID of the product to checkout. First available price will be selected." - } - }, - "type": "object", - "required": [ - "payment_processor", - "product_id" - ], - "title": "CheckoutProductCreate", - "description": "Create a new checkout session from a product.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription." - }, - "CheckoutPublic": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "$ref": "#/components/schemas/PaymentProcessor", - "description": "Payment processor used." - }, - "status": { - "$ref": "#/components/schemas/CheckoutStatus", - "description": "Status of the checkout session." - }, - "client_secret": { - "type": "string", - "title": "Client Secret", - "description": "Client secret used to update and complete the checkout session from the client." - }, - "url": { - "type": "string", - "title": "Url", - "description": "URL where the customer can access the checkout session." - }, - "expires_at": { - "type": "string", - "format": "date-time", - "title": "Expires At", - "description": "Expiration date and time of the checkout session." - }, - "success_url": { - "type": "string", - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "tax_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Tax Amount", - "description": "Computed tax amount to pay in cents." - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency", - "description": "Currency code of the checkout session." - }, - "subtotal_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Subtotal Amount", - "description": "Subtotal amount in cents, including discounts and before tax." - }, - "total_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Amount", - "description": "Total amount to pay in cents, including discounts and after tax." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "ID of the product to checkout." - }, - "product_price_id": { - "type": "string", - "format": "uuid4", - "title": "Product Price Id", - "description": "ID of the product price to checkout." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount applied to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "is_discount_applicable": { - "type": "boolean", - "title": "Is Discount Applicable", - "description": "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable." - }, - "is_free_product_price": { - "type": "boolean", - "title": "Is Free Product Price", - "description": "Whether the product price is free, regardless of discounts." - }, - "is_payment_required": { - "type": "boolean", - "title": "Is Payment Required", - "description": "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount." - }, - "is_payment_setup_required": { - "type": "boolean", - "title": "Is Payment Setup Required", - "description": "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles." - }, - "is_payment_form_required": { - "type": "boolean", - "title": "Is Payment Form Required", - "description": "Whether the checkout requires a payment form, whether because of a payment or payment method setup." - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "payment_processor_metadata": { - "type": "object", - "title": "Payment Processor Metadata" - }, - "product": { - "$ref": "#/components/schemas/CheckoutProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration" - } - ] - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "attached_custom_fields": { - "items": { - "$ref": "#/components/schemas/AttachedCustomField" - }, - "type": "array", - "title": "Attached Custom Fields" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "payment_processor", - "status", - "client_secret", - "url", - "expires_at", - "success_url", - "embed_origin", - "amount", - "tax_amount", - "currency", - "subtotal_amount", - "total_amount", - "product_id", - "product_price_id", - "discount_id", - "allow_discount_codes", - "is_discount_applicable", - "is_free_product_price", - "is_payment_required", - "is_payment_setup_required", - "is_payment_form_required", - "customer_id", - "customer_name", - "customer_email", - "customer_ip_address", - "customer_billing_address", - "customer_tax_id", - "payment_processor_metadata", - "product", - "product_price", - "discount", - "organization", - "attached_custom_fields" - ], - "title": "CheckoutPublic", - "description": "Checkout session data retrieved using the client secret." - }, - "CheckoutPublicConfirmed": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "payment_processor": { - "$ref": "#/components/schemas/PaymentProcessor", - "description": "Payment processor used." - }, - "status": { - "type": "string", - "enum": [ - "confirmed" - ], - "const": "confirmed", - "title": "Status" - }, - "client_secret": { - "type": "string", - "title": "Client Secret", - "description": "Client secret used to update and complete the checkout session from the client." - }, - "url": { - "type": "string", - "title": "Url", - "description": "URL where the customer can access the checkout session." - }, - "expires_at": { - "type": "string", - "format": "date-time", - "title": "Expires At", - "description": "Expiration date and time of the checkout session." - }, - "success_url": { - "type": "string", - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "tax_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Tax Amount", - "description": "Computed tax amount to pay in cents." - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency", - "description": "Currency code of the checkout session." - }, - "subtotal_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Subtotal Amount", - "description": "Subtotal amount in cents, including discounts and before tax." - }, - "total_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Amount", - "description": "Total amount to pay in cents, including discounts and after tax." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "ID of the product to checkout." - }, - "product_price_id": { - "type": "string", - "format": "uuid4", - "title": "Product Price Id", - "description": "ID of the product price to checkout." - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount applied to the checkout." - }, - "allow_discount_codes": { - "type": "boolean", - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "is_discount_applicable": { - "type": "boolean", - "title": "Is Discount Applicable", - "description": "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable." - }, - "is_free_product_price": { - "type": "boolean", - "title": "Is Free Product Price", - "description": "Whether the product price is free, regardless of discounts." - }, - "is_payment_required": { - "type": "boolean", - "title": "Is Payment Required", - "description": "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount." - }, - "is_payment_setup_required": { - "type": "boolean", - "title": "Is Payment Setup Required", - "description": "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles." - }, - "is_payment_form_required": { - "type": "boolean", - "title": "Is Payment Form Required", - "description": "Whether the checkout requires a payment form, whether because of a payment or payment method setup." - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "payment_processor_metadata": { - "type": "object", - "title": "Payment Processor Metadata" - }, - "product": { - "$ref": "#/components/schemas/CheckoutProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration" - } - ] - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "organization": { - "$ref": "#/components/schemas/Organization" - }, - "attached_custom_fields": { - "items": { - "$ref": "#/components/schemas/AttachedCustomField" - }, - "type": "array", - "title": "Attached Custom Fields" - }, - "customer_session_token": { - "type": "string", - "title": "Customer Session Token" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "payment_processor", - "status", - "client_secret", - "url", - "expires_at", - "success_url", - "embed_origin", - "amount", - "tax_amount", - "currency", - "subtotal_amount", - "total_amount", - "product_id", - "product_price_id", - "discount_id", - "allow_discount_codes", - "is_discount_applicable", - "is_free_product_price", - "is_payment_required", - "is_payment_setup_required", - "is_payment_form_required", - "customer_id", - "customer_name", - "customer_email", - "customer_ip_address", - "customer_billing_address", - "customer_tax_id", - "payment_processor_metadata", - "product", - "product_price", - "discount", - "organization", - "attached_custom_fields", - "customer_session_token" - ], - "title": "CheckoutPublicConfirmed", - "description": "Checkout session data retrieved using the client secret after confirmation.\n\nIt contains a customer session token to retrieve order information\nright after the checkout." - }, - "CheckoutSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "expires_at", - "-expires_at" - ], - "title": "CheckoutSortProperty" - }, - "CheckoutStatus": { - "type": "string", - "enum": [ - "open", - "expired", - "confirmed", - "succeeded", - "failed" - ], - "title": "CheckoutStatus" - }, - "CheckoutUpdate": { - "properties": { - "custom_field_data": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id", - "description": "ID of the product price to checkout. Must correspond to a price linked to the same product." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id", - "description": "ID of the discount to apply to the checkout." - }, - "allow_discount_codes": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Allow Discount Codes", - "description": "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - }, - "customer_ip_address": { - "anyOf": [ - { - "type": "string", - "format": "ipvanyaddress", - "description": "IP address of the customer. Used to detect tax location." - }, - { - "type": "null" - } - ], - "title": "Customer Ip Address" - }, - "customer_metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Customer Metadata", - "description": "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "success_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Success Url", - "description": "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - }, - "embed_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Embed Origin", - "description": "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page." - } - }, - "type": "object", - "title": "CheckoutUpdate", - "description": "Update an existing checkout session using an access token." - }, - "CheckoutUpdatePublic": { - "properties": { - "custom_field_data": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "product_price_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Product Price Id", - "description": "ID of the product price to checkout. Must correspond to a price linked to the same product." - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "description": "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "customer_name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Name" - }, - "customer_email": { - "anyOf": [ - { - "type": "string", - "format": "email", - "description": "Email address of the customer." - }, - { - "type": "null" - } - ], - "title": "Customer Email" - }, - "customer_billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address", - "description": "Billing address of the customer." - }, - { - "type": "null" - } - ] - }, - "customer_tax_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Customer Tax Id" - }, - "discount_code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Discount Code", - "description": "Discount code to apply to the checkout." - } - }, - "type": "object", - "title": "CheckoutUpdatePublic", - "description": "Update an existing checkout session using the client secret." - }, - "CurrencyAmount": { - "properties": { - "currency": { - "type": "string", - "title": "Currency", - "description": "Three letter currency code (eg: USD)" - }, - "amount": { - "type": "integer", - "title": "Amount", - "description": "Amount in the currencies smallest unit (cents if currency is USD)" - } - }, - "type": "object", - "required": [ - "currency", - "amount" - ], - "title": "CurrencyAmount" - }, - "CustomField": { - "oneOf": [ - { - "$ref": "#/components/schemas/CustomFieldText" - }, - { - "$ref": "#/components/schemas/CustomFieldNumber" - }, - { - "$ref": "#/components/schemas/CustomFieldDate" - }, - { - "$ref": "#/components/schemas/CustomFieldCheckbox" - }, - { - "$ref": "#/components/schemas/CustomFieldSelect" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "checkbox": "#/components/schemas/CustomFieldCheckbox", - "date": "#/components/schemas/CustomFieldDate", - "number": "#/components/schemas/CustomFieldNumber", - "select": "#/components/schemas/CustomFieldSelect", - "text": "#/components/schemas/CustomFieldText" - } - } - }, - "CustomFieldCheckbox": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "type": { - "type": "string", - "enum": [ - "checkbox" - ], - "const": "checkbox", - "title": "Type" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldCheckboxProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "title": "CustomFieldCheckbox", - "description": "Schema for a custom field of type checkbox." - }, - "CustomFieldCheckboxProperties": { - "properties": { - "form_label": { - "type": "string", - "minLength": 1, - "title": "Form Label" - }, - "form_help_text": { - "type": "string", - "minLength": 1, - "title": "Form Help Text" - }, - "form_placeholder": { - "type": "string", - "minLength": 1, - "title": "Form Placeholder" - } - }, - "type": "object", - "title": "CustomFieldCheckboxProperties" - }, - "CustomFieldCreate": { - "oneOf": [ - { - "$ref": "#/components/schemas/CustomFieldCreateText" - }, - { - "$ref": "#/components/schemas/CustomFieldCreateNumber" - }, - { - "$ref": "#/components/schemas/CustomFieldCreateDate" - }, - { - "$ref": "#/components/schemas/CustomFieldCreateCheckbox" - }, - { - "$ref": "#/components/schemas/CustomFieldCreateSelect" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "checkbox": "#/components/schemas/CustomFieldCreateCheckbox", - "date": "#/components/schemas/CustomFieldCreateDate", - "number": "#/components/schemas/CustomFieldCreateNumber", - "select": "#/components/schemas/CustomFieldCreateSelect", - "text": "#/components/schemas/CustomFieldCreateText" - } - } - }, - "CustomFieldCreateCheckbox": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "enum": [ - "checkbox" - ], - "const": "checkbox", - "title": "Type" - }, - "slug": { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "minLength": 1, - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldCheckboxProperties" - } - }, - "type": "object", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "title": "CustomFieldCreateCheckbox", - "description": "Schema to create a custom field of type checkbox." - }, - "CustomFieldCreateDate": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "enum": [ - "date" - ], - "const": "date", - "title": "Type" - }, - "slug": { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "minLength": 1, - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldDateProperties" - } - }, - "type": "object", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "title": "CustomFieldCreateDate", - "description": "Schema to create a custom field of type date." - }, - "CustomFieldCreateNumber": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "enum": [ - "number" - ], - "const": "number", - "title": "Type" - }, - "slug": { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "minLength": 1, - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldNumberProperties" - } - }, - "type": "object", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "title": "CustomFieldCreateNumber", - "description": "Schema to create a custom field of type number." - }, - "CustomFieldCreateSelect": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "enum": [ - "select" - ], - "const": "select", - "title": "Type" - }, - "slug": { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "minLength": 1, - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldSelectProperties" - } - }, - "type": "object", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "title": "CustomFieldCreateSelect", - "description": "Schema to create a custom field of type select." - }, - "CustomFieldCreateText": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "type": { - "type": "string", - "enum": [ - "text" - ], - "const": "text", - "title": "Type" - }, - "slug": { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - "name": { - "type": "string", - "minLength": 1, - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldTextProperties" - } - }, - "type": "object", - "required": [ - "type", - "slug", - "name", - "properties" - ], - "title": "CustomFieldCreateText", - "description": "Schema to create a custom field of type text." - }, - "CustomFieldDate": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "type": { - "type": "string", - "enum": [ - "date" - ], - "const": "date", - "title": "Type" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldDateProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "title": "CustomFieldDate", - "description": "Schema for a custom field of type date." - }, - "CustomFieldDateProperties": { - "properties": { - "form_label": { - "type": "string", - "minLength": 1, - "title": "Form Label" - }, - "form_help_text": { - "type": "string", - "minLength": 1, - "title": "Form Help Text" - }, - "form_placeholder": { - "type": "string", - "minLength": 1, - "title": "Form Placeholder" - }, - "ge": { - "type": "integer", - "title": "Ge" - }, - "le": { - "type": "integer", - "title": "Le" - } - }, - "type": "object", - "title": "CustomFieldDateProperties" - }, - "CustomFieldNumber": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "type": { - "type": "string", - "enum": [ - "number" - ], - "const": "number", - "title": "Type" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldNumberProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "title": "CustomFieldNumber", - "description": "Schema for a custom field of type number." - }, - "CustomFieldNumberProperties": { - "properties": { - "form_label": { - "type": "string", - "minLength": 1, - "title": "Form Label" - }, - "form_help_text": { - "type": "string", - "minLength": 1, - "title": "Form Help Text" - }, - "form_placeholder": { - "type": "string", - "minLength": 1, - "title": "Form Placeholder" - }, - "ge": { - "type": "integer", - "title": "Ge" - }, - "le": { - "type": "integer", - "title": "Le" - } - }, - "type": "object", - "title": "CustomFieldNumberProperties" - }, - "CustomFieldSelect": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "type": { - "type": "string", - "enum": [ - "select" - ], - "const": "select", - "title": "Type" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldSelectProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "title": "CustomFieldSelect", - "description": "Schema for a custom field of type select." - }, - "CustomFieldSelectOption": { - "properties": { - "value": { - "type": "string", - "minLength": 1, - "title": "Value" - }, - "label": { - "type": "string", - "minLength": 1, - "title": "Label" - } - }, - "type": "object", - "required": [ - "value", - "label" - ], - "title": "CustomFieldSelectOption" - }, - "CustomFieldSelectProperties": { - "properties": { - "form_label": { - "type": "string", - "minLength": 1, - "title": "Form Label" - }, - "form_help_text": { - "type": "string", - "minLength": 1, - "title": "Form Help Text" - }, - "form_placeholder": { - "type": "string", - "minLength": 1, - "title": "Form Placeholder" - }, - "options": { - "items": { - "$ref": "#/components/schemas/CustomFieldSelectOption" - }, - "type": "array", - "title": "Options" - } - }, - "type": "object", - "required": [ - "options" - ], - "title": "CustomFieldSelectProperties" - }, - "CustomFieldSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "slug", - "-slug", - "name", - "-name", - "type", - "-type" - ], - "title": "CustomFieldSortProperty" - }, - "CustomFieldText": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "type": { - "type": "string", - "enum": [ - "text" - ], - "const": "text", - "title": "Type" - }, - "slug": { - "type": "string", - "title": "Slug", - "description": "Identifier of the custom field. It'll be used as key when storing the value." - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the custom field." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the custom field.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "properties": { - "$ref": "#/components/schemas/CustomFieldTextProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "type", - "slug", - "name", - "organization_id", - "properties" - ], - "title": "CustomFieldText", - "description": "Schema for a custom field of type text." - }, - "CustomFieldTextProperties": { - "properties": { - "form_label": { - "type": "string", - "minLength": 1, - "title": "Form Label" - }, - "form_help_text": { - "type": "string", - "minLength": 1, - "title": "Form Help Text" - }, - "form_placeholder": { - "type": "string", - "minLength": 1, - "title": "Form Placeholder" - }, - "textarea": { - "type": "boolean", - "title": "Textarea" - }, - "min_length": { - "type": "integer", - "minimum": 0, - "title": "Min Length" - }, - "max_length": { - "type": "integer", - "minimum": 0, - "title": "Max Length" - } - }, - "type": "object", - "title": "CustomFieldTextProperties" - }, - "CustomFieldType": { - "type": "string", - "enum": [ - "text", - "number", - "date", - "checkbox", - "select" - ], - "title": "CustomFieldType" - }, - "CustomFieldUpdate": { - "oneOf": [ - { - "$ref": "#/components/schemas/CustomFieldUpdateText" - }, - { - "$ref": "#/components/schemas/CustomFieldUpdateNumber" - }, - { - "$ref": "#/components/schemas/CustomFieldUpdateDate" - }, - { - "$ref": "#/components/schemas/CustomFieldUpdateCheckbox" - }, - { - "$ref": "#/components/schemas/CustomFieldUpdateSelect" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "checkbox": "#/components/schemas/CustomFieldUpdateCheckbox", - "date": "#/components/schemas/CustomFieldUpdateDate", - "number": "#/components/schemas/CustomFieldUpdateNumber", - "select": "#/components/schemas/CustomFieldUpdateSelect", - "text": "#/components/schemas/CustomFieldUpdateText" - } - } - }, - "CustomFieldUpdateCheckbox": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "enum": [ - "checkbox" - ], - "const": "checkbox", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldCheckboxProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "CustomFieldUpdateCheckbox", - "description": "Schema to update a custom field of type checkbox." - }, - "CustomFieldUpdateDate": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "enum": [ - "date" - ], - "const": "date", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldDateProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "CustomFieldUpdateDate", - "description": "Schema to update a custom field of type date." - }, - "CustomFieldUpdateNumber": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "enum": [ - "number" - ], - "const": "number", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldNumberProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "CustomFieldUpdateNumber", - "description": "Schema to update a custom field of type number." - }, - "CustomFieldUpdateSelect": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "enum": [ - "select" - ], - "const": "select", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldSelectProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "CustomFieldUpdateSelect", - "description": "Schema to update a custom field of type select." - }, - "CustomFieldUpdateText": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the custom field." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "slug": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "pattern": "^[a-z0-9-_]+$", - "description": "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - }, - { - "type": "null" - } - ], - "title": "Slug" - }, - "type": { - "type": "string", - "enum": [ - "text" - ], - "const": "text", - "title": "Type" - }, - "properties": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomFieldTextProperties" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "type" - ], - "title": "CustomFieldUpdateText", - "description": "Schema to update a custom field of type text." - }, - "Customer": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "readOnly": true - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "organization_id", - "avatar_url" - ], - "title": "Customer", - "description": "A customer in an organization." - }, - "CustomerBenefitGrant": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomerBenefitGrantDiscord" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepository" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantDownloadables" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantLicenseKeys" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantAds" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantCustom" - } - ] - }, - "CustomerBenefitGrantAds": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitAdsSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantAdsProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ], - "title": "CustomerBenefitGrantAds" - }, - "CustomerBenefitGrantAdsUpdate": { - "properties": { - "benefit_type": { - "type": "string", - "enum": [ - "ads" - ], - "const": "ads", - "title": "Benefit Type" - } - }, - "type": "object", - "required": [ - "benefit_type" - ], - "title": "CustomerBenefitGrantAdsUpdate" - }, - "CustomerBenefitGrantCustom": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitCustomSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantCustomProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ], - "title": "CustomerBenefitGrantCustom" - }, - "CustomerBenefitGrantCustomUpdate": { - "properties": { - "benefit_type": { - "type": "string", - "enum": [ - "custom" - ], - "const": "custom", - "title": "Benefit Type" - } - }, - "type": "object", - "required": [ - "benefit_type" - ], - "title": "CustomerBenefitGrantCustomUpdate" - }, - "CustomerBenefitGrantDiscord": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitDiscordSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantDiscordProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ], - "title": "CustomerBenefitGrantDiscord" - }, - "CustomerBenefitGrantDiscordPropertiesUpdate": { - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - } - }, - "type": "object", - "required": [ - "account_id" - ], - "title": "CustomerBenefitGrantDiscordPropertiesUpdate" - }, - "CustomerBenefitGrantDiscordUpdate": { - "properties": { - "benefit_type": { - "type": "string", - "enum": [ - "discord" - ], - "const": "discord", - "title": "Benefit Type" - }, - "properties": { - "$ref": "#/components/schemas/CustomerBenefitGrantDiscordPropertiesUpdate" - } - }, - "type": "object", - "required": [ - "benefit_type", - "properties" - ], - "title": "CustomerBenefitGrantDiscordUpdate" - }, - "CustomerBenefitGrantDownloadables": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitDownloadablesSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantDownloadablesProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ], - "title": "CustomerBenefitGrantDownloadables" - }, - "CustomerBenefitGrantDownloadablesUpdate": { - "properties": { - "benefit_type": { - "type": "string", - "enum": [ - "downloadables" - ], - "const": "downloadables", - "title": "Benefit Type" - } - }, - "type": "object", - "required": [ - "benefit_type" - ], - "title": "CustomerBenefitGrantDownloadablesUpdate" - }, - "CustomerBenefitGrantGitHubRepository": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitGitHubRepositorySubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ], - "title": "CustomerBenefitGrantGitHubRepository" - }, - "CustomerBenefitGrantGitHubRepositoryPropertiesUpdate": { - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - } - }, - "type": "object", - "required": [ - "account_id" - ], - "title": "CustomerBenefitGrantGitHubRepositoryPropertiesUpdate" - }, - "CustomerBenefitGrantGitHubRepositoryUpdate": { - "properties": { - "benefit_type": { - "type": "string", - "enum": [ - "github_repository" - ], - "const": "github_repository", - "title": "Benefit Type" - }, - "properties": { - "$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryPropertiesUpdate" - } - }, - "type": "object", - "required": [ - "benefit_type", - "properties" - ], - "title": "CustomerBenefitGrantGitHubRepositoryUpdate" - }, - "CustomerBenefitGrantLicenseKeys": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "granted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Granted At" - }, - "revoked_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "order_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Order Id" - }, - "is_granted": { - "type": "boolean", - "title": "Is Granted" - }, - "is_revoked": { - "type": "boolean", - "title": "Is Revoked" - }, - "benefit": { - "$ref": "#/components/schemas/BenefitLicenseKeysSubscriber" - }, - "properties": { - "$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "granted_at", - "revoked_at", - "customer_id", - "benefit_id", - "subscription_id", - "order_id", - "is_granted", - "is_revoked", - "benefit", - "properties" - ], - "title": "CustomerBenefitGrantLicenseKeys" - }, - "CustomerBenefitGrantLicenseKeysUpdate": { - "properties": { - "benefit_type": { - "type": "string", - "enum": [ - "license_keys" - ], - "const": "license_keys", - "title": "Benefit Type" - } - }, - "type": "object", - "required": [ - "benefit_type" - ], - "title": "CustomerBenefitGrantLicenseKeysUpdate" - }, - "CustomerBenefitGrantSortProperty": { - "type": "string", - "enum": [ - "granted_at", - "-granted_at", - "type", - "-type", - "organization", - "-organization" - ], - "title": "CustomerBenefitGrantSortProperty" - }, - "CustomerBenefitGrantUpdate": { - "oneOf": [ - { - "$ref": "#/components/schemas/CustomerBenefitGrantDiscordUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantDownloadablesUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantAdsUpdate" - }, - { - "$ref": "#/components/schemas/CustomerBenefitGrantCustomUpdate" - } - ], - "discriminator": { - "propertyName": "benefit_type", - "mapping": { - "ads": "#/components/schemas/CustomerBenefitGrantAdsUpdate", - "custom": "#/components/schemas/CustomerBenefitGrantCustomUpdate", - "discord": "#/components/schemas/CustomerBenefitGrantDiscordUpdate", - "downloadables": "#/components/schemas/CustomerBenefitGrantDownloadablesUpdate", - "github_repository": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate", - "license_keys": "#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate" - } - } - }, - "CustomerCreate": { - "properties": { - "email": { - "type": "string", - "format": "email", - "title": "Email" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the customer. **Required unless you use an organization token.**" - } - }, - "type": "object", - "required": [ - "email" - ], - "title": "CustomerCreate" - }, - "CustomerOrder": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "tax_amount": { - "type": "integer", - "title": "Tax Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id" - }, - "product_price_id": { - "type": "string", - "format": "uuid4", - "title": "Product Price Id" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - }, - "product": { - "$ref": "#/components/schemas/CustomerOrderProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "subscription": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomerOrderSubscription" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "tax_amount", - "currency", - "customer_id", - "product_id", - "product_price_id", - "subscription_id", - "user_id", - "product", - "product_price", - "subscription" - ], - "title": "CustomerOrder" - }, - "CustomerOrderInvoice": { - "properties": { - "url": { - "type": "string", - "title": "Url", - "description": "The URL to the invoice." - } - }, - "type": "object", - "required": [ - "url" - ], - "title": "CustomerOrderInvoice", - "description": "Order's invoice data." - }, - "CustomerOrderProduct": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the product." - }, - "prices": { - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "type": "array", - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "items": { - "$ref": "#/components/schemas/BenefitBase" - }, - "type": "array", - "title": "BenefitPublic", - "description": "List of benefits granted by the product." - }, - "medias": { - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "type": "array", - "title": "Medias", - "description": "List of medias associated to the product." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "prices", - "benefits", - "medias", - "organization" - ], - "title": "CustomerOrderProduct" - }, - "CustomerOrderSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "amount", - "-amount", - "organization", - "-organization", - "product", - "-product", - "subscription", - "-subscription" - ], - "title": "CustomerOrderSortProperty" - }, - "CustomerOrderSubscription": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval" - }, - "status": { - "$ref": "#/components/schemas/SubscriptionStatus" - }, - "current_period_start": { - "type": "string", - "format": "date-time", - "title": "Current Period Start" - }, - "current_period_end": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Current Period End" - }, - "cancel_at_period_end": { - "type": "boolean", - "title": "Cancel At Period End" - }, - "started_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Started At" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id" - }, - "price_id": { - "type": "string", - "format": "uuid4", - "title": "Price Id" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "currency", - "recurring_interval", - "status", - "current_period_start", - "current_period_end", - "cancel_at_period_end", - "started_at", - "ended_at", - "customer_id", - "product_id", - "price_id", - "discount_id", - "checkout_id" - ], - "title": "CustomerOrderSubscription" - }, - "CustomerPortalCustomer": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "oauth_accounts": { - "additionalProperties": { - "$ref": "#/components/schemas/CustomerPortalOAuthAccount" - }, - "type": "object", - "title": "Oauth Accounts" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "oauth_accounts" - ], - "title": "CustomerPortalCustomer" - }, - "CustomerPortalOAuthAccount": { - "properties": { - "account_id": { - "type": "string", - "title": "Account Id" - }, - "account_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Account Username" - } - }, - "type": "object", - "required": [ - "account_id", - "account_username" - ], - "title": "CustomerPortalOAuthAccount" - }, - "CustomerSession": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "token": { - "type": "string", - "title": "Token" - }, - "expires_at": { - "type": "string", - "format": "date-time", - "title": "Expires At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "customer": { - "$ref": "#/components/schemas/Customer" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "token", - "expires_at", - "customer_id", - "customer" - ], - "title": "CustomerSession", - "description": "A customer session that can be used to authenticate as a customer." - }, - "CustomerSessionCreate": { - "properties": { - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id", - "description": "ID of the customer to create a session for." - } - }, - "type": "object", - "required": [ - "customer_id" - ], - "title": "CustomerSessionCreate", - "description": "Schema for creating a customer session." - }, - "CustomerSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "email", - "-email", - "name", - "-name" - ], - "title": "CustomerSortProperty" - }, - "CustomerSubscription": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval" - }, - "status": { - "$ref": "#/components/schemas/SubscriptionStatus" - }, - "current_period_start": { - "type": "string", - "format": "date-time", - "title": "Current Period Start" - }, - "current_period_end": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Current Period End" - }, - "cancel_at_period_end": { - "type": "boolean", - "title": "Cancel At Period End" - }, - "started_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Started At" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id" - }, - "price_id": { - "type": "string", - "format": "uuid4", - "title": "Price Id" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - }, - "product": { - "$ref": "#/components/schemas/CustomerSubscriptionProduct" - }, - "price": { - "$ref": "#/components/schemas/ProductPrice" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "currency", - "recurring_interval", - "status", - "current_period_start", - "current_period_end", - "cancel_at_period_end", - "started_at", - "ended_at", - "customer_id", - "product_id", - "price_id", - "discount_id", - "checkout_id", - "user_id", - "product", - "price" - ], - "title": "CustomerSubscription" - }, - "CustomerSubscriptionProduct": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the product." - }, - "prices": { - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "type": "array", - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "items": { - "$ref": "#/components/schemas/BenefitBase" - }, - "type": "array", - "title": "BenefitPublic", - "description": "List of benefits granted by the product." - }, - "medias": { - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "type": "array", - "title": "Medias", - "description": "List of medias associated to the product." - }, - "organization": { - "$ref": "#/components/schemas/Organization" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "prices", - "benefits", - "medias", - "organization" - ], - "title": "CustomerSubscriptionProduct" - }, - "CustomerSubscriptionSortProperty": { - "type": "string", - "enum": [ - "started_at", - "-started_at", - "amount", - "-amount", - "status", - "-status", - "organization", - "-organization", - "product", - "-product" - ], - "title": "CustomerSubscriptionSortProperty" - }, - "CustomerSubscriptionUpdate": { - "properties": { - "product_price_id": { - "type": "string", - "format": "uuid4", - "title": "Product Price Id" - } - }, - "type": "object", - "required": [ - "product_price_id" - ], - "title": "CustomerSubscriptionUpdate" - }, - "CustomerUpdate": { - "properties": { - "email": { - "anyOf": [ - { - "type": "string", - "format": "email" - }, - { - "type": "null" - } - ], - "title": "Email" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - } - }, - "type": "object", - "title": "CustomerUpdate" - }, - "Discount": { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDuration" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDuration" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDuration" - } - ] - }, - "DiscountCreate": { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationCreate" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDurationCreate" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationCreate" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDurationCreate" - } - ] - }, - "DiscountDuration": { - "type": "string", - "enum": [ - "once", - "forever", - "repeating" - ], - "title": "DiscountDuration" - }, - "DiscountFixedOnceForeverDuration": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "products": { - "items": { - "$ref": "#/components/schemas/DiscountProduct" - }, - "type": "array", - "title": "Products" - } - }, - "type": "object", - "required": [ - "duration", - "type", - "amount", - "currency", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id", - "products" - ], - "title": "DiscountFixedOnceForeverDuration", - "description": "Schema for a fixed amount discount that is applied once or forever." - }, - "DiscountFixedOnceForeverDurationBase": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - } - }, - "type": "object", - "required": [ - "duration", - "type", - "amount", - "currency", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id" - ], - "title": "DiscountFixedOnceForeverDurationBase" - }, - "DiscountFixedOnceForeverDurationCreate": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType", - "description": "Type of the discount." - }, - "amount": { - "type": "integer", - "minimum": 0, - "title": "Amount", - "description": "Fixed amount to discount from the invoice total." - }, - "currency": { - "type": "string", - "pattern": "usd", - "title": "Currency", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "minLength": 1, - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Optional timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Optional maximum number of times the discount can be redeemed." - }, - "products": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array", - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**" - } - }, - "type": "object", - "required": [ - "duration", - "type", - "amount", - "name" - ], - "title": "DiscountFixedOnceForeverDurationCreate", - "description": "Schema to create a fixed amount discount that is applied once or forever." - }, - "DiscountFixedRepeatDuration": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "products": { - "items": { - "$ref": "#/components/schemas/DiscountProduct" - }, - "type": "array", - "title": "Products" - } - }, - "type": "object", - "required": [ - "duration", - "duration_in_months", - "type", - "amount", - "currency", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id", - "products" - ], - "title": "DiscountFixedRepeatDuration", - "description": "Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months." - }, - "DiscountFixedRepeatDurationBase": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - } - }, - "type": "object", - "required": [ - "duration", - "duration_in_months", - "type", - "amount", - "currency", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id" - ], - "title": "DiscountFixedRepeatDurationBase" - }, - "DiscountFixedRepeatDurationCreate": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "minimum": 1, - "title": "Duration In Months", - "description": "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24." - }, - "type": { - "$ref": "#/components/schemas/DiscountType", - "description": "Type of the discount." - }, - "amount": { - "type": "integer", - "minimum": 0, - "title": "Amount", - "description": "Fixed amount to discount from the invoice total." - }, - "currency": { - "type": "string", - "pattern": "usd", - "title": "Currency", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "minLength": 1, - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Optional timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Optional maximum number of times the discount can be redeemed." - }, - "products": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array", - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**" - } - }, - "type": "object", - "required": [ - "duration", - "duration_in_months", - "type", - "amount", - "name" - ], - "title": "DiscountFixedRepeatDurationCreate", - "description": "Schema to create a fixed amount discount that is applied on every invoice\nfor a certain number of months." - }, - "DiscountPercentageOnceForeverDuration": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "products": { - "items": { - "$ref": "#/components/schemas/DiscountProduct" - }, - "type": "array", - "title": "Products" - } - }, - "type": "object", - "required": [ - "duration", - "type", - "basis_points", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id", - "products" - ], - "title": "DiscountPercentageOnceForeverDuration", - "description": "Schema for a percentage discount that is applied once or forever." - }, - "DiscountPercentageOnceForeverDurationBase": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - } - }, - "type": "object", - "required": [ - "duration", - "type", - "basis_points", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id" - ], - "title": "DiscountPercentageOnceForeverDurationBase" - }, - "DiscountPercentageOnceForeverDurationCreate": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "type": { - "$ref": "#/components/schemas/DiscountType", - "description": "Type of the discount." - }, - "basis_points": { - "type": "integer", - "maximum": 10000, - "minimum": 1, - "title": "Basis Points", - "description": "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "minLength": 1, - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Optional timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Optional maximum number of times the discount can be redeemed." - }, - "products": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array", - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**" - } - }, - "type": "object", - "required": [ - "duration", - "type", - "basis_points", - "name" - ], - "title": "DiscountPercentageOnceForeverDurationCreate", - "description": "Schema to create a percentage discount that is applied once or forever." - }, - "DiscountPercentageRepeatDuration": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "products": { - "items": { - "$ref": "#/components/schemas/DiscountProduct" - }, - "type": "array", - "title": "Products" - } - }, - "type": "object", - "required": [ - "duration", - "duration_in_months", - "type", - "basis_points", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id", - "products" - ], - "title": "DiscountPercentageRepeatDuration", - "description": "Schema for a percentage discount that is applied on every invoice\nfor a certain number of months." - }, - "DiscountPercentageRepeatDurationBase": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "title": "Duration In Months" - }, - "type": { - "$ref": "#/components/schemas/DiscountType" - }, - "basis_points": { - "type": "integer", - "title": "Basis Points" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Maximum number of times the discount can be redeemed." - }, - "redemptions_count": { - "type": "integer", - "title": "Redemptions Count", - "description": "Number of times the discount has been redeemed." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - } - }, - "type": "object", - "required": [ - "duration", - "duration_in_months", - "type", - "basis_points", - "created_at", - "modified_at", - "id", - "metadata", - "name", - "code", - "starts_at", - "ends_at", - "max_redemptions", - "redemptions_count", - "organization_id" - ], - "title": "DiscountPercentageRepeatDurationBase" - }, - "DiscountPercentageRepeatDurationCreate": { - "properties": { - "duration": { - "$ref": "#/components/schemas/DiscountDuration" - }, - "duration_in_months": { - "type": "integer", - "minimum": 1, - "title": "Duration In Months", - "description": "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24." - }, - "type": { - "$ref": "#/components/schemas/DiscountType", - "description": "Type of the discount." - }, - "basis_points": { - "type": "integer", - "maximum": 10000, - "minimum": 1, - "title": "Basis Points", - "description": "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "minLength": 1, - "title": "Name", - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - "code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code", - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - "starts_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Starts At", - "description": "Optional timestamp after which the discount is redeemable." - }, - "ends_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ends At", - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - "max_redemptions": { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Max Redemptions", - "description": "Optional maximum number of times the discount can be redeemed." - }, - "products": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array", - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the discount. **Required unless you use an organization token.**" - } - }, - "type": "object", - "required": [ - "duration", - "duration_in_months", - "type", - "basis_points", - "name" - ], - "title": "DiscountPercentageRepeatDurationCreate", - "description": "Schema to create a percentage discount that is applied on every invoice\nfor a certain number of months." - }, - "DiscountProduct": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the product." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id" - ], - "title": "DiscountProduct", - "description": "A product that a discount can be applied to." - }, - "DiscountSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "name", - "-name", - "code", - "-code", - "redemptions_count", - "-redemptions_count" - ], - "title": "DiscountSortProperty" - }, - "DiscountType": { - "type": "string", - "enum": [ - "fixed", - "percentage" - ], - "title": "DiscountType" - }, - "DiscountUpdate": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 1, - "description": "Name of the discount. Will be displayed to the customer when the discount is applied." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "code": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - }, - { - "type": "null" - } - ], - "title": "Code" - }, - "starts_at": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "description": "Optional timestamp after which the discount is redeemable." - }, - { - "type": "null" - } - ], - "title": "Starts At" - }, - "ends_at": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "description": "Optional timestamp after which the discount is no longer redeemable." - }, - { - "type": "null" - } - ], - "title": "Ends At" - }, - "max_redemptions": { - "anyOf": [ - { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "description": "Optional maximum number of times the discount can be redeemed." - }, - { - "type": "null" - } - ], - "title": "Max Redemptions" - }, - "duration": { - "anyOf": [ - { - "$ref": "#/components/schemas/DiscountDuration" - }, - { - "type": "null" - } - ] - }, - "duration_in_months": { - "anyOf": [ - { - "type": "integer", - "minimum": 1, - "description": "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24." - }, - { - "type": "null" - } - ], - "title": "Duration In Months" - }, - "type": { - "anyOf": [ - { - "$ref": "#/components/schemas/DiscountType" - }, - { - "type": "null" - } - ] - }, - "amount": { - "anyOf": [ - { - "type": "integer", - "minimum": 0, - "description": "Fixed amount to discount from the invoice total." - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string", - "pattern": "usd", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "basis_points": { - "anyOf": [ - { - "type": "integer", - "maximum": 10000, - "minimum": 1, - "description": "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550." - }, - { - "type": "null" - } - ], - "title": "Basis Points" - }, - "products": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array", - "description": "List of product IDs the discount can be applied to." - }, - { - "type": "null" - } - ], - "title": "Products" - } - }, - "type": "object", - "title": "DiscountUpdate", - "description": "Schema to update a discount." - }, - "DownloadableFileCreate": { - "properties": { - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "upload": { - "$ref": "#/components/schemas/S3FileCreateMultipart" - }, - "service": { - "type": "string", - "enum": [ - "downloadable" - ], - "const": "downloadable", - "title": "Service" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - } - }, - "type": "object", - "required": [ - "name", - "mime_type", - "size", - "upload", - "service" - ], - "title": "DownloadableFileCreate", - "description": "Schema to create a file to be associated with the downloadables benefit." - }, - "DownloadableFileRead": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "service": { - "type": "string", - "enum": [ - "downloadable" - ], - "const": "downloadable", - "title": "Service" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - } - }, - "type": "object", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "version", - "service", - "is_uploaded", - "created_at", - "size_readable" - ], - "title": "DownloadableFileRead", - "description": "File to be associated with the downloadables benefit." - }, - "DownloadableRead": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id" - }, - "file": { - "$ref": "#/components/schemas/FileDownload" - } - }, - "type": "object", - "required": [ - "id", - "benefit_id", - "file" - ], - "title": "DownloadableRead" - }, - "ExistingProductPrice": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "ExistingProductPrice", - "description": "A price that already exists for this product.\n\nUseful when updating a product if you want to keep an existing price." - }, - "ExternalOrganization": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "platform": { - "$ref": "#/components/schemas/Platforms" - }, - "name": { - "type": "string", - "title": "Name" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url" - }, - "is_personal": { - "type": "boolean", - "title": "Is Personal" - }, - "bio": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Bio" - }, - "pretty_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pretty Name" - }, - "company": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Company" - }, - "blog": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Blog" - }, - "location": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Location" - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Email" - }, - "twitter_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Twitter Username" - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - } - }, - "type": "object", - "required": [ - "id", - "platform", - "name", - "avatar_url", - "is_personal", - "bio", - "pretty_name", - "company", - "blog", - "location", - "email", - "twitter_username", - "organization_id" - ], - "title": "ExternalOrganization" - }, - "ExternalOrganizationSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "name", - "-name" - ], - "title": "ExternalOrganizationSortProperty" - }, - "FileCreate": { - "oneOf": [ - { - "$ref": "#/components/schemas/DownloadableFileCreate" - }, - { - "$ref": "#/components/schemas/ProductMediaFileCreate" - }, - { - "$ref": "#/components/schemas/OrganizationAvatarFileCreate" - } - ], - "discriminator": { - "propertyName": "service", - "mapping": { - "downloadable": "#/components/schemas/DownloadableFileCreate", - "organization_avatar": "#/components/schemas/OrganizationAvatarFileCreate", - "product_media": "#/components/schemas/ProductMediaFileCreate" - } - } - }, - "FileDownload": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "download": { - "$ref": "#/components/schemas/S3DownloadURL" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded" - }, - "service": { - "$ref": "#/components/schemas/FileServiceTypes" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - } - }, - "type": "object", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "download", - "version", - "is_uploaded", - "service", - "size_readable" - ], - "title": "FileDownload" - }, - "FilePatch": { - "properties": { - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - } - }, - "type": "object", - "title": "FilePatch" - }, - "FileServiceTypes": { - "type": "string", - "enum": [ - "downloadable", - "product_media", - "organization_avatar" - ], - "title": "FileServiceTypes" - }, - "FileUpload": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "upload": { - "$ref": "#/components/schemas/S3FileUploadMultipart" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded", - "default": false - }, - "service": { - "$ref": "#/components/schemas/FileServiceTypes" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - } - }, - "type": "object", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "upload", - "version", - "service", - "size_readable" - ], - "title": "FileUpload" - }, - "FileUploadCompleted": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "path": { - "type": "string", - "title": "Path" - }, - "parts": { - "items": { - "$ref": "#/components/schemas/S3FileUploadCompletedPart" - }, - "type": "array", - "title": "Parts" - } - }, - "type": "object", - "required": [ - "id", - "path", - "parts" - ], - "title": "FileUploadCompleted" - }, - "Funding": { - "properties": { - "funding_goal": { - "anyOf": [ - { - "$ref": "#/components/schemas/CurrencyAmount" - }, - { - "type": "null" - } - ] - }, - "pledges_sum": { - "anyOf": [ - { - "$ref": "#/components/schemas/CurrencyAmount" - }, - { - "type": "null" - } - ], - "description": "Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD." - } - }, - "type": "object", - "title": "Funding" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "Interval": { - "type": "string", - "enum": [ - "year", - "month", - "week", - "day", - "hour" - ], - "title": "Interval" - }, - "IntrospectTokenResponse": { - "properties": { - "active": { - "type": "boolean", - "title": "Active" - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "token_type": { - "type": "string", - "enum": [ - "access_token", - "refresh_token" - ], - "title": "Token Type" - }, - "scope": { - "type": "string", - "title": "Scope" - }, - "sub_type": { - "$ref": "#/components/schemas/SubType" - }, - "sub": { - "type": "string", - "title": "Sub" - }, - "aud": { - "type": "string", - "title": "Aud" - }, - "iss": { - "type": "string", - "title": "Iss" - }, - "exp": { - "type": "integer", - "title": "Exp" - }, - "iat": { - "type": "integer", - "title": "Iat" - } - }, - "type": "object", - "required": [ - "active", - "client_id", - "token_type", - "scope", - "sub_type", - "sub", - "aud", - "iss", - "exp", - "iat" - ], - "title": "IntrospectTokenResponse" - }, - "Issue": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "platform": { - "$ref": "#/components/schemas/Platforms", - "description": "Issue platform (currently always GitHub)" - }, - "number": { - "type": "integer", - "title": "Number", - "description": "GitHub #number" - }, - "title": { - "type": "string", - "title": "Title", - "description": "GitHub issue title" - }, - "body": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Body", - "description": "GitHub issue body" - }, - "comments": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Comments", - "description": "Number of GitHub comments made on the issue" - }, - "labels": { - "items": { - "$ref": "#/components/schemas/Label" - }, - "type": "array", - "title": "Labels", - "default": [] - }, - "author": { - "anyOf": [ - { - "$ref": "#/components/schemas/Author" - }, - { - "type": "null" - } - ], - "description": "GitHub author" - }, - "assignees": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/Assignee" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Assignees", - "description": "GitHub assignees" - }, - "reactions": { - "anyOf": [ - { - "$ref": "#/components/schemas/Reactions" - }, - { - "type": "null" - } - ], - "description": "GitHub reactions" - }, - "state": { - "$ref": "#/components/schemas/State" - }, - "issue_closed_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Issue Closed At" - }, - "issue_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Issue Modified At" - }, - "issue_created_at": { - "type": "string", - "format": "date-time", - "title": "Issue Created At" - }, - "needs_confirmation_solved": { - "type": "boolean", - "title": "Needs Confirmation Solved", - "description": "If a maintainer needs to mark this issue as solved" - }, - "confirmed_solved_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Confirmed Solved At", - "description": "If this issue has been marked as confirmed solved through Polar" - }, - "funding": { - "$ref": "#/components/schemas/Funding" - }, - "repository": { - "$ref": "#/components/schemas/Repository", - "description": "The repository that the issue is in" - }, - "upfront_split_to_contributors": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Upfront Split To Contributors", - "description": "Share of rewrads that will be rewarded to contributors of this issue. A number between 0 and 100 (inclusive)." - }, - "pledge_badge_currently_embedded": { - "type": "boolean", - "title": "Pledge Badge Currently Embedded", - "description": "If this issue currently has the Polar badge SVG embedded" - }, - "badge_custom_content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Badge Custom Content", - "description": "Optional custom badge SVG promotional content" - } - }, - "type": "object", - "required": [ - "id", - "platform", - "number", - "title", - "state", - "issue_created_at", - "needs_confirmation_solved", - "funding", - "repository", - "pledge_badge_currently_embedded" - ], - "title": "Issue" - }, - "Label": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "color": { - "type": "string", - "title": "Color" - } - }, - "type": "object", - "required": [ - "name", - "color" - ], - "title": "Label" - }, - "LicenseKeyActivate": { - "properties": { - "key": { - "type": "string", - "title": "Key" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "label": { - "type": "string", - "title": "Label" - }, - "conditions": { - "type": "object", - "title": "Conditions", - "default": {} - }, - "meta": { - "type": "object", - "title": "Meta", - "default": {} - } - }, - "type": "object", - "required": [ - "key", - "organization_id", - "label" - ], - "title": "LicenseKeyActivate" - }, - "LicenseKeyActivationBase": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "license_key_id": { - "type": "string", - "format": "uuid4", - "title": "License Key Id" - }, - "label": { - "type": "string", - "title": "Label" - }, - "meta": { - "type": "object", - "title": "Meta" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At" - } - }, - "type": "object", - "required": [ - "id", - "license_key_id", - "label", - "meta", - "created_at", - "modified_at" - ], - "title": "LicenseKeyActivationBase" - }, - "LicenseKeyActivationRead": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "license_key_id": { - "type": "string", - "format": "uuid4", - "title": "License Key Id" - }, - "label": { - "type": "string", - "title": "Label" - }, - "meta": { - "type": "object", - "title": "Meta" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At" - }, - "license_key": { - "$ref": "#/components/schemas/LicenseKeyRead" - } - }, - "type": "object", - "required": [ - "id", - "license_key_id", - "label", - "meta", - "created_at", - "modified_at", - "license_key" - ], - "title": "LicenseKeyActivationRead" - }, - "LicenseKeyCustomer": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "readOnly": true - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "organization_id", - "avatar_url" - ], - "title": "LicenseKeyCustomer" - }, - "LicenseKeyDeactivate": { - "properties": { - "key": { - "type": "string", - "title": "Key" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "activation_id": { - "type": "string", - "format": "uuid4", - "title": "Activation Id" - } - }, - "type": "object", - "required": [ - "key", - "organization_id", - "activation_id" - ], - "title": "LicenseKeyDeactivate" - }, - "LicenseKeyRead": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "user": { - "$ref": "#/components/schemas/LicenseKeyUser", - "deprecated": true - }, - "customer": { - "$ref": "#/components/schemas/LicenseKeyCustomer" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - "key": { - "type": "string", - "title": "Key" - }, - "display_key": { - "type": "string", - "title": "Display Key" - }, - "status": { - "$ref": "#/components/schemas/LicenseKeyStatus" - }, - "limit_activations": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Activations" - }, - "usage": { - "type": "integer", - "title": "Usage" - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - }, - "validations": { - "type": "integer", - "title": "Validations" - }, - "last_validated_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Validated At" - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At" - } - }, - "type": "object", - "required": [ - "id", - "organization_id", - "user_id", - "customer_id", - "user", - "customer", - "benefit_id", - "key", - "display_key", - "status", - "limit_activations", - "usage", - "limit_usage", - "validations", - "last_validated_at", - "expires_at" - ], - "title": "LicenseKeyRead" - }, - "LicenseKeyStatus": { - "type": "string", - "enum": [ - "granted", - "revoked", - "disabled" - ], - "title": "LicenseKeyStatus" - }, - "LicenseKeyUpdate": { - "properties": { - "status": { - "anyOf": [ - { - "$ref": "#/components/schemas/LicenseKeyStatus" - }, - { - "type": "null" - } - ] - }, - "usage": { - "type": "integer", - "title": "Usage", - "default": 0 - }, - "limit_activations": { - "anyOf": [ - { - "type": "integer", - "maximum": 50, - "exclusiveMinimum": 0 - }, - { - "type": "null" - } - ], - "title": "Limit Activations" - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer", - "exclusiveMinimum": 0 - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At" - } - }, - "type": "object", - "title": "LicenseKeyUpdate" - }, - "LicenseKeyUser": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "email": { - "type": "string", - "title": "Email" - }, - "public_name": { - "type": "string", - "title": "Public Name" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - } - }, - "type": "object", - "required": [ - "id", - "email", - "public_name" - ], - "title": "LicenseKeyUser" - }, - "LicenseKeyValidate": { - "properties": { - "key": { - "type": "string", - "title": "Key" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "activation_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Activation Id" - }, - "benefit_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - { - "type": "null" - } - ], - "title": "Benefit Id" - }, - "customer_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Customer Id" - }, - "increment_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Increment Usage" - }, - "conditions": { - "type": "object", - "title": "Conditions", - "default": {} - } - }, - "type": "object", - "required": [ - "key", - "organization_id" - ], - "title": "LicenseKeyValidate" - }, - "LicenseKeyWithActivations": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "user": { - "$ref": "#/components/schemas/LicenseKeyUser", - "deprecated": true - }, - "customer": { - "$ref": "#/components/schemas/LicenseKeyCustomer" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - "key": { - "type": "string", - "title": "Key" - }, - "display_key": { - "type": "string", - "title": "Display Key" - }, - "status": { - "$ref": "#/components/schemas/LicenseKeyStatus" - }, - "limit_activations": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Activations" - }, - "usage": { - "type": "integer", - "title": "Usage" - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - }, - "validations": { - "type": "integer", - "title": "Validations" - }, - "last_validated_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Validated At" - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At" - }, - "activations": { - "items": { - "$ref": "#/components/schemas/LicenseKeyActivationBase" - }, - "type": "array", - "title": "Activations" - } - }, - "type": "object", - "required": [ - "id", - "organization_id", - "user_id", - "customer_id", - "user", - "customer", - "benefit_id", - "key", - "display_key", - "status", - "limit_activations", - "usage", - "limit_usage", - "validations", - "last_validated_at", - "expires_at", - "activations" - ], - "title": "LicenseKeyWithActivations" - }, - "ListResource_BenefitGrant_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/BenefitGrant" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[BenefitGrant]" - }, - "ListResource_Benefit_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[Benefit]" - }, - "ListResource_CheckoutLink_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/CheckoutLink" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[CheckoutLink]" - }, - "ListResource_Checkout_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Checkout" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[Checkout]" - }, - "ListResource_CustomField_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/CustomField", - "title": "CustomField" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[CustomField]" - }, - "ListResource_CustomerBenefitGrant_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/CustomerBenefitGrant", - "title": "CustomerBenefitGrant" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[CustomerBenefitGrant]" - }, - "ListResource_CustomerOrder_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/CustomerOrder" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[CustomerOrder]" - }, - "ListResource_CustomerSubscription_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/CustomerSubscription" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[CustomerSubscription]" - }, - "ListResource_Customer_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Customer" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[Customer]" - }, - "ListResource_Discount_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Discount", - "title": "Discount" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[Discount]" - }, - "ListResource_DownloadableRead_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/DownloadableRead" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[DownloadableRead]" - }, - "ListResource_ExternalOrganization_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/ExternalOrganization" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[ExternalOrganization]" - }, - "ListResource_FileRead_": { - "properties": { - "items": { - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/DownloadableFileRead" - }, - { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - { - "$ref": "#/components/schemas/OrganizationAvatarFileRead" - } - ], - "title": "FileRead", - "discriminator": { - "propertyName": "service", - "mapping": { - "downloadable": "#/components/schemas/DownloadableFileRead", - "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead", - "product_media": "#/components/schemas/ProductMediaFileRead" - } - } - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[FileRead]" - }, - "ListResource_LicenseKeyRead_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/LicenseKeyRead" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[LicenseKeyRead]" - }, - "ListResource_OAuth2Client_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/OAuth2Client" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[OAuth2Client]" - }, - "ListResource_Order_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Order" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[Order]" - }, - "ListResource_Organization_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Organization" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[Organization]" - }, - "ListResource_Product_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Product" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[Product]" - }, - "ListResource_Repository_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Repository" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[Repository]" - }, - "ListResource_Subscription_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Subscription" - }, - "type": "array", - "title": "Items" - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "type": "object", - "required": [ - "items", - "pagination" - ], - "title": "ListResource[Subscription]" - }, - "Metric": { - "properties": { - "slug": { - "type": "string", - "title": "Slug", - "description": "Unique identifier for the metric." - }, - "display_name": { - "type": "string", - "title": "Display Name", - "description": "Human-readable name for the metric." - }, - "type": { - "$ref": "#/components/schemas/MetricType", - "description": "Type of the metric, useful to know the unit or format of the value." - } - }, - "type": "object", - "required": [ - "slug", - "display_name", - "type" - ], - "title": "Metric", - "description": "Information about a metric." - }, - "MetricPeriod": { - "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "title": "Timestamp", - "description": "Timestamp of this period data." - }, - "orders": { - "type": "integer", - "title": "Orders" - }, - "revenue": { - "type": "integer", - "title": "Revenue" - }, - "average_order_value": { - "type": "integer", - "title": "Average Order Value" - }, - "one_time_products": { - "type": "integer", - "title": "One Time Products" - }, - "one_time_products_revenue": { - "type": "integer", - "title": "One Time Products Revenue" - }, - "new_subscriptions": { - "type": "integer", - "title": "New Subscriptions" - }, - "new_subscriptions_revenue": { - "type": "integer", - "title": "New Subscriptions Revenue" - }, - "renewed_subscriptions": { - "type": "integer", - "title": "Renewed Subscriptions" - }, - "renewed_subscriptions_revenue": { - "type": "integer", - "title": "Renewed Subscriptions Revenue" - }, - "active_subscriptions": { - "type": "integer", - "title": "Active Subscriptions" - }, - "monthly_recurring_revenue": { - "type": "integer", - "title": "Monthly Recurring Revenue" - } - }, - "type": "object", - "required": [ - "timestamp", - "orders", - "revenue", - "average_order_value", - "one_time_products", - "one_time_products_revenue", - "new_subscriptions", - "new_subscriptions_revenue", - "renewed_subscriptions", - "renewed_subscriptions_revenue", - "active_subscriptions", - "monthly_recurring_revenue" - ], - "title": "MetricPeriod" - }, - "MetricType": { - "type": "string", - "enum": [ - "scalar", - "currency" - ], - "title": "MetricType" - }, - "Metrics": { - "properties": { - "orders": { - "$ref": "#/components/schemas/Metric" - }, - "revenue": { - "$ref": "#/components/schemas/Metric" - }, - "average_order_value": { - "$ref": "#/components/schemas/Metric" - }, - "one_time_products": { - "$ref": "#/components/schemas/Metric" - }, - "one_time_products_revenue": { - "$ref": "#/components/schemas/Metric" - }, - "new_subscriptions": { - "$ref": "#/components/schemas/Metric" - }, - "new_subscriptions_revenue": { - "$ref": "#/components/schemas/Metric" - }, - "renewed_subscriptions": { - "$ref": "#/components/schemas/Metric" - }, - "renewed_subscriptions_revenue": { - "$ref": "#/components/schemas/Metric" - }, - "active_subscriptions": { - "$ref": "#/components/schemas/Metric" - }, - "monthly_recurring_revenue": { - "$ref": "#/components/schemas/Metric" - } - }, - "type": "object", - "required": [ - "orders", - "revenue", - "average_order_value", - "one_time_products", - "one_time_products_revenue", - "new_subscriptions", - "new_subscriptions_revenue", - "renewed_subscriptions", - "renewed_subscriptions_revenue", - "active_subscriptions", - "monthly_recurring_revenue" - ], - "title": "Metrics" - }, - "MetricsIntervalLimit": { - "properties": { - "max_days": { - "type": "integer", - "title": "Max Days", - "description": "Maximum number of days for this interval." - } - }, - "type": "object", - "required": [ - "max_days" - ], - "title": "MetricsIntervalLimit", - "description": "Date interval limit to get metrics for a given interval." - }, - "MetricsIntervalsLimits": { - "properties": { - "hour": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the hour interval." - }, - "day": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the day interval." - }, - "week": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the week interval." - }, - "month": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the month interval." - }, - "year": { - "$ref": "#/components/schemas/MetricsIntervalLimit", - "description": "Limits for the year interval." - } - }, - "type": "object", - "required": [ - "hour", - "day", - "week", - "month", - "year" - ], - "title": "MetricsIntervalsLimits", - "description": "Date interval limits to get metrics for each interval." - }, - "MetricsLimits": { - "properties": { - "min_date": { - "type": "string", - "format": "date", - "title": "Min Date", - "description": "Minimum date to get metrics." - }, - "intervals": { - "$ref": "#/components/schemas/MetricsIntervalsLimits", - "description": "Limits for each interval." - } - }, - "type": "object", - "required": [ - "min_date", - "intervals" - ], - "title": "MetricsLimits", - "description": "Date limits to get metrics." - }, - "MetricsResponse": { - "properties": { - "periods": { - "items": { - "$ref": "#/components/schemas/MetricPeriod" - }, - "type": "array", - "title": "Periods", - "description": "List of data for each timestamp." - }, - "metrics": { - "$ref": "#/components/schemas/Metrics", - "description": "Information about the returned metrics." - } - }, - "type": "object", - "required": [ - "periods", - "metrics" - ], - "title": "MetricsResponse", - "description": "Metrics response schema." - }, - "NotPermitted": { - "properties": { - "error": { - "type": "string", - "enum": [ - "NotPermitted" - ], - "const": "NotPermitted", - "title": "Error" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "error", - "detail" - ], - "title": "NotPermitted" - }, - "OAuth2Client": { - "properties": { - "redirect_uris": { - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "type": "array", - "title": "Redirect Uris" - }, - "token_endpoint_auth_method": { - "type": "string", - "enum": [ - "client_secret_basic", - "client_secret_post", - "none" - ], - "title": "Token Endpoint Auth Method", - "default": "client_secret_post" - }, - "grant_types": { - "items": { - "type": "string", - "enum": [ - "authorization_code", - "refresh_token" - ] - }, - "type": "array", - "title": "Grant Types", - "default": [ - "authorization_code", - "refresh_token" - ] - }, - "response_types": { - "items": { - "type": "string", - "enum": [ - "code" - ], - "const": "code" - }, - "type": "array", - "title": "Response Types", - "default": [ - "code" - ] - }, - "scope": { - "type": "string", - "title": "Scope", - "default": "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write" - }, - "client_name": { - "type": "string", - "title": "Client Name" - }, - "client_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Uri" - }, - "logo_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Uri" - }, - "tos_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Tos Uri" - }, - "policy_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Policy Uri" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "client_secret": { - "type": "string", - "title": "Client Secret" - }, - "client_id_issued_at": { - "type": "integer", - "title": "Client Id Issued At" - }, - "client_secret_expires_at": { - "type": "integer", - "title": "Client Secret Expires At" - } - }, - "type": "object", - "required": [ - "redirect_uris", - "client_name", - "created_at", - "modified_at", - "client_id", - "client_secret", - "client_id_issued_at", - "client_secret_expires_at" - ], - "title": "OAuth2Client" - }, - "OAuth2ClientConfiguration": { - "properties": { - "redirect_uris": { - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "type": "array", - "title": "Redirect Uris" - }, - "token_endpoint_auth_method": { - "type": "string", - "enum": [ - "client_secret_basic", - "client_secret_post", - "none" - ], - "title": "Token Endpoint Auth Method", - "default": "client_secret_post" - }, - "grant_types": { - "items": { - "type": "string", - "enum": [ - "authorization_code", - "refresh_token" - ] - }, - "type": "array", - "title": "Grant Types", - "default": [ - "authorization_code", - "refresh_token" - ] - }, - "response_types": { - "items": { - "type": "string", - "enum": [ - "code" - ], - "const": "code" - }, - "type": "array", - "title": "Response Types", - "default": [ - "code" - ] - }, - "scope": { - "type": "string", - "title": "Scope", - "default": "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write" - }, - "client_name": { - "type": "string", - "title": "Client Name" - }, - "client_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Uri" - }, - "logo_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Uri" - }, - "tos_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Tos Uri" - }, - "policy_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Policy Uri" - } - }, - "type": "object", - "required": [ - "redirect_uris", - "client_name" - ], - "title": "OAuth2ClientConfiguration" - }, - "OAuth2ClientConfigurationUpdate": { - "properties": { - "redirect_uris": { - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "type": "array", - "title": "Redirect Uris" - }, - "token_endpoint_auth_method": { - "type": "string", - "enum": [ - "client_secret_basic", - "client_secret_post", - "none" - ], - "title": "Token Endpoint Auth Method", - "default": "client_secret_post" - }, - "grant_types": { - "items": { - "type": "string", - "enum": [ - "authorization_code", - "refresh_token" - ] - }, - "type": "array", - "title": "Grant Types", - "default": [ - "authorization_code", - "refresh_token" - ] - }, - "response_types": { - "items": { - "type": "string", - "enum": [ - "code" - ], - "const": "code" - }, - "type": "array", - "title": "Response Types", - "default": [ - "code" - ] - }, - "scope": { - "type": "string", - "title": "Scope", - "default": "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write" - }, - "client_name": { - "type": "string", - "title": "Client Name" - }, - "client_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Uri" - }, - "logo_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Logo Uri" - }, - "tos_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Tos Uri" - }, - "policy_uri": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Policy Uri" - }, - "client_id": { - "type": "string", - "title": "Client Id" - } - }, - "type": "object", - "required": [ - "redirect_uris", - "client_name", - "client_id" - ], - "title": "OAuth2ClientConfigurationUpdate" - }, - "OAuth2ClientPublic": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "client_id": { - "type": "string", - "title": "Client Id" - }, - "client_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Name" - }, - "client_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Client Uri" - }, - "logo_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Logo Uri" - }, - "tos_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Tos Uri" - }, - "policy_uri": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Policy Uri" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "client_id", - "client_name", - "client_uri", - "logo_uri", - "tos_uri", - "policy_uri" - ], - "title": "OAuth2ClientPublic" - }, - "Order": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "amount": { - "type": "integer", - "title": "Amount" - }, - "tax_amount": { - "type": "integer", - "title": "Tax Amount" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "billing_reason": { - "$ref": "#/components/schemas/OrderBillingReason" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id" - }, - "product_price_id": { - "type": "string", - "format": "uuid4", - "title": "Product Price Id" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "subscription_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Subscription Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - }, - "customer": { - "$ref": "#/components/schemas/OrderCustomer" - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - }, - "user": { - "$ref": "#/components/schemas/OrderUser", - "deprecated": true - }, - "product": { - "$ref": "#/components/schemas/OrderProduct" - }, - "product_price": { - "$ref": "#/components/schemas/ProductPrice" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase" - } - ], - "title": "OrderDiscount" - }, - { - "type": "null" - } - ], - "title": "Discount" - }, - "subscription": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrderSubscription" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "amount", - "tax_amount", - "currency", - "billing_reason", - "billing_address", - "customer_id", - "product_id", - "product_price_id", - "discount_id", - "subscription_id", - "checkout_id", - "customer", - "user_id", - "user", - "product", - "product_price", - "discount", - "subscription" - ], - "title": "Order" - }, - "OrderBillingReason": { - "type": "string", - "enum": [ - "purchase", - "subscription_create", - "subscription_cycle", - "subscription_update" - ], - "title": "OrderBillingReason" - }, - "OrderCustomer": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "readOnly": true - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "organization_id", - "avatar_url" - ], - "title": "OrderCustomer" - }, - "OrderInvoice": { - "properties": { - "url": { - "type": "string", - "title": "Url", - "description": "The URL to the invoice." - } - }, - "type": "object", - "required": [ - "url" - ], - "title": "OrderInvoice", - "description": "Order's invoice data." - }, - "OrderProduct": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the product." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id" - ], - "title": "OrderProduct" - }, - "OrderSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "amount", - "-amount", - "customer", - "-customer", - "product", - "-product", - "discount", - "-discount", - "subscription", - "-subscription" - ], - "title": "OrderSortProperty" - }, - "OrderSubscription": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval" - }, - "status": { - "$ref": "#/components/schemas/SubscriptionStatus" - }, - "current_period_start": { - "type": "string", - "format": "date-time", - "title": "Current Period Start" - }, - "current_period_end": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Current Period End" - }, - "cancel_at_period_end": { - "type": "boolean", - "title": "Cancel At Period End" - }, - "started_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Started At" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id" - }, - "price_id": { - "type": "string", - "format": "uuid4", - "title": "Price Id" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - } - }, - "type": "object", - "required": [ - "metadata", - "created_at", - "modified_at", - "id", - "amount", - "currency", - "recurring_interval", - "status", - "current_period_start", - "current_period_end", - "cancel_at_period_end", - "started_at", - "ended_at", - "customer_id", - "product_id", - "price_id", - "discount_id", - "checkout_id", - "user_id" - ], - "title": "OrderSubscription" - }, - "OrderUser": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "email": { - "type": "string", - "title": "Email" - }, - "public_name": { - "type": "string", - "title": "Public Name" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "github_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Github Username" - } - }, - "type": "object", - "required": [ - "id", - "email", - "public_name" - ], - "title": "OrderUser" - }, - "Organization": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - "name": { - "type": "string", - "title": "Name" - }, - "slug": { - "type": "string", - "title": "Slug" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "bio": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Bio" - }, - "company": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Company" - }, - "blog": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Blog" - }, - "location": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Location" - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Email" - }, - "twitter_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Twitter Username" - }, - "pledge_minimum_amount": { - "type": "integer", - "title": "Pledge Minimum Amount" - }, - "pledge_badge_show_amount": { - "type": "boolean", - "title": "Pledge Badge Show Amount" - }, - "default_upfront_split_to_contributors": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Default Upfront Split To Contributors" - }, - "profile_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationProfileSettings" - }, - { - "type": "null" - } - ], - "description": "Settings for the organization profile" - }, - "feature_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationFeatureSettings" - }, - { - "type": "null" - } - ], - "description": "Settings for the organization features" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "slug", - "avatar_url", - "bio", - "company", - "blog", - "location", - "email", - "twitter_username", - "pledge_minimum_amount", - "pledge_badge_show_amount", - "default_upfront_split_to_contributors", - "profile_settings", - "feature_settings" - ], - "title": "Organization" - }, - "OrganizationAvatarFileCreate": { - "properties": { - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "mime_type": { - "type": "string", - "pattern": "^image\\/(jpeg|png|gif|webp|svg\\+xml)$", - "title": "Mime Type", - "description": "MIME type of the file. Only images are supported for this type of file." - }, - "size": { - "type": "integer", - "maximum": 1048576, - "title": "Size", - "description": "Size of the file. A maximum of 1 MB is allowed for this type of file." - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "upload": { - "$ref": "#/components/schemas/S3FileCreateMultipart" - }, - "service": { - "type": "string", - "enum": [ - "organization_avatar" - ], - "const": "organization_avatar", - "title": "Service" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - } - }, - "type": "object", - "required": [ - "name", - "mime_type", - "size", - "upload", - "service" - ], - "title": "OrganizationAvatarFileCreate", - "description": "Schema to create a file to be used as an organization avatar." - }, - "OrganizationAvatarFileRead": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "service": { - "type": "string", - "enum": [ - "organization_avatar" - ], - "const": "organization_avatar", - "title": "Service" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - }, - "public_url": { - "type": "string", - "title": "Public Url", - "readOnly": true - } - }, - "type": "object", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "version", - "service", - "is_uploaded", - "created_at", - "size_readable", - "public_url" - ], - "title": "OrganizationAvatarFileRead", - "description": "File to be used as an organization avatar." - }, - "OrganizationCreate": { - "properties": { - "name": { - "type": "string", - "minLength": 3, - "title": "Name" - }, - "slug": { - "type": "string", - "minLength": 3, - "title": "Slug" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "feature_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationFeatureSettings" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "name", - "slug" - ], - "title": "OrganizationCreate" - }, - "OrganizationFeatureSettings": { - "properties": { - "issue_funding_enabled": { - "type": "boolean", - "title": "Issue Funding Enabled", - "description": "If this organization has issue funding enabled", - "default": false - } - }, - "type": "object", - "title": "OrganizationFeatureSettings" - }, - "OrganizationProfileSettings": { - "properties": { - "enabled": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Enabled", - "description": "If this organization has a profile enabled" - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 160 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "A description of the organization" - }, - "featured_projects": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Featured Projects", - "description": "A list of featured projects" - }, - "featured_organizations": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Featured Organizations", - "description": "A list of featured organizations" - }, - "links": { - "anyOf": [ - { - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Links", - "description": "A list of links associated with the organization" - }, - "subscribe": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationSubscribePromoteSettings" - }, - { - "type": "null" - } - ], - "description": "Subscription promotion settings", - "default": { - "promote": true, - "show_count": true, - "count_free": true - } - }, - "accent_color": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Accent Color", - "description": "Accent color for the organization" - } - }, - "type": "object", - "title": "OrganizationProfileSettings" - }, - "OrganizationSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "name", - "-name" - ], - "title": "OrganizationSortProperty" - }, - "OrganizationSubscribePromoteSettings": { - "properties": { - "promote": { - "type": "boolean", - "title": "Promote", - "description": "Promote email subscription (free)", - "default": true - }, - "show_count": { - "type": "boolean", - "title": "Show Count", - "description": "Show subscription count publicly", - "default": true - }, - "count_free": { - "type": "boolean", - "title": "Count Free", - "description": "Include free subscribers in total count", - "default": true - } - }, - "type": "object", - "title": "OrganizationSubscribePromoteSettings" - }, - "OrganizationUpdate": { - "properties": { - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 3 - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "default_upfront_split_to_contributors": { - "anyOf": [ - { - "type": "integer", - "maximum": 100, - "minimum": 0 - }, - { - "type": "null" - } - ], - "title": "Default Upfront Split To Contributors" - }, - "pledge_badge_show_amount": { - "type": "boolean", - "title": "Pledge Badge Show Amount", - "default": false - }, - "billing_email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Billing Email" - }, - "default_badge_custom_content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Default Badge Custom Content" - }, - "pledge_minimum_amount": { - "type": "integer", - "title": "Pledge Minimum Amount", - "default": 2000 - }, - "total_monthly_spending_limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Monthly Spending Limit" - }, - "per_user_monthly_spending_limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Per User Monthly Spending Limit" - }, - "profile_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationProfileSettings" - }, - { - "type": "null" - } - ] - }, - "feature_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/OrganizationFeatureSettings" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "OrganizationUpdate" - }, - "Pagination": { - "properties": { - "total_count": { - "type": "integer", - "title": "Total Count" - }, - "max_page": { - "type": "integer", - "title": "Max Page" - } - }, - "type": "object", - "required": [ - "total_count", - "max_page" - ], - "title": "Pagination" - }, - "PaymentProcessor": { - "type": "string", - "enum": [ - "stripe" - ], - "const": "stripe", - "title": "PaymentProcessor" - }, - "Platforms": { - "type": "string", - "enum": [ - "github" - ], - "const": "github", - "title": "Platforms" - }, - "Pledge": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "amount": { - "type": "integer", - "title": "Amount", - "description": "Amount pledged towards the issue" - }, - "currency": { - "type": "string", - "title": "Currency" - }, - "state": { - "$ref": "#/components/schemas/PledgeState", - "description": "Current state of the pledge" - }, - "type": { - "$ref": "#/components/schemas/PledgeType", - "description": "Type of pledge" - }, - "refunded_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Refunded At", - "description": "If and when the pledge was refunded to the pledger" - }, - "scheduled_payout_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Scheduled Payout At", - "description": "When the payout is scheduled to be made to the maintainers behind the issue. Disputes must be made before this date." - }, - "issue": { - "$ref": "#/components/schemas/Issue", - "description": "The issue that the pledge was made towards" - }, - "pledger": { - "anyOf": [ - { - "$ref": "#/components/schemas/Pledger" - }, - { - "type": "null" - } - ], - "description": "The user or organization that made this pledge" - }, - "hosted_invoice_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Hosted Invoice Url", - "description": "URL of invoice for this pledge" - }, - "authed_can_admin_sender": { - "type": "boolean", - "title": "Authed Can Admin Sender", - "description": "If the currently authenticated subject can perform admin actions on behalf of the maker of the peldge", - "default": false - }, - "authed_can_admin_received": { - "type": "boolean", - "title": "Authed Can Admin Received", - "description": "If the currently authenticated subject can perform admin actions on behalf of the receiver of the peldge", - "default": false - }, - "created_by": { - "anyOf": [ - { - "$ref": "#/components/schemas/Pledger" - }, - { - "type": "null" - } - ], - "description": "For pledges made by an organization, or on behalf of an organization. This is the user that made the pledge. Only visible for members of said organization." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "currency", - "state", - "type", - "issue" - ], - "title": "Pledge" - }, - "PledgeState": { - "type": "string", - "enum": [ - "initiated", - "created", - "pending", - "refunded", - "disputed", - "charge_disputed", - "cancelled" - ], - "title": "PledgeState" - }, - "PledgeType": { - "type": "string", - "enum": [ - "pay_upfront", - "pay_on_completion", - "pay_directly" - ], - "title": "PledgeType" - }, - "Pledger": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "github_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Github Username" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - } - }, - "type": "object", - "required": [ - "name", - "github_username", - "avatar_url" - ], - "title": "Pledger" - }, - "Product": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the product." - }, - "name": { - "type": "string", - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_recurring": { - "type": "boolean", - "title": "Is Recurring", - "description": "Whether the product is a subscription tier." - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the product is archived and no longer available." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id", - "description": "The ID of the organization owning the product." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "prices": { - "items": { - "$ref": "#/components/schemas/ProductPrice" - }, - "type": "array", - "title": "Prices", - "description": "List of prices for this product." - }, - "benefits": { - "items": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - }, - "type": "array", - "title": "Benefits", - "description": "List of benefits granted by the product." - }, - "medias": { - "items": { - "$ref": "#/components/schemas/ProductMediaFileRead" - }, - "type": "array", - "title": "Medias", - "description": "List of medias associated to the product." - }, - "attached_custom_fields": { - "items": { - "$ref": "#/components/schemas/AttachedCustomField" - }, - "type": "array", - "title": "Attached Custom Fields", - "description": "List of custom fields attached to the product." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "name", - "description", - "is_recurring", - "is_archived", - "organization_id", - "metadata", - "prices", - "benefits", - "medias", - "attached_custom_fields" - ], - "title": "Product", - "description": "A product." - }, - "ProductBenefitsUpdate": { - "properties": { - "benefits": { - "items": { - "type": "string", - "format": "uuid4", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - "type": "array", - "title": "Benefits", - "description": "List of benefit IDs. Each one must be on the same organization as the product." - } - }, - "type": "object", - "required": [ - "benefits" - ], - "title": "ProductBenefitsUpdate", - "description": "Schema to update the benefits granted by a product." - }, - "ProductCreate": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductRecurringCreate" - }, - { - "$ref": "#/components/schemas/ProductOneTimeCreate" - } - ] - }, - "ProductMediaFileCreate": { - "properties": { - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "mime_type": { - "type": "string", - "pattern": "^image\\/(jpeg|png|gif|webp|svg\\+xml)$", - "title": "Mime Type", - "description": "MIME type of the file. Only images are supported for this type of file." - }, - "size": { - "type": "integer", - "maximum": 10485760, - "title": "Size", - "description": "Size of the file. A maximum of 10 MB is allowed for this type of file." - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "upload": { - "$ref": "#/components/schemas/S3FileCreateMultipart" - }, - "service": { - "type": "string", - "enum": [ - "product_media" - ], - "const": "product_media", - "title": "Service" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - } - }, - "type": "object", - "required": [ - "name", - "mime_type", - "size", - "upload", - "service" - ], - "title": "ProductMediaFileCreate", - "description": "Schema to create a file to be used as a product media file." - }, - "ProductMediaFileRead": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "path": { - "type": "string", - "title": "Path" - }, - "mime_type": { - "type": "string", - "title": "Mime Type" - }, - "size": { - "type": "integer", - "title": "Size" - }, - "storage_version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Storage Version" - }, - "checksum_etag": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "checksum_sha256_hex": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Hex" - }, - "last_modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Modified At" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version" - }, - "service": { - "type": "string", - "enum": [ - "product_media" - ], - "const": "product_media", - "title": "Service" - }, - "is_uploaded": { - "type": "boolean", - "title": "Is Uploaded" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "size_readable": { - "type": "string", - "title": "Size Readable", - "readOnly": true - }, - "public_url": { - "type": "string", - "title": "Public Url", - "readOnly": true - } - }, - "type": "object", - "required": [ - "id", - "organization_id", - "name", - "path", - "mime_type", - "size", - "storage_version", - "checksum_etag", - "checksum_sha256_base64", - "checksum_sha256_hex", - "last_modified_at", - "version", - "service", - "is_uploaded", - "created_at", - "size_readable", - "public_url" - ], - "title": "ProductMediaFileRead", - "description": "File to be used as a product media file." - }, - "ProductOneTimeCreate": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "minLength": 3, - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "prices": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/ProductPriceOneTimeFixedCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeCustomCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeFreeCreate" - } - ] - }, - "type": "array", - "maxItems": 1, - "minItems": 1, - "title": "ProductPriceOneTimeCreate", - "description": "List of available prices for this product." - }, - "medias": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Medias", - "description": "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded." - }, - "attached_custom_fields": { - "items": { - "$ref": "#/components/schemas/AttachedCustomFieldCreate" - }, - "type": "array", - "title": "Attached Custom Fields", - "description": "List of custom fields to attach." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the product. **Required unless you use an organization token.**" - } - }, - "type": "object", - "required": [ - "name", - "prices" - ], - "title": "ProductOneTimeCreate", - "description": "Schema to create a one-time product." - }, - "ProductPrice": { - "oneOf": [ - { - "$ref": "#/components/schemas/ProductPriceRecurring" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTime" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "one_time": "#/components/schemas/ProductPriceOneTime", - "recurring": "#/components/schemas/ProductPriceRecurring" - } - } - }, - "ProductPriceOneTime": { - "oneOf": [ - { - "$ref": "#/components/schemas/ProductPriceOneTimeFixed" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeCustom" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeFree" - } - ], - "discriminator": { - "propertyName": "amount_type", - "mapping": { - "custom": "#/components/schemas/ProductPriceOneTimeCustom", - "fixed": "#/components/schemas/ProductPriceOneTimeFixed", - "free": "#/components/schemas/ProductPriceOneTimeFree" - } - } - }, - "ProductPriceOneTimeCustom": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "enum": [ - "custom" - ], - "const": "custom", - "title": "Amount Type" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "The ID of the product owning the price." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "description": "The currency." - }, - "minimum_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Minimum Amount", - "description": "The minimum amount the customer can pay." - }, - "maximum_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Maximum Amount", - "description": "The maximum amount the customer can pay." - }, - "preset_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Preset Amount", - "description": "The initial amount shown to the customer." - }, - "type": { - "type": "string", - "enum": [ - "one_time" - ], - "const": "one_time", - "title": "Type", - "description": "The type of the price." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "price_currency", - "minimum_amount", - "maximum_amount", - "preset_amount", - "type" - ], - "title": "ProductPriceOneTimeCustom", - "description": "A pay-what-you-want price for a one-time product." - }, - "ProductPriceOneTimeCustomCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "one_time" - ], - "const": "one_time", - "title": "Type" - }, - "amount_type": { - "type": "string", - "enum": [ - "custom" - ], - "const": "custom", - "title": "Amount Type" - }, - "price_currency": { - "type": "string", - "pattern": "usd", - "title": "Price Currency", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - "minimum_amount": { - "anyOf": [ - { - "type": "integer", - "maximum": 99999999, - "minimum": 50, - "description": "The price in cents." - }, - { - "type": "null" - } - ], - "title": "Minimum Amount", - "description": "The minimum amount the customer can pay." - }, - "maximum_amount": { - "anyOf": [ - { - "type": "integer", - "maximum": 99999999, - "minimum": 50, - "description": "The price in cents." - }, - { - "type": "null" - } - ], - "title": "Maximum Amount", - "description": "The maximum amount the customer can pay." - }, - "preset_amount": { - "anyOf": [ - { - "type": "integer", - "maximum": 99999999, - "minimum": 50, - "description": "The price in cents." - }, - { - "type": "null" - } - ], - "title": "Preset Amount", - "description": "The initial amount shown to the customer." - } - }, - "type": "object", - "required": [ - "type", - "amount_type" - ], - "title": "ProductPriceOneTimeCustomCreate", - "description": "Schema to create a pay-what-you-want price for a one-time product." - }, - "ProductPriceOneTimeFixed": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "enum": [ - "fixed" - ], - "const": "fixed", - "title": "Amount Type" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "The ID of the product owning the price." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "description": "The currency." - }, - "price_amount": { - "type": "integer", - "title": "Price Amount", - "description": "The price in cents." - }, - "type": { - "type": "string", - "enum": [ - "one_time" - ], - "const": "one_time", - "title": "Type", - "description": "The type of the price." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "price_currency", - "price_amount", - "type" - ], - "title": "ProductPriceOneTimeFixed", - "description": "A one-time price for a product." - }, - "ProductPriceOneTimeFixedCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "one_time" - ], - "const": "one_time", - "title": "Type" - }, - "amount_type": { - "type": "string", - "enum": [ - "fixed" - ], - "const": "fixed", - "title": "Amount Type" - }, - "price_amount": { - "type": "integer", - "maximum": 99999999, - "minimum": 50, - "title": "Price Amount", - "description": "The price in cents." - }, - "price_currency": { - "type": "string", - "pattern": "usd", - "title": "Price Currency", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - } - }, - "type": "object", - "required": [ - "type", - "amount_type", - "price_amount" - ], - "title": "ProductPriceOneTimeFixedCreate", - "description": "Schema to create a one-time product price." - }, - "ProductPriceOneTimeFree": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "enum": [ - "free" - ], - "const": "free", - "title": "Amount Type" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "The ID of the product owning the price." - }, - "type": { - "type": "string", - "enum": [ - "one_time" - ], - "const": "one_time", - "title": "Type", - "description": "The type of the price." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "type" - ], - "title": "ProductPriceOneTimeFree", - "description": "A free one-time price for a product." - }, - "ProductPriceOneTimeFreeCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "one_time" - ], - "const": "one_time", - "title": "Type" - }, - "amount_type": { - "type": "string", - "enum": [ - "free" - ], - "const": "free", - "title": "Amount Type" - } - }, - "type": "object", - "required": [ - "type", - "amount_type" - ], - "title": "ProductPriceOneTimeFreeCreate", - "description": "Schema to create a free one-time product price." - }, - "ProductPriceRecurring": { - "oneOf": [ - { - "$ref": "#/components/schemas/ProductPriceRecurringFixed" - }, - { - "$ref": "#/components/schemas/ProductPriceRecurringCustom" - }, - { - "$ref": "#/components/schemas/ProductPriceRecurringFree" - } - ], - "discriminator": { - "propertyName": "amount_type", - "mapping": { - "custom": "#/components/schemas/ProductPriceRecurringCustom", - "fixed": "#/components/schemas/ProductPriceRecurringFixed", - "free": "#/components/schemas/ProductPriceRecurringFree" - } - } - }, - "ProductPriceRecurringCustom": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "enum": [ - "custom" - ], - "const": "custom", - "title": "Amount Type" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "The ID of the product owning the price." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "description": "The currency." - }, - "minimum_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Minimum Amount", - "description": "The minimum amount the customer can pay." - }, - "maximum_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Maximum Amount", - "description": "The maximum amount the customer can pay." - }, - "preset_amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Preset Amount", - "description": "The initial amount shown to the customer." - }, - "type": { - "type": "string", - "enum": [ - "recurring" - ], - "const": "recurring", - "title": "Type", - "description": "The type of the price." - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "price_currency", - "minimum_amount", - "maximum_amount", - "preset_amount", - "type", - "recurring_interval" - ], - "title": "ProductPriceRecurringCustom", - "description": "A pay-what-you-want recurring price for a product, i.e. a subscription." - }, - "ProductPriceRecurringFixed": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "enum": [ - "fixed" - ], - "const": "fixed", - "title": "Amount Type" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "The ID of the product owning the price." - }, - "price_currency": { - "type": "string", - "title": "Price Currency", - "description": "The currency." - }, - "price_amount": { - "type": "integer", - "title": "Price Amount", - "description": "The price in cents." - }, - "type": { - "type": "string", - "enum": [ - "recurring" - ], - "const": "recurring", - "title": "Type", - "description": "The type of the price." - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "price_currency", - "price_amount", - "type", - "recurring_interval" - ], - "title": "ProductPriceRecurringFixed", - "description": "A recurring price for a product, i.e. a subscription." - }, - "ProductPriceRecurringFixedCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "recurring" - ], - "const": "recurring", - "title": "Type" - }, - "amount_type": { - "type": "string", - "enum": [ - "fixed" - ], - "const": "fixed", - "title": "Amount Type" - }, - "price_amount": { - "type": "integer", - "maximum": 99999999, - "minimum": 50, - "title": "Price Amount", - "description": "The price in cents." - }, - "price_currency": { - "type": "string", - "pattern": "usd", - "title": "Price Currency", - "description": "The currency. Currently, only `usd` is supported.", - "default": "usd" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "type": "object", - "required": [ - "type", - "amount_type", - "price_amount", - "recurring_interval" - ], - "title": "ProductPriceRecurringFixedCreate", - "description": "Schema to create a recurring product price, i.e. a subscription." - }, - "ProductPriceRecurringFree": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the price." - }, - "amount_type": { - "type": "string", - "enum": [ - "free" - ], - "const": "free", - "title": "Amount Type" - }, - "is_archived": { - "type": "boolean", - "title": "Is Archived", - "description": "Whether the price is archived and no longer available." - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id", - "description": "The ID of the product owning the price." - }, - "type": { - "type": "string", - "enum": [ - "recurring" - ], - "const": "recurring", - "title": "Type", - "description": "The type of the price." - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount_type", - "is_archived", - "product_id", - "type", - "recurring_interval" - ], - "title": "ProductPriceRecurringFree", - "description": "A free recurring price for a product, i.e. a subscription." - }, - "ProductPriceRecurringFreeCreate": { - "properties": { - "type": { - "type": "string", - "enum": [ - "recurring" - ], - "const": "recurring", - "title": "Type" - }, - "amount_type": { - "type": "string", - "enum": [ - "free" - ], - "const": "free", - "title": "Amount Type" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval", - "description": "The recurring interval of the price." - } - }, - "type": "object", - "required": [ - "type", - "amount_type", - "recurring_interval" - ], - "title": "ProductPriceRecurringFreeCreate", - "description": "Schema to create a free recurring product price, i.e. a subscription." - }, - "ProductPriceType": { - "type": "string", - "enum": [ - "one_time", - "recurring" - ], - "title": "ProductPriceType" - }, - "ProductRecurringCreate": { - "properties": { - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "title": "Metadata", - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - "name": { - "type": "string", - "minLength": 3, - "title": "Name", - "description": "The name of the product." - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "prices": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/ProductPriceRecurringFixedCreate" - }, - "type": "array", - "maxItems": 2, - "minItems": 1, - "title": "ProductPriceRecurringFixedCreate", - "description": "List of recurring prices. Only one price per interval (one monthly and one yearly) is allowed." - }, - { - "items": { - "$ref": "#/components/schemas/ProductPriceRecurringFreeCreate" - }, - "type": "array", - "maxItems": 1, - "minItems": 1, - "title": "ProductPriceRecurringFreeCreate", - "description": "List with a single free recurring price." - } - ], - "title": "Prices", - "description": "List of available prices for this product." - }, - "medias": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Medias", - "description": "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded." - }, - "attached_custom_fields": { - "items": { - "$ref": "#/components/schemas/AttachedCustomFieldCreate" - }, - "type": "array", - "title": "Attached Custom Fields", - "description": "List of custom fields to attach." - }, - "organization_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4", - "description": "The organization ID.", - "x-polar-selector-widget": { - "displayProperty": "name", - "resourceName": "Organization", - "resourceRoot": "/v1/organizations" - } - }, - { - "type": "null" - } - ], - "title": "Organization Id", - "description": "The ID of the organization owning the product. **Required unless you use an organization token.**" - } - }, - "type": "object", - "required": [ - "name", - "prices" - ], - "title": "ProductRecurringCreate", - "description": "Schema to create a recurring product, i.e. a subscription." - }, - "ProductSortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "name", - "-name", - "price_type", - "-price_type", - "price_amount_type", - "-price_amount_type", - "price_amount", - "-price_amount" - ], - "title": "ProductSortProperty" - }, - "ProductUpdate": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "maxProperties": 50, - "description": "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "name": { - "anyOf": [ - { - "type": "string", - "minLength": 3, - "description": "The name of the product." - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "The description of the product." - }, - "is_archived": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Is Archived", - "description": "Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally." - }, - "prices": { - "anyOf": [ - { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/ExistingProductPrice" - }, - { - "$ref": "#/components/schemas/ProductPriceRecurringFixedCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceRecurringFreeCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeFixedCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeCustomCreate" - }, - { - "$ref": "#/components/schemas/ProductPriceOneTimeFreeCreate" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Prices", - "description": "List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object." - }, - "medias": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Medias", - "description": "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded." - }, - "attached_custom_fields": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/AttachedCustomFieldCreate" - }, - "type": "array", - "description": "List of custom fields to attach." - }, - { - "type": "null" - } - ], - "title": "Attached Custom Fields" - } - }, - "type": "object", - "title": "ProductUpdate", - "description": "Schema to update a product." - }, - "Reactions": { - "properties": { - "total_count": { - "type": "integer", - "title": "Total Count" - }, - "plus_one": { - "type": "integer", - "title": "Plus One" - }, - "minus_one": { - "type": "integer", - "title": "Minus One" - }, - "laugh": { - "type": "integer", - "title": "Laugh" - }, - "hooray": { - "type": "integer", - "title": "Hooray" - }, - "confused": { - "type": "integer", - "title": "Confused" - }, - "heart": { - "type": "integer", - "title": "Heart" - }, - "rocket": { - "type": "integer", - "title": "Rocket" - }, - "eyes": { - "type": "integer", - "title": "Eyes" - } - }, - "type": "object", - "required": [ - "total_count", - "plus_one", - "minus_one", - "laugh", - "hooray", - "confused", - "heart", - "rocket", - "eyes" - ], - "title": "Reactions" - }, - "Repository": { - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Id" - }, - "platform": { - "$ref": "#/components/schemas/Platforms" - }, - "is_private": { - "type": "boolean", - "title": "Is Private" - }, - "name": { - "type": "string", - "title": "Name", - "examples": [ - "MyOrg" - ] - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "stars": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Stars", - "examples": [ - 1337 - ] - }, - "license": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "License" - }, - "homepage": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Homepage" - }, - "profile_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/RepositoryProfileSettings" - }, - { - "type": "null" - } - ], - "description": "Settings for the repository profile" - }, - "organization": { - "$ref": "#/components/schemas/ExternalOrganization" - }, - "internal_organization": { - "anyOf": [ - { - "$ref": "#/components/schemas/Organization" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "id", - "platform", - "is_private", - "name", - "description", - "stars", - "license", - "homepage", - "profile_settings", - "organization", - "internal_organization" - ], - "title": "Repository" - }, - "RepositoryProfileSettings": { - "properties": { - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 240 - }, - { - "type": "null" - } - ], - "title": "Description", - "description": "A description of the repository" - }, - "cover_image_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cover Image Url", - "description": "A URL to a cover image" - }, - "featured_organizations": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Featured Organizations", - "description": "A list of featured organizations" - }, - "highlighted_subscription_tiers": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Highlighted Subscription Tiers", - "description": "A list of highlighted subscription tiers" - }, - "links": { - "anyOf": [ - { - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Links", - "description": "A list of links related to the repository" - } - }, - "type": "object", - "title": "RepositoryProfileSettings" - }, - "RepositoryProfileSettingsUpdate": { - "properties": { - "set_description": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Set Description" - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 240 - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "set_cover_image_url": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Set Cover Image Url" - }, - "cover_image_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cover Image Url" - }, - "featured_organizations": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Featured Organizations" - }, - "highlighted_subscription_tiers": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "uuid4" - }, - "type": "array", - "maxItems": 3 - }, - { - "type": "null" - } - ], - "title": "Highlighted Subscription Tiers" - }, - "links": { - "anyOf": [ - { - "items": { - "type": "string", - "maxLength": 2083, - "minLength": 1, - "format": "uri" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Links" - } - }, - "type": "object", - "title": "RepositoryProfileSettingsUpdate" - }, - "RepositorySortProperty": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "name", - "-name", - "stars", - "-stars" - ], - "title": "RepositorySortProperty" - }, - "RepositoryUpdate": { - "properties": { - "profile_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/RepositoryProfileSettingsUpdate" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "RepositoryUpdate" - }, - "ResourceNotFound": { - "properties": { - "error": { - "type": "string", - "enum": [ - "ResourceNotFound" - ], - "const": "ResourceNotFound", - "title": "Error" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "error", - "detail" - ], - "title": "ResourceNotFound" - }, - "RevokeTokenResponse": { - "properties": {}, - "type": "object", - "title": "RevokeTokenResponse" - }, - "S3DownloadURL": { - "properties": { - "url": { - "type": "string", - "title": "Url" - }, - "headers": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Headers", - "default": {} - }, - "expires_at": { - "type": "string", - "format": "date-time", - "title": "Expires At" - } - }, - "type": "object", - "required": [ - "url", - "expires_at" - ], - "title": "S3DownloadURL" - }, - "S3FileCreateMultipart": { - "properties": { - "parts": { - "items": { - "$ref": "#/components/schemas/S3FileCreatePart" - }, - "type": "array", - "title": "Parts" - } - }, - "type": "object", - "required": [ - "parts" - ], - "title": "S3FileCreateMultipart" - }, - "S3FileCreatePart": { - "properties": { - "number": { - "type": "integer", - "title": "Number" - }, - "chunk_start": { - "type": "integer", - "title": "Chunk Start" - }, - "chunk_end": { - "type": "integer", - "title": "Chunk End" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - } - }, - "type": "object", - "required": [ - "number", - "chunk_start", - "chunk_end" - ], - "title": "S3FileCreatePart" - }, - "S3FileUploadCompletedPart": { - "properties": { - "number": { - "type": "integer", - "title": "Number" - }, - "checksum_etag": { - "type": "string", - "title": "Checksum Etag" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - } - }, - "type": "object", - "required": [ - "number", - "checksum_etag", - "checksum_sha256_base64" - ], - "title": "S3FileUploadCompletedPart" - }, - "S3FileUploadMultipart": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "path": { - "type": "string", - "title": "Path" - }, - "parts": { - "items": { - "$ref": "#/components/schemas/S3FileUploadPart" - }, - "type": "array", - "title": "Parts" - } - }, - "type": "object", - "required": [ - "id", - "path", - "parts" - ], - "title": "S3FileUploadMultipart" - }, - "S3FileUploadPart": { - "properties": { - "number": { - "type": "integer", - "title": "Number" - }, - "chunk_start": { - "type": "integer", - "title": "Chunk Start" - }, - "chunk_end": { - "type": "integer", - "title": "Chunk End" - }, - "checksum_sha256_base64": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Checksum Sha256 Base64" - }, - "url": { - "type": "string", - "title": "Url" - }, - "expires_at": { - "type": "string", - "format": "date-time", - "title": "Expires At" - }, - "headers": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Headers", - "default": {} - } - }, - "type": "object", - "required": [ - "number", - "chunk_start", - "chunk_end", - "url", - "expires_at" - ], - "title": "S3FileUploadPart" - }, - "Scope": { - "type": "string", - "enum": [ - "openid", - "profile", - "email", - "user:read", - "admin", - "web_default", - "organizations:read", - "organizations:write", - "custom_fields:read", - "custom_fields:write", - "discounts:read", - "discounts:write", - "checkout_links:read", - "checkout_links:write", - "checkouts:read", - "checkouts:write", - "products:read", - "products:write", - "benefits:read", - "benefits:write", - "files:read", - "files:write", - "subscriptions:read", - "subscriptions:write", - "customers:read", - "customers:write", - "customer_sessions:write", - "orders:read", - "metrics:read", - "webhooks:read", - "webhooks:write", - "external_organizations:read", - "license_keys:read", - "license_keys:write", - "repositories:read", - "repositories:write", - "issues:read", - "issues:write", - "customer_portal:read", - "customer_portal:write" - ], - "title": "Scope", - "enumNames": { - "benefits:read": "Read benefits", - "benefits:write": "Create or modify benefits", - "checkout_links:read": "Read checkout links", - "checkout_links:write": "Create or modify checkout links", - "checkouts:read": "Read checkout sessions", - "checkouts:write": "Create or modify checkout sessions", - "custom_fields:read": "Read custom fields", - "custom_fields:write": "Create or modify custom fields", - "customer_portal:read": "Read your orders, subscriptions and benefits", - "customer_portal:write": "Create or modify your orders, subscriptions and benefits", - "customers:read": "Read customers", - "customers:write": "Create or modify customers", - "discounts:read": "Read discounts", - "discounts:write": "Create or modify discounts", - "email": "Read your email address", - "files:read": "Read file uploads", - "files:write": "Create or modify file uploads", - "license_keys:read": "Read license keys", - "license_keys:write": "Modify license keys", - "metrics:read": "Read metrics", - "openid": "OpenID", - "orders:read": "Read orders made on your organizations", - "organizations:read": "Read your organizations", - "organizations:write": "Create or modify organizations", - "products:read": "Read products", - "products:write": "Create or modify products", - "profile": "Read your profile", - "subscriptions:read": "Read subscriptions made on your organizations", - "subscriptions:write": "Create or modify subscriptions made on your organizations", - "user:read": "User Read", - "web_default": "Web Default", - "webhooks:read": "Read webhooks", - "webhooks:write": "Create or modify webhooks" - } - }, - "State": { - "type": "string", - "enum": [ - "open", - "closed" - ], - "title": "State" - }, - "SubType": { - "type": "string", - "enum": [ - "user", - "organization" - ], - "title": "SubType" - }, - "Subscription": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "amount": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Amount" - }, - "currency": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Currency" - }, - "recurring_interval": { - "$ref": "#/components/schemas/SubscriptionRecurringInterval" - }, - "status": { - "$ref": "#/components/schemas/SubscriptionStatus" - }, - "current_period_start": { - "type": "string", - "format": "date-time", - "title": "Current Period Start" - }, - "current_period_end": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Current Period End" - }, - "cancel_at_period_end": { - "type": "boolean", - "title": "Cancel At Period End" - }, - "started_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Started At" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "product_id": { - "type": "string", - "format": "uuid4", - "title": "Product Id" - }, - "price_id": { - "type": "string", - "format": "uuid4", - "title": "Price Id" - }, - "discount_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Discount Id" - }, - "checkout_id": { - "anyOf": [ - { - "type": "string", - "format": "uuid4" - }, - { - "type": "null" - } - ], - "title": "Checkout Id" - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "custom_field_data": { - "type": "object", - "title": "Custom Field Data", - "description": "Key-value object storing custom field values." - }, - "customer": { - "$ref": "#/components/schemas/SubscriptionCustomer" - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - }, - "user": { - "$ref": "#/components/schemas/SubscriptionUser", - "deprecated": true - }, - "product": { - "$ref": "#/components/schemas/Product" - }, - "price": { - "$ref": "#/components/schemas/ProductPriceRecurring" - }, - "discount": { - "anyOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountFixedRepeatDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase" - }, - { - "$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase" - } - ], - "title": "SubscriptionDiscount" - }, - { - "type": "null" - } - ], - "title": "Discount" - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "amount", - "currency", - "recurring_interval", - "status", - "current_period_start", - "current_period_end", - "cancel_at_period_end", - "started_at", - "ended_at", - "customer_id", - "product_id", - "price_id", - "discount_id", - "checkout_id", - "metadata", - "customer", - "user_id", - "user", - "product", - "price", - "discount" - ], - "title": "Subscription" - }, - "SubscriptionCustomer": { - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At", - "description": "Creation timestamp of the object." - }, - "modified_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Modified At", - "description": "Last modification timestamp of the object." - }, - "id": { - "type": "string", - "format": "uuid4", - "title": "Id", - "description": "The ID of the object." - }, - "metadata": { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "boolean" - } - ] - }, - "type": "object", - "title": "Metadata" - }, - "email": { - "type": "string", - "title": "Email" - }, - "email_verified": { - "type": "boolean", - "title": "Email Verified" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "billing_address": { - "anyOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "type": "null" - } - ] - }, - "tax_id": { - "anyOf": [ - { - "prefixItems": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TaxIDFormat" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2 - }, - { - "type": "null" - } - ], - "title": "Tax Id" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "avatar_url": { - "type": "string", - "title": "Avatar Url", - "readOnly": true - } - }, - "type": "object", - "required": [ - "created_at", - "modified_at", - "id", - "metadata", - "email", - "email_verified", - "name", - "billing_address", - "tax_id", - "organization_id", - "avatar_url" - ], - "title": "SubscriptionCustomer" - }, - "SubscriptionRecurringInterval": { - "type": "string", - "enum": [ - "month", - "year" - ], - "title": "SubscriptionRecurringInterval" - }, - "SubscriptionSortProperty": { - "type": "string", - "enum": [ - "customer", - "-customer", - "status", - "-status", - "started_at", - "-started_at", - "current_period_end", - "-current_period_end", - "amount", - "-amount", - "product", - "-product", - "discount", - "-discount" - ], - "title": "SubscriptionSortProperty" - }, - "SubscriptionStatus": { - "type": "string", - "enum": [ - "incomplete", - "incomplete_expired", - "trialing", - "active", - "past_due", - "canceled", - "unpaid" - ], - "title": "SubscriptionStatus" - }, - "SubscriptionUser": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "email": { - "type": "string", - "title": "Email" - }, - "public_name": { - "type": "string", - "title": "Public Name" - }, - "avatar_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Avatar Url" - }, - "github_username": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Github Username" - } - }, - "type": "object", - "required": [ - "id", - "email", - "public_name" - ], - "title": "SubscriptionUser" - }, - "TaxIDFormat": { - "type": "string", - "enum": [ - "ad_nrt", - "ae_trn", - "ar_cuit", - "au_abn", - "au_arn", - "bg_uic", - "bh_vat", - "bo_tin", - "br_cnpj", - "br_cpf", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "ch_uid", - "ch_vat", - "cl_tin", - "cn_tin", - "co_nit", - "cr_tin", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kr_brn", - "kz_bin", - "li_uid", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sv_nit", - "th_vat", - "tr_tin", - "tw_vat", - "ua_vat", - "us_ein", - "uy_ruc", - "ve_rif", - "vn_tin", - "za_vat" - ], - "title": "TaxIDFormat", - "description": "List of supported tax ID formats.\n\nRef: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id" - }, - "TokenResponse": { - "properties": { - "access_token": { - "type": "string", - "title": "Access Token" - }, - "token_type": { - "type": "string", - "enum": [ - "Bearer" - ], - "const": "Bearer", - "title": "Token Type" - }, - "expires_in": { - "type": "integer", - "title": "Expires In" - }, - "refresh_token": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Refresh Token" - }, - "scope": { - "type": "string", - "title": "Scope" - }, - "id_token": { - "type": "string", - "title": "Id Token" - } - }, - "type": "object", - "required": [ - "access_token", - "token_type", - "expires_in", - "refresh_token", - "scope", - "id_token" - ], - "title": "TokenResponse" - }, - "Unauthorized": { - "properties": { - "error": { - "type": "string", - "enum": [ - "Unauthorized" - ], - "const": "Unauthorized", - "title": "Error" - }, - "detail": { - "type": "string", - "title": "Detail" - } - }, - "type": "object", - "required": [ - "error", - "detail" - ], - "title": "Unauthorized" - }, - "UserInfoOrganization": { - "properties": { - "sub": { - "type": "string", - "title": "Sub" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - } - }, - "type": "object", - "required": [ - "sub" - ], - "title": "UserInfoOrganization" - }, - "UserInfoUser": { - "properties": { - "sub": { - "type": "string", - "title": "Sub" - }, - "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Name" - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Email" - }, - "email_verified": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Email Verified" - } - }, - "type": "object", - "required": [ - "sub" - ], - "title": "UserInfoUser" - }, - "ValidatedLicenseKey": { - "properties": { - "id": { - "type": "string", - "format": "uuid4", - "title": "Id" - }, - "organization_id": { - "type": "string", - "format": "uuid4", - "title": "Organization Id" - }, - "user_id": { - "type": "string", - "format": "uuid4", - "title": "User Id", - "deprecated": true - }, - "customer_id": { - "type": "string", - "format": "uuid4", - "title": "Customer Id" - }, - "user": { - "$ref": "#/components/schemas/LicenseKeyUser", - "deprecated": true - }, - "customer": { - "$ref": "#/components/schemas/LicenseKeyCustomer" - }, - "benefit_id": { - "type": "string", - "format": "uuid4", - "title": "Benefit Id", - "description": "The benefit ID.", - "x-polar-selector-widget": { - "displayProperty": "description", - "resourceName": "Benefit", - "resourceRoot": "/v1/benefits" - } - }, - "key": { - "type": "string", - "title": "Key" - }, - "display_key": { - "type": "string", - "title": "Display Key" - }, - "status": { - "$ref": "#/components/schemas/LicenseKeyStatus" - }, - "limit_activations": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Activations" - }, - "usage": { - "type": "integer", - "title": "Usage" - }, - "limit_usage": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit Usage" - }, - "validations": { - "type": "integer", - "title": "Validations" - }, - "last_validated_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Last Validated At" - }, - "expires_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At" - }, - "activation": { - "anyOf": [ - { - "$ref": "#/components/schemas/LicenseKeyActivationBase" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "id", - "organization_id", - "user_id", - "customer_id", - "user", - "customer", - "benefit_id", - "key", - "display_key", - "status", - "limit_activations", - "usage", - "limit_usage", - "validations", - "last_validated_at", - "expires_at" - ], - "title": "ValidatedLicenseKey" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "type": "array", - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } - }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" - }, - "WebhookBenefitCreatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "benefit.created" - ], - "const": "benefit.created", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookBenefitCreatedPayload", - "description": "Sent when a new benefit is created.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookBenefitGrantCreatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "benefit_grant.created" - ], - "const": "benefit_grant.created", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/BenefitGrantWebhook" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookBenefitGrantCreatedPayload", - "description": "Sent when a new benefit grant is created.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookBenefitGrantRevokedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "benefit_grant.revoked" - ], - "const": "benefit_grant.revoked", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/BenefitGrantWebhook" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookBenefitGrantRevokedPayload", - "description": "Sent when a new benefit grant is revoked.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookBenefitGrantUpdatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "benefit_grant.updated" - ], - "const": "benefit_grant.updated", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/BenefitGrantWebhook" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookBenefitGrantUpdatedPayload", - "description": "Sent when a new benefit grant is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookBenefitUpdatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "benefit.updated" - ], - "const": "benefit.updated", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Benefit", - "title": "Benefit" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookBenefitUpdatedPayload", - "description": "Sent when a benefit is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookCheckoutCreatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "checkout.created" - ], - "const": "checkout.created", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Checkout" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookCheckoutCreatedPayload", - "description": "Sent when a new checkout is created.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookCheckoutUpdatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "checkout.updated" - ], - "const": "checkout.updated", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Checkout" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookCheckoutUpdatedPayload", - "description": "Sent when a checkout is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookOrderCreatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "order.created" - ], - "const": "order.created", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Order" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookOrderCreatedPayload", - "description": "Sent when a new order is created.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookOrganizationUpdatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "organization.updated" - ], - "const": "organization.updated", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Organization" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookOrganizationUpdatedPayload", - "description": "Sent when a organization is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookPledgeCreatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "pledge.created" - ], - "const": "pledge.created", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Pledge" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookPledgeCreatedPayload", - "description": "Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookPledgeUpdatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "pledge.updated" - ], - "const": "pledge.updated", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Pledge" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookPledgeUpdatedPayload", - "description": "Sent when a pledge is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookProductCreatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "product.created" - ], - "const": "product.created", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Product" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookProductCreatedPayload", - "description": "Sent when a new product is created.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookProductUpdatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "product.updated" - ], - "const": "product.updated", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Product" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookProductUpdatedPayload", - "description": "Sent when a product is updated.\n\n**Discord \u0026 Slack support:** Basic" - }, - "WebhookSubscriptionActivePayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "subscription.active" - ], - "const": "subscription.active", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookSubscriptionActivePayload", - "description": "Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookSubscriptionCanceledPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "subscription.canceled" - ], - "const": "subscription.canceled", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookSubscriptionCanceledPayload", - "description": "Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookSubscriptionCreatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "subscription.created" - ], - "const": "subscription.created", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookSubscriptionCreatedPayload", - "description": "Sent when a new subscription is created.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookSubscriptionRevokedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "subscription.revoked" - ], - "const": "subscription.revoked", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookSubscriptionRevokedPayload", - "description": "Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord \u0026 Slack support:** Full" - }, - "WebhookSubscriptionUpdatedPayload": { - "properties": { - "type": { - "type": "string", - "enum": [ - "subscription.updated" - ], - "const": "subscription.updated", - "title": "Type" - }, - "data": { - "$ref": "#/components/schemas/Subscription" - } - }, - "type": "object", - "required": [ - "type", - "data" - ], - "title": "WebhookSubscriptionUpdatedPayload", - "description": "Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord \u0026 Slack support:** On cancellation and revocation. Renewals are skipped." - } - }, - "securitySchemes": { - "oidc": { - "type": "openIdConnect", - "openIdConnectUrl": "/.well-known/openid-configuration" - }, - "pat": { - "type": "http", - "description": "You can generate a **Personal Access Token** from your [settings](https://polar.sh/settings).", - "scheme": "bearer" - }, - "customer_session": { - "type": "http", - "scheme": "bearer" - } - } - }, - "tags": [ - { - "name": "private", - "description": "Endpoints that should appear in the schema only in development to generate our internal JS SDK." - }, - { - "name": "documented", - "description": "Endpoints shown and documented in the Polar API documentation." - }, - { - "name": "featured", - "description": "Endpoints featured in the Polar API documentation for their interest in common use-cases." - }, - { - "name": "issue_funding", - "description": "Endpoints related to issue funding and rewards in the Polar API." - } - ] -} \ No newline at end of file diff --git a/.speakeasy/temp/registry_694e26.json b/.speakeasy/temp/registry_694e26.json deleted file mode 100644 index 171e90f..0000000 --- a/.speakeasy/temp/registry_694e26.json +++ /dev/null @@ -1 +0,0 @@ -{"openapi":"3.1.0","info":{"title":"Polar API","summary":"Polar HTTP and Webhooks API","description":"Read the docs at https://docs.polar.sh/api","version":"0.1.0"},"servers":[{"url":"https://api.polar.sh","description":"Production environment","x-speakeasy-server-id":"production"},{"url":"https://sandbox-api.polar.sh","description":"Sandbox environment","x-speakeasy-server-id":"sandbox"}],"paths":{"/v1/external_organizations/":{"get":{"tags":["external_organizations","documented","issue_funding"],"summary":"List External Organizations","description":"List external organizations.","operationId":"external_organizations:list","security":[{"oidc":["external_organizations:read"]},{"pat":[]}],"parameters":[{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Platforms"},{"type":"array","items":{"$ref":"#/components/schemas/Platforms"}},{"type":"null"}],"title":"Platform Filter","description":"Filter by platform."},"description":"Filter by platform."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"RepositoryName Filter","description":"Filter by name."},"description":"Filter by name."},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ExternalOrganizationSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_ExternalOrganization_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"external_organizations","x-speakeasy-name-override":"list"}},"/v1/repositories/":{"get":{"tags":["repositories","documented","issue_funding"],"summary":"List Repositories","description":"List repositories.","operationId":"repositories:list","security":[{"oidc":["repositories:read","repositories:write"]},{"pat":[]}],"parameters":[{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Platforms"},{"type":"array","items":{"$ref":"#/components/schemas/Platforms"}},{"type":"null"}],"title":"Platform Filter","description":"Filter by platform."},"description":"Filter by platform."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"RepositoryName Filter","description":"Filter by name."},"description":"Filter by name."},{"name":"external_organization_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"ExternalOrganizationName Filter","description":"Filter by external organization name."},"description":"Filter by external organization name."},{"name":"is_private","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by private status.","title":"Is Private"},"description":"Filter by private status."},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RepositorySortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Repository_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"repositories","x-speakeasy-name-override":"list"}},"/v1/repositories/{id}":{"get":{"tags":["repositories","documented","issue_funding"],"summary":"Get Repository","description":"Get a repository by ID.","operationId":"repositories:get","security":[{"oidc":["repositories:read","repositories:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The repository ID.","x-polar-selector-widget":{"resourceRoot":"/v1/repositories","resourceName":"Repository","displayProperty":"name"},"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"404":{"description":"Repository not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","Organization","User"],"x-speakeasy-group":"repositories","x-speakeasy-name-override":"get"},"patch":{"tags":["repositories","documented","issue_funding"],"summary":"Update Repository","description":"Update a repository.","operationId":"repositories:update","security":[{"oidc":["repositories:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The repository ID.","x-polar-selector-widget":{"resourceRoot":"/v1/repositories","resourceName":"Repository","displayProperty":"name"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryUpdate"}}}},"responses":{"200":{"description":"Repository updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"403":{"description":"You don't have the permission to update this repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Repository not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"repositories","x-speakeasy-name-override":"update"}},"/v1/organizations/":{"get":{"tags":["organizations","documented","featured"],"summary":"List Organizations","description":"List organizations.","operationId":"organizations:list","security":[{"oidc":["organizations:read","organizations:write"]},{"pat":[]}],"parameters":[{"name":"slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by slug.","title":"Slug"},"description":"Filter by slug."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/OrganizationSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Organization_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"organizations","x-speakeasy-name-override":"list"},"post":{"tags":["organizations","documented","featured"],"summary":"Create Organization","description":"Create an organization.","operationId":"organizations:create","security":[{"oidc":["organizations:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}}},"responses":{"201":{"description":"Organization created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["User"],"x-speakeasy-group":"organizations","x-speakeasy-name-override":"create"}},"/v1/organizations/{id}":{"get":{"tags":["organizations","documented","featured"],"summary":"Get Organization","description":"Get an organization by ID.","operationId":"organizations:get","security":[{"oidc":["organizations:read","organizations:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"},"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"404":{"description":"Organization not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"organizations","x-speakeasy-name-override":"get"},"patch":{"tags":["organizations","documented","featured"],"summary":"Update Organization","description":"Update an organization.","operationId":"organizations:update","security":[{"oidc":["organizations:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Organization updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"403":{"description":"You don't have the permission to update this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Organization not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"organizations","x-speakeasy-name-override":"update"}},"/v1/subscriptions/":{"get":{"tags":["subscriptions","documented"],"summary":"List Subscriptions","description":"List subscriptions.","operationId":"subscriptions:list","security":[{"oidc":["subscriptions:read","subscriptions:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"CustomerID Filter","description":"Filter by customer ID."},"description":"Filter by customer ID."},{"name":"discount_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"DiscountID Filter","description":"Filter by discount ID."},"description":"Filter by discount ID."},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active or inactive subscription.","title":"Active"},"description":"Filter by active or inactive subscription."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-started_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Subscription_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"subscriptions","x-speakeasy-name-override":"list"}},"/v1/subscriptions/export":{"get":{"tags":["subscriptions","documented"],"summary":"Export Subscriptions","description":"Export subscriptions as a CSV file.","operationId":"subscriptions:export","security":[{"oidc":["subscriptions:read","subscriptions:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"description":"Filter by organization ID.","title":"Organization Id"},"description":"Filter by organization ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"subscriptions","x-speakeasy-name-override":"export"}},"/v1/advertisements/":{"get":{"tags":["advertisements","documented"],"summary":"List Campaigns","description":"List active advertisement campaigns for a benefit.","operationId":"advertisements:list","parameters":[{"name":"benefit_id","in":"query","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Benefit Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AdvertisementSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["granted_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvertisementCampaignListResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"advertisements","x-speakeasy-name-override":"list"}},"/v1/advertisements/{id}":{"get":{"tags":["advertisements","documented"],"summary":"Get Campaign","description":"Get an advertisement campaign by ID.","operationId":"advertisements:get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The advertisement campaign ID.","title":"Id"},"description":"The advertisement campaign ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvertisementCampaign"}}}},"404":{"description":"Advertisement campaign not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"advertisements","x-speakeasy-name-override":"get"}},"/v1/oauth2/":{"get":{"tags":["oauth2","clients","documented"],"summary":"List Clients","description":"List OAuth2 clients.","operationId":"oauth2:clients:list","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_OAuth2Client_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"list"}},"/v1/oauth2/register":{"post":{"tags":["oauth2","clients","documented"],"summary":"Create Client","description":"Create an OAuth2 client.","operationId":"oauth2:clients:oauth2:create_client","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2ClientConfiguration"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"oidc":[]},{"pat":[]}],"x-polar-allowed-subjects":["User"],"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"create"}},"/v1/oauth2/register/{client_id}":{"get":{"tags":["oauth2","clients","documented"],"summary":"Get Client","description":"Get an OAuth2 client by Client ID.","operationId":"oauth2:clients:oauth2:get_client","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"get"},"put":{"tags":["oauth2","clients","documented"],"summary":"Update Client","description":"Update an OAuth2 client.","operationId":"oauth2:clients:oauth2:update_client","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2ClientConfigurationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"update"},"delete":{"tags":["oauth2","clients","documented"],"summary":"Delete Client","description":"Delete an OAuth2 client.","operationId":"oauth2:clients:oauth2:delete_client","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"oauth2.clients","x-speakeasy-name-override":"delete"}},"/v1/oauth2/authorize":{"get":{"tags":["oauth2","documented"],"summary":"Authorize","operationId":"oauth2:authorize","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AuthorizeResponseUser"},{"$ref":"#/components/schemas/AuthorizeResponseOrganization"}],"title":"Response Oauth2:Authorize","discriminator":{"propertyName":"sub_type","mapping":{"user":"#/components/schemas/AuthorizeResponseUser","organization":"#/components/schemas/AuthorizeResponseOrganization"}}}}}}},"security":[{"oidc":[]},{"pat":[]}],"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"oauth2","x-speakeasy-name-override":"authorize"}},"/v1/oauth2/token":{"post":{"tags":["oauth2","featured","documented"],"summary":"Request Token","description":"Request an access token using a valid grant.","operationId":"oauth2:request_token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"oneOf":[{"$ref":"#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest"},{"$ref":"#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest"}],"discriminator":{"propertyName":"grant_type","mapping":{"authorization_code":"#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest","refresh_token":"#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}},"x-components":{"AuthorizationCodeTokenRequest":{"properties":{"grant_type":{"const":"authorization_code","enum":["authorization_code"],"title":"Grant Type","type":"string"},"client_id":{"title":"Client Id","type":"string"},"client_secret":{"title":"Client Secret","type":"string"},"code":{"title":"Code","type":"string"},"redirect_uri":{"format":"uri","maxLength":2083,"minLength":1,"title":"Redirect Uri","type":"string"}},"required":["grant_type","client_id","client_secret","code","redirect_uri"],"title":"AuthorizationCodeTokenRequest","type":"object"},"RefreshTokenRequest":{"properties":{"grant_type":{"const":"refresh_token","enum":["refresh_token"],"title":"Grant Type","type":"string"},"client_id":{"title":"Client Id","type":"string"},"client_secret":{"title":"Client Secret","type":"string"},"refresh_token":{"title":"Refresh Token","type":"string"}},"required":["grant_type","client_id","client_secret","refresh_token"],"title":"RefreshTokenRequest","type":"object"}},"x-speakeasy-group":"oauth2","x-speakeasy-name-override":"token"}},"/v1/oauth2/revoke":{"post":{"tags":["oauth2","featured","documented"],"summary":"Revoke Token","description":"Revoke an access token or a refresh token.","operationId":"oauth2:revoke_token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"token":{"type":"string","title":"Token"},"token_type_hint":{"anyOf":[{"type":"string","enum":["access_token","refresh_token"]},{"type":"null"}],"title":"Token Type Hint"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["token","client_id","client_secret"],"title":"RevokeTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeTokenResponse"}}}}},"x-speakeasy-group":"oauth2","x-speakeasy-name-override":"revoke"}},"/v1/oauth2/introspect":{"post":{"tags":["oauth2","featured","documented"],"summary":"Introspect Token","description":"Get information about an access token.","operationId":"oauth2:introspect_token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"token":{"type":"string","title":"Token"},"token_type_hint":{"anyOf":[{"type":"string","enum":["access_token","refresh_token"]},{"type":"null"}],"title":"Token Type Hint"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["token","client_id","client_secret"],"title":"IntrospectTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntrospectTokenResponse"}}}}},"x-speakeasy-group":"oauth2","x-speakeasy-name-override":"introspect"}},"/v1/oauth2/userinfo":{"get":{"tags":["oauth2","featured","documented"],"summary":"Get User Info","description":"Get information about the authenticated user.","operationId":"oauth2:userinfo","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UserInfoUser"},{"$ref":"#/components/schemas/UserInfoOrganization"}],"title":"Response Oauth2:Userinfo"}}}}},"security":[{"oidc":[]}],"x-speakeasy-name-override":"userinfo","x-speakeasy-group":"oauth2"}},"/v1/benefits/":{"get":{"tags":["benefits","documented"],"summary":"List Benefits","description":"List benefits.","operationId":"benefits:list","security":[{"oidc":["benefits:read","benefits:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BenefitType"},{"type":"array","items":{"$ref":"#/components/schemas/BenefitType"}},{"type":"null"}],"title":"BenefitType Filter","description":"Filter by benefit type."},"description":"Filter by benefit type."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Benefit_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"benefits","x-speakeasy-name-override":"list"},"post":{"tags":["benefits","documented"],"summary":"Create Benefit","description":"Create a benefit.","operationId":"benefits:create","security":[{"oidc":["benefits:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenefitCreate"}}}},"responses":{"201":{"description":"Benefit created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"benefits","x-speakeasy-name-override":"create"}},"/v1/benefits/{id}":{"get":{"tags":["benefits","documented"],"summary":"Get Benefit","description":"Get a benefit by ID.","operationId":"benefits:get","security":[{"oidc":["benefits:read","benefits:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}}}},"404":{"description":"Benefit not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"benefits","x-speakeasy-name-override":"get"},"patch":{"tags":["benefits","documented"],"summary":"Update Benefit","description":"Update a benefit.","operationId":"benefits:update","security":[{"oidc":["benefits:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BenefitAdsUpdate"},{"$ref":"#/components/schemas/BenefitCustomUpdate"},{"$ref":"#/components/schemas/BenefitDiscordUpdate"},{"$ref":"#/components/schemas/BenefitGitHubRepositoryUpdate"},{"$ref":"#/components/schemas/BenefitDownloadablesUpdate"},{"$ref":"#/components/schemas/BenefitLicenseKeysUpdate"}],"title":"Benefit Update"}}}},"responses":{"200":{"description":"Benefit updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}}}},"403":{"description":"You don't have the permission to update this benefit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Benefit not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"benefits","x-speakeasy-name-override":"update"},"delete":{"tags":["benefits","documented"],"summary":"Delete Benefit","description":"Delete a benefit.\n\n> [!WARNING]\n> Every grants associated with the benefit will be revoked.\n> Users will lose access to the benefit.","operationId":"benefits:delete","security":[{"oidc":["benefits:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Id"}}],"responses":{"204":{"description":"Benefit deleted."},"403":{"description":"You don't have the permission to update this benefit or it's not deletable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Benefit not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"benefits","x-speakeasy-name-override":"delete"}},"/v1/benefits/{id}/grants":{"get":{"tags":["benefits","documented"],"summary":"List Benefit Grants","description":"List the individual grants for a benefit.\n\nIt's especially useful to check if a user has been granted a benefit.","operationId":"benefits:grants","security":[{"oidc":["benefits:read","benefits:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"},"title":"Id"}},{"name":"is_granted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. ","title":"Is Granted"},"description":"Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. "},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"CustomerID Filter","description":"Filter by customer."},"description":"Filter by customer."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_BenefitGrant_"}}}},"404":{"description":"Benefit not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"benefits","x-speakeasy-name-override":"grants"}},"/v1/products/":{"get":{"tags":["products","documented","featured"],"summary":"List Products","description":"List products.","operationId":"products:list","security":[{"oidc":["products:read","products:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by product name.","title":"Query"},"description":"Filter by product name."},{"name":"is_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter on archived products.","title":"Is Archived"},"description":"Filter on archived products."},{"name":"is_recurring","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. ","title":"Is Recurring"},"description":"Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. "},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}}},{"type":"null"}],"title":"BenefitID Filter","description":"Filter products granting specific benefit."},"description":"Filter products granting specific benefit."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ProductSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Product_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"products","x-speakeasy-name-override":"list"},"post":{"tags":["products","documented","featured"],"summary":"Create Product","description":"Create a product.","operationId":"products:create","security":[{"oidc":["products:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate","title":"ProductCreate"}}}},"responses":{"201":{"description":"Product created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"products","x-speakeasy-name-override":"create"}},"/v1/products/{id}":{"get":{"tags":["products","documented","featured"],"summary":"Get Product","description":"Get a product by ID.","operationId":"products:get","security":[{"oidc":["products:read","products:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"},"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"Product not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"products","x-speakeasy-name-override":"get"},"patch":{"tags":["products","documented","featured"],"summary":"Update Product","description":"Update a product.","operationId":"products:update","security":[{"oidc":["products:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Product updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"403":{"description":"You don't have the permission to update this product.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Product not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"products","x-speakeasy-name-override":"update"}},"/v1/products/{id}/benefits":{"post":{"tags":["products","documented","featured"],"summary":"Update Product Benefits","description":"Update benefits granted by a product.","operationId":"products:update_benefits","security":[{"oidc":["products:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"},"title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductBenefitsUpdate"}}}},"responses":{"200":{"description":"Product benefits updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"403":{"description":"You don't have the permission to update this product.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Product not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"products","x-speakeasy-name-override":"update_benefits"}},"/v1/orders/":{"get":{"tags":["orders","documented"],"summary":"List Orders","description":"List orders.","operationId":"orders:list","security":[{"oidc":["orders:read"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"product_price_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ProductPriceType"},{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceType"}},{"type":"null"}],"title":"ProductPriceType Filter","description":"Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases."},"description":"Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases."},{"name":"discount_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"DiscountID Filter","description":"Filter by discount ID."},"description":"Filter by discount ID."},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"CustomerID Filter","description":"Filter by customer ID."},"description":"Filter by customer ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/OrderSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Order_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"orders","x-speakeasy-name-override":"list"}},"/v1/orders/{id}":{"get":{"tags":["orders","documented"],"summary":"Get Order","description":"Get an order by ID.","operationId":"orders:get","security":[{"oidc":["orders:read"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The order ID.","title":"Id"},"description":"The order ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"404":{"description":"Order not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"orders","x-speakeasy-name-override":"get"}},"/v1/orders/{id}/invoice":{"get":{"tags":["orders","documented"],"summary":"Get Order Invoice","description":"Get an order's invoice data.","operationId":"orders:invoice","security":[{"oidc":["orders:read"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The order ID.","title":"Id"},"description":"The order ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInvoice"}}}},"404":{"description":"Order not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"orders","x-speakeasy-name-override":"invoice"}},"/v1/checkouts/custom/":{"get":{"tags":["checkouts","custom","documented","featured"],"summary":"List Checkout Sessions","description":"List checkout sessions.","operationId":"checkouts:custom:list","security":[{"oidc":["checkouts:read","checkouts:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Checkout_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"list"},"post":{"tags":["checkouts","custom","documented","featured"],"summary":"Create Checkout Session","description":"Create a checkout session.","operationId":"checkouts:custom:create","security":[{"oidc":["checkouts:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreate"}}}},"responses":{"201":{"description":"Checkout session created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"create"}},"/v1/checkouts/custom/{id}":{"get":{"tags":["checkouts","custom","documented","featured"],"summary":"Get Checkout Session","description":"Get a checkout session by ID.","operationId":"checkouts:custom:get","security":[{"oidc":["checkouts:read","checkouts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout session ID.","title":"Id"},"description":"The checkout session ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"get"},"patch":{"tags":["checkouts","custom","documented","featured"],"summary":"Update Checkout Session","description":"Update a checkout session.","operationId":"checkouts:custom:update","security":[{"oidc":["checkouts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout session ID.","title":"Id"},"description":"The checkout session ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutUpdate"}}}},"responses":{"200":{"description":"Checkout session updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"update"}},"/v1/checkouts/custom/client/{client_secret}":{"get":{"tags":["checkouts","custom","documented","featured"],"summary":"Get Checkout Session from Client","description":"Get a checkout session by client secret.","operationId":"checkouts:custom:client_get","parameters":[{"name":"client_secret","in":"path","required":true,"schema":{"type":"string","description":"The checkout session client secret.","title":"Client Secret"},"description":"The checkout session client secret."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPublic"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"client_get"},"patch":{"tags":["checkouts","custom","documented","featured"],"summary":"Update Checkout Session from Client","description":"Update a checkout session by client secret.","operationId":"checkouts:custom:client_update","parameters":[{"name":"client_secret","in":"path","required":true,"schema":{"type":"string","description":"The checkout session client secret.","title":"Client Secret"},"description":"The checkout session client secret."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutUpdatePublic"}}}},"responses":{"200":{"description":"Checkout session updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPublic"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"client_update"}},"/v1/checkouts/custom/client/{client_secret}/confirm":{"post":{"tags":["checkouts","custom","documented","featured"],"summary":"Confirm Checkout Session from Client","description":"Confirm a checkout session by client secret.\n\nOrders and subscriptions will be processed.","operationId":"checkouts:custom:client_confirm","security":[{"oidc":[]},{"pat":[]}],"parameters":[{"name":"client_secret","in":"path","required":true,"schema":{"type":"string","description":"The checkout session client secret.","title":"Client Secret"},"description":"The checkout session client secret."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutConfirmStripe"}}}},"responses":{"200":{"description":"Checkout session confirmed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPublicConfirmed"}}}},"404":{"description":"Checkout session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-group":"checkouts.custom","x-speakeasy-name-override":"client_confirm"}},"/v1/checkouts/":{"post":{"tags":["checkouts","documented"],"summary":"Create Checkout","description":"Create a checkout session.","operationId":"checkouts:create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLegacyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLegacy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"oidc":[]},{"pat":[]}],"x-polar-allowed-subjects":["Anonymous","User"],"x-speakeasy-deprecation-replacement":"checkouts:custom:create","x-speakeasy-deprecation-message":"This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information.","x-speakeasy-group":"checkouts","x-speakeasy-name-override":"create"}},"/v1/checkouts/{id}":{"get":{"tags":["checkouts","documented"],"summary":"Get Checkout","description":"Get an active checkout session by ID.","operationId":"checkouts:get","deprecated":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLegacy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-deprecation-message":"This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information.","x-speakeasy-group":"checkouts","x-speakeasy-name-override":"get"}},"/v1/files/":{"get":{"tags":["files","documented"],"summary":"List Files","description":"List files.","operationId":"files:list","security":[{"oidc":["files:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"null"}],"title":"Organization Id"}},{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"description":"List of file IDs to get. ","title":"Ids"},"description":"List of file IDs to get. "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_FileRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"files","x-speakeasy-name-override":"list"},"post":{"tags":["files","documented"],"summary":"Create File","description":"Create a file.","operationId":"files:create","security":[{"oidc":["files:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileCreate"}}}},"responses":{"201":{"description":"File created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUpload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"files","x-speakeasy-name-override":"create"}},"/v1/files/{id}/uploaded":{"post":{"tags":["files","documented"],"summary":"Complete File Upload","description":"Complete a file upload.","operationId":"files:uploaded","security":[{"oidc":["files:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The file ID.","title":"Id"},"description":"The file ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadCompleted"}}}},"responses":{"200":{"description":"File upload completed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DownloadableFileRead"},{"$ref":"#/components/schemas/ProductMediaFileRead"},{"$ref":"#/components/schemas/OrganizationAvatarFileRead"}],"discriminator":{"propertyName":"service","mapping":{"downloadable":"#/components/schemas/DownloadableFileRead","product_media":"#/components/schemas/ProductMediaFileRead","organization_avatar":"#/components/schemas/OrganizationAvatarFileRead"}},"title":"Response Files:Uploaded"}}}},"403":{"description":"You don't have the permission to update this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"File not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"files","x-speakeasy-name-override":"uploaded"}},"/v1/files/{id}":{"patch":{"tags":["files","documented"],"summary":"Update File","description":"Update a file.","operationId":"files:update","security":[{"oidc":["files:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The file ID.","title":"Id"},"description":"The file ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilePatch"}}}},"responses":{"200":{"description":"File updated.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DownloadableFileRead"},{"$ref":"#/components/schemas/ProductMediaFileRead"},{"$ref":"#/components/schemas/OrganizationAvatarFileRead"}],"discriminator":{"propertyName":"service","mapping":{"downloadable":"#/components/schemas/DownloadableFileRead","product_media":"#/components/schemas/ProductMediaFileRead","organization_avatar":"#/components/schemas/OrganizationAvatarFileRead"}},"title":"Response Files:Update"}}}},"403":{"description":"You don't have the permission to update this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"File not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"files","x-speakeasy-name-override":"update"},"delete":{"tags":["files","documented"],"summary":"Delete File","description":"Delete a file.","operationId":"files:delete","security":[{"oidc":["files:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}}],"responses":{"204":{"description":"File deleted."},"403":{"description":"You don't have the permission to delete this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"File not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"files","x-speakeasy-name-override":"delete"}},"/v1/metrics/":{"get":{"tags":["metrics","documented"],"summary":"Get Metrics","description":"Get metrics about your orders and subscriptions.","operationId":"metrics:get","security":[{"oidc":["metrics:read"]},{"pat":[]}],"parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date.","title":"Start Date"},"description":"Start date."},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date.","title":"End Date"},"description":"End date."},{"name":"interval","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Interval","description":"Interval between two timestamps."},"description":"Interval between two timestamps."},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"product_price_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ProductPriceType"},{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceType"}},{"type":"null"}],"title":"ProductPriceType Filter","description":"Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."},"description":"Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"metrics","x-speakeasy-name-override":"get"}},"/v1/metrics/limits":{"get":{"tags":["metrics","documented"],"summary":"Get Metrics Limits","description":"Get the interval limits for the metrics endpoint.","operationId":"metrics:limits","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsLimits"}}}}},"security":[{"oidc":["metrics:read"]},{"pat":[]}],"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"metrics","x-speakeasy-name-override":"limits"}},"/v1/license-keys":{"get":{"tags":["license_keys","documented","featured"],"summary":"List License Keys","description":"Get license keys connected to the given organization & filters.","operationId":"license_keys:list","security":[{"oidc":["license_keys:read","license_keys:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}}},{"type":"null"}],"title":"BenefitID Filter","description":"Filter by benefit ID."},"description":"Filter by benefit ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_LicenseKeyRead_"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"license_keys","x-speakeasy-name-override":"list"}},"/v1/license-keys/{id}":{"get":{"tags":["license_keys","documented","featured"],"summary":"Get License Key","description":"Get a license key.","operationId":"license_keys:get","security":[{"oidc":["license_keys:read","license_keys:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyWithActivations"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"license_keys","x-speakeasy-name-override":"get"},"patch":{"tags":["license_keys","documented","featured"],"summary":"Update License Key","description":"Update a license key.","operationId":"license_keys:update","security":[{"oidc":["license_keys:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyRead"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"license_keys","x-speakeasy-name-override":"update"}},"/v1/license-keys/{id}/activations/{activation_id}":{"get":{"tags":["license_keys","documented","featured"],"summary":"Get Activation","description":"Get a license key activation.","operationId":"license_keys:get_activation","security":[{"oidc":["license_keys:read","license_keys:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}},{"name":"activation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Activation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyActivationRead"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"license_keys","x-speakeasy-name-override":"get_activation"}},"/v1/checkout-links/":{"get":{"tags":["checkout-links","documented"],"summary":"List Checkout Links","description":"List checkout links.","operationId":"checkout-links:list","security":[{"oidc":["checkout_links:read","checkout_links:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CheckoutLinkSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CheckoutLink_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"list"},"post":{"tags":["checkout-links","documented"],"summary":"Create Checkout Link","description":"Create a checkout link.","operationId":"checkout-links:create","security":[{"oidc":["checkout_links:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkCreate"}}}},"responses":{"201":{"description":"Checkout link created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"create"}},"/v1/checkout-links/{id}":{"get":{"tags":["checkout-links","documented"],"summary":"Get Checkout Link","description":"Get a checkout link by ID.","operationId":"checkout-links:get","security":[{"oidc":["checkout_links:read","checkout_links:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout link ID.","title":"Id"},"description":"The checkout link ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"404":{"description":"Checkout link not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"get"},"patch":{"tags":["checkout-links","documented"],"summary":"Update Checkout Link","description":"Update a checkout link.","operationId":"checkout-links:update","security":[{"oidc":["checkout_links:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout link ID.","title":"Id"},"description":"The checkout link ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkUpdate"}}}},"responses":{"200":{"description":"Checkout link updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"404":{"description":"Checkout link not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"update"},"delete":{"tags":["checkout-links","documented"],"summary":"Delete Checkout Link","description":"Delete a checkout link.","operationId":"checkout-links:delete","security":[{"oidc":["checkout_links:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The checkout link ID.","title":"Id"},"description":"The checkout link ID."}],"responses":{"204":{"description":"Checkout link deleted."},"404":{"description":"Checkout link not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"checkout-links","x-speakeasy-name-override":"delete"}},"/v1/custom-fields/":{"get":{"tags":["custom-fields","documented"],"summary":"List Custom Fields","description":"List custom fields.","operationId":"custom-fields:list","security":[{"oidc":["custom_fields:read","custom_fields:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by custom field name or slug.","title":"Query"},"description":"Filter by custom field name or slug."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldType"}},{"type":"null"}],"title":"CustomFieldType Filter","description":"Filter by custom field type."},"description":"Filter by custom field type."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["slug"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CustomField_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"list"},"post":{"tags":["custom-fields","documented"],"summary":"Create Custom Field","description":"Create a custom field.","operationId":"custom-fields:create","security":[{"oidc":["custom_fields:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldCreate"}}}},"responses":{"201":{"description":"Custom field created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField","title":"CustomField"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"create"}},"/v1/custom-fields/{id}":{"get":{"tags":["custom-fields","documented"],"summary":"Get Custom Field","description":"Get a custom field by ID.","operationId":"custom-fields:get","security":[{"oidc":["custom_fields:read","custom_fields:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The custom field ID.","title":"Id"},"description":"The custom field ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField","title":"CustomField"}}}},"404":{"description":"Custom field not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"get"},"patch":{"tags":["custom-fields","documented"],"summary":"Update Custom Field","description":"Update a custom field.","operationId":"custom-fields:update","security":[{"oidc":["custom_fields:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The custom field ID.","title":"Id"},"description":"The custom field ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldUpdate"}}}},"responses":{"200":{"description":"Custom field updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField","title":"CustomField"}}}},"404":{"description":"Custom field not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"update"},"delete":{"tags":["custom-fields","documented"],"summary":"Delete Custom Field","description":"Delete a custom field.","operationId":"custom-fields:delete","security":[{"oidc":["custom_fields:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The custom field ID.","title":"Id"},"description":"The custom field ID."}],"responses":{"204":{"description":"Custom field deleted."},"404":{"description":"Custom field not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"custom-fields","x-speakeasy-name-override":"delete"}},"/v1/discounts/":{"get":{"tags":["discounts","featured","documented"],"summary":"List Discounts","description":"List discounts.","operationId":"discounts:list","security":[{"oidc":["discounts:read","discounts:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by name.","title":"Query"},"description":"Filter by name."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/DiscountSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Discount_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"discounts","x-speakeasy-name-override":"list"},"post":{"tags":["discounts","featured","documented"],"summary":"Create Discount","description":"Create a discount.","operationId":"discounts:create","security":[{"oidc":["discounts:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCreate"}}}},"responses":{"201":{"description":"Discount created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount","title":"Discount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"discounts","x-speakeasy-name-override":"create"}},"/v1/discounts/{id}":{"get":{"tags":["discounts","featured","documented"],"summary":"Get Discount","description":"Get a discount by ID.","operationId":"discounts:get","security":[{"oidc":["discounts:read","discounts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The discount ID.","title":"Id"},"description":"The discount ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount","title":"Discount"}}}},"404":{"description":"Discount not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"discounts","x-speakeasy-name-override":"get"},"patch":{"tags":["discounts","featured","documented"],"summary":"Update Discount","description":"Update a discount.","operationId":"discounts:update","security":[{"oidc":["discounts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The discount ID.","title":"Id"},"description":"The discount ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountUpdate"}}}},"responses":{"200":{"description":"Discount updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount","title":"Discount"}}}},"404":{"description":"Discount not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"discounts","x-speakeasy-name-override":"update"},"delete":{"tags":["discounts","featured","documented"],"summary":"Delete Discount","description":"Delete a discount.","operationId":"discounts:delete","security":[{"oidc":["discounts:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The discount ID.","title":"Id"},"description":"The discount ID."}],"responses":{"204":{"description":"Discount deleted."},"404":{"description":"Discount not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"discounts","x-speakeasy-name-override":"delete"}},"/v1/customers/":{"get":{"tags":["customers","documented","featured"],"summary":"List Customers","description":"List customers.","operationId":"customers:list","security":[{"oidc":["customers:read","customers:write"]},{"pat":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by name or email.","title":"Query"},"description":"Filter by name or email."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomerSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_Customer_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customers","x-speakeasy-name-override":"list"},"post":{"tags":["customers","documented","featured"],"summary":"Create Customer","description":"Create a customer.","operationId":"customers:create","security":[{"oidc":["customers:write"]},{"pat":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Customer created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customers","x-speakeasy-name-override":"create"}},"/v1/customers/{id}":{"get":{"tags":["customers","documented","featured"],"summary":"Get Customer","description":"Get a customer by ID.","operationId":"customers:get","security":[{"oidc":["customers:read","customers:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The customer ID.","title":"Id"},"description":"The customer ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customers","x-speakeasy-name-override":"get"},"patch":{"tags":["customers","documented","featured"],"summary":"Update Customer","description":"Update a customer.","operationId":"customers:update","security":[{"oidc":["customers:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The customer ID.","title":"Id"},"description":"The customer ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Customer updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customers","x-speakeasy-name-override":"update"},"delete":{"tags":["customers","documented","featured"],"summary":"Delete Customer","description":"Delete a customer.\n\nImmediately cancels any active subscriptions and revokes any active benefits.","operationId":"customers:delete","security":[{"oidc":["customers:write"]},{"pat":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The customer ID.","title":"Id"},"description":"The customer ID."}],"responses":{"204":{"description":"Customer deleted."},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customers","x-speakeasy-name-override":"delete"}},"/v1/customer-portal/benefit-grants/":{"get":{"tags":["customer_portal","benefit-grants","documented"],"summary":"List Benefit Grants","description":"List benefits grants of the authenticated customer or user.","operationId":"customer_portal:benefit-grants:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BenefitType"},{"type":"array","items":{"$ref":"#/components/schemas/BenefitType"}},{"type":"null"}],"title":"BenefitType Filter","description":"Filter by benefit type."},"description":"Filter by benefit type."},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"BenefitID Filter","description":"Filter by benefit ID."},"description":"Filter by benefit ID."},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"checkout_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"CheckoutID Filter","description":"Filter by checkout ID."},"description":"Filter by checkout ID."},{"name":"order_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"OrderID Filter","description":"Filter by order ID."},"description":"Filter by order ID."},{"name":"subscription_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"SubscriptionID Filter","description":"Filter by subscription ID."},"description":"Filter by subscription ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomerBenefitGrantSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-granted_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CustomerBenefitGrant_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.benefit-grants","x-speakeasy-name-override":"list"}},"/v1/customer-portal/benefit-grants/{id}":{"get":{"tags":["customer_portal","benefit-grants","documented"],"summary":"Get Benefit Grant","description":"Get a benefit grant by ID for the authenticated customer or user.","operationId":"customer_portal:benefit-grants:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit grant ID.","title":"Id"},"description":"The benefit grant ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBenefitGrant","title":"CustomerBenefitGrant"}}}},"404":{"description":"Benefit grant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.benefit-grants","x-speakeasy-name-override":"get"},"patch":{"tags":["customer_portal","benefit-grants","documented"],"summary":"Update Benefit Grant","description":"Update a benefit grant for the authenticated customer or user.","operationId":"customer_portal:benefit-grants:update","security":[{"oidc":["customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The benefit grant ID.","title":"Id"},"description":"The benefit grant ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBenefitGrantUpdate","title":"CustomerBenefitGrantUpdate"}}}},"responses":{"200":{"description":"Benefit grant updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBenefitGrant","title":"CustomerBenefitGrant"}}}},"403":{"description":"The benefit grant is revoked and cannot be updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"Benefit grant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.benefit-grants","x-speakeasy-name-override":"update"}},"/v1/customer-portal/customers/{id}":{"get":{"tags":["customer_portal","customers","documented"],"summary":"Get Customer","description":"Get a customer by ID for the authenticated customer or user.","operationId":"customer_portal:customers:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The customer ID.","title":"Id"},"description":"The customer ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPortalCustomer"}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.customers","x-speakeasy-name-override":"get"}},"/v1/customer-portal/downloadables/":{"get":{"tags":["customer_portal","downloadables","documented"],"summary":"List Downloadables","operationId":"customer_portal:downloadables:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}}},{"type":"null"}],"title":"BenefitID Filter","description":"Filter by benefit ID."},"description":"Filter by benefit ID."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_DownloadableRead_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.downloadables","x-speakeasy-name-override":"list"}},"/v1/customer-portal/downloadables/{token}":{"get":{"tags":["customer_portal","downloadables","documented"],"summary":"Get Downloadable","operationId":"customer_portal:downloadables:customer_portal.downloadables.get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"302":{"description":"Redirected to download"},"400":{"description":"Invalid signature"},"404":{"description":"Downloadable not found"},"410":{"description":"Expired signature"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.downloadables","x-speakeasy-name-override":"get"}},"/v1/customer-portal/license-keys/":{"get":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"List License Keys","operationId":"customer_portal:license_keys:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"benefit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"resourceRoot":"/v1/benefits","resourceName":"Benefit","displayProperty":"description"}},{"type":"null"}],"description":"Filter by a specific benefit","title":"Benefit Id"},"description":"Filter by a specific benefit"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_LicenseKeyRead_"}}}},"401":{"description":"Not authorized to manage license key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"list"}},"/v1/customer-portal/license-keys/{id}":{"get":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"Get License Key","description":"Get a license key.","operationId":"customer_portal:license_keys:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyWithActivations"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"get"}},"/v1/customer-portal/license-keys/validate":{"post":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"Validate License Key","description":"Validate a license key.","operationId":"customer_portal:license_keys:validate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyValidate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidatedLicenseKey"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"validate"}},"/v1/customer-portal/license-keys/activate":{"post":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"Activate License Key","description":"Activate a license key instance.","operationId":"customer_portal:license_keys:activate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyActivate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyActivationRead"}}}},"403":{"description":"License key activation not required or permitted (limit reached).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotPermitted"}}}},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"activate"}},"/v1/customer-portal/license-keys/deactivate":{"post":{"tags":["customer_portal","license_keys","documented","featured"],"summary":"Deactivate License Key","description":"Deactivate a license key instance.","operationId":"customer_portal:license_keys:deactivate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyDeactivate"}}},"required":true},"responses":{"204":{"description":"License key activation deactivated."},"404":{"description":"License key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.license_keys","x-speakeasy-name-override":"deactivate"}},"/v1/customer-portal/orders/":{"get":{"tags":["customer_portal","orders","documented"],"summary":"List Orders","description":"List orders of the authenticated customer or user.","operationId":"customer_portal:orders:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"product_price_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ProductPriceType"},{"type":"array","items":{"$ref":"#/components/schemas/ProductPriceType"}},{"type":"null"}],"title":"ProductPriceType Filter","description":"Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases."},"description":"Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases."},{"name":"subscription_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"array","items":{"type":"string","format":"uuid4"}},{"type":"null"}],"title":"SubscriptionID Filter","description":"Filter by subscription ID."},"description":"Filter by subscription ID."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by product or organization name.","title":"Query"},"description":"Search by product or organization name."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomerOrderSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-created_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CustomerOrder_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.orders","x-speakeasy-name-override":"list"}},"/v1/customer-portal/orders/{id}":{"get":{"tags":["customer_portal","orders","documented"],"summary":"Get Order","description":"Get an order by ID for the authenticated customer or user.","operationId":"customer_portal:orders:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The order ID.","title":"Id"},"description":"The order ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOrder"}}}},"404":{"description":"Order not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.orders","x-speakeasy-name-override":"get"}},"/v1/customer-portal/orders/{id}/invoice":{"get":{"tags":["customer_portal","orders","documented"],"summary":"Get Order Invoice","description":"Get an order's invoice data.","operationId":"customer_portal:orders:invoice","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The order ID.","title":"Id"},"description":"The order ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOrderInvoice"}}}},"404":{"description":"Order not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.orders","x-speakeasy-name-override":"invoice"}},"/v1/customer-portal/organizations/{slug}":{"get":{"tags":["customer_portal","organizations","documented"],"summary":"Get Organization","description":"Get a customer portal's organization by slug.","operationId":"customer_portal:organizations:get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","description":"The organization slug.","title":"Slug"},"description":"The organization slug."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"404":{"description":"Organization not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"customer_portal.organizations","x-speakeasy-name-override":"get"}},"/v1/customer-portal/subscriptions/":{"get":{"tags":["customer_portal","subscriptions","documented","featured"],"summary":"List Subscriptions","description":"List subscriptions of the authenticated customer or user.","operationId":"customer_portal:subscriptions:list","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"resourceRoot":"/v1/organizations","resourceName":"Organization","displayProperty":"name"}}},{"type":"null"}],"title":"OrganizationID Filter","description":"Filter by organization ID."},"description":"Filter by organization ID."},{"name":"product_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}},{"type":"array","items":{"type":"string","format":"uuid4","description":"The product ID.","x-polar-selector-widget":{"resourceRoot":"/v1/products","resourceName":"Product","displayProperty":"name"}}},{"type":"null"}],"title":"ProductID Filter","description":"Filter by product ID."},"description":"Filter by product ID."},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active or cancelled subscription.","title":"Active"},"description":"Filter by active or cancelled subscription."},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by product or organization name.","title":"Query"},"description":"Search by product or organization name."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Page number, defaults to 1.","default":1,"title":"Page"},"description":"Page number, defaults to 1."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Size of a page, defaults to 10. Maximum is 100.","default":10,"title":"Limit"},"description":"Size of a page, defaults to 10. Maximum is 100."},{"name":"sorting","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CustomerSubscriptionSortProperty"}},{"type":"null"}],"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.","default":["-started_at"],"title":"Sorting"},"description":"Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResource_CustomerSubscription_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"limit","in":"parameters","type":"limit"}],"outputs":{"results":"$.items","numPages":"$.pagination.max_page"}},"x-speakeasy-group":"customer_portal.subscriptions","x-speakeasy-name-override":"list"}},"/v1/customer-portal/subscriptions/{id}":{"get":{"tags":["customer_portal","subscriptions","documented","featured"],"summary":"Get Subscription","description":"Get a subscription for the authenticated customer or user.","operationId":"customer_portal:subscriptions:get","security":[{"oidc":["customer_portal:read","customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The subscription ID.","title":"Id"},"description":"The subscription ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSubscription"}}}},"404":{"description":"Subscription not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.subscriptions","x-speakeasy-name-override":"get"},"patch":{"tags":["customer_portal","subscriptions","documented","featured"],"summary":"Update Subscription","description":"Update a subscription of the authenticated customer or user.","operationId":"customer_portal:subscriptions:update","security":[{"oidc":["customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The subscription ID.","title":"Id"},"description":"The subscription ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSubscriptionUpdate"}}}},"responses":{"200":{"description":"Subscription updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSubscription"}}}},"404":{"description":"Subscription not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.subscriptions","x-speakeasy-name-override":"update"},"delete":{"tags":["customer_portal","subscriptions","documented","featured"],"summary":"Cancel Subscription","description":"Cancel a subscription of the authenticated customer or user.","operationId":"customer_portal:subscriptions:cancel","security":[{"oidc":["customer_portal:write"]},{"pat":[]},{"customer_session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid4","description":"The subscription ID.","title":"Id"},"description":"The subscription ID."}],"responses":{"200":{"description":"Subscription canceled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSubscription"}}}},"403":{"description":"This subscription is already canceled or will be at the end of the period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlreadyCanceledSubscription"}}}},"404":{"description":"Subscription not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceNotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-polar-allowed-subjects":["Customer","User"],"x-speakeasy-group":"customer_portal.subscriptions","x-speakeasy-name-override":"cancel"}},"/v1/customer-sessions/":{"post":{"tags":["customer-sessions","documented","featured"],"summary":"Create Customer Session","description":"Create a customer session.","operationId":"customer-sessions:create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSessionCreate"}}},"required":true},"responses":{"201":{"description":"Customer session created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"oidc":["customer_sessions:write"]},{"pat":[]}],"x-polar-allowed-subjects":["Organization","User"],"x-speakeasy-group":"customer-sessions","x-speakeasy-name-override":"create"}}},"webhooks":{"checkout.created":{"post":{"summary":"checkout.created","description":"Sent when a new checkout is created.\n\n**Discord & Slack support:** Basic","operationId":"_endpointcheckout_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCheckoutCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"checkout.updated":{"post":{"summary":"checkout.updated","description":"Sent when a checkout is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointcheckout_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCheckoutUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"order.created":{"post":{"summary":"order.created","description":"Sent when a new order is created.\n\n**Discord & Slack support:** Full","operationId":"_endpointorder_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOrderCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.created":{"post":{"summary":"subscription.created","description":"Sent when a new subscription is created.\n\n**Discord & Slack support:** Full","operationId":"_endpointsubscription_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.updated":{"post":{"summary":"subscription.updated","description":"Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord & Slack support:** On cancellation and revocation. Renewals are skipped.","operationId":"_endpointsubscription_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.active":{"post":{"summary":"subscription.active","description":"Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord & Slack support:** Full","operationId":"_endpointsubscription_active_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionActivePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.canceled":{"post":{"summary":"subscription.canceled","description":"Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord & Slack support:** Full","operationId":"_endpointsubscription_canceled_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionCanceledPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"subscription.revoked":{"post":{"summary":"subscription.revoked","description":"Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord & Slack support:** Full","operationId":"_endpointsubscription_revoked_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRevokedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"product.created":{"post":{"summary":"product.created","description":"Sent when a new product is created.\n\n**Discord & Slack support:** Basic","operationId":"_endpointproduct_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookProductCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"product.updated":{"post":{"summary":"product.updated","description":"Sent when a product is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointproduct_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookProductUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"pledge.created":{"post":{"summary":"pledge.created","description":"Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord & Slack support:** Full","operationId":"_endpointpledge_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPledgeCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"pledge.updated":{"post":{"summary":"pledge.updated","description":"Sent when a pledge is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointpledge_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPledgeUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"organization.updated":{"post":{"summary":"organization.updated","description":"Sent when a organization is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointorganization_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOrganizationUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit.created":{"post":{"summary":"benefit.created","description":"Sent when a new benefit is created.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit.updated":{"post":{"summary":"benefit.updated","description":"Sent when a benefit is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit_grant.created":{"post":{"summary":"benefit_grant.created","description":"Sent when a new benefit grant is created.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_grant_created_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitGrantCreatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit_grant.updated":{"post":{"summary":"benefit_grant.updated","description":"Sent when a new benefit grant is updated.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_grant_updated_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitGrantUpdatedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"benefit_grant.revoked":{"post":{"summary":"benefit_grant.revoked","description":"Sent when a new benefit grant is revoked.\n\n**Discord & Slack support:** Basic","operationId":"_endpointbenefit_grant_revoked_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookBenefitGrantRevokedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Address":{"properties":{"line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line2"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"type":"string","pattern":"^\\w{2}$","title":"Country"}},"type":"object","required":["country"],"title":"Address"},"AdvertisementCampaign":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id"},"image_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Image Url"},"image_url_dark":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Image Url Dark"},"text":{"type":"string","title":"Text"},"link_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Link Url"}},"type":"object","required":["created_at","modified_at","id","image_url","image_url_dark","text","link_url"],"title":"AdvertisementCampaign"},"AdvertisementCampaignListResource":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdvertisementCampaign"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"},"dimensions":{"prefixItems":[{"type":"integer"},{"type":"integer"}],"items":{"type":"integer"},"type":"array","maxItems":2,"minItems":2,"title":"Dimensions","description":"The dimensions (width, height) in pixels of the advertisement images."}},"type":"object","required":["items","pagination","dimensions"],"title":"AdvertisementCampaignListResource"},"AdvertisementSortProperty":{"type":"string","enum":["created_at","-created_at","granted_at","-granted_at","views","-views","clicks","-clicks"],"title":"AdvertisementSortProperty"},"AlreadyCanceledSubscription":{"properties":{"error":{"type":"string","enum":["AlreadyCanceledSubscription"],"const":"AlreadyCanceledSubscription","title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"AlreadyCanceledSubscription"},"Assignee":{"properties":{"id":{"type":"integer","title":"Id"},"login":{"type":"string","title":"Login"},"html_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Html Url"},"avatar_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Avatar Url"}},"type":"object","required":["id","login","html_url","avatar_url"],"title":"Assignee"},"AttachedCustomField":{"properties":{"custom_field_id":{"type":"string","format":"uuid4","title":"Custom Field Id","description":"ID of the custom field."},"custom_field":{"$ref":"#/components/schemas/CustomField","title":"CustomField"},"order":{"type":"integer","title":"Order","description":"Order of the custom field in the resource."},"required":{"type":"boolean","title":"Required","description":"Whether the value is required for this custom field."}},"type":"object","required":["custom_field_id","custom_field","order","required"],"title":"AttachedCustomField","description":"Schema of a custom field attached to a resource."},"AttachedCustomFieldCreate":{"properties":{"custom_field_id":{"type":"string","format":"uuid4","title":"Custom Field Id","description":"ID of the custom field to attach."},"required":{"type":"boolean","title":"Required","description":"Whether the value is required for this custom field."}},"type":"object","required":["custom_field_id","required"],"title":"AttachedCustomFieldCreate","description":"Schema to attach a custom field to a resource."},"Author":{"properties":{"id":{"type":"integer","title":"Id"},"login":{"type":"string","title":"Login"},"html_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Html Url"},"avatar_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Avatar Url"}},"type":"object","required":["id","login","html_url","avatar_url"],"title":"Author"},"AuthorizeOrganization":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"slug":{"type":"string","title":"Slug"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","slug","avatar_url"],"title":"AuthorizeOrganization"},"AuthorizeResponseOrganization":{"properties":{"client":{"$ref":"#/components/schemas/OAuth2ClientPublic"},"sub_type":{"type":"string","enum":["organization"],"const":"organization","title":"Sub Type"},"sub":{"anyOf":[{"$ref":"#/components/schemas/AuthorizeOrganization"},{"type":"null"}]},"scopes":{"items":{"$ref":"#/components/schemas/Scope"},"type":"array","title":"Scopes"},"organizations":{"items":{"$ref":"#/components/schemas/AuthorizeOrganization"},"type":"array","title":"Organizations"}},"type":"object","required":["client","sub_type","sub","scopes","organizations"],"title":"AuthorizeResponseOrganization"},"AuthorizeResponseUser":{"properties":{"client":{"$ref":"#/components/schemas/OAuth2ClientPublic"},"sub_type":{"type":"string","enum":["user"],"const":"user","title":"Sub Type"},"sub":{"anyOf":[{"$ref":"#/components/schemas/AuthorizeUser"},{"type":"null"}]},"scopes":{"items":{"$ref":"#/components/schemas/Scope"},"type":"array","title":"Scopes"}},"type":"object","required":["client","sub_type","sub","scopes"],"title":"AuthorizeResponseUser"},"AuthorizeUser":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","email","avatar_url"],"title":"AuthorizeUser"},"Benefit":{"anyOf":[{"$ref":"#/components/schemas/BenefitAds"},{"$ref":"#/components/schemas/BenefitCustom"},{"$ref":"#/components/schemas/BenefitDiscord"},{"$ref":"#/components/schemas/BenefitGitHubRepository"},{"$ref":"#/components/schemas/BenefitDownloadables"},{"$ref":"#/components/schemas/BenefitLicenseKeys"}]},"BenefitAds":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["ads"],"const":"ads","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitAdsProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitAds","description":"A benefit of type `ads`.\n\nUse it so your backers can display ads on your README, website, etc."},"BenefitAdsCreate":{"properties":{"type":{"type":"string","enum":["ads"],"const":"ads","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitAdsProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitAdsCreate"},"BenefitAdsProperties":{"properties":{"image_height":{"type":"integer","title":"Image Height","description":"The height of the displayed ad.","default":400},"image_width":{"type":"integer","title":"Image Width","description":"The width of the displayed ad.","default":400}},"type":"object","title":"BenefitAdsProperties","description":"Properties for a benefit of type `ads`."},"BenefitAdsSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["ads"],"const":"ads","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitAdsProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitAdsSubscriber"},"BenefitAdsUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["ads"],"const":"ads","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitAdsProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitAdsUpdate"},"BenefitBase":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"$ref":"#/components/schemas/BenefitType","description":"The type of the benefit."},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id"],"title":"BenefitBase"},"BenefitCreate":{"oneOf":[{"$ref":"#/components/schemas/BenefitCustomCreate"},{"$ref":"#/components/schemas/BenefitAdsCreate"},{"$ref":"#/components/schemas/BenefitDiscordCreate"},{"$ref":"#/components/schemas/BenefitGitHubRepositoryCreate"},{"$ref":"#/components/schemas/BenefitDownloadablesCreate"},{"$ref":"#/components/schemas/BenefitLicenseKeysCreate"}],"discriminator":{"propertyName":"type","mapping":{"ads":"#/components/schemas/BenefitAdsCreate","custom":"#/components/schemas/BenefitCustomCreate","discord":"#/components/schemas/BenefitDiscordCreate","downloadables":"#/components/schemas/BenefitDownloadablesCreate","github_repository":"#/components/schemas/BenefitGitHubRepositoryCreate","license_keys":"#/components/schemas/BenefitLicenseKeysCreate"}}},"BenefitCustom":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["custom"],"const":"custom","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitCustomProperties"},"is_tax_applicable":{"type":"boolean","title":"Is Tax Applicable","deprecated":true}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties","is_tax_applicable"],"title":"BenefitCustom","description":"A benefit of type `custom`.\n\nUse it to grant any kind of benefit that doesn't fit in the other types."},"BenefitCustomCreate":{"properties":{"type":{"type":"string","enum":["custom"],"const":"custom","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitCustomCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitCustomCreate","description":"Schema to create a benefit of type `custom`."},"BenefitCustomCreateProperties":{"properties":{"note":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private note to be shared with customers who have this benefit granted."},{"type":"null"}],"title":"Note"}},"type":"object","title":"BenefitCustomCreateProperties","description":"Properties for creating a benefit of type `custom`."},"BenefitCustomProperties":{"properties":{"note":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private note to be shared with customers who have this benefit granted."},{"type":"null"}],"title":"Note"}},"type":"object","required":["note"],"title":"BenefitCustomProperties","description":"Properties for a benefit of type `custom`."},"BenefitCustomSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["custom"],"const":"custom","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitCustomSubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitCustomSubscriber"},"BenefitCustomSubscriberProperties":{"properties":{"note":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private note to be shared with customers who have this benefit granted."},{"type":"null"}],"title":"Note"}},"type":"object","required":["note"],"title":"BenefitCustomSubscriberProperties","description":"Properties available to subscribers for a benefit of type `custom`."},"BenefitCustomUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["custom"],"const":"custom","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitCustomProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitCustomUpdate"},"BenefitDiscord":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["discord"],"const":"discord","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitDiscordProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitDiscord","description":"A benefit of type `discord`.\n\nUse it to automatically invite your backers to a Discord server."},"BenefitDiscordCreate":{"properties":{"type":{"type":"string","enum":["discord"],"const":"discord","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitDiscordCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitDiscordCreate"},"BenefitDiscordCreateProperties":{"properties":{"guild_token":{"type":"string","title":"Guild Token"},"role_id":{"type":"string","title":"Role Id","description":"The ID of the Discord role to grant."}},"type":"object","required":["guild_token","role_id"],"title":"BenefitDiscordCreateProperties","description":"Properties to create a benefit of type `discord`."},"BenefitDiscordProperties":{"properties":{"guild_id":{"type":"string","title":"Guild Id","description":"The ID of the Discord server."},"role_id":{"type":"string","title":"Role Id","description":"The ID of the Discord role to grant."},"guild_token":{"type":"string","title":"Guild Token","readOnly":true}},"type":"object","required":["guild_id","role_id","guild_token"],"title":"BenefitDiscordProperties","description":"Properties for a benefit of type `discord`."},"BenefitDiscordSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["discord"],"const":"discord","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitDiscordSubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitDiscordSubscriber"},"BenefitDiscordSubscriberProperties":{"properties":{"guild_id":{"type":"string","title":"Guild Id","description":"The ID of the Discord server."}},"type":"object","required":["guild_id"],"title":"BenefitDiscordSubscriberProperties","description":"Properties available to subscribers for a benefit of type `discord`."},"BenefitDiscordUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["discord"],"const":"discord","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitDiscordCreateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitDiscordUpdate"},"BenefitDownloadables":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitDownloadablesProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitDownloadables"},"BenefitDownloadablesCreate":{"properties":{"type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitDownloadablesCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitDownloadablesCreate"},"BenefitDownloadablesCreateProperties":{"properties":{"archived":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Archived","default":{}},"files":{"items":{"type":"string","format":"uuid4"},"type":"array","minItems":1,"title":"Files"}},"type":"object","required":["files"],"title":"BenefitDownloadablesCreateProperties"},"BenefitDownloadablesProperties":{"properties":{"archived":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Archived"},"files":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Files"}},"type":"object","required":["archived","files"],"title":"BenefitDownloadablesProperties"},"BenefitDownloadablesSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitDownloadablesSubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitDownloadablesSubscriber"},"BenefitDownloadablesSubscriberProperties":{"properties":{"active_files":{"items":{"type":"string","format":"uuid4"},"type":"array","title":"Active Files"}},"type":"object","required":["active_files"],"title":"BenefitDownloadablesSubscriberProperties"},"BenefitDownloadablesUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitDownloadablesCreateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitDownloadablesUpdate"},"BenefitGitHubRepository":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitGitHubRepositoryProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitGitHubRepository","description":"A benefit of type `github_repository`.\n\nUse it to automatically invite your backers to a private GitHub repository."},"BenefitGitHubRepositoryCreate":{"properties":{"type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitGitHubRepositoryCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitGitHubRepositoryCreate"},"BenefitGitHubRepositoryCreateProperties":{"properties":{"repository_owner":{"type":"string","title":"Repository Owner","description":"The owner of the repository.","examples":["polarsource"]},"repository_name":{"type":"string","title":"Repository Name","description":"The name of the repository.","examples":["private_repo"]},"permission":{"type":"string","enum":["pull","triage","push","maintain","admin"],"title":"Permission","description":"The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)."}},"type":"object","required":["repository_owner","repository_name","permission"],"title":"BenefitGitHubRepositoryCreateProperties","description":"Properties to create a benefit of type `github_repository`."},"BenefitGitHubRepositoryProperties":{"properties":{"repository_owner":{"type":"string","title":"Repository Owner","description":"The owner of the repository.","examples":["polarsource"]},"repository_name":{"type":"string","title":"Repository Name","description":"The name of the repository.","examples":["private_repo"]},"permission":{"type":"string","enum":["pull","triage","push","maintain","admin"],"title":"Permission","description":"The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)."},"repository_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Repository Id","deprecated":true}},"type":"object","required":["repository_owner","repository_name","permission"],"title":"BenefitGitHubRepositoryProperties","description":"Properties for a benefit of type `github_repository`."},"BenefitGitHubRepositorySubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitGitHubRepositorySubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitGitHubRepositorySubscriber"},"BenefitGitHubRepositorySubscriberProperties":{"properties":{"repository_owner":{"type":"string","title":"Repository Owner","description":"The owner of the repository.","examples":["polarsource"]},"repository_name":{"type":"string","title":"Repository Name","description":"The name of the repository.","examples":["private_repo"]}},"type":"object","required":["repository_owner","repository_name"],"title":"BenefitGitHubRepositorySubscriberProperties","description":"Properties available to subscribers for a benefit of type `github_repository`."},"BenefitGitHubRepositoryUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitGitHubRepositoryCreateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitGitHubRepositoryUpdate"},"BenefitGrant":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the grant."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At","description":"The timestamp when the benefit was granted. If `None`, the benefit is not granted."},"is_granted":{"type":"boolean","title":"Is Granted","description":"Whether the benefit is granted."},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At","description":"The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."},"is_revoked":{"type":"boolean","title":"Is Revoked","description":"Whether the benefit is revoked."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"The ID of the subscription that granted this benefit."},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id","description":"The ID of the order that granted this benefit."},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id","description":"The ID of the customer concerned by this grant."},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The ID of the benefit concerned by this grant."},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitGrantDiscordProperties"},{"$ref":"#/components/schemas/BenefitGrantGitHubRepositoryProperties"},{"$ref":"#/components/schemas/BenefitGrantDownloadablesProperties"},{"$ref":"#/components/schemas/BenefitGrantLicenseKeysProperties"},{"$ref":"#/components/schemas/BenefitGrantAdsProperties"},{"$ref":"#/components/schemas/BenefitGrantCustomProperties"}],"title":"Properties"}},"type":"object","required":["created_at","modified_at","id","is_granted","is_revoked","subscription_id","order_id","customer_id","user_id","benefit_id","properties"],"title":"BenefitGrant"},"BenefitGrantAdsProperties":{"properties":{"advertisement_campaign_id":{"type":"string","title":"Advertisement Campaign Id"}},"type":"object","required":["advertisement_campaign_id"],"title":"BenefitGrantAdsProperties"},"BenefitGrantCustomProperties":{"properties":{},"type":"object","title":"BenefitGrantCustomProperties"},"BenefitGrantDiscordProperties":{"properties":{"account_id":{"type":"string","title":"Account Id"},"guild_id":{"type":"string","title":"Guild Id"},"role_id":{"type":"string","title":"Role Id"}},"type":"object","title":"BenefitGrantDiscordProperties"},"BenefitGrantDownloadablesProperties":{"properties":{"files":{"items":{"type":"string"},"type":"array","title":"Files"}},"type":"object","title":"BenefitGrantDownloadablesProperties"},"BenefitGrantGitHubRepositoryProperties":{"properties":{"account_id":{"type":"string","title":"Account Id"},"repository_owner":{"type":"string","title":"Repository Owner"},"repository_name":{"type":"string","title":"Repository Name"},"permission":{"type":"string","enum":["pull","triage","push","maintain","admin"],"title":"Permission"}},"type":"object","title":"BenefitGrantGitHubRepositoryProperties"},"BenefitGrantLicenseKeysProperties":{"properties":{"license_key_id":{"type":"string","title":"License Key Id"},"display_key":{"type":"string","title":"Display Key"}},"type":"object","title":"BenefitGrantLicenseKeysProperties"},"BenefitGrantWebhook":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the grant."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At","description":"The timestamp when the benefit was granted. If `None`, the benefit is not granted."},"is_granted":{"type":"boolean","title":"Is Granted","description":"Whether the benefit is granted."},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At","description":"The timestamp when the benefit was revoked. If `None`, the benefit is not revoked."},"is_revoked":{"type":"boolean","title":"Is Revoked","description":"Whether the benefit is revoked."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"The ID of the subscription that granted this benefit."},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id","description":"The ID of the order that granted this benefit."},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id","description":"The ID of the customer concerned by this grant."},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The ID of the benefit concerned by this grant."},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitGrantDiscordProperties"},{"$ref":"#/components/schemas/BenefitGrantGitHubRepositoryProperties"},{"$ref":"#/components/schemas/BenefitGrantDownloadablesProperties"},{"$ref":"#/components/schemas/BenefitGrantLicenseKeysProperties"},{"$ref":"#/components/schemas/BenefitGrantAdsProperties"},{"$ref":"#/components/schemas/BenefitGrantCustomProperties"}],"title":"Properties"},"benefit":{"$ref":"#/components/schemas/Benefit","title":"Benefit"},"previous_properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitGrantDiscordProperties"},{"$ref":"#/components/schemas/BenefitGrantGitHubRepositoryProperties"},{"$ref":"#/components/schemas/BenefitGrantDownloadablesProperties"},{"$ref":"#/components/schemas/BenefitGrantLicenseKeysProperties"},{"$ref":"#/components/schemas/BenefitGrantAdsProperties"},{"$ref":"#/components/schemas/BenefitGrantCustomProperties"},{"type":"null"}],"title":"Previous Properties"}},"type":"object","required":["created_at","modified_at","id","is_granted","is_revoked","subscription_id","order_id","customer_id","user_id","benefit_id","properties","benefit"],"title":"BenefitGrantWebhook"},"BenefitLicenseKeyActivationProperties":{"properties":{"limit":{"type":"integer","maximum":50.0,"exclusiveMinimum":0.0,"title":"Limit"},"enable_customer_admin":{"type":"boolean","title":"Enable Customer Admin"}},"type":"object","required":["limit","enable_customer_admin"],"title":"BenefitLicenseKeyActivationProperties"},"BenefitLicenseKeyExpirationProperties":{"properties":{"ttl":{"type":"integer","exclusiveMinimum":0.0,"title":"Ttl"},"timeframe":{"type":"string","enum":["year","month","day"],"title":"Timeframe"}},"type":"object","required":["ttl","timeframe"],"title":"BenefitLicenseKeyExpirationProperties"},"BenefitLicenseKeys":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"properties":{"$ref":"#/components/schemas/BenefitLicenseKeysProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","properties"],"title":"BenefitLicenseKeys"},"BenefitLicenseKeysCreate":{"properties":{"type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Type"},"description":{"type":"string","maxLength":42,"minLength":3,"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the benefit. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/BenefitLicenseKeysCreateProperties"}},"type":"object","required":["type","description","properties"],"title":"BenefitLicenseKeysCreate"},"BenefitLicenseKeysCreateProperties":{"properties":{"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"expires":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyExpirationProperties"},{"type":"null"}]},"activations":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyActivationProperties"},{"type":"null"}]},"limit_usage":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Limit Usage"}},"type":"object","title":"BenefitLicenseKeysCreateProperties"},"BenefitLicenseKeysProperties":{"properties":{"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"expires":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyExpirationProperties"},{"type":"null"}]},"activations":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyActivationProperties"},{"type":"null"}]},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"}},"type":"object","required":["prefix","expires","activations","limit_usage"],"title":"BenefitLicenseKeysProperties"},"BenefitLicenseKeysSubscriber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the benefit."},"type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Type"},"description":{"type":"string","title":"Description","description":"The description of the benefit."},"selectable":{"type":"boolean","title":"Selectable","description":"Whether the benefit is selectable when creating a product."},"deletable":{"type":"boolean","title":"Deletable","description":"Whether the benefit is deletable."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the benefit."},"organization":{"$ref":"#/components/schemas/Organization"},"properties":{"$ref":"#/components/schemas/BenefitLicenseKeysSubscriberProperties"}},"type":"object","required":["created_at","modified_at","id","type","description","selectable","deletable","organization_id","organization","properties"],"title":"BenefitLicenseKeysSubscriber"},"BenefitLicenseKeysSubscriberProperties":{"properties":{"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"expires":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyExpirationProperties"},{"type":"null"}]},"activations":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeyActivationProperties"},{"type":"null"}]},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"}},"type":"object","required":["prefix","expires","activations","limit_usage"],"title":"BenefitLicenseKeysSubscriberProperties"},"BenefitLicenseKeysUpdate":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":42,"minLength":3},{"type":"null"}],"title":"Description","description":"The description of the benefit. Will be displayed on products having this benefit."},"type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/BenefitLicenseKeysCreateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"BenefitLicenseKeysUpdate"},"BenefitType":{"type":"string","enum":["custom","ads","discord","github_repository","downloadables","license_keys"],"title":"BenefitType"},"Checkout":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"$ref":"#/components/schemas/PaymentProcessor","description":"Payment processor used."},"status":{"$ref":"#/components/schemas/CheckoutStatus","description":"Status of the checkout session."},"client_secret":{"type":"string","title":"Client Secret","description":"Client secret used to update and complete the checkout session from the client."},"url":{"type":"string","title":"Url","description":"URL where the customer can access the checkout session."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Expiration date and time of the checkout session."},"success_url":{"type":"string","title":"Success Url","description":"URL where the customer will be redirected after a successful payment."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"tax_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Amount","description":"Computed tax amount to pay in cents."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"Currency code of the checkout session."},"subtotal_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subtotal Amount","description":"Subtotal amount in cents, including discounts and before tax."},"total_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Amount","description":"Total amount to pay in cents, including discounts and after tax."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount applied to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"is_discount_applicable":{"type":"boolean","title":"Is Discount Applicable","description":"Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable."},"is_free_product_price":{"type":"boolean","title":"Is Free Product Price","description":"Whether the product price is free, regardless of discounts."},"is_payment_required":{"type":"boolean","title":"Is Payment Required","description":"Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount."},"is_payment_setup_required":{"type":"boolean","title":"Is Payment Setup Required","description":"Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles."},"is_payment_form_required":{"type":"boolean","title":"Is Payment Form Required","description":"Whether the checkout requires a payment form, whether because of a payment or payment method setup."},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"payment_processor_metadata":{"type":"object","title":"Payment Processor Metadata"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"product":{"$ref":"#/components/schemas/CheckoutProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountFixedRepeatDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageRepeatDuration"}]},{"type":"null"}],"title":"Discount"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomField"},"type":"array","title":"Attached Custom Fields"},"customer_metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Customer Metadata"}},"type":"object","required":["created_at","modified_at","id","payment_processor","status","client_secret","url","expires_at","success_url","embed_origin","amount","tax_amount","currency","subtotal_amount","total_amount","product_id","product_price_id","discount_id","allow_discount_codes","is_discount_applicable","is_free_product_price","is_payment_required","is_payment_setup_required","is_payment_form_required","customer_id","customer_name","customer_email","customer_ip_address","customer_billing_address","customer_tax_id","payment_processor_metadata","metadata","product","product_price","discount","subscription_id","attached_custom_fields","customer_metadata"],"title":"Checkout","description":"Checkout session data retrieved using an access token."},"CheckoutConfirmStripe":{"properties":{"custom_field_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Custom Field Data","description":"Key-value object storing custom field values."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id","description":"ID of the product price to checkout. Must correspond to a price linked to the same product."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"discount_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Code","description":"Discount code to apply to the checkout."},"confirmation_token_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation Token Id","description":"ID of the Stripe confirmation token. Required for fixed prices and custom prices."}},"type":"object","title":"CheckoutConfirmStripe","description":"Confirm a checkout session using a Stripe confirmation token."},"CheckoutCreate":{"anyOf":[{"$ref":"#/components/schemas/CheckoutProductCreate"},{"$ref":"#/components/schemas/CheckoutPriceCreate"}]},"CheckoutDiscountFixedOnceForeverDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["duration","type","amount","currency","id","name","code"],"title":"CheckoutDiscountFixedOnceForeverDuration","description":"Schema for a fixed amount discount that is applied once or forever."},"CheckoutDiscountFixedRepeatDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["duration","duration_in_months","type","amount","currency","id","name","code"],"title":"CheckoutDiscountFixedRepeatDuration","description":"Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months."},"CheckoutDiscountPercentageOnceForeverDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["duration","type","basis_points","id","name","code"],"title":"CheckoutDiscountPercentageOnceForeverDuration","description":"Schema for a percentage discount that is applied once or forever."},"CheckoutDiscountPercentageRepeatDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["duration","duration_in_months","type","basis_points","id","name","code"],"title":"CheckoutDiscountPercentageRepeatDuration","description":"Schema for a percentage discount that is applied on every invoice\nfor a certain number of months."},"CheckoutLegacy":{"properties":{"id":{"type":"string","title":"Id","description":"The ID of the checkout."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"URL the customer should be redirected to complete the purchase."},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"product":{"$ref":"#/components/schemas/CheckoutProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"}},"type":"object","required":["id","customer_email","customer_name","product","product_price"],"title":"CheckoutLegacy","description":"A checkout session."},"CheckoutLegacyCreate":{"properties":{"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to subscribe to."},"success_url":{"type":"string","minLength":1,"format":"uri","title":"Success Url","description":"URL where the customer will be redirected after a successful subscription. You can add the `session_id={CHECKOUT_SESSION_ID}` query parameter to retrieve the checkout session id."},"customer_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Customer Email","description":"If you already know the email of your customer, you can set it. It'll be pre-filled on the checkout page."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"ID of the subscription to update. If not provided, a new subscription will be created."}},"type":"object","required":["product_price_id","success_url"],"title":"CheckoutLegacyCreate"},"CheckoutLink":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"payment_processor":{"$ref":"#/components/schemas/PaymentProcessor","description":"Payment processor used."},"client_secret":{"type":"string","title":"Client Secret","description":"Client secret used to access the checkout link."},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Optional label to distinguish links internally"},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id","description":"ID of the product price to checkout. First available price will be selected unless an explicit price ID is set."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."},"product":{"$ref":"#/components/schemas/CheckoutLinkProduct"},"product_price":{"anyOf":[{"$ref":"#/components/schemas/ProductPrice"},{"type":"null"}]},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountFixedRepeatDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDurationBase"}],"title":"CheckoutLinkDiscount"},{"type":"null"}],"title":"Discount"},"url":{"type":"string","title":"Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","payment_processor","client_secret","success_url","label","allow_discount_codes","product_id","product_price_id","discount_id","product","product_price","discount","url"],"title":"CheckoutLink","description":"Checkout link data."},"CheckoutLinkCreate":{"anyOf":[{"$ref":"#/components/schemas/CheckoutLinkProductCreate"},{"$ref":"#/components/schemas/CheckoutLinkPriceCreate"}]},"CheckoutLinkPriceCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"payment_processor":{"type":"string","enum":["stripe"],"const":"stripe","title":"Payment Processor","description":"Payment processor to use. Currently only Stripe is supported."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Optional label to distinguish links internally"},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.","default":true},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."}},"type":"object","required":["payment_processor","product_price_id"],"title":"CheckoutLinkPriceCreate"},"CheckoutLinkProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/BenefitBase"},"type":"array","title":"BenefitPublic","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","prices","benefits","medias"],"title":"CheckoutLinkProduct","description":"Product data for a checkout link."},"CheckoutLinkProductCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"payment_processor":{"type":"string","enum":["stripe"],"const":"stripe","title":"Payment Processor","description":"Payment processor to use. Currently only Stripe is supported."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Optional label to distinguish links internally"},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.","default":true},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout. First available price will be selected."}},"type":"object","required":["payment_processor","product_id"],"title":"CheckoutLinkProductCreate"},"CheckoutLinkSortProperty":{"type":"string","enum":["created_at","-created_at"],"title":"CheckoutLinkSortProperty"},"CheckoutLinkUpdate":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"allow_discount_codes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."}},"type":"object","title":"CheckoutLinkUpdate","description":"Schema to update an existing checkout link."},"CheckoutPriceCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"type":"string","enum":["stripe"],"const":"stripe","title":"Payment Processor","description":"Payment processor to use. Currently only Stripe is supported."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.","default":true},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id","description":"ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer."},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"customer_metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Customer Metadata","description":"Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."}},"type":"object","required":["payment_processor","product_price_id"],"title":"CheckoutPriceCreate","description":"Create a new checkout session from a product price.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription."},"CheckoutProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/BenefitBase"},"type":"array","title":"BenefitPublic","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","prices","benefits","medias"],"title":"CheckoutProduct","description":"Product data for a checkout session."},"CheckoutProductCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"type":"string","enum":["stripe"],"const":"stripe","title":"Payment Processor","description":"Payment processor to use. Currently only Stripe is supported."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.","default":true},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id","description":"ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer."},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"customer_metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Customer Metadata","description":"Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id","description":"ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout. First available price will be selected."}},"type":"object","required":["payment_processor","product_id"],"title":"CheckoutProductCreate","description":"Create a new checkout session from a product.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription."},"CheckoutPublic":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"$ref":"#/components/schemas/PaymentProcessor","description":"Payment processor used."},"status":{"$ref":"#/components/schemas/CheckoutStatus","description":"Status of the checkout session."},"client_secret":{"type":"string","title":"Client Secret","description":"Client secret used to update and complete the checkout session from the client."},"url":{"type":"string","title":"Url","description":"URL where the customer can access the checkout session."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Expiration date and time of the checkout session."},"success_url":{"type":"string","title":"Success Url","description":"URL where the customer will be redirected after a successful payment."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"tax_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Amount","description":"Computed tax amount to pay in cents."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"Currency code of the checkout session."},"subtotal_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subtotal Amount","description":"Subtotal amount in cents, including discounts and before tax."},"total_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Amount","description":"Total amount to pay in cents, including discounts and after tax."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount applied to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"is_discount_applicable":{"type":"boolean","title":"Is Discount Applicable","description":"Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable."},"is_free_product_price":{"type":"boolean","title":"Is Free Product Price","description":"Whether the product price is free, regardless of discounts."},"is_payment_required":{"type":"boolean","title":"Is Payment Required","description":"Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount."},"is_payment_setup_required":{"type":"boolean","title":"Is Payment Setup Required","description":"Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles."},"is_payment_form_required":{"type":"boolean","title":"Is Payment Form Required","description":"Whether the checkout requires a payment form, whether because of a payment or payment method setup."},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"payment_processor_metadata":{"type":"object","title":"Payment Processor Metadata"},"product":{"$ref":"#/components/schemas/CheckoutProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountFixedRepeatDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageRepeatDuration"}]},{"type":"null"}],"title":"Discount"},"organization":{"$ref":"#/components/schemas/Organization"},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomField"},"type":"array","title":"Attached Custom Fields"}},"type":"object","required":["created_at","modified_at","id","payment_processor","status","client_secret","url","expires_at","success_url","embed_origin","amount","tax_amount","currency","subtotal_amount","total_amount","product_id","product_price_id","discount_id","allow_discount_codes","is_discount_applicable","is_free_product_price","is_payment_required","is_payment_setup_required","is_payment_form_required","customer_id","customer_name","customer_email","customer_ip_address","customer_billing_address","customer_tax_id","payment_processor_metadata","product","product_price","discount","organization","attached_custom_fields"],"title":"CheckoutPublic","description":"Checkout session data retrieved using the client secret."},"CheckoutPublicConfirmed":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"payment_processor":{"$ref":"#/components/schemas/PaymentProcessor","description":"Payment processor used."},"status":{"type":"string","enum":["confirmed"],"const":"confirmed","title":"Status"},"client_secret":{"type":"string","title":"Client Secret","description":"Client secret used to update and complete the checkout session from the client."},"url":{"type":"string","title":"Url","description":"URL where the customer can access the checkout session."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Expiration date and time of the checkout session."},"success_url":{"type":"string","title":"Success Url","description":"URL where the customer will be redirected after a successful payment."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"tax_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Amount","description":"Computed tax amount to pay in cents."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"Currency code of the checkout session."},"subtotal_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subtotal Amount","description":"Subtotal amount in cents, including discounts and before tax."},"total_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Amount","description":"Total amount to pay in cents, including discounts and after tax."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"ID of the product to checkout."},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id","description":"ID of the product price to checkout."},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount applied to the checkout."},"allow_discount_codes":{"type":"boolean","title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"is_discount_applicable":{"type":"boolean","title":"Is Discount Applicable","description":"Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable."},"is_free_product_price":{"type":"boolean","title":"Is Free Product Price","description":"Whether the product price is free, regardless of discounts."},"is_payment_required":{"type":"boolean","title":"Is Payment Required","description":"Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount."},"is_payment_setup_required":{"type":"boolean","title":"Is Payment Setup Required","description":"Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles."},"is_payment_form_required":{"type":"boolean","title":"Is Payment Form Required","description":"Whether the checkout requires a payment form, whether because of a payment or payment method setup."},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"payment_processor_metadata":{"type":"object","title":"Payment Processor Metadata"},"product":{"$ref":"#/components/schemas/CheckoutProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountFixedRepeatDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"},{"$ref":"#/components/schemas/CheckoutDiscountPercentageRepeatDuration"}]},{"type":"null"}],"title":"Discount"},"organization":{"$ref":"#/components/schemas/Organization"},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomField"},"type":"array","title":"Attached Custom Fields"},"customer_session_token":{"type":"string","title":"Customer Session Token"}},"type":"object","required":["created_at","modified_at","id","payment_processor","status","client_secret","url","expires_at","success_url","embed_origin","amount","tax_amount","currency","subtotal_amount","total_amount","product_id","product_price_id","discount_id","allow_discount_codes","is_discount_applicable","is_free_product_price","is_payment_required","is_payment_setup_required","is_payment_form_required","customer_id","customer_name","customer_email","customer_ip_address","customer_billing_address","customer_tax_id","payment_processor_metadata","product","product_price","discount","organization","attached_custom_fields","customer_session_token"],"title":"CheckoutPublicConfirmed","description":"Checkout session data retrieved using the client secret after confirmation.\n\nIt contains a customer session token to retrieve order information\nright after the checkout."},"CheckoutSortProperty":{"type":"string","enum":["created_at","-created_at","expires_at","-expires_at"],"title":"CheckoutSortProperty"},"CheckoutStatus":{"type":"string","enum":["open","expired","confirmed","succeeded","failed"],"title":"CheckoutStatus"},"CheckoutUpdate":{"properties":{"custom_field_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Custom Field Data","description":"Key-value object storing custom field values."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id","description":"ID of the product price to checkout. Must correspond to a price linked to the same product."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id","description":"ID of the discount to apply to the checkout."},"allow_discount_codes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Discount Codes","description":"Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it."},"customer_ip_address":{"anyOf":[{"type":"string","format":"ipvanyaddress","description":"IP address of the customer. Used to detect tax location."},{"type":"null"}],"title":"Customer Ip Address"},"customer_metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Customer Metadata","description":"Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"success_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Success Url","description":"URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id."},"embed_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embed Origin","description":"If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page."}},"type":"object","title":"CheckoutUpdate","description":"Update an existing checkout session using an access token."},"CheckoutUpdatePublic":{"properties":{"custom_field_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Custom Field Data","description":"Key-value object storing custom field values."},"product_price_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Product Price Id","description":"ID of the product price to checkout. Must correspond to a price linked to the same product."},"amount":{"anyOf":[{"type":"integer","description":"Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices."},{"type":"null"}],"title":"Amount"},"customer_name":{"anyOf":[{"type":"string","description":"Name of the customer."},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string","format":"email","description":"Email address of the customer."},{"type":"null"}],"title":"Customer Email"},"customer_billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Billing address of the customer."},{"type":"null"}]},"customer_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Tax Id"},"discount_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Code","description":"Discount code to apply to the checkout."}},"type":"object","title":"CheckoutUpdatePublic","description":"Update an existing checkout session using the client secret."},"CurrencyAmount":{"properties":{"currency":{"type":"string","title":"Currency","description":"Three letter currency code (eg: USD)"},"amount":{"type":"integer","title":"Amount","description":"Amount in the currencies smallest unit (cents if currency is USD)"}},"type":"object","required":["currency","amount"],"title":"CurrencyAmount"},"CustomField":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldText"},{"$ref":"#/components/schemas/CustomFieldNumber"},{"$ref":"#/components/schemas/CustomFieldDate"},{"$ref":"#/components/schemas/CustomFieldCheckbox"},{"$ref":"#/components/schemas/CustomFieldSelect"}],"discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CustomFieldCheckbox","date":"#/components/schemas/CustomFieldDate","number":"#/components/schemas/CustomFieldNumber","select":"#/components/schemas/CustomFieldSelect","text":"#/components/schemas/CustomFieldText"}}},"CustomFieldCheckbox":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["checkbox"],"const":"checkbox","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldCheckboxProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldCheckbox","description":"Schema for a custom field of type checkbox."},"CustomFieldCheckboxProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"}},"type":"object","title":"CustomFieldCheckboxProperties"},"CustomFieldCreate":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldCreateText"},{"$ref":"#/components/schemas/CustomFieldCreateNumber"},{"$ref":"#/components/schemas/CustomFieldCreateDate"},{"$ref":"#/components/schemas/CustomFieldCreateCheckbox"},{"$ref":"#/components/schemas/CustomFieldCreateSelect"}],"discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CustomFieldCreateCheckbox","date":"#/components/schemas/CustomFieldCreateDate","number":"#/components/schemas/CustomFieldCreateNumber","select":"#/components/schemas/CustomFieldCreateSelect","text":"#/components/schemas/CustomFieldCreateText"}}},"CustomFieldCreateCheckbox":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["checkbox"],"const":"checkbox","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldCheckboxProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateCheckbox","description":"Schema to create a custom field of type checkbox."},"CustomFieldCreateDate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["date"],"const":"date","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldDateProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateDate","description":"Schema to create a custom field of type date."},"CustomFieldCreateNumber":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["number"],"const":"number","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldNumberProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateNumber","description":"Schema to create a custom field of type number."},"CustomFieldCreateSelect":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["select"],"const":"select","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldSelectProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateSelect","description":"Schema to create a custom field of type select."},"CustomFieldCreateText":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"type":{"type":"string","enum":["text"],"const":"text","title":"Type"},"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the custom field."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the custom field. **Required unless you use an organization token.**"},"properties":{"$ref":"#/components/schemas/CustomFieldTextProperties"}},"type":"object","required":["type","slug","name","properties"],"title":"CustomFieldCreateText","description":"Schema to create a custom field of type text."},"CustomFieldDate":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["date"],"const":"date","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldDateProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldDate","description":"Schema for a custom field of type date."},"CustomFieldDateProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"},"ge":{"type":"integer","title":"Ge"},"le":{"type":"integer","title":"Le"}},"type":"object","title":"CustomFieldDateProperties"},"CustomFieldNumber":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["number"],"const":"number","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldNumberProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldNumber","description":"Schema for a custom field of type number."},"CustomFieldNumberProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"},"ge":{"type":"integer","title":"Ge"},"le":{"type":"integer","title":"Le"}},"type":"object","title":"CustomFieldNumberProperties"},"CustomFieldSelect":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["select"],"const":"select","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldSelectProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldSelect","description":"Schema for a custom field of type select."},"CustomFieldSelectOption":{"properties":{"value":{"type":"string","minLength":1,"title":"Value"},"label":{"type":"string","minLength":1,"title":"Label"}},"type":"object","required":["value","label"],"title":"CustomFieldSelectOption"},"CustomFieldSelectProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"},"options":{"items":{"$ref":"#/components/schemas/CustomFieldSelectOption"},"type":"array","title":"Options"}},"type":"object","required":["options"],"title":"CustomFieldSelectProperties"},"CustomFieldSortProperty":{"type":"string","enum":["created_at","-created_at","slug","-slug","name","-name","type","-type"],"title":"CustomFieldSortProperty"},"CustomFieldText":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"type":{"type":"string","enum":["text"],"const":"text","title":"Type"},"slug":{"type":"string","title":"Slug","description":"Identifier of the custom field. It'll be used as key when storing the value."},"name":{"type":"string","title":"Name","description":"Name of the custom field."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the custom field.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"properties":{"$ref":"#/components/schemas/CustomFieldTextProperties"}},"type":"object","required":["created_at","modified_at","id","metadata","type","slug","name","organization_id","properties"],"title":"CustomFieldText","description":"Schema for a custom field of type text."},"CustomFieldTextProperties":{"properties":{"form_label":{"type":"string","minLength":1,"title":"Form Label"},"form_help_text":{"type":"string","minLength":1,"title":"Form Help Text"},"form_placeholder":{"type":"string","minLength":1,"title":"Form Placeholder"},"textarea":{"type":"boolean","title":"Textarea"},"min_length":{"type":"integer","minimum":0.0,"title":"Min Length"},"max_length":{"type":"integer","minimum":0.0,"title":"Max Length"}},"type":"object","title":"CustomFieldTextProperties"},"CustomFieldType":{"type":"string","enum":["text","number","date","checkbox","select"],"title":"CustomFieldType"},"CustomFieldUpdate":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldUpdateText"},{"$ref":"#/components/schemas/CustomFieldUpdateNumber"},{"$ref":"#/components/schemas/CustomFieldUpdateDate"},{"$ref":"#/components/schemas/CustomFieldUpdateCheckbox"},{"$ref":"#/components/schemas/CustomFieldUpdateSelect"}],"discriminator":{"propertyName":"type","mapping":{"checkbox":"#/components/schemas/CustomFieldUpdateCheckbox","date":"#/components/schemas/CustomFieldUpdateDate","number":"#/components/schemas/CustomFieldUpdateNumber","select":"#/components/schemas/CustomFieldUpdateSelect","text":"#/components/schemas/CustomFieldUpdateText"}}},"CustomFieldUpdateCheckbox":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["checkbox"],"const":"checkbox","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldCheckboxProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateCheckbox","description":"Schema to update a custom field of type checkbox."},"CustomFieldUpdateDate":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["date"],"const":"date","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDateProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateDate","description":"Schema to update a custom field of type date."},"CustomFieldUpdateNumber":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["number"],"const":"number","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldNumberProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateNumber","description":"Schema to update a custom field of type number."},"CustomFieldUpdateSelect":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["select"],"const":"select","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldSelectProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateSelect","description":"Schema to update a custom field of type select."},"CustomFieldUpdateText":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the custom field."},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-_]+$","description":"Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens."},{"type":"null"}],"title":"Slug"},"type":{"type":"string","enum":["text"],"const":"text","title":"Type"},"properties":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldTextProperties"},{"type":"null"}]}},"type":"object","required":["type"],"title":"CustomFieldUpdateText","description":"Schema to update a custom field of type text."},"Customer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"avatar_url":{"type":"string","title":"Avatar Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","email","email_verified","name","billing_address","tax_id","organization_id","avatar_url"],"title":"Customer","description":"A customer in an organization."},"CustomerBenefitGrant":{"anyOf":[{"$ref":"#/components/schemas/CustomerBenefitGrantDiscord"},{"$ref":"#/components/schemas/CustomerBenefitGrantGitHubRepository"},{"$ref":"#/components/schemas/CustomerBenefitGrantDownloadables"},{"$ref":"#/components/schemas/CustomerBenefitGrantLicenseKeys"},{"$ref":"#/components/schemas/CustomerBenefitGrantAds"},{"$ref":"#/components/schemas/CustomerBenefitGrantCustom"}]},"CustomerBenefitGrantAds":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitAdsSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantAdsProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantAds"},"CustomerBenefitGrantAdsUpdate":{"properties":{"benefit_type":{"type":"string","enum":["ads"],"const":"ads","title":"Benefit Type"}},"type":"object","required":["benefit_type"],"title":"CustomerBenefitGrantAdsUpdate"},"CustomerBenefitGrantCustom":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitCustomSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantCustomProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantCustom"},"CustomerBenefitGrantCustomUpdate":{"properties":{"benefit_type":{"type":"string","enum":["custom"],"const":"custom","title":"Benefit Type"}},"type":"object","required":["benefit_type"],"title":"CustomerBenefitGrantCustomUpdate"},"CustomerBenefitGrantDiscord":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitDiscordSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantDiscordProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantDiscord"},"CustomerBenefitGrantDiscordPropertiesUpdate":{"properties":{"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["account_id"],"title":"CustomerBenefitGrantDiscordPropertiesUpdate"},"CustomerBenefitGrantDiscordUpdate":{"properties":{"benefit_type":{"type":"string","enum":["discord"],"const":"discord","title":"Benefit Type"},"properties":{"$ref":"#/components/schemas/CustomerBenefitGrantDiscordPropertiesUpdate"}},"type":"object","required":["benefit_type","properties"],"title":"CustomerBenefitGrantDiscordUpdate"},"CustomerBenefitGrantDownloadables":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitDownloadablesSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantDownloadablesProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantDownloadables"},"CustomerBenefitGrantDownloadablesUpdate":{"properties":{"benefit_type":{"type":"string","enum":["downloadables"],"const":"downloadables","title":"Benefit Type"}},"type":"object","required":["benefit_type"],"title":"CustomerBenefitGrantDownloadablesUpdate"},"CustomerBenefitGrantGitHubRepository":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitGitHubRepositorySubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantGitHubRepositoryProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantGitHubRepository"},"CustomerBenefitGrantGitHubRepositoryPropertiesUpdate":{"properties":{"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["account_id"],"title":"CustomerBenefitGrantGitHubRepositoryPropertiesUpdate"},"CustomerBenefitGrantGitHubRepositoryUpdate":{"properties":{"benefit_type":{"type":"string","enum":["github_repository"],"const":"github_repository","title":"Benefit Type"},"properties":{"$ref":"#/components/schemas/CustomerBenefitGrantGitHubRepositoryPropertiesUpdate"}},"type":"object","required":["benefit_type","properties"],"title":"CustomerBenefitGrantGitHubRepositoryUpdate"},"CustomerBenefitGrantLicenseKeys":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Order Id"},"is_granted":{"type":"boolean","title":"Is Granted"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"benefit":{"$ref":"#/components/schemas/BenefitLicenseKeysSubscriber"},"properties":{"$ref":"#/components/schemas/BenefitGrantLicenseKeysProperties"}},"type":"object","required":["created_at","modified_at","id","granted_at","revoked_at","customer_id","benefit_id","subscription_id","order_id","is_granted","is_revoked","benefit","properties"],"title":"CustomerBenefitGrantLicenseKeys"},"CustomerBenefitGrantLicenseKeysUpdate":{"properties":{"benefit_type":{"type":"string","enum":["license_keys"],"const":"license_keys","title":"Benefit Type"}},"type":"object","required":["benefit_type"],"title":"CustomerBenefitGrantLicenseKeysUpdate"},"CustomerBenefitGrantSortProperty":{"type":"string","enum":["granted_at","-granted_at","type","-type","organization","-organization"],"title":"CustomerBenefitGrantSortProperty"},"CustomerBenefitGrantUpdate":{"oneOf":[{"$ref":"#/components/schemas/CustomerBenefitGrantDiscordUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantDownloadablesUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantAdsUpdate"},{"$ref":"#/components/schemas/CustomerBenefitGrantCustomUpdate"}],"discriminator":{"propertyName":"benefit_type","mapping":{"ads":"#/components/schemas/CustomerBenefitGrantAdsUpdate","custom":"#/components/schemas/CustomerBenefitGrantCustomUpdate","discord":"#/components/schemas/CustomerBenefitGrantDiscordUpdate","downloadables":"#/components/schemas/CustomerBenefitGrantDownloadablesUpdate","github_repository":"#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate","license_keys":"#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate"}}},"CustomerCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the customer. **Required unless you use an organization token.**"}},"type":"object","required":["email"],"title":"CustomerCreate"},"CustomerOrder":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id"},"amount":{"type":"integer","title":"Amount"},"tax_amount":{"type":"integer","title":"Tax Amount"},"currency":{"type":"string","title":"Currency"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"product":{"$ref":"#/components/schemas/CustomerOrderProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/CustomerOrderSubscription"},{"type":"null"}]}},"type":"object","required":["created_at","modified_at","id","amount","tax_amount","currency","customer_id","product_id","product_price_id","subscription_id","user_id","product","product_price","subscription"],"title":"CustomerOrder"},"CustomerOrderInvoice":{"properties":{"url":{"type":"string","title":"Url","description":"The URL to the invoice."}},"type":"object","required":["url"],"title":"CustomerOrderInvoice","description":"Order's invoice data."},"CustomerOrderProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/BenefitBase"},"type":"array","title":"BenefitPublic","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."},"organization":{"$ref":"#/components/schemas/Organization"}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","prices","benefits","medias","organization"],"title":"CustomerOrderProduct"},"CustomerOrderSortProperty":{"type":"string","enum":["created_at","-created_at","amount","-amount","organization","-organization","product","-product","subscription","-subscription"],"title":"CustomerOrderSortProperty"},"CustomerOrderSubscription":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"price_id":{"type":"string","format":"uuid4","title":"Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"}},"type":"object","required":["created_at","modified_at","id","amount","currency","recurring_interval","status","current_period_start","current_period_end","cancel_at_period_end","started_at","ended_at","customer_id","product_id","price_id","discount_id","checkout_id"],"title":"CustomerOrderSubscription"},"CustomerPortalCustomer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"oauth_accounts":{"additionalProperties":{"$ref":"#/components/schemas/CustomerPortalOAuthAccount"},"type":"object","title":"Oauth Accounts"}},"type":"object","required":["created_at","modified_at","id","email","email_verified","name","billing_address","tax_id","oauth_accounts"],"title":"CustomerPortalCustomer"},"CustomerPortalOAuthAccount":{"properties":{"account_id":{"type":"string","title":"Account Id"},"account_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Username"}},"type":"object","required":["account_id","account_username"],"title":"CustomerPortalOAuthAccount"},"CustomerSession":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"customer":{"$ref":"#/components/schemas/Customer"}},"type":"object","required":["created_at","modified_at","id","token","expires_at","customer_id","customer"],"title":"CustomerSession","description":"A customer session that can be used to authenticate as a customer."},"CustomerSessionCreate":{"properties":{"customer_id":{"type":"string","format":"uuid4","title":"Customer Id","description":"ID of the customer to create a session for."}},"type":"object","required":["customer_id"],"title":"CustomerSessionCreate","description":"Schema for creating a customer session."},"CustomerSortProperty":{"type":"string","enum":["created_at","-created_at","email","-email","name","-name"],"title":"CustomerSortProperty"},"CustomerSubscription":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"price_id":{"type":"string","format":"uuid4","title":"Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"product":{"$ref":"#/components/schemas/CustomerSubscriptionProduct"},"price":{"$ref":"#/components/schemas/ProductPrice"}},"type":"object","required":["created_at","modified_at","id","amount","currency","recurring_interval","status","current_period_start","current_period_end","cancel_at_period_end","started_at","ended_at","customer_id","product_id","price_id","discount_id","checkout_id","user_id","product","price"],"title":"CustomerSubscription"},"CustomerSubscriptionProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/BenefitBase"},"type":"array","title":"BenefitPublic","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."},"organization":{"$ref":"#/components/schemas/Organization"}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","prices","benefits","medias","organization"],"title":"CustomerSubscriptionProduct"},"CustomerSubscriptionSortProperty":{"type":"string","enum":["started_at","-started_at","amount","-amount","status","-status","organization","-organization","product","-product"],"title":"CustomerSubscriptionSortProperty"},"CustomerSubscriptionUpdate":{"properties":{"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id"}},"type":"object","required":["product_price_id"],"title":"CustomerSubscriptionUpdate"},"CustomerUpdate":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"}},"type":"object","title":"CustomerUpdate"},"Discount":{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDuration"},{"$ref":"#/components/schemas/DiscountFixedRepeatDuration"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDuration"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDuration"}]},"DiscountCreate":{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDurationCreate"},{"$ref":"#/components/schemas/DiscountFixedRepeatDurationCreate"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDurationCreate"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDurationCreate"}]},"DiscountDuration":{"type":"string","enum":["once","forever","repeating"],"title":"DiscountDuration"},"DiscountFixedOnceForeverDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"products":{"items":{"$ref":"#/components/schemas/DiscountProduct"},"type":"array","title":"Products"}},"type":"object","required":["duration","type","amount","currency","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id","products"],"title":"DiscountFixedOnceForeverDuration","description":"Schema for a fixed amount discount that is applied once or forever."},"DiscountFixedOnceForeverDurationBase":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}}},"type":"object","required":["duration","type","amount","currency","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id"],"title":"DiscountFixedOnceForeverDurationBase"},"DiscountFixedOnceForeverDurationCreate":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType","description":"Type of the discount."},"amount":{"type":"integer","minimum":0.0,"title":"Amount","description":"Fixed amount to discount from the invoice total."},"currency":{"type":"string","pattern":"usd","title":"Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Optional timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Optional timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"Optional maximum number of times the discount can be redeemed."},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the discount. **Required unless you use an organization token.**"}},"type":"object","required":["duration","type","amount","name"],"title":"DiscountFixedOnceForeverDurationCreate","description":"Schema to create a fixed amount discount that is applied once or forever."},"DiscountFixedRepeatDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"products":{"items":{"$ref":"#/components/schemas/DiscountProduct"},"type":"array","title":"Products"}},"type":"object","required":["duration","duration_in_months","type","amount","currency","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id","products"],"title":"DiscountFixedRepeatDuration","description":"Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months."},"DiscountFixedRepeatDurationBase":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}}},"type":"object","required":["duration","duration_in_months","type","amount","currency","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id"],"title":"DiscountFixedRepeatDurationBase"},"DiscountFixedRepeatDurationCreate":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","minimum":1.0,"title":"Duration In Months","description":"Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24."},"type":{"$ref":"#/components/schemas/DiscountType","description":"Type of the discount."},"amount":{"type":"integer","minimum":0.0,"title":"Amount","description":"Fixed amount to discount from the invoice total."},"currency":{"type":"string","pattern":"usd","title":"Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Optional timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Optional timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"Optional maximum number of times the discount can be redeemed."},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the discount. **Required unless you use an organization token.**"}},"type":"object","required":["duration","duration_in_months","type","amount","name"],"title":"DiscountFixedRepeatDurationCreate","description":"Schema to create a fixed amount discount that is applied on every invoice\nfor a certain number of months."},"DiscountPercentageOnceForeverDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"products":{"items":{"$ref":"#/components/schemas/DiscountProduct"},"type":"array","title":"Products"}},"type":"object","required":["duration","type","basis_points","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id","products"],"title":"DiscountPercentageOnceForeverDuration","description":"Schema for a percentage discount that is applied once or forever."},"DiscountPercentageOnceForeverDurationBase":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}}},"type":"object","required":["duration","type","basis_points","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id"],"title":"DiscountPercentageOnceForeverDurationBase"},"DiscountPercentageOnceForeverDurationCreate":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"type":{"$ref":"#/components/schemas/DiscountType","description":"Type of the discount."},"basis_points":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Basis Points","description":"Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Optional timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Optional timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"Optional maximum number of times the discount can be redeemed."},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the discount. **Required unless you use an organization token.**"}},"type":"object","required":["duration","type","basis_points","name"],"title":"DiscountPercentageOnceForeverDurationCreate","description":"Schema to create a percentage discount that is applied once or forever."},"DiscountPercentageRepeatDuration":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"products":{"items":{"$ref":"#/components/schemas/DiscountProduct"},"type":"array","title":"Products"}},"type":"object","required":["duration","duration_in_months","type","basis_points","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id","products"],"title":"DiscountPercentageRepeatDuration","description":"Schema for a percentage discount that is applied on every invoice\nfor a certain number of months."},"DiscountPercentageRepeatDurationBase":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","title":"Duration In Months"},"type":{"$ref":"#/components/schemas/DiscountType"},"basis_points":{"type":"integer","title":"Basis Points"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"name":{"type":"string","title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions","description":"Maximum number of times the discount can be redeemed."},"redemptions_count":{"type":"integer","title":"Redemptions Count","description":"Number of times the discount has been redeemed."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}}},"type":"object","required":["duration","duration_in_months","type","basis_points","created_at","modified_at","id","metadata","name","code","starts_at","ends_at","max_redemptions","redemptions_count","organization_id"],"title":"DiscountPercentageRepeatDurationBase"},"DiscountPercentageRepeatDurationCreate":{"properties":{"duration":{"$ref":"#/components/schemas/DiscountDuration"},"duration_in_months":{"type":"integer","minimum":1.0,"title":"Duration In Months","description":"Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24."},"type":{"$ref":"#/components/schemas/DiscountType","description":"Type of the discount."},"basis_points":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Basis Points","description":"Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the discount. Will be displayed to the customer when the discount is applied."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Optional timestamp after which the discount is redeemable."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"Optional timestamp after which the discount is no longer redeemable."},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Redemptions","description":"Optional maximum number of times the discount can be redeemed."},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the discount. **Required unless you use an organization token.**"}},"type":"object","required":["duration","duration_in_months","type","basis_points","name"],"title":"DiscountPercentageRepeatDurationCreate","description":"Schema to create a percentage discount that is applied on every invoice\nfor a certain number of months."},"DiscountProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id"],"title":"DiscountProduct","description":"A product that a discount can be applied to."},"DiscountSortProperty":{"type":"string","enum":["created_at","-created_at","name","-name","code","-code","redemptions_count","-redemptions_count"],"title":"DiscountSortProperty"},"DiscountType":{"type":"string","enum":["fixed","percentage"],"title":"DiscountType"},"DiscountUpdate":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":1,"description":"Name of the discount. Will be displayed to the customer when the discount is applied."},{"type":"null"}],"title":"Name"},"code":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API."},{"type":"null"}],"title":"Code"},"starts_at":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Optional timestamp after which the discount is redeemable."},{"type":"null"}],"title":"Starts At"},"ends_at":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Optional timestamp after which the discount is no longer redeemable."},{"type":"null"}],"title":"Ends At"},"max_redemptions":{"anyOf":[{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"description":"Optional maximum number of times the discount can be redeemed."},{"type":"null"}],"title":"Max Redemptions"},"duration":{"anyOf":[{"$ref":"#/components/schemas/DiscountDuration"},{"type":"null"}]},"duration_in_months":{"anyOf":[{"type":"integer","minimum":1.0,"description":"Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24."},{"type":"null"}],"title":"Duration In Months"},"type":{"anyOf":[{"$ref":"#/components/schemas/DiscountType"},{"type":"null"}]},"amount":{"anyOf":[{"type":"integer","minimum":0.0,"description":"Fixed amount to discount from the invoice total."},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string","pattern":"usd","description":"The currency. Currently, only `usd` is supported.","default":"usd"},{"type":"null"}],"title":"Currency"},"basis_points":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0,"description":"Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550."},{"type":"null"}],"title":"Basis Points"},"products":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","description":"List of product IDs the discount can be applied to."},{"type":"null"}],"title":"Products"}},"type":"object","title":"DiscountUpdate","description":"Schema to update a discount."},"DownloadableFileCreate":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"upload":{"$ref":"#/components/schemas/S3FileCreateMultipart"},"service":{"type":"string","enum":["downloadable"],"const":"downloadable","title":"Service"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","required":["name","mime_type","size","upload","service"],"title":"DownloadableFileCreate","description":"Schema to create a file to be associated with the downloadables benefit."},"DownloadableFileRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"service":{"type":"string","enum":["downloadable"],"const":"downloadable","title":"Service"},"is_uploaded":{"type":"boolean","title":"Is Uploaded"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","version","service","is_uploaded","created_at","size_readable"],"title":"DownloadableFileRead","description":"File to be associated with the downloadables benefit."},"DownloadableRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id"},"file":{"$ref":"#/components/schemas/FileDownload"}},"type":"object","required":["id","benefit_id","file"],"title":"DownloadableRead"},"ExistingProductPrice":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"}},"type":"object","required":["id"],"title":"ExistingProductPrice","description":"A price that already exists for this product.\n\nUseful when updating a product if you want to keep an existing price."},"ExternalOrganization":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"platform":{"$ref":"#/components/schemas/Platforms"},"name":{"type":"string","title":"Name"},"avatar_url":{"type":"string","title":"Avatar Url"},"is_personal":{"type":"boolean","title":"Is Personal"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"pretty_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pretty Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"blog":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blog"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"twitter_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Username"},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id"}},"type":"object","required":["id","platform","name","avatar_url","is_personal","bio","pretty_name","company","blog","location","email","twitter_username","organization_id"],"title":"ExternalOrganization"},"ExternalOrganizationSortProperty":{"type":"string","enum":["created_at","-created_at","name","-name"],"title":"ExternalOrganizationSortProperty"},"FileCreate":{"oneOf":[{"$ref":"#/components/schemas/DownloadableFileCreate"},{"$ref":"#/components/schemas/ProductMediaFileCreate"},{"$ref":"#/components/schemas/OrganizationAvatarFileCreate"}],"discriminator":{"propertyName":"service","mapping":{"downloadable":"#/components/schemas/DownloadableFileCreate","organization_avatar":"#/components/schemas/OrganizationAvatarFileCreate","product_media":"#/components/schemas/ProductMediaFileCreate"}}},"FileDownload":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"download":{"$ref":"#/components/schemas/S3DownloadURL"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"is_uploaded":{"type":"boolean","title":"Is Uploaded"},"service":{"$ref":"#/components/schemas/FileServiceTypes"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","download","version","is_uploaded","service","size_readable"],"title":"FileDownload"},"FilePatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","title":"FilePatch"},"FileServiceTypes":{"type":"string","enum":["downloadable","product_media","organization_avatar"],"title":"FileServiceTypes"},"FileUpload":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"upload":{"$ref":"#/components/schemas/S3FileUploadMultipart"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"is_uploaded":{"type":"boolean","title":"Is Uploaded","default":false},"service":{"$ref":"#/components/schemas/FileServiceTypes"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","upload","version","service","size_readable"],"title":"FileUpload"},"FileUploadCompleted":{"properties":{"id":{"type":"string","title":"Id"},"path":{"type":"string","title":"Path"},"parts":{"items":{"$ref":"#/components/schemas/S3FileUploadCompletedPart"},"type":"array","title":"Parts"}},"type":"object","required":["id","path","parts"],"title":"FileUploadCompleted"},"Funding":{"properties":{"funding_goal":{"anyOf":[{"$ref":"#/components/schemas/CurrencyAmount"},{"type":"null"}]},"pledges_sum":{"anyOf":[{"$ref":"#/components/schemas/CurrencyAmount"},{"type":"null"}],"description":"Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD."}},"type":"object","title":"Funding"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Interval":{"type":"string","enum":["year","month","week","day","hour"],"title":"Interval"},"IntrospectTokenResponse":{"properties":{"active":{"type":"boolean","title":"Active"},"client_id":{"type":"string","title":"Client Id"},"token_type":{"type":"string","enum":["access_token","refresh_token"],"title":"Token Type"},"scope":{"type":"string","title":"Scope"},"sub_type":{"$ref":"#/components/schemas/SubType"},"sub":{"type":"string","title":"Sub"},"aud":{"type":"string","title":"Aud"},"iss":{"type":"string","title":"Iss"},"exp":{"type":"integer","title":"Exp"},"iat":{"type":"integer","title":"Iat"}},"type":"object","required":["active","client_id","token_type","scope","sub_type","sub","aud","iss","exp","iat"],"title":"IntrospectTokenResponse"},"Issue":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"platform":{"$ref":"#/components/schemas/Platforms","description":"Issue platform (currently always GitHub)"},"number":{"type":"integer","title":"Number","description":"GitHub #number"},"title":{"type":"string","title":"Title","description":"GitHub issue title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"GitHub issue body"},"comments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comments","description":"Number of GitHub comments made on the issue"},"labels":{"items":{"$ref":"#/components/schemas/Label"},"type":"array","title":"Labels","default":[]},"author":{"anyOf":[{"$ref":"#/components/schemas/Author"},{"type":"null"}],"description":"GitHub author"},"assignees":{"anyOf":[{"items":{"$ref":"#/components/schemas/Assignee"},"type":"array"},{"type":"null"}],"title":"Assignees","description":"GitHub assignees"},"reactions":{"anyOf":[{"$ref":"#/components/schemas/Reactions"},{"type":"null"}],"description":"GitHub reactions"},"state":{"$ref":"#/components/schemas/State"},"issue_closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issue Closed At"},"issue_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issue Modified At"},"issue_created_at":{"type":"string","format":"date-time","title":"Issue Created At"},"needs_confirmation_solved":{"type":"boolean","title":"Needs Confirmation Solved","description":"If a maintainer needs to mark this issue as solved"},"confirmed_solved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed Solved At","description":"If this issue has been marked as confirmed solved through Polar"},"funding":{"$ref":"#/components/schemas/Funding"},"repository":{"$ref":"#/components/schemas/Repository","description":"The repository that the issue is in"},"upfront_split_to_contributors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Upfront Split To Contributors","description":"Share of rewrads that will be rewarded to contributors of this issue. A number between 0 and 100 (inclusive)."},"pledge_badge_currently_embedded":{"type":"boolean","title":"Pledge Badge Currently Embedded","description":"If this issue currently has the Polar badge SVG embedded"},"badge_custom_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badge Custom Content","description":"Optional custom badge SVG promotional content"}},"type":"object","required":["id","platform","number","title","state","issue_created_at","needs_confirmation_solved","funding","repository","pledge_badge_currently_embedded"],"title":"Issue"},"Label":{"properties":{"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"}},"type":"object","required":["name","color"],"title":"Label"},"LicenseKeyActivate":{"properties":{"key":{"type":"string","title":"Key"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"label":{"type":"string","title":"Label"},"conditions":{"type":"object","title":"Conditions","default":{}},"meta":{"type":"object","title":"Meta","default":{}}},"type":"object","required":["key","organization_id","label"],"title":"LicenseKeyActivate"},"LicenseKeyActivationBase":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"license_key_id":{"type":"string","format":"uuid4","title":"License Key Id"},"label":{"type":"string","title":"Label"},"meta":{"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At"}},"type":"object","required":["id","license_key_id","label","meta","created_at","modified_at"],"title":"LicenseKeyActivationBase"},"LicenseKeyActivationRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"license_key_id":{"type":"string","format":"uuid4","title":"License Key Id"},"label":{"type":"string","title":"Label"},"meta":{"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At"},"license_key":{"$ref":"#/components/schemas/LicenseKeyRead"}},"type":"object","required":["id","license_key_id","label","meta","created_at","modified_at","license_key"],"title":"LicenseKeyActivationRead"},"LicenseKeyCustomer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"avatar_url":{"type":"string","title":"Avatar Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","email","email_verified","name","billing_address","tax_id","organization_id","avatar_url"],"title":"LicenseKeyCustomer"},"LicenseKeyDeactivate":{"properties":{"key":{"type":"string","title":"Key"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"activation_id":{"type":"string","format":"uuid4","title":"Activation Id"}},"type":"object","required":["key","organization_id","activation_id"],"title":"LicenseKeyDeactivate"},"LicenseKeyRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"user":{"$ref":"#/components/schemas/LicenseKeyUser","deprecated":true},"customer":{"$ref":"#/components/schemas/LicenseKeyCustomer"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},"key":{"type":"string","title":"Key"},"display_key":{"type":"string","title":"Display Key"},"status":{"$ref":"#/components/schemas/LicenseKeyStatus"},"limit_activations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Activations"},"usage":{"type":"integer","title":"Usage"},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"},"validations":{"type":"integer","title":"Validations"},"last_validated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Validated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","organization_id","user_id","customer_id","user","customer","benefit_id","key","display_key","status","limit_activations","usage","limit_usage","validations","last_validated_at","expires_at"],"title":"LicenseKeyRead"},"LicenseKeyStatus":{"type":"string","enum":["granted","revoked","disabled"],"title":"LicenseKeyStatus"},"LicenseKeyUpdate":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/LicenseKeyStatus"},{"type":"null"}]},"usage":{"type":"integer","title":"Usage","default":0},"limit_activations":{"anyOf":[{"type":"integer","maximum":50.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Limit Activations"},"limit_usage":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Limit Usage"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","title":"LicenseKeyUpdate"},"LicenseKeyUser":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","title":"Email"},"public_name":{"type":"string","title":"Public Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","email","public_name"],"title":"LicenseKeyUser"},"LicenseKeyValidate":{"properties":{"key":{"type":"string","title":"Key"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"activation_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Activation Id"},"benefit_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},{"type":"null"}],"title":"Benefit Id"},"customer_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Customer Id"},"increment_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Increment Usage"},"conditions":{"type":"object","title":"Conditions","default":{}}},"type":"object","required":["key","organization_id"],"title":"LicenseKeyValidate"},"LicenseKeyWithActivations":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"user":{"$ref":"#/components/schemas/LicenseKeyUser","deprecated":true},"customer":{"$ref":"#/components/schemas/LicenseKeyCustomer"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},"key":{"type":"string","title":"Key"},"display_key":{"type":"string","title":"Display Key"},"status":{"$ref":"#/components/schemas/LicenseKeyStatus"},"limit_activations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Activations"},"usage":{"type":"integer","title":"Usage"},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"},"validations":{"type":"integer","title":"Validations"},"last_validated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Validated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"activations":{"items":{"$ref":"#/components/schemas/LicenseKeyActivationBase"},"type":"array","title":"Activations"}},"type":"object","required":["id","organization_id","user_id","customer_id","user","customer","benefit_id","key","display_key","status","limit_activations","usage","limit_usage","validations","last_validated_at","expires_at","activations"],"title":"LicenseKeyWithActivations"},"ListResource_BenefitGrant_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BenefitGrant"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[BenefitGrant]"},"ListResource_Benefit_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Benefit","title":"Benefit"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Benefit]"},"ListResource_CheckoutLink_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CheckoutLink"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CheckoutLink]"},"ListResource_Checkout_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Checkout"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Checkout]"},"ListResource_CustomField_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomField","title":"CustomField"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CustomField]"},"ListResource_CustomerBenefitGrant_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerBenefitGrant","title":"CustomerBenefitGrant"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CustomerBenefitGrant]"},"ListResource_CustomerOrder_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerOrder"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CustomerOrder]"},"ListResource_CustomerSubscription_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerSubscription"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[CustomerSubscription]"},"ListResource_Customer_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Customer"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Customer]"},"ListResource_Discount_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Discount","title":"Discount"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Discount]"},"ListResource_DownloadableRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DownloadableRead"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[DownloadableRead]"},"ListResource_ExternalOrganization_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExternalOrganization"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[ExternalOrganization]"},"ListResource_FileRead_":{"properties":{"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/DownloadableFileRead"},{"$ref":"#/components/schemas/ProductMediaFileRead"},{"$ref":"#/components/schemas/OrganizationAvatarFileRead"}],"title":"FileRead","discriminator":{"propertyName":"service","mapping":{"downloadable":"#/components/schemas/DownloadableFileRead","organization_avatar":"#/components/schemas/OrganizationAvatarFileRead","product_media":"#/components/schemas/ProductMediaFileRead"}}},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[FileRead]"},"ListResource_LicenseKeyRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LicenseKeyRead"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[LicenseKeyRead]"},"ListResource_OAuth2Client_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OAuth2Client"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[OAuth2Client]"},"ListResource_Order_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Order"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Order]"},"ListResource_Organization_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Organization"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Organization]"},"ListResource_Product_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Product"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Product]"},"ListResource_Repository_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Repository"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Repository]"},"ListResource_Subscription_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Subscription"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"ListResource[Subscription]"},"Metric":{"properties":{"slug":{"type":"string","title":"Slug","description":"Unique identifier for the metric."},"display_name":{"type":"string","title":"Display Name","description":"Human-readable name for the metric."},"type":{"$ref":"#/components/schemas/MetricType","description":"Type of the metric, useful to know the unit or format of the value."}},"type":"object","required":["slug","display_name","type"],"title":"Metric","description":"Information about a metric."},"MetricPeriod":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"Timestamp of this period data."},"orders":{"type":"integer","title":"Orders"},"revenue":{"type":"integer","title":"Revenue"},"average_order_value":{"type":"integer","title":"Average Order Value"},"one_time_products":{"type":"integer","title":"One Time Products"},"one_time_products_revenue":{"type":"integer","title":"One Time Products Revenue"},"new_subscriptions":{"type":"integer","title":"New Subscriptions"},"new_subscriptions_revenue":{"type":"integer","title":"New Subscriptions Revenue"},"renewed_subscriptions":{"type":"integer","title":"Renewed Subscriptions"},"renewed_subscriptions_revenue":{"type":"integer","title":"Renewed Subscriptions Revenue"},"active_subscriptions":{"type":"integer","title":"Active Subscriptions"},"monthly_recurring_revenue":{"type":"integer","title":"Monthly Recurring Revenue"}},"type":"object","required":["timestamp","orders","revenue","average_order_value","one_time_products","one_time_products_revenue","new_subscriptions","new_subscriptions_revenue","renewed_subscriptions","renewed_subscriptions_revenue","active_subscriptions","monthly_recurring_revenue"],"title":"MetricPeriod"},"MetricType":{"type":"string","enum":["scalar","currency"],"title":"MetricType"},"Metrics":{"properties":{"orders":{"$ref":"#/components/schemas/Metric"},"revenue":{"$ref":"#/components/schemas/Metric"},"average_order_value":{"$ref":"#/components/schemas/Metric"},"one_time_products":{"$ref":"#/components/schemas/Metric"},"one_time_products_revenue":{"$ref":"#/components/schemas/Metric"},"new_subscriptions":{"$ref":"#/components/schemas/Metric"},"new_subscriptions_revenue":{"$ref":"#/components/schemas/Metric"},"renewed_subscriptions":{"$ref":"#/components/schemas/Metric"},"renewed_subscriptions_revenue":{"$ref":"#/components/schemas/Metric"},"active_subscriptions":{"$ref":"#/components/schemas/Metric"},"monthly_recurring_revenue":{"$ref":"#/components/schemas/Metric"}},"type":"object","required":["orders","revenue","average_order_value","one_time_products","one_time_products_revenue","new_subscriptions","new_subscriptions_revenue","renewed_subscriptions","renewed_subscriptions_revenue","active_subscriptions","monthly_recurring_revenue"],"title":"Metrics"},"MetricsIntervalLimit":{"properties":{"max_days":{"type":"integer","title":"Max Days","description":"Maximum number of days for this interval."}},"type":"object","required":["max_days"],"title":"MetricsIntervalLimit","description":"Date interval limit to get metrics for a given interval."},"MetricsIntervalsLimits":{"properties":{"hour":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the hour interval."},"day":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the day interval."},"week":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the week interval."},"month":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the month interval."},"year":{"$ref":"#/components/schemas/MetricsIntervalLimit","description":"Limits for the year interval."}},"type":"object","required":["hour","day","week","month","year"],"title":"MetricsIntervalsLimits","description":"Date interval limits to get metrics for each interval."},"MetricsLimits":{"properties":{"min_date":{"type":"string","format":"date","title":"Min Date","description":"Minimum date to get metrics."},"intervals":{"$ref":"#/components/schemas/MetricsIntervalsLimits","description":"Limits for each interval."}},"type":"object","required":["min_date","intervals"],"title":"MetricsLimits","description":"Date limits to get metrics."},"MetricsResponse":{"properties":{"periods":{"items":{"$ref":"#/components/schemas/MetricPeriod"},"type":"array","title":"Periods","description":"List of data for each timestamp."},"metrics":{"$ref":"#/components/schemas/Metrics","description":"Information about the returned metrics."}},"type":"object","required":["periods","metrics"],"title":"MetricsResponse","description":"Metrics response schema."},"NotPermitted":{"properties":{"error":{"type":"string","enum":["NotPermitted"],"const":"NotPermitted","title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"NotPermitted"},"OAuth2Client":{"properties":{"redirect_uris":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","title":"Redirect Uris"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"title":"Token Endpoint Auth Method","default":"client_secret_post"},"grant_types":{"items":{"type":"string","enum":["authorization_code","refresh_token"]},"type":"array","title":"Grant Types","default":["authorization_code","refresh_token"]},"response_types":{"items":{"type":"string","enum":["code"],"const":"code"},"type":"array","title":"Response Types","default":["code"]},"scope":{"type":"string","title":"Scope","default":"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"},"client_name":{"type":"string","title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"logo_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Logo Uri"},"tos_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Tos Uri"},"policy_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Policy Uri"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"client_id_issued_at":{"type":"integer","title":"Client Id Issued At"},"client_secret_expires_at":{"type":"integer","title":"Client Secret Expires At"}},"type":"object","required":["redirect_uris","client_name","created_at","modified_at","client_id","client_secret","client_id_issued_at","client_secret_expires_at"],"title":"OAuth2Client"},"OAuth2ClientConfiguration":{"properties":{"redirect_uris":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","title":"Redirect Uris"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"title":"Token Endpoint Auth Method","default":"client_secret_post"},"grant_types":{"items":{"type":"string","enum":["authorization_code","refresh_token"]},"type":"array","title":"Grant Types","default":["authorization_code","refresh_token"]},"response_types":{"items":{"type":"string","enum":["code"],"const":"code"},"type":"array","title":"Response Types","default":["code"]},"scope":{"type":"string","title":"Scope","default":"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"},"client_name":{"type":"string","title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"logo_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Logo Uri"},"tos_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Tos Uri"},"policy_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Policy Uri"}},"type":"object","required":["redirect_uris","client_name"],"title":"OAuth2ClientConfiguration"},"OAuth2ClientConfigurationUpdate":{"properties":{"redirect_uris":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","title":"Redirect Uris"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","none"],"title":"Token Endpoint Auth Method","default":"client_secret_post"},"grant_types":{"items":{"type":"string","enum":["authorization_code","refresh_token"]},"type":"array","title":"Grant Types","default":["authorization_code","refresh_token"]},"response_types":{"items":{"type":"string","enum":["code"],"const":"code"},"type":"array","title":"Response Types","default":["code"]},"scope":{"type":"string","title":"Scope","default":"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write"},"client_name":{"type":"string","title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"logo_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Logo Uri"},"tos_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Tos Uri"},"policy_uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Policy Uri"},"client_id":{"type":"string","title":"Client Id"}},"type":"object","required":["redirect_uris","client_name","client_id"],"title":"OAuth2ClientConfigurationUpdate"},"OAuth2ClientPublic":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"client_id":{"type":"string","title":"Client Id"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"logo_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Uri"},"tos_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tos Uri"},"policy_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Uri"}},"type":"object","required":["created_at","modified_at","client_id","client_name","client_uri","logo_uri","tos_uri","policy_uri"],"title":"OAuth2ClientPublic"},"Order":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"amount":{"type":"integer","title":"Amount"},"tax_amount":{"type":"integer","title":"Tax Amount"},"currency":{"type":"string","title":"Currency"},"billing_reason":{"$ref":"#/components/schemas/OrderBillingReason"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"product_price_id":{"type":"string","format":"uuid4","title":"Product Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"subscription_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Subscription Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"},"customer":{"$ref":"#/components/schemas/OrderCustomer"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"user":{"$ref":"#/components/schemas/OrderUser","deprecated":true},"product":{"$ref":"#/components/schemas/OrderProduct"},"product_price":{"$ref":"#/components/schemas/ProductPrice"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountFixedRepeatDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDurationBase"}],"title":"OrderDiscount"},{"type":"null"}],"title":"Discount"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/OrderSubscription"},{"type":"null"}]}},"type":"object","required":["created_at","modified_at","id","metadata","amount","tax_amount","currency","billing_reason","billing_address","customer_id","product_id","product_price_id","discount_id","subscription_id","checkout_id","customer","user_id","user","product","product_price","discount","subscription"],"title":"Order"},"OrderBillingReason":{"type":"string","enum":["purchase","subscription_create","subscription_cycle","subscription_update"],"title":"OrderBillingReason"},"OrderCustomer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"avatar_url":{"type":"string","title":"Avatar Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","email","email_verified","name","billing_address","tax_id","organization_id","avatar_url"],"title":"OrderCustomer"},"OrderInvoice":{"properties":{"url":{"type":"string","title":"Url","description":"The URL to the invoice."}},"type":"object","required":["url"],"title":"OrderInvoice","description":"Order's invoice data."},"OrderProduct":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id"],"title":"OrderProduct"},"OrderSortProperty":{"type":"string","enum":["created_at","-created_at","amount","-amount","customer","-customer","product","-product","discount","-discount","subscription","-subscription"],"title":"OrderSortProperty"},"OrderSubscription":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"price_id":{"type":"string","format":"uuid4","title":"Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true}},"type":"object","required":["metadata","created_at","modified_at","id","amount","currency","recurring_interval","status","current_period_start","current_period_end","cancel_at_period_end","started_at","ended_at","customer_id","product_id","price_id","discount_id","checkout_id","user_id"],"title":"OrderSubscription"},"OrderUser":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","title":"Email"},"public_name":{"type":"string","title":"Public Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"github_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Username"}},"type":"object","required":["id","email","public_name"],"title":"OrderUser"},"Organization":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"blog":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blog"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"twitter_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter Username"},"pledge_minimum_amount":{"type":"integer","title":"Pledge Minimum Amount"},"pledge_badge_show_amount":{"type":"boolean","title":"Pledge Badge Show Amount"},"default_upfront_split_to_contributors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Upfront Split To Contributors"},"profile_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationProfileSettings"},{"type":"null"}],"description":"Settings for the organization profile"},"feature_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationFeatureSettings"},{"type":"null"}],"description":"Settings for the organization features"}},"type":"object","required":["created_at","modified_at","id","name","slug","avatar_url","bio","company","blog","location","email","twitter_username","pledge_minimum_amount","pledge_badge_show_amount","default_upfront_split_to_contributors","profile_settings","feature_settings"],"title":"Organization"},"OrganizationAvatarFileCreate":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","pattern":"^image\\/(jpeg|png|gif|webp|svg\\+xml)$","title":"Mime Type","description":"MIME type of the file. Only images are supported for this type of file."},"size":{"type":"integer","maximum":1048576.0,"title":"Size","description":"Size of the file. A maximum of 1 MB is allowed for this type of file."},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"upload":{"$ref":"#/components/schemas/S3FileCreateMultipart"},"service":{"type":"string","enum":["organization_avatar"],"const":"organization_avatar","title":"Service"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","required":["name","mime_type","size","upload","service"],"title":"OrganizationAvatarFileCreate","description":"Schema to create a file to be used as an organization avatar."},"OrganizationAvatarFileRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"service":{"type":"string","enum":["organization_avatar"],"const":"organization_avatar","title":"Service"},"is_uploaded":{"type":"boolean","title":"Is Uploaded"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true},"public_url":{"type":"string","title":"Public Url","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","version","service","is_uploaded","created_at","size_readable","public_url"],"title":"OrganizationAvatarFileRead","description":"File to be used as an organization avatar."},"OrganizationCreate":{"properties":{"name":{"type":"string","minLength":3,"title":"Name"},"slug":{"type":"string","minLength":3,"title":"Slug"},"avatar_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Avatar Url"},"feature_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationFeatureSettings"},{"type":"null"}]}},"type":"object","required":["name","slug"],"title":"OrganizationCreate"},"OrganizationFeatureSettings":{"properties":{"issue_funding_enabled":{"type":"boolean","title":"Issue Funding Enabled","description":"If this organization has issue funding enabled","default":false}},"type":"object","title":"OrganizationFeatureSettings"},"OrganizationProfileSettings":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"If this organization has a profile enabled"},"description":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Description","description":"A description of the organization"},"featured_projects":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Featured Projects","description":"A list of featured projects"},"featured_organizations":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Featured Organizations","description":"A list of featured organizations"},"links":{"anyOf":[{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array"},{"type":"null"}],"title":"Links","description":"A list of links associated with the organization"},"subscribe":{"anyOf":[{"$ref":"#/components/schemas/OrganizationSubscribePromoteSettings"},{"type":"null"}],"description":"Subscription promotion settings","default":{"promote":true,"show_count":true,"count_free":true}},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color","description":"Accent color for the organization"}},"type":"object","title":"OrganizationProfileSettings"},"OrganizationSortProperty":{"type":"string","enum":["created_at","-created_at","name","-name"],"title":"OrganizationSortProperty"},"OrganizationSubscribePromoteSettings":{"properties":{"promote":{"type":"boolean","title":"Promote","description":"Promote email subscription (free)","default":true},"show_count":{"type":"boolean","title":"Show Count","description":"Show subscription count publicly","default":true},"count_free":{"type":"boolean","title":"Count Free","description":"Include free subscribers in total count","default":true}},"type":"object","title":"OrganizationSubscribePromoteSettings"},"OrganizationUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":3},{"type":"null"}],"title":"Name"},"avatar_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Avatar Url"},"default_upfront_split_to_contributors":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Default Upfront Split To Contributors"},"pledge_badge_show_amount":{"type":"boolean","title":"Pledge Badge Show Amount","default":false},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"default_badge_custom_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Badge Custom Content"},"pledge_minimum_amount":{"type":"integer","title":"Pledge Minimum Amount","default":2000},"total_monthly_spending_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Monthly Spending Limit"},"per_user_monthly_spending_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Per User Monthly Spending Limit"},"profile_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationProfileSettings"},{"type":"null"}]},"feature_settings":{"anyOf":[{"$ref":"#/components/schemas/OrganizationFeatureSettings"},{"type":"null"}]}},"type":"object","title":"OrganizationUpdate"},"Pagination":{"properties":{"total_count":{"type":"integer","title":"Total Count"},"max_page":{"type":"integer","title":"Max Page"}},"type":"object","required":["total_count","max_page"],"title":"Pagination"},"PaymentProcessor":{"type":"string","enum":["stripe"],"const":"stripe","title":"PaymentProcessor"},"Platforms":{"type":"string","enum":["github"],"const":"github","title":"Platforms"},"Pledge":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"type":"integer","title":"Amount","description":"Amount pledged towards the issue"},"currency":{"type":"string","title":"Currency"},"state":{"$ref":"#/components/schemas/PledgeState","description":"Current state of the pledge"},"type":{"$ref":"#/components/schemas/PledgeType","description":"Type of pledge"},"refunded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refunded At","description":"If and when the pledge was refunded to the pledger"},"scheduled_payout_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Payout At","description":"When the payout is scheduled to be made to the maintainers behind the issue. Disputes must be made before this date."},"issue":{"$ref":"#/components/schemas/Issue","description":"The issue that the pledge was made towards"},"pledger":{"anyOf":[{"$ref":"#/components/schemas/Pledger"},{"type":"null"}],"description":"The user or organization that made this pledge"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url","description":"URL of invoice for this pledge"},"authed_can_admin_sender":{"type":"boolean","title":"Authed Can Admin Sender","description":"If the currently authenticated subject can perform admin actions on behalf of the maker of the peldge","default":false},"authed_can_admin_received":{"type":"boolean","title":"Authed Can Admin Received","description":"If the currently authenticated subject can perform admin actions on behalf of the receiver of the peldge","default":false},"created_by":{"anyOf":[{"$ref":"#/components/schemas/Pledger"},{"type":"null"}],"description":"For pledges made by an organization, or on behalf of an organization. This is the user that made the pledge. Only visible for members of said organization."}},"type":"object","required":["created_at","modified_at","id","amount","currency","state","type","issue"],"title":"Pledge"},"PledgeState":{"type":"string","enum":["initiated","created","pending","refunded","disputed","charge_disputed","cancelled"],"title":"PledgeState"},"PledgeType":{"type":"string","enum":["pay_upfront","pay_on_completion","pay_directly"],"title":"PledgeType"},"Pledger":{"properties":{"name":{"type":"string","title":"Name"},"github_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Username"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["name","github_username","avatar_url"],"title":"Pledger"},"Product":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the product."},"name":{"type":"string","title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_recurring":{"type":"boolean","title":"Is Recurring","description":"Whether the product is a subscription tier."},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the product is archived and no longer available."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id","description":"The ID of the organization owning the product."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"prices":{"items":{"$ref":"#/components/schemas/ProductPrice"},"type":"array","title":"Prices","description":"List of prices for this product."},"benefits":{"items":{"$ref":"#/components/schemas/Benefit","title":"Benefit"},"type":"array","title":"Benefits","description":"List of benefits granted by the product."},"medias":{"items":{"$ref":"#/components/schemas/ProductMediaFileRead"},"type":"array","title":"Medias","description":"List of medias associated to the product."},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomField"},"type":"array","title":"Attached Custom Fields","description":"List of custom fields attached to the product."}},"type":"object","required":["created_at","modified_at","id","name","description","is_recurring","is_archived","organization_id","metadata","prices","benefits","medias","attached_custom_fields"],"title":"Product","description":"A product."},"ProductBenefitsUpdate":{"properties":{"benefits":{"items":{"type":"string","format":"uuid4","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},"type":"array","title":"Benefits","description":"List of benefit IDs. Each one must be on the same organization as the product."}},"type":"object","required":["benefits"],"title":"ProductBenefitsUpdate","description":"Schema to update the benefits granted by a product."},"ProductCreate":{"anyOf":[{"$ref":"#/components/schemas/ProductRecurringCreate"},{"$ref":"#/components/schemas/ProductOneTimeCreate"}]},"ProductMediaFileCreate":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","pattern":"^image\\/(jpeg|png|gif|webp|svg\\+xml)$","title":"Mime Type","description":"MIME type of the file. Only images are supported for this type of file."},"size":{"type":"integer","maximum":10485760.0,"title":"Size","description":"Size of the file. A maximum of 10 MB is allowed for this type of file."},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"upload":{"$ref":"#/components/schemas/S3FileCreateMultipart"},"service":{"type":"string","enum":["product_media"],"const":"product_media","title":"Service"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","required":["name","mime_type","size","upload","service"],"title":"ProductMediaFileCreate","description":"Schema to create a file to be used as a product media file."},"ProductMediaFileRead":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"mime_type":{"type":"string","title":"Mime Type"},"size":{"type":"integer","title":"Size"},"storage_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Version"},"checksum_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"checksum_sha256_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Hex"},"last_modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified At"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"service":{"type":"string","enum":["product_media"],"const":"product_media","title":"Service"},"is_uploaded":{"type":"boolean","title":"Is Uploaded"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"size_readable":{"type":"string","title":"Size Readable","readOnly":true},"public_url":{"type":"string","title":"Public Url","readOnly":true}},"type":"object","required":["id","organization_id","name","path","mime_type","size","storage_version","checksum_etag","checksum_sha256_base64","checksum_sha256_hex","last_modified_at","version","service","is_uploaded","created_at","size_readable","public_url"],"title":"ProductMediaFileRead","description":"File to be used as a product media file."},"ProductOneTimeCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":3,"title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"prices":{"items":{"anyOf":[{"$ref":"#/components/schemas/ProductPriceOneTimeFixedCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeCustomCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeFreeCreate"}]},"type":"array","maxItems":1,"minItems":1,"title":"ProductPriceOneTimeCreate","description":"List of available prices for this product."},"medias":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Medias","description":"List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded."},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomFieldCreate"},"type":"array","title":"Attached Custom Fields","description":"List of custom fields to attach."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the product. **Required unless you use an organization token.**"}},"type":"object","required":["name","prices"],"title":"ProductOneTimeCreate","description":"Schema to create a one-time product."},"ProductPrice":{"oneOf":[{"$ref":"#/components/schemas/ProductPriceRecurring"},{"$ref":"#/components/schemas/ProductPriceOneTime"}],"discriminator":{"propertyName":"type","mapping":{"one_time":"#/components/schemas/ProductPriceOneTime","recurring":"#/components/schemas/ProductPriceRecurring"}}},"ProductPriceOneTime":{"oneOf":[{"$ref":"#/components/schemas/ProductPriceOneTimeFixed"},{"$ref":"#/components/schemas/ProductPriceOneTimeCustom"},{"$ref":"#/components/schemas/ProductPriceOneTimeFree"}],"discriminator":{"propertyName":"amount_type","mapping":{"custom":"#/components/schemas/ProductPriceOneTimeCustom","fixed":"#/components/schemas/ProductPriceOneTimeFixed","free":"#/components/schemas/ProductPriceOneTimeFree"}}},"ProductPriceOneTimeCustom":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["custom"],"const":"custom","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"price_currency":{"type":"string","title":"Price Currency","description":"The currency."},"minimum_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Amount","description":"The minimum amount the customer can pay."},"maximum_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maximum Amount","description":"The maximum amount the customer can pay."},"preset_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Preset Amount","description":"The initial amount shown to the customer."},"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type","description":"The type of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","price_currency","minimum_amount","maximum_amount","preset_amount","type"],"title":"ProductPriceOneTimeCustom","description":"A pay-what-you-want price for a one-time product."},"ProductPriceOneTimeCustomCreate":{"properties":{"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type"},"amount_type":{"type":"string","enum":["custom"],"const":"custom","title":"Amount Type"},"price_currency":{"type":"string","pattern":"usd","title":"Price Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"},"minimum_amount":{"anyOf":[{"type":"integer","maximum":99999999.0,"minimum":50.0,"description":"The price in cents."},{"type":"null"}],"title":"Minimum Amount","description":"The minimum amount the customer can pay."},"maximum_amount":{"anyOf":[{"type":"integer","maximum":99999999.0,"minimum":50.0,"description":"The price in cents."},{"type":"null"}],"title":"Maximum Amount","description":"The maximum amount the customer can pay."},"preset_amount":{"anyOf":[{"type":"integer","maximum":99999999.0,"minimum":50.0,"description":"The price in cents."},{"type":"null"}],"title":"Preset Amount","description":"The initial amount shown to the customer."}},"type":"object","required":["type","amount_type"],"title":"ProductPriceOneTimeCustomCreate","description":"Schema to create a pay-what-you-want price for a one-time product."},"ProductPriceOneTimeFixed":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["fixed"],"const":"fixed","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"price_currency":{"type":"string","title":"Price Currency","description":"The currency."},"price_amount":{"type":"integer","title":"Price Amount","description":"The price in cents."},"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type","description":"The type of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","price_currency","price_amount","type"],"title":"ProductPriceOneTimeFixed","description":"A one-time price for a product."},"ProductPriceOneTimeFixedCreate":{"properties":{"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type"},"amount_type":{"type":"string","enum":["fixed"],"const":"fixed","title":"Amount Type"},"price_amount":{"type":"integer","maximum":99999999.0,"minimum":50.0,"title":"Price Amount","description":"The price in cents."},"price_currency":{"type":"string","pattern":"usd","title":"Price Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"}},"type":"object","required":["type","amount_type","price_amount"],"title":"ProductPriceOneTimeFixedCreate","description":"Schema to create a one-time product price."},"ProductPriceOneTimeFree":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["free"],"const":"free","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type","description":"The type of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","type"],"title":"ProductPriceOneTimeFree","description":"A free one-time price for a product."},"ProductPriceOneTimeFreeCreate":{"properties":{"type":{"type":"string","enum":["one_time"],"const":"one_time","title":"Type"},"amount_type":{"type":"string","enum":["free"],"const":"free","title":"Amount Type"}},"type":"object","required":["type","amount_type"],"title":"ProductPriceOneTimeFreeCreate","description":"Schema to create a free one-time product price."},"ProductPriceRecurring":{"oneOf":[{"$ref":"#/components/schemas/ProductPriceRecurringFixed"},{"$ref":"#/components/schemas/ProductPriceRecurringCustom"},{"$ref":"#/components/schemas/ProductPriceRecurringFree"}],"discriminator":{"propertyName":"amount_type","mapping":{"custom":"#/components/schemas/ProductPriceRecurringCustom","fixed":"#/components/schemas/ProductPriceRecurringFixed","free":"#/components/schemas/ProductPriceRecurringFree"}}},"ProductPriceRecurringCustom":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["custom"],"const":"custom","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"price_currency":{"type":"string","title":"Price Currency","description":"The currency."},"minimum_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Amount","description":"The minimum amount the customer can pay."},"maximum_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maximum Amount","description":"The maximum amount the customer can pay."},"preset_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Preset Amount","description":"The initial amount shown to the customer."},"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type","description":"The type of the price."},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","price_currency","minimum_amount","maximum_amount","preset_amount","type","recurring_interval"],"title":"ProductPriceRecurringCustom","description":"A pay-what-you-want recurring price for a product, i.e. a subscription."},"ProductPriceRecurringFixed":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["fixed"],"const":"fixed","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"price_currency":{"type":"string","title":"Price Currency","description":"The currency."},"price_amount":{"type":"integer","title":"Price Amount","description":"The price in cents."},"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type","description":"The type of the price."},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","price_currency","price_amount","type","recurring_interval"],"title":"ProductPriceRecurringFixed","description":"A recurring price for a product, i.e. a subscription."},"ProductPriceRecurringFixedCreate":{"properties":{"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type"},"amount_type":{"type":"string","enum":["fixed"],"const":"fixed","title":"Amount Type"},"price_amount":{"type":"integer","maximum":99999999.0,"minimum":50.0,"title":"Price Amount","description":"The price in cents."},"price_currency":{"type":"string","pattern":"usd","title":"Price Currency","description":"The currency. Currently, only `usd` is supported.","default":"usd"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["type","amount_type","price_amount","recurring_interval"],"title":"ProductPriceRecurringFixedCreate","description":"Schema to create a recurring product price, i.e. a subscription."},"ProductPriceRecurringFree":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the price."},"amount_type":{"type":"string","enum":["free"],"const":"free","title":"Amount Type"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Whether the price is archived and no longer available."},"product_id":{"type":"string","format":"uuid4","title":"Product Id","description":"The ID of the product owning the price."},"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type","description":"The type of the price."},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["created_at","modified_at","id","amount_type","is_archived","product_id","type","recurring_interval"],"title":"ProductPriceRecurringFree","description":"A free recurring price for a product, i.e. a subscription."},"ProductPriceRecurringFreeCreate":{"properties":{"type":{"type":"string","enum":["recurring"],"const":"recurring","title":"Type"},"amount_type":{"type":"string","enum":["free"],"const":"free","title":"Amount Type"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval","description":"The recurring interval of the price."}},"type":"object","required":["type","amount_type","recurring_interval"],"title":"ProductPriceRecurringFreeCreate","description":"Schema to create a free recurring product price, i.e. a subscription."},"ProductPriceType":{"type":"string","enum":["one_time","recurring"],"title":"ProductPriceType"},"ProductRecurringCreate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"title":"Metadata","description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},"name":{"type":"string","minLength":3,"title":"Name","description":"The name of the product."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"prices":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProductPriceRecurringFixedCreate"},"type":"array","maxItems":2,"minItems":1,"title":"ProductPriceRecurringFixedCreate","description":"List of recurring prices. Only one price per interval (one monthly and one yearly) is allowed."},{"items":{"$ref":"#/components/schemas/ProductPriceRecurringFreeCreate"},"type":"array","maxItems":1,"minItems":1,"title":"ProductPriceRecurringFreeCreate","description":"List with a single free recurring price."}],"title":"Prices","description":"List of available prices for this product."},"medias":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Medias","description":"List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded."},"attached_custom_fields":{"items":{"$ref":"#/components/schemas/AttachedCustomFieldCreate"},"type":"array","title":"Attached Custom Fields","description":"List of custom fields to attach."},"organization_id":{"anyOf":[{"type":"string","format":"uuid4","description":"The organization ID.","x-polar-selector-widget":{"displayProperty":"name","resourceName":"Organization","resourceRoot":"/v1/organizations"}},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization owning the product. **Required unless you use an organization token.**"}},"type":"object","required":["name","prices"],"title":"ProductRecurringCreate","description":"Schema to create a recurring product, i.e. a subscription."},"ProductSortProperty":{"type":"string","enum":["created_at","-created_at","name","-name","price_type","-price_type","price_amount_type","-price_amount_type","price_amount","-price_amount"],"title":"ProductSortProperty"},"ProductUpdate":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"integer"},{"type":"boolean"}]},"type":"object","maxProperties":50,"description":"Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**."},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string","minLength":3,"description":"The name of the product."},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the product."},"is_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Archived","description":"Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally."},"prices":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/ExistingProductPrice"},{"$ref":"#/components/schemas/ProductPriceRecurringFixedCreate"},{"$ref":"#/components/schemas/ProductPriceRecurringFreeCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeFixedCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeCustomCreate"},{"$ref":"#/components/schemas/ProductPriceOneTimeFreeCreate"}]},"type":"array"},{"type":"null"}],"title":"Prices","description":"List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object."},"medias":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Medias","description":"List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded."},"attached_custom_fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttachedCustomFieldCreate"},"type":"array","description":"List of custom fields to attach."},{"type":"null"}],"title":"Attached Custom Fields"}},"type":"object","title":"ProductUpdate","description":"Schema to update a product."},"Reactions":{"properties":{"total_count":{"type":"integer","title":"Total Count"},"plus_one":{"type":"integer","title":"Plus One"},"minus_one":{"type":"integer","title":"Minus One"},"laugh":{"type":"integer","title":"Laugh"},"hooray":{"type":"integer","title":"Hooray"},"confused":{"type":"integer","title":"Confused"},"heart":{"type":"integer","title":"Heart"},"rocket":{"type":"integer","title":"Rocket"},"eyes":{"type":"integer","title":"Eyes"}},"type":"object","required":["total_count","plus_one","minus_one","laugh","hooray","confused","heart","rocket","eyes"],"title":"Reactions"},"Repository":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"platform":{"$ref":"#/components/schemas/Platforms"},"is_private":{"type":"boolean","title":"Is Private"},"name":{"type":"string","title":"Name","examples":["MyOrg"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"stars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stars","examples":[1337]},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License"},"homepage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage"},"profile_settings":{"anyOf":[{"$ref":"#/components/schemas/RepositoryProfileSettings"},{"type":"null"}],"description":"Settings for the repository profile"},"organization":{"$ref":"#/components/schemas/ExternalOrganization"},"internal_organization":{"anyOf":[{"$ref":"#/components/schemas/Organization"},{"type":"null"}]}},"type":"object","required":["id","platform","is_private","name","description","stars","license","homepage","profile_settings","organization","internal_organization"],"title":"Repository"},"RepositoryProfileSettings":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Description","description":"A description of the repository"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url","description":"A URL to a cover image"},"featured_organizations":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Featured Organizations","description":"A list of featured organizations"},"highlighted_subscription_tiers":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Highlighted Subscription Tiers","description":"A list of highlighted subscription tiers"},"links":{"anyOf":[{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array"},{"type":"null"}],"title":"Links","description":"A list of links related to the repository"}},"type":"object","title":"RepositoryProfileSettings"},"RepositoryProfileSettingsUpdate":{"properties":{"set_description":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Set Description"},"description":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Description"},"set_cover_image_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Set Cover Image Url"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url"},"featured_organizations":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array"},{"type":"null"}],"title":"Featured Organizations"},"highlighted_subscription_tiers":{"anyOf":[{"items":{"type":"string","format":"uuid4"},"type":"array","maxItems":3},{"type":"null"}],"title":"Highlighted Subscription Tiers"},"links":{"anyOf":[{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"RepositoryProfileSettingsUpdate"},"RepositorySortProperty":{"type":"string","enum":["created_at","-created_at","name","-name","stars","-stars"],"title":"RepositorySortProperty"},"RepositoryUpdate":{"properties":{"profile_settings":{"anyOf":[{"$ref":"#/components/schemas/RepositoryProfileSettingsUpdate"},{"type":"null"}]}},"type":"object","title":"RepositoryUpdate"},"ResourceNotFound":{"properties":{"error":{"type":"string","enum":["ResourceNotFound"],"const":"ResourceNotFound","title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"ResourceNotFound"},"RevokeTokenResponse":{"properties":{},"type":"object","title":"RevokeTokenResponse"},"S3DownloadURL":{"properties":{"url":{"type":"string","title":"Url"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["url","expires_at"],"title":"S3DownloadURL"},"S3FileCreateMultipart":{"properties":{"parts":{"items":{"$ref":"#/components/schemas/S3FileCreatePart"},"type":"array","title":"Parts"}},"type":"object","required":["parts"],"title":"S3FileCreateMultipart"},"S3FileCreatePart":{"properties":{"number":{"type":"integer","title":"Number"},"chunk_start":{"type":"integer","title":"Chunk Start"},"chunk_end":{"type":"integer","title":"Chunk End"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"}},"type":"object","required":["number","chunk_start","chunk_end"],"title":"S3FileCreatePart"},"S3FileUploadCompletedPart":{"properties":{"number":{"type":"integer","title":"Number"},"checksum_etag":{"type":"string","title":"Checksum Etag"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"}},"type":"object","required":["number","checksum_etag","checksum_sha256_base64"],"title":"S3FileUploadCompletedPart"},"S3FileUploadMultipart":{"properties":{"id":{"type":"string","title":"Id"},"path":{"type":"string","title":"Path"},"parts":{"items":{"$ref":"#/components/schemas/S3FileUploadPart"},"type":"array","title":"Parts"}},"type":"object","required":["id","path","parts"],"title":"S3FileUploadMultipart"},"S3FileUploadPart":{"properties":{"number":{"type":"integer","title":"Number"},"chunk_start":{"type":"integer","title":"Chunk Start"},"chunk_end":{"type":"integer","title":"Chunk End"},"checksum_sha256_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum Sha256 Base64"},"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}}},"type":"object","required":["number","chunk_start","chunk_end","url","expires_at"],"title":"S3FileUploadPart"},"Scope":{"type":"string","enum":["openid","profile","email","user:read","admin","web_default","organizations:read","organizations:write","custom_fields:read","custom_fields:write","discounts:read","discounts:write","checkout_links:read","checkout_links:write","checkouts:read","checkouts:write","products:read","products:write","benefits:read","benefits:write","files:read","files:write","subscriptions:read","subscriptions:write","customers:read","customers:write","customer_sessions:write","orders:read","metrics:read","webhooks:read","webhooks:write","external_organizations:read","license_keys:read","license_keys:write","repositories:read","repositories:write","issues:read","issues:write","customer_portal:read","customer_portal:write"],"title":"Scope","enumNames":{"benefits:read":"Read benefits","benefits:write":"Create or modify benefits","checkout_links:read":"Read checkout links","checkout_links:write":"Create or modify checkout links","checkouts:read":"Read checkout sessions","checkouts:write":"Create or modify checkout sessions","custom_fields:read":"Read custom fields","custom_fields:write":"Create or modify custom fields","customer_portal:read":"Read your orders, subscriptions and benefits","customer_portal:write":"Create or modify your orders, subscriptions and benefits","customers:read":"Read customers","customers:write":"Create or modify customers","discounts:read":"Read discounts","discounts:write":"Create or modify discounts","email":"Read your email address","files:read":"Read file uploads","files:write":"Create or modify file uploads","license_keys:read":"Read license keys","license_keys:write":"Modify license keys","metrics:read":"Read metrics","openid":"OpenID","orders:read":"Read orders made on your organizations","organizations:read":"Read your organizations","organizations:write":"Create or modify organizations","products:read":"Read products","products:write":"Create or modify products","profile":"Read your profile","subscriptions:read":"Read subscriptions made on your organizations","subscriptions:write":"Create or modify subscriptions made on your organizations","user:read":"User Read","web_default":"Web Default","webhooks:read":"Read webhooks","webhooks:write":"Create or modify webhooks"}},"State":{"type":"string","enum":["open","closed"],"title":"State"},"SubType":{"type":"string","enum":["user","organization"],"title":"SubType"},"Subscription":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"recurring_interval":{"$ref":"#/components/schemas/SubscriptionRecurringInterval"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"current_period_start":{"type":"string","format":"date-time","title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"product_id":{"type":"string","format":"uuid4","title":"Product Id"},"price_id":{"type":"string","format":"uuid4","title":"Price Id"},"discount_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Discount Id"},"checkout_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Checkout Id"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"custom_field_data":{"type":"object","title":"Custom Field Data","description":"Key-value object storing custom field values."},"customer":{"$ref":"#/components/schemas/SubscriptionCustomer"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"user":{"$ref":"#/components/schemas/SubscriptionUser","deprecated":true},"product":{"$ref":"#/components/schemas/Product"},"price":{"$ref":"#/components/schemas/ProductPriceRecurring"},"discount":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DiscountFixedOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountFixedRepeatDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageOnceForeverDurationBase"},{"$ref":"#/components/schemas/DiscountPercentageRepeatDurationBase"}],"title":"SubscriptionDiscount"},{"type":"null"}],"title":"Discount"}},"type":"object","required":["created_at","modified_at","id","amount","currency","recurring_interval","status","current_period_start","current_period_end","cancel_at_period_end","started_at","ended_at","customer_id","product_id","price_id","discount_id","checkout_id","metadata","customer","user_id","user","product","price","discount"],"title":"Subscription"},"SubscriptionCustomer":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp of the object."},"modified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified At","description":"Last modification timestamp of the object."},"id":{"type":"string","format":"uuid4","title":"Id","description":"The ID of the object."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Metadata"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"tax_id":{"anyOf":[{"prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/TaxIDFormat"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Tax Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"avatar_url":{"type":"string","title":"Avatar Url","readOnly":true}},"type":"object","required":["created_at","modified_at","id","metadata","email","email_verified","name","billing_address","tax_id","organization_id","avatar_url"],"title":"SubscriptionCustomer"},"SubscriptionRecurringInterval":{"type":"string","enum":["month","year"],"title":"SubscriptionRecurringInterval"},"SubscriptionSortProperty":{"type":"string","enum":["customer","-customer","status","-status","started_at","-started_at","current_period_end","-current_period_end","amount","-amount","product","-product","discount","-discount"],"title":"SubscriptionSortProperty"},"SubscriptionStatus":{"type":"string","enum":["incomplete","incomplete_expired","trialing","active","past_due","canceled","unpaid"],"title":"SubscriptionStatus"},"SubscriptionUser":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"email":{"type":"string","title":"Email"},"public_name":{"type":"string","title":"Public Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"github_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Username"}},"type":"object","required":["id","email","public_name"],"title":"SubscriptionUser"},"TaxIDFormat":{"type":"string","enum":["ad_nrt","ae_trn","ar_cuit","au_abn","au_arn","bg_uic","bh_vat","bo_tin","br_cnpj","br_cpf","ca_bn","ca_gst_hst","ca_pst_bc","ca_pst_mb","ca_pst_sk","ca_qst","ch_uid","ch_vat","cl_tin","cn_tin","co_nit","cr_tin","de_stn","do_rcn","ec_ruc","eg_tin","es_cif","eu_oss_vat","eu_vat","gb_vat","ge_vat","hk_br","hr_oib","hu_tin","id_npwp","il_vat","in_gst","is_vat","jp_cn","jp_rn","jp_trn","ke_pin","kr_brn","kz_bin","li_uid","mx_rfc","my_frp","my_itn","my_sst","ng_tin","no_vat","no_voec","nz_gst","om_vat","pe_ruc","ph_tin","ro_tin","rs_pib","ru_inn","ru_kpp","sa_vat","sg_gst","sg_uen","si_tin","sv_nit","th_vat","tr_tin","tw_vat","ua_vat","us_ein","uy_ruc","ve_rif","vn_tin","za_vat"],"title":"TaxIDFormat","description":"List of supported tax ID formats.\n\nRef: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","enum":["Bearer"],"const":"Bearer","title":"Token Type"},"expires_in":{"type":"integer","title":"Expires In"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"scope":{"type":"string","title":"Scope"},"id_token":{"type":"string","title":"Id Token"}},"type":"object","required":["access_token","token_type","expires_in","refresh_token","scope","id_token"],"title":"TokenResponse"},"Unauthorized":{"properties":{"error":{"type":"string","enum":["Unauthorized"],"const":"Unauthorized","title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"Unauthorized"},"UserInfoOrganization":{"properties":{"sub":{"type":"string","title":"Sub"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["sub"],"title":"UserInfoOrganization"},"UserInfoUser":{"properties":{"sub":{"type":"string","title":"Sub"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"email_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Verified"}},"type":"object","required":["sub"],"title":"UserInfoUser"},"ValidatedLicenseKey":{"properties":{"id":{"type":"string","format":"uuid4","title":"Id"},"organization_id":{"type":"string","format":"uuid4","title":"Organization Id"},"user_id":{"type":"string","format":"uuid4","title":"User Id","deprecated":true},"customer_id":{"type":"string","format":"uuid4","title":"Customer Id"},"user":{"$ref":"#/components/schemas/LicenseKeyUser","deprecated":true},"customer":{"$ref":"#/components/schemas/LicenseKeyCustomer"},"benefit_id":{"type":"string","format":"uuid4","title":"Benefit Id","description":"The benefit ID.","x-polar-selector-widget":{"displayProperty":"description","resourceName":"Benefit","resourceRoot":"/v1/benefits"}},"key":{"type":"string","title":"Key"},"display_key":{"type":"string","title":"Display Key"},"status":{"$ref":"#/components/schemas/LicenseKeyStatus"},"limit_activations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Activations"},"usage":{"type":"integer","title":"Usage"},"limit_usage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit Usage"},"validations":{"type":"integer","title":"Validations"},"last_validated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Validated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"activation":{"anyOf":[{"$ref":"#/components/schemas/LicenseKeyActivationBase"},{"type":"null"}]}},"type":"object","required":["id","organization_id","user_id","customer_id","user","customer","benefit_id","key","display_key","status","limit_activations","usage","limit_usage","validations","last_validated_at","expires_at"],"title":"ValidatedLicenseKey"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookBenefitCreatedPayload":{"properties":{"type":{"type":"string","enum":["benefit.created"],"const":"benefit.created","title":"Type"},"data":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}},"type":"object","required":["type","data"],"title":"WebhookBenefitCreatedPayload","description":"Sent when a new benefit is created.\n\n**Discord & Slack support:** Basic"},"WebhookBenefitGrantCreatedPayload":{"properties":{"type":{"type":"string","enum":["benefit_grant.created"],"const":"benefit_grant.created","title":"Type"},"data":{"$ref":"#/components/schemas/BenefitGrantWebhook"}},"type":"object","required":["type","data"],"title":"WebhookBenefitGrantCreatedPayload","description":"Sent when a new benefit grant is created.\n\n**Discord & Slack support:** Basic"},"WebhookBenefitGrantRevokedPayload":{"properties":{"type":{"type":"string","enum":["benefit_grant.revoked"],"const":"benefit_grant.revoked","title":"Type"},"data":{"$ref":"#/components/schemas/BenefitGrantWebhook"}},"type":"object","required":["type","data"],"title":"WebhookBenefitGrantRevokedPayload","description":"Sent when a new benefit grant is revoked.\n\n**Discord & Slack support:** Basic"},"WebhookBenefitGrantUpdatedPayload":{"properties":{"type":{"type":"string","enum":["benefit_grant.updated"],"const":"benefit_grant.updated","title":"Type"},"data":{"$ref":"#/components/schemas/BenefitGrantWebhook"}},"type":"object","required":["type","data"],"title":"WebhookBenefitGrantUpdatedPayload","description":"Sent when a new benefit grant is updated.\n\n**Discord & Slack support:** Basic"},"WebhookBenefitUpdatedPayload":{"properties":{"type":{"type":"string","enum":["benefit.updated"],"const":"benefit.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Benefit","title":"Benefit"}},"type":"object","required":["type","data"],"title":"WebhookBenefitUpdatedPayload","description":"Sent when a benefit is updated.\n\n**Discord & Slack support:** Basic"},"WebhookCheckoutCreatedPayload":{"properties":{"type":{"type":"string","enum":["checkout.created"],"const":"checkout.created","title":"Type"},"data":{"$ref":"#/components/schemas/Checkout"}},"type":"object","required":["type","data"],"title":"WebhookCheckoutCreatedPayload","description":"Sent when a new checkout is created.\n\n**Discord & Slack support:** Basic"},"WebhookCheckoutUpdatedPayload":{"properties":{"type":{"type":"string","enum":["checkout.updated"],"const":"checkout.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Checkout"}},"type":"object","required":["type","data"],"title":"WebhookCheckoutUpdatedPayload","description":"Sent when a checkout is updated.\n\n**Discord & Slack support:** Basic"},"WebhookOrderCreatedPayload":{"properties":{"type":{"type":"string","enum":["order.created"],"const":"order.created","title":"Type"},"data":{"$ref":"#/components/schemas/Order"}},"type":"object","required":["type","data"],"title":"WebhookOrderCreatedPayload","description":"Sent when a new order is created.\n\n**Discord & Slack support:** Full"},"WebhookOrganizationUpdatedPayload":{"properties":{"type":{"type":"string","enum":["organization.updated"],"const":"organization.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Organization"}},"type":"object","required":["type","data"],"title":"WebhookOrganizationUpdatedPayload","description":"Sent when a organization is updated.\n\n**Discord & Slack support:** Basic"},"WebhookPledgeCreatedPayload":{"properties":{"type":{"type":"string","enum":["pledge.created"],"const":"pledge.created","title":"Type"},"data":{"$ref":"#/components/schemas/Pledge"}},"type":"object","required":["type","data"],"title":"WebhookPledgeCreatedPayload","description":"Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord & Slack support:** Full"},"WebhookPledgeUpdatedPayload":{"properties":{"type":{"type":"string","enum":["pledge.updated"],"const":"pledge.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Pledge"}},"type":"object","required":["type","data"],"title":"WebhookPledgeUpdatedPayload","description":"Sent when a pledge is updated.\n\n**Discord & Slack support:** Basic"},"WebhookProductCreatedPayload":{"properties":{"type":{"type":"string","enum":["product.created"],"const":"product.created","title":"Type"},"data":{"$ref":"#/components/schemas/Product"}},"type":"object","required":["type","data"],"title":"WebhookProductCreatedPayload","description":"Sent when a new product is created.\n\n**Discord & Slack support:** Basic"},"WebhookProductUpdatedPayload":{"properties":{"type":{"type":"string","enum":["product.updated"],"const":"product.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Product"}},"type":"object","required":["type","data"],"title":"WebhookProductUpdatedPayload","description":"Sent when a product is updated.\n\n**Discord & Slack support:** Basic"},"WebhookSubscriptionActivePayload":{"properties":{"type":{"type":"string","enum":["subscription.active"],"const":"subscription.active","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionActivePayload","description":"Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord & Slack support:** Full"},"WebhookSubscriptionCanceledPayload":{"properties":{"type":{"type":"string","enum":["subscription.canceled"],"const":"subscription.canceled","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionCanceledPayload","description":"Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord & Slack support:** Full"},"WebhookSubscriptionCreatedPayload":{"properties":{"type":{"type":"string","enum":["subscription.created"],"const":"subscription.created","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionCreatedPayload","description":"Sent when a new subscription is created.\n\n**Discord & Slack support:** Full"},"WebhookSubscriptionRevokedPayload":{"properties":{"type":{"type":"string","enum":["subscription.revoked"],"const":"subscription.revoked","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionRevokedPayload","description":"Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord & Slack support:** Full"},"WebhookSubscriptionUpdatedPayload":{"properties":{"type":{"type":"string","enum":["subscription.updated"],"const":"subscription.updated","title":"Type"},"data":{"$ref":"#/components/schemas/Subscription"}},"type":"object","required":["type","data"],"title":"WebhookSubscriptionUpdatedPayload","description":"Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord & Slack support:** On cancellation and revocation. Renewals are skipped."}},"securitySchemes":{"oidc":{"type":"openIdConnect","openIdConnectUrl":"/.well-known/openid-configuration"},"pat":{"type":"http","description":"You can generate a **Personal Access Token** from your [settings](https://polar.sh/settings).","scheme":"bearer"},"customer_session":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"private","description":"Endpoints that should appear in the schema only in development to generate our internal JS SDK."},{"name":"documented","description":"Endpoints shown and documented in the Polar API documentation."},{"name":"featured","description":"Endpoints featured in the Polar API documentation for their interest in common use-cases."},{"name":"issue_funding","description":"Endpoints related to issue funding and rewards in the Polar API."}]} \ No newline at end of file diff --git a/.speakeasy/temp/transform_MelgKQiXpL.yaml b/.speakeasy/temp/transform_MelgKQiXpL.yaml deleted file mode 100644 index 873a524..0000000 --- a/.speakeasy/temp/transform_MelgKQiXpL.yaml +++ /dev/null @@ -1,18334 +0,0 @@ -openapi: "3.1.0" -info: - summary: "Polar HTTP and Webhooks API" - title: "Polar API" - description: "Read the docs at https://docs.polar.sh/api" - version: "0.1.0" -servers: - - url: "https://api.polar.sh" - description: "Production environment" - x-speakeasy-server-id: "production" - - url: "https://sandbox-api.polar.sh" - description: "Sandbox environment" - x-speakeasy-server-id: "sandbox" -paths: - "/v1/external_organizations/": - get: - tags: - - "external_organizations" - - "documented" - - "issue_funding" - summary: "List External Organizations" - description: "List external organizations." - operationId: "external_organizations:list" - parameters: - - name: "platform" - in: "query" - description: "Filter by platform." - required: false - schema: - anyOf: - - {"$ref": "#/components/schemas/Platforms"} - - type: "array" - items: {"$ref": "#/components/schemas/Platforms"} - - type: "null" - title: "Platform Filter" - description: "Filter by platform." - - name: "name" - in: "query" - description: "Filter by name." - required: false - schema: - anyOf: - - type: "string" - - type: "array" - items: - type: "string" - - type: "null" - title: "RepositoryName Filter" - description: "Filter by name." - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/ExternalOrganizationSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_ExternalOrganization_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - external_organizations:read - - pat: [] - x-polar-allowed-subjects: ["Anonymous", "Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "external_organizations" - x-speakeasy-name-override: "list" - "/v1/repositories/": - get: - tags: - - "repositories" - - "documented" - - "issue_funding" - summary: "List Repositories" - description: "List repositories." - operationId: "repositories:list" - parameters: - - name: "platform" - in: "query" - description: "Filter by platform." - required: false - schema: - anyOf: - - {"$ref": "#/components/schemas/Platforms"} - - type: "array" - items: {"$ref": "#/components/schemas/Platforms"} - - type: "null" - title: "Platform Filter" - description: "Filter by platform." - - name: "name" - in: "query" - description: "Filter by name." - required: false - schema: - anyOf: - - type: "string" - - type: "array" - items: - type: "string" - - type: "null" - title: "RepositoryName Filter" - description: "Filter by name." - - name: "external_organization_name" - in: "query" - description: "Filter by external organization name." - required: false - schema: - anyOf: - - type: "string" - - type: "array" - items: - type: "string" - - type: "null" - title: "ExternalOrganizationName Filter" - description: "Filter by external organization name." - - name: "is_private" - in: "query" - description: "Filter by private status." - required: false - schema: - anyOf: - - type: "boolean" - - type: "null" - title: "Is Private" - description: "Filter by private status." - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/RepositorySortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_Repository_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - repositories:read - - repositories:write - - pat: [] - x-polar-allowed-subjects: ["Anonymous", "Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "repositories" - x-speakeasy-name-override: "list" - "/v1/repositories/{id}": - get: - tags: - - "repositories" - - "documented" - - "issue_funding" - summary: "Get Repository" - description: "Get a repository by ID." - operationId: "repositories:get" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The repository ID." - x-polar-selector-widget: {"resourceRoot": "/v1/repositories", "resourceName": "Repository", "displayProperty": "name"} - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/Repository"} - "404": - description: "Repository not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - repositories:read - - repositories:write - - pat: [] - x-polar-allowed-subjects: ["Anonymous", "Organization", "User"] - x-speakeasy-group: "repositories" - x-speakeasy-name-override: "get" - patch: - tags: - - "repositories" - - "documented" - - "issue_funding" - summary: "Update Repository" - description: "Update a repository." - operationId: "repositories:update" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The repository ID." - x-polar-selector-widget: {"resourceRoot": "/v1/repositories", "resourceName": "Repository", "displayProperty": "name"} - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/RepositoryUpdate"} - required: true - responses: - "200": - description: "Repository updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Repository"} - "403": - description: "You don't have the permission to update this repository." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "Repository not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - repositories:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "repositories" - x-speakeasy-name-override: "update" - "/v1/organizations/": - get: - tags: - - "organizations" - - "documented" - - "featured" - summary: "List Organizations" - description: "List organizations." - operationId: "organizations:list" - parameters: - - name: "slug" - in: "query" - description: "Filter by slug." - required: false - schema: - anyOf: - - type: "string" - - type: "null" - title: "Slug" - description: "Filter by slug." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/OrganizationSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_Organization_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - organizations:read - - organizations:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "organizations" - x-speakeasy-name-override: "list" - post: - tags: - - "organizations" - - "documented" - - "featured" - summary: "Create Organization" - description: "Create an organization." - operationId: "organizations:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/OrganizationCreate"} - required: true - responses: - "201": - description: "Organization created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Organization"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - organizations:write - - pat: [] - x-polar-allowed-subjects: ["User"] - x-speakeasy-group: "organizations" - x-speakeasy-name-override: "create" - "/v1/organizations/{id}": - get: - tags: - - "organizations" - - "documented" - - "featured" - summary: "Get Organization" - description: "Get an organization by ID." - operationId: "organizations:get" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/Organization"} - "404": - description: "Organization not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - organizations:read - - organizations:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "organizations" - x-speakeasy-name-override: "get" - patch: - tags: - - "organizations" - - "documented" - - "featured" - summary: "Update Organization" - description: "Update an organization." - operationId: "organizations:update" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/OrganizationUpdate"} - required: true - responses: - "200": - description: "Organization updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Organization"} - "403": - description: "You don't have the permission to update this organization." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "Organization not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - organizations:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "organizations" - x-speakeasy-name-override: "update" - "/v1/subscriptions/": - get: - tags: - - "subscriptions" - - "documented" - summary: "List Subscriptions" - description: "List subscriptions." - operationId: "subscriptions:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "product_id" - in: "query" - description: "Filter by product ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "null" - title: "ProductID Filter" - description: "Filter by product ID." - - name: "customer_id" - in: "query" - description: "Filter by customer ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "CustomerID Filter" - description: "Filter by customer ID." - - name: "discount_id" - in: "query" - description: "Filter by discount ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "null" - title: "DiscountID Filter" - description: "Filter by discount ID." - - name: "active" - in: "query" - description: "Filter by active or inactive subscription." - required: false - schema: - anyOf: - - type: "boolean" - - type: "null" - title: "Active" - description: "Filter by active or inactive subscription." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/SubscriptionSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-started_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_Subscription_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - subscriptions:read - - subscriptions:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "subscriptions" - x-speakeasy-name-override: "list" - "/v1/subscriptions/export": - get: - tags: - - "subscriptions" - - "documented" - summary: "Export Subscriptions" - description: "Export subscriptions as a CSV file." - operationId: "subscriptions:export" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "Organization Id" - description: "Filter by organization ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - subscriptions:read - - subscriptions:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "subscriptions" - x-speakeasy-name-override: "export" - "/v1/advertisements/": - get: - tags: - - "advertisements" - - "documented" - summary: "List Campaigns" - description: "List active advertisement campaigns for a benefit." - operationId: "advertisements:list" - parameters: - - name: "benefit_id" - in: "query" - required: true - schema: - type: "string" - title: "Benefit Id" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/AdvertisementSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["granted_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/AdvertisementCampaignListResource"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "advertisements" - x-speakeasy-name-override: "list" - "/v1/advertisements/{id}": - get: - tags: - - "advertisements" - - "documented" - summary: "Get Campaign" - description: "Get an advertisement campaign by ID." - operationId: "advertisements:get" - parameters: - - name: "id" - in: "path" - description: "The advertisement campaign ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The advertisement campaign ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/AdvertisementCampaign"} - "404": - description: "Advertisement campaign not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - x-speakeasy-group: "advertisements" - x-speakeasy-name-override: "get" - "/v1/oauth2/": - get: - tags: - - "oauth2" - - "clients" - - "documented" - summary: "List Clients" - description: "List OAuth2 clients." - operationId: "oauth2:clients:list" - parameters: - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_OAuth2Client_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: [] - - pat: [] - x-polar-allowed-subjects: ["User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "oauth2.clients" - x-speakeasy-name-override: "list" - "/v1/oauth2/register": - post: - tags: - - "oauth2" - - "clients" - - "documented" - summary: "Create Client" - description: "Create an OAuth2 client." - operationId: "oauth2:clients:oauth2:create_client" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/OAuth2ClientConfiguration"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: [] - - pat: [] - x-polar-allowed-subjects: ["User"] - x-speakeasy-group: "oauth2.clients" - x-speakeasy-name-override: "create" - "/v1/oauth2/register/{client_id}": - get: - tags: - - "oauth2" - - "clients" - - "documented" - summary: "Get Client" - description: "Get an OAuth2 client by Client ID." - operationId: "oauth2:clients:oauth2:get_client" - parameters: - - name: "client_id" - in: "path" - required: true - schema: - type: "string" - title: "Client Id" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: [] - - pat: [] - x-polar-allowed-subjects: ["Anonymous", "User"] - x-speakeasy-group: "oauth2.clients" - x-speakeasy-name-override: "get" - put: - tags: - - "oauth2" - - "clients" - - "documented" - summary: "Update Client" - description: "Update an OAuth2 client." - operationId: "oauth2:clients:oauth2:update_client" - parameters: - - name: "client_id" - in: "path" - required: true - schema: - type: "string" - title: "Client Id" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/OAuth2ClientConfigurationUpdate"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: [] - - pat: [] - x-polar-allowed-subjects: ["Anonymous", "User"] - x-speakeasy-group: "oauth2.clients" - x-speakeasy-name-override: "update" - delete: - tags: - - "oauth2" - - "clients" - - "documented" - summary: "Delete Client" - description: "Delete an OAuth2 client." - operationId: "oauth2:clients:oauth2:delete_client" - parameters: - - name: "client_id" - in: "path" - required: true - schema: - type: "string" - title: "Client Id" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: [] - - pat: [] - x-polar-allowed-subjects: ["Anonymous", "User"] - x-speakeasy-group: "oauth2.clients" - x-speakeasy-name-override: "delete" - "/v1/oauth2/authorize": - get: - tags: - - "oauth2" - - "documented" - summary: "Authorize" - operationId: "oauth2:authorize" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: - oneOf: - - {"$ref": "#/components/schemas/AuthorizeResponseUser"} - - {"$ref": "#/components/schemas/AuthorizeResponseOrganization"} - discriminator: - propertyName: "sub_type" - mapping: - "user": "#/components/schemas/AuthorizeResponseUser" - "organization": "#/components/schemas/AuthorizeResponseOrganization" - title: "Response Oauth2:Authorize" - security: - - oidc: [] - - pat: [] - x-polar-allowed-subjects: ["Anonymous", "User"] - x-speakeasy-group: "oauth2" - x-speakeasy-name-override: "authorize" - "/v1/oauth2/token": - post: - tags: - - "oauth2" - - "featured" - - "documented" - summary: "Request Token" - description: "Request an access token using a valid grant." - operationId: "oauth2:request_token" - requestBody: - content: - "application/x-www-form-urlencoded": - schema: - oneOf: - - {"$ref": "#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest"} - - {"$ref": "#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest"} - discriminator: - propertyName: "grant_type" - mapping: - "authorization_code": "#/paths/~1v1~1oauth2~1token/post/x-components/AuthorizationCodeTokenRequest" - "refresh_token": "#/paths/~1v1~1oauth2~1token/post/x-components/RefreshTokenRequest" - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/TokenResponse"} - x-components: {"AuthorizationCodeTokenRequest": {"properties": {"grant_type": {"const": "authorization_code", "enum": ["authorization_code"], "title": "Grant Type", "type": "string"}, "client_id": {"title": "Client Id", "type": "string"}, "client_secret": {"title": "Client Secret", "type": "string"}, "code": {"title": "Code", "type": "string"}, "redirect_uri": {"format": "uri", "maxLength": 2083, "minLength": 1, "title": "Redirect Uri", "type": "string"}}, "required": ["grant_type", "client_id", "client_secret", "code", "redirect_uri"], "title": "AuthorizationCodeTokenRequest", "type": "object"}, "RefreshTokenRequest": {"properties": {"grant_type": {"const": "refresh_token", "enum": ["refresh_token"], "title": "Grant Type", "type": "string"}, "client_id": {"title": "Client Id", "type": "string"}, "client_secret": {"title": "Client Secret", "type": "string"}, "refresh_token": {"title": "Refresh Token", "type": "string"}}, "required": ["grant_type", "client_id", "client_secret", "refresh_token"], "title": "RefreshTokenRequest", "type": "object"}} - x-speakeasy-group: "oauth2" - x-speakeasy-name-override: "token" - "/v1/oauth2/revoke": - post: - tags: - - "oauth2" - - "featured" - - "documented" - summary: "Revoke Token" - description: "Revoke an access token or a refresh token." - operationId: "oauth2:revoke_token" - requestBody: - content: - "application/x-www-form-urlencoded": - schema: - type: "object" - properties: - "token": - type: "string" - title: "Token" - "token_type_hint": - anyOf: - - type: "string" - enum: - - "access_token" - - "refresh_token" - - type: "null" - title: "Token Type Hint" - "client_id": - type: "string" - title: "Client Id" - "client_secret": - type: "string" - title: "Client Secret" - title: "RevokeTokenRequest" - required: - - "token" - - "client_id" - - "client_secret" - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/RevokeTokenResponse"} - x-speakeasy-group: "oauth2" - x-speakeasy-name-override: "revoke" - "/v1/oauth2/introspect": - post: - tags: - - "oauth2" - - "featured" - - "documented" - summary: "Introspect Token" - description: "Get information about an access token." - operationId: "oauth2:introspect_token" - requestBody: - content: - "application/x-www-form-urlencoded": - schema: - type: "object" - properties: - "token": - type: "string" - title: "Token" - "token_type_hint": - anyOf: - - type: "string" - enum: - - "access_token" - - "refresh_token" - - type: "null" - title: "Token Type Hint" - "client_id": - type: "string" - title: "Client Id" - "client_secret": - type: "string" - title: "Client Secret" - title: "IntrospectTokenRequest" - required: - - "token" - - "client_id" - - "client_secret" - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/IntrospectTokenResponse"} - x-speakeasy-group: "oauth2" - x-speakeasy-name-override: "introspect" - "/v1/oauth2/userinfo": - get: - tags: - - "oauth2" - - "featured" - - "documented" - summary: "Get User Info" - description: "Get information about the authenticated user." - operationId: "oauth2:userinfo" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: - anyOf: - - {"$ref": "#/components/schemas/UserInfoUser"} - - {"$ref": "#/components/schemas/UserInfoOrganization"} - title: "Response Oauth2:Userinfo" - security: - - oidc: [] - x-speakeasy-name-override: "userinfo" - x-speakeasy-group: "oauth2" - "/v1/benefits/": - get: - tags: - - "benefits" - - "documented" - summary: "List Benefits" - description: "List benefits." - operationId: "benefits:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "type" - in: "query" - description: "Filter by benefit type." - required: false - schema: - anyOf: - - {"$ref": "#/components/schemas/BenefitType"} - - type: "array" - items: {"$ref": "#/components/schemas/BenefitType"} - - type: "null" - title: "BenefitType Filter" - description: "Filter by benefit type." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_Benefit_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - benefits:read - - benefits:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "benefits" - x-speakeasy-name-override: "list" - post: - tags: - - "benefits" - - "documented" - summary: "Create Benefit" - description: "Create a benefit." - operationId: "benefits:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/BenefitCreate"} - required: true - responses: - "201": - description: "Benefit created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Benefit", "title": "Benefit"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - benefits:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "benefits" - x-speakeasy-name-override: "create" - "/v1/benefits/{id}": - get: - tags: - - "benefits" - - "documented" - summary: "Get Benefit" - description: "Get a benefit by ID." - operationId: "benefits:get" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/Benefit", "title": "Benefit"} - "404": - description: "Benefit not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - benefits:read - - benefits:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "benefits" - x-speakeasy-name-override: "get" - delete: - tags: - - "benefits" - - "documented" - summary: "Delete Benefit" - description: "Delete a benefit.\n\n> [!WARNING]\n> Every grants associated with the benefit will be revoked.\n> Users will lose access to the benefit." - operationId: "benefits:delete" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - responses: - "204": - description: "Benefit deleted." - "403": - description: "You don't have the permission to update this benefit or it's not deletable." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "Benefit not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - benefits:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "benefits" - x-speakeasy-name-override: "delete" - patch: - tags: - - "benefits" - - "documented" - summary: "Update Benefit" - description: "Update a benefit." - operationId: "benefits:update" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - requestBody: - content: - "application/json": - schema: - anyOf: - - {"$ref": "#/components/schemas/BenefitAdsUpdate"} - - {"$ref": "#/components/schemas/BenefitCustomUpdate"} - - {"$ref": "#/components/schemas/BenefitDiscordUpdate"} - - {"$ref": "#/components/schemas/BenefitGitHubRepositoryUpdate"} - - {"$ref": "#/components/schemas/BenefitDownloadablesUpdate"} - - {"$ref": "#/components/schemas/BenefitLicenseKeysUpdate"} - title: "Benefit Update" - required: true - responses: - "200": - description: "Benefit updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Benefit", "title": "Benefit"} - "403": - description: "You don't have the permission to update this benefit." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "Benefit not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - benefits:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "benefits" - x-speakeasy-name-override: "update" - "/v1/benefits/{id}/grants": - get: - tags: - - "benefits" - - "documented" - summary: "List Benefit Grants" - description: "List the individual grants for a benefit.\n\nIt's especially useful to check if a user has been granted a benefit." - operationId: "benefits:grants" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - - name: "is_granted" - in: "query" - description: "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. " - required: false - schema: - anyOf: - - type: "boolean" - - type: "null" - title: "Is Granted" - description: "Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. " - - name: "customer_id" - in: "query" - description: "Filter by customer." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "CustomerID Filter" - description: "Filter by customer." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_BenefitGrant_"} - "404": - description: "Benefit not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - benefits:read - - benefits:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "benefits" - x-speakeasy-name-override: "grants" - "/v1/products/": - get: - tags: - - "products" - - "documented" - - "featured" - summary: "List Products" - description: "List products." - operationId: "products:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "query" - in: "query" - description: "Filter by product name." - required: false - schema: - anyOf: - - type: "string" - - type: "null" - title: "Query" - description: "Filter by product name." - - name: "is_archived" - in: "query" - description: "Filter on archived products." - required: false - schema: - anyOf: - - type: "boolean" - - type: "null" - title: "Is Archived" - description: "Filter on archived products." - - name: "is_recurring" - in: "query" - description: "Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. " - required: false - schema: - anyOf: - - type: "boolean" - - type: "null" - title: "Is Recurring" - description: "Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. " - - name: "benefit_id" - in: "query" - description: "Filter products granting specific benefit." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - - type: "null" - title: "BenefitID Filter" - description: "Filter products granting specific benefit." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/ProductSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_Product_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - products:read - - products:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "products" - x-speakeasy-name-override: "list" - post: - tags: - - "products" - - "documented" - - "featured" - summary: "Create Product" - description: "Create a product." - operationId: "products:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/ProductCreate", "title": "ProductCreate"} - required: true - responses: - "201": - description: "Product created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Product"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - products:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "products" - x-speakeasy-name-override: "create" - "/v1/products/{id}": - get: - tags: - - "products" - - "documented" - - "featured" - summary: "Get Product" - description: "Get a product by ID." - operationId: "products:get" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/Product"} - "404": - description: "Product not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - products:read - - products:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "products" - x-speakeasy-name-override: "get" - patch: - tags: - - "products" - - "documented" - - "featured" - summary: "Update Product" - description: "Update a product." - operationId: "products:update" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/ProductUpdate"} - required: true - responses: - "200": - description: "Product updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Product"} - "403": - description: "You don't have the permission to update this product." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "Product not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - products:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "products" - x-speakeasy-name-override: "update" - "/v1/products/{id}/benefits": - post: - tags: - - "products" - - "documented" - - "featured" - summary: "Update Product Benefits" - description: "Update benefits granted by a product." - operationId: "products:update_benefits" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/ProductBenefitsUpdate"} - required: true - responses: - "200": - description: "Product benefits updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Product"} - "403": - description: "You don't have the permission to update this product." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "Product not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - products:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "products" - x-speakeasy-name-override: "update_benefits" - "/v1/orders/": - get: - tags: - - "orders" - - "documented" - summary: "List Orders" - description: "List orders." - operationId: "orders:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "product_id" - in: "query" - description: "Filter by product ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "null" - title: "ProductID Filter" - description: "Filter by product ID." - - name: "product_price_type" - in: "query" - description: "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - required: false - schema: - anyOf: - - {"$ref": "#/components/schemas/ProductPriceType"} - - type: "array" - items: {"$ref": "#/components/schemas/ProductPriceType"} - - type: "null" - title: "ProductPriceType Filter" - description: "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - - name: "discount_id" - in: "query" - description: "Filter by discount ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "DiscountID Filter" - description: "Filter by discount ID." - - name: "customer_id" - in: "query" - description: "Filter by customer ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "CustomerID Filter" - description: "Filter by customer ID." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/OrderSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_Order_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - orders:read - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "orders" - x-speakeasy-name-override: "list" - "/v1/orders/{id}": - get: - tags: - - "orders" - - "documented" - summary: "Get Order" - description: "Get an order by ID." - operationId: "orders:get" - parameters: - - name: "id" - in: "path" - description: "The order ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The order ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/Order"} - "404": - description: "Order not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - orders:read - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "orders" - x-speakeasy-name-override: "get" - "/v1/orders/{id}/invoice": - get: - tags: - - "orders" - - "documented" - summary: "Get Order Invoice" - description: "Get an order's invoice data." - operationId: "orders:invoice" - parameters: - - name: "id" - in: "path" - description: "The order ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The order ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/OrderInvoice"} - "404": - description: "Order not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - orders:read - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "orders" - x-speakeasy-name-override: "invoice" - "/v1/checkouts/custom/": - get: - tags: - - "checkouts" - - "custom" - - "documented" - - "featured" - summary: "List Checkout Sessions" - description: "List checkout sessions." - operationId: "checkouts:custom:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "product_id" - in: "query" - description: "Filter by product ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "null" - title: "ProductID Filter" - description: "Filter by product ID." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/CheckoutSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_Checkout_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - checkouts:read - - checkouts:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "checkouts.custom" - x-speakeasy-name-override: "list" - post: - tags: - - "checkouts" - - "custom" - - "documented" - - "featured" - summary: "Create Checkout Session" - description: "Create a checkout session." - operationId: "checkouts:custom:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutCreate"} - required: true - responses: - "201": - description: "Checkout session created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Checkout"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - checkouts:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "checkouts.custom" - x-speakeasy-name-override: "create" - "/v1/checkouts/custom/{id}": - get: - tags: - - "checkouts" - - "custom" - - "documented" - - "featured" - summary: "Get Checkout Session" - description: "Get a checkout session by ID." - operationId: "checkouts:custom:get" - parameters: - - name: "id" - in: "path" - description: "The checkout session ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The checkout session ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/Checkout"} - "404": - description: "Checkout session not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - checkouts:read - - checkouts:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "checkouts.custom" - x-speakeasy-name-override: "get" - patch: - tags: - - "checkouts" - - "custom" - - "documented" - - "featured" - summary: "Update Checkout Session" - description: "Update a checkout session." - operationId: "checkouts:custom:update" - parameters: - - name: "id" - in: "path" - description: "The checkout session ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The checkout session ID." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutUpdate"} - required: true - responses: - "200": - description: "Checkout session updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Checkout"} - "404": - description: "Checkout session not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - checkouts:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "checkouts.custom" - x-speakeasy-name-override: "update" - "/v1/checkouts/custom/client/{client_secret}": - get: - tags: - - "checkouts" - - "custom" - - "documented" - - "featured" - summary: "Get Checkout Session from Client" - description: "Get a checkout session by client secret." - operationId: "checkouts:custom:client_get" - parameters: - - name: "client_secret" - in: "path" - description: "The checkout session client secret." - required: true - schema: - type: "string" - title: "Client Secret" - description: "The checkout session client secret." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutPublic"} - "404": - description: "Checkout session not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - x-speakeasy-group: "checkouts.custom" - x-speakeasy-name-override: "client_get" - patch: - tags: - - "checkouts" - - "custom" - - "documented" - - "featured" - summary: "Update Checkout Session from Client" - description: "Update a checkout session by client secret." - operationId: "checkouts:custom:client_update" - parameters: - - name: "client_secret" - in: "path" - description: "The checkout session client secret." - required: true - schema: - type: "string" - title: "Client Secret" - description: "The checkout session client secret." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutUpdatePublic"} - required: true - responses: - "200": - description: "Checkout session updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutPublic"} - "404": - description: "Checkout session not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - x-speakeasy-group: "checkouts.custom" - x-speakeasy-name-override: "client_update" - "/v1/checkouts/custom/client/{client_secret}/confirm": - post: - tags: - - "checkouts" - - "custom" - - "documented" - - "featured" - summary: "Confirm Checkout Session from Client" - description: "Confirm a checkout session by client secret.\n\nOrders and subscriptions will be processed." - operationId: "checkouts:custom:client_confirm" - parameters: - - name: "client_secret" - in: "path" - description: "The checkout session client secret." - required: true - schema: - type: "string" - title: "Client Secret" - description: "The checkout session client secret." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutConfirmStripe"} - required: true - responses: - "200": - description: "Checkout session confirmed." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutPublicConfirmed"} - "404": - description: "Checkout session not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: [] - - pat: [] - x-polar-allowed-subjects: ["Anonymous", "User"] - x-speakeasy-group: "checkouts.custom" - x-speakeasy-name-override: "client_confirm" - "/v1/checkouts/": - post: - tags: - - "checkouts" - - "documented" - summary: "Create Checkout" - description: "Create a checkout session." - operationId: "checkouts:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutLegacyCreate"} - required: true - responses: - "201": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutLegacy"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - deprecated: true - security: - - oidc: [] - - pat: [] - x-polar-allowed-subjects: ["Anonymous", "User"] - x-speakeasy-deprecation-replacement: "checkouts:custom:create" - x-speakeasy-deprecation-message: "This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information." - x-speakeasy-group: "checkouts" - x-speakeasy-name-override: "create" - "/v1/checkouts/{id}": - get: - tags: - - "checkouts" - - "documented" - summary: "Get Checkout" - description: "Get an active checkout session by ID." - operationId: "checkouts:get" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutLegacy"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - deprecated: true - x-speakeasy-deprecation-message: "This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information." - x-speakeasy-group: "checkouts" - x-speakeasy-name-override: "get" - "/v1/files/": - get: - tags: - - "files" - - "documented" - summary: "List Files" - description: "List files." - operationId: "files:list" - parameters: - - name: "organization_id" - in: "query" - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "Organization Id" - - name: "ids" - in: "query" - description: "List of file IDs to get. " - required: false - schema: - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "Ids" - description: "List of file IDs to get. " - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_FileRead_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - files:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "files" - x-speakeasy-name-override: "list" - post: - tags: - - "files" - - "documented" - summary: "Create File" - description: "Create a file." - operationId: "files:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/FileCreate"} - required: true - responses: - "201": - description: "File created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/FileUpload"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - files:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "files" - x-speakeasy-name-override: "create" - "/v1/files/{id}/uploaded": - post: - tags: - - "files" - - "documented" - summary: "Complete File Upload" - description: "Complete a file upload." - operationId: "files:uploaded" - parameters: - - name: "id" - in: "path" - description: "The file ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The file ID." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/FileUploadCompleted"} - required: true - responses: - "200": - description: "File upload completed." - content: - "application/json": - schema: - oneOf: - - {"$ref": "#/components/schemas/DownloadableFileRead"} - - {"$ref": "#/components/schemas/ProductMediaFileRead"} - - {"$ref": "#/components/schemas/OrganizationAvatarFileRead"} - discriminator: - propertyName: "service" - mapping: - "downloadable": "#/components/schemas/DownloadableFileRead" - "product_media": "#/components/schemas/ProductMediaFileRead" - "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead" - title: "Response Files:Uploaded" - "403": - description: "You don't have the permission to update this file." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "File not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - files:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "files" - x-speakeasy-name-override: "uploaded" - "/v1/files/{id}": - delete: - tags: - - "files" - - "documented" - summary: "Delete File" - description: "Delete a file." - operationId: "files:delete" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - responses: - "204": - description: "File deleted." - "403": - description: "You don't have the permission to delete this file." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "File not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - files:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "files" - x-speakeasy-name-override: "delete" - patch: - tags: - - "files" - - "documented" - summary: "Update File" - description: "Update a file." - operationId: "files:update" - parameters: - - name: "id" - in: "path" - description: "The file ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The file ID." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/FilePatch"} - required: true - responses: - "200": - description: "File updated." - content: - "application/json": - schema: - oneOf: - - {"$ref": "#/components/schemas/DownloadableFileRead"} - - {"$ref": "#/components/schemas/ProductMediaFileRead"} - - {"$ref": "#/components/schemas/OrganizationAvatarFileRead"} - discriminator: - propertyName: "service" - mapping: - "downloadable": "#/components/schemas/DownloadableFileRead" - "product_media": "#/components/schemas/ProductMediaFileRead" - "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead" - title: "Response Files:Update" - "403": - description: "You don't have the permission to update this file." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "File not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - files:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "files" - x-speakeasy-name-override: "update" - "/v1/metrics/": - get: - tags: - - "metrics" - - "documented" - summary: "Get Metrics" - description: "Get metrics about your orders and subscriptions." - operationId: "metrics:get" - parameters: - - name: "start_date" - in: "query" - description: "Start date." - required: true - schema: - type: "string" - title: "Start Date" - format: "date" - description: "Start date." - - name: "end_date" - in: "query" - description: "End date." - required: true - schema: - type: "string" - title: "End Date" - format: "date" - description: "End date." - - name: "interval" - in: "query" - description: "Interval between two timestamps." - required: true - schema: {"$ref": "#/components/schemas/Interval", "description": "Interval between two timestamps."} - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "product_id" - in: "query" - description: "Filter by product ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "null" - title: "ProductID Filter" - description: "Filter by product ID." - - name: "product_price_type" - in: "query" - description: "Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases." - required: false - schema: - anyOf: - - {"$ref": "#/components/schemas/ProductPriceType"} - - type: "array" - items: {"$ref": "#/components/schemas/ProductPriceType"} - - type: "null" - title: "ProductPriceType Filter" - description: "Filter by product price type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/MetricsResponse"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - metrics:read - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "metrics" - x-speakeasy-name-override: "get" - "/v1/metrics/limits": - get: - tags: - - "metrics" - - "documented" - summary: "Get Metrics Limits" - description: "Get the interval limits for the metrics endpoint." - operationId: "metrics:limits" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/MetricsLimits"} - security: - - oidc: - - metrics:read - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "metrics" - x-speakeasy-name-override: "limits" - "/v1/license-keys": - get: - tags: - - "license_keys" - - "documented" - - "featured" - summary: "List License Keys" - description: "Get license keys connected to the given organization & filters." - operationId: "license_keys:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "benefit_id" - in: "query" - description: "Filter by benefit ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - - type: "null" - title: "BenefitID Filter" - description: "Filter by benefit ID." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_LicenseKeyRead_"} - "401": - description: "Not authorized to manage license key." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Unauthorized"} - "404": - description: "License key not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - license_keys:read - - license_keys:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "license_keys" - x-speakeasy-name-override: "list" - "/v1/license-keys/{id}": - get: - tags: - - "license_keys" - - "documented" - - "featured" - summary: "Get License Key" - description: "Get a license key." - operationId: "license_keys:get" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/LicenseKeyWithActivations"} - "401": - description: "Not authorized to manage license key." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Unauthorized"} - "404": - description: "License key not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - license_keys:read - - license_keys:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "license_keys" - x-speakeasy-name-override: "get" - patch: - tags: - - "license_keys" - - "documented" - - "featured" - summary: "Update License Key" - description: "Update a license key." - operationId: "license_keys:update" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/LicenseKeyUpdate"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/LicenseKeyRead"} - "401": - description: "Not authorized to manage license key." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Unauthorized"} - "404": - description: "License key not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - license_keys:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "license_keys" - x-speakeasy-name-override: "update" - "/v1/license-keys/{id}/activations/{activation_id}": - get: - tags: - - "license_keys" - - "documented" - - "featured" - summary: "Get Activation" - description: "Get a license key activation." - operationId: "license_keys:get_activation" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - - name: "activation_id" - in: "path" - required: true - schema: - type: "string" - title: "Activation Id" - format: "uuid4" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/LicenseKeyActivationRead"} - "401": - description: "Not authorized to manage license key." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Unauthorized"} - "404": - description: "License key not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - license_keys:read - - license_keys:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "license_keys" - x-speakeasy-name-override: "get_activation" - "/v1/checkout-links/": - get: - tags: - - "checkout-links" - - "documented" - summary: "List Checkout Links" - description: "List checkout links." - operationId: "checkout-links:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "product_id" - in: "query" - description: "Filter by product ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "null" - title: "ProductID Filter" - description: "Filter by product ID." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/CheckoutLinkSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_CheckoutLink_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - checkout_links:read - - checkout_links:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "checkout-links" - x-speakeasy-name-override: "list" - post: - tags: - - "checkout-links" - - "documented" - summary: "Create Checkout Link" - description: "Create a checkout link." - operationId: "checkout-links:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutLinkCreate"} - required: true - responses: - "201": - description: "Checkout link created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutLink"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - checkout_links:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "checkout-links" - x-speakeasy-name-override: "create" - "/v1/checkout-links/{id}": - get: - tags: - - "checkout-links" - - "documented" - summary: "Get Checkout Link" - description: "Get a checkout link by ID." - operationId: "checkout-links:get" - parameters: - - name: "id" - in: "path" - description: "The checkout link ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The checkout link ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutLink"} - "404": - description: "Checkout link not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - checkout_links:read - - checkout_links:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "checkout-links" - x-speakeasy-name-override: "get" - delete: - tags: - - "checkout-links" - - "documented" - summary: "Delete Checkout Link" - description: "Delete a checkout link." - operationId: "checkout-links:delete" - parameters: - - name: "id" - in: "path" - description: "The checkout link ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The checkout link ID." - responses: - "204": - description: "Checkout link deleted." - "404": - description: "Checkout link not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - checkout_links:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "checkout-links" - x-speakeasy-name-override: "delete" - patch: - tags: - - "checkout-links" - - "documented" - summary: "Update Checkout Link" - description: "Update a checkout link." - operationId: "checkout-links:update" - parameters: - - name: "id" - in: "path" - description: "The checkout link ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The checkout link ID." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutLinkUpdate"} - required: true - responses: - "200": - description: "Checkout link updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CheckoutLink"} - "404": - description: "Checkout link not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - checkout_links:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "checkout-links" - x-speakeasy-name-override: "update" - "/v1/custom-fields/": - get: - tags: - - "custom-fields" - - "documented" - summary: "List Custom Fields" - description: "List custom fields." - operationId: "custom-fields:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "query" - in: "query" - description: "Filter by custom field name or slug." - required: false - schema: - anyOf: - - type: "string" - - type: "null" - title: "Query" - description: "Filter by custom field name or slug." - - name: "type" - in: "query" - description: "Filter by custom field type." - required: false - schema: - anyOf: - - {"$ref": "#/components/schemas/CustomFieldType"} - - type: "array" - items: {"$ref": "#/components/schemas/CustomFieldType"} - - type: "null" - title: "CustomFieldType Filter" - description: "Filter by custom field type." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/CustomFieldSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["slug"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_CustomField_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - custom_fields:read - - custom_fields:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "custom-fields" - x-speakeasy-name-override: "list" - post: - tags: - - "custom-fields" - - "documented" - summary: "Create Custom Field" - description: "Create a custom field." - operationId: "custom-fields:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomFieldCreate"} - required: true - responses: - "201": - description: "Custom field created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomField", "title": "CustomField"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - custom_fields:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "custom-fields" - x-speakeasy-name-override: "create" - "/v1/custom-fields/{id}": - get: - tags: - - "custom-fields" - - "documented" - summary: "Get Custom Field" - description: "Get a custom field by ID." - operationId: "custom-fields:get" - parameters: - - name: "id" - in: "path" - description: "The custom field ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The custom field ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomField", "title": "CustomField"} - "404": - description: "Custom field not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - custom_fields:read - - custom_fields:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "custom-fields" - x-speakeasy-name-override: "get" - delete: - tags: - - "custom-fields" - - "documented" - summary: "Delete Custom Field" - description: "Delete a custom field." - operationId: "custom-fields:delete" - parameters: - - name: "id" - in: "path" - description: "The custom field ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The custom field ID." - responses: - "204": - description: "Custom field deleted." - "404": - description: "Custom field not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - custom_fields:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "custom-fields" - x-speakeasy-name-override: "delete" - patch: - tags: - - "custom-fields" - - "documented" - summary: "Update Custom Field" - description: "Update a custom field." - operationId: "custom-fields:update" - parameters: - - name: "id" - in: "path" - description: "The custom field ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The custom field ID." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomFieldUpdate"} - required: true - responses: - "200": - description: "Custom field updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomField", "title": "CustomField"} - "404": - description: "Custom field not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - custom_fields:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "custom-fields" - x-speakeasy-name-override: "update" - "/v1/discounts/": - get: - tags: - - "discounts" - - "featured" - - "documented" - summary: "List Discounts" - description: "List discounts." - operationId: "discounts:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "query" - in: "query" - description: "Filter by name." - required: false - schema: - anyOf: - - type: "string" - - type: "null" - title: "Query" - description: "Filter by name." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/DiscountSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_Discount_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - discounts:read - - discounts:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "discounts" - x-speakeasy-name-override: "list" - post: - tags: - - "discounts" - - "featured" - - "documented" - summary: "Create Discount" - description: "Create a discount." - operationId: "discounts:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/DiscountCreate"} - required: true - responses: - "201": - description: "Discount created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Discount", "title": "Discount"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - discounts:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "discounts" - x-speakeasy-name-override: "create" - "/v1/discounts/{id}": - get: - tags: - - "discounts" - - "featured" - - "documented" - summary: "Get Discount" - description: "Get a discount by ID." - operationId: "discounts:get" - parameters: - - name: "id" - in: "path" - description: "The discount ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The discount ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/Discount", "title": "Discount"} - "404": - description: "Discount not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - discounts:read - - discounts:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "discounts" - x-speakeasy-name-override: "get" - delete: - tags: - - "discounts" - - "featured" - - "documented" - summary: "Delete Discount" - description: "Delete a discount." - operationId: "discounts:delete" - parameters: - - name: "id" - in: "path" - description: "The discount ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The discount ID." - responses: - "204": - description: "Discount deleted." - "404": - description: "Discount not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - discounts:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "discounts" - x-speakeasy-name-override: "delete" - patch: - tags: - - "discounts" - - "featured" - - "documented" - summary: "Update Discount" - description: "Update a discount." - operationId: "discounts:update" - parameters: - - name: "id" - in: "path" - description: "The discount ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The discount ID." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/DiscountUpdate"} - required: true - responses: - "200": - description: "Discount updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Discount", "title": "Discount"} - "404": - description: "Discount not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - discounts:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "discounts" - x-speakeasy-name-override: "update" - "/v1/customers/": - get: - tags: - - "customers" - - "documented" - - "featured" - summary: "List Customers" - description: "List customers." - operationId: "customers:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "query" - in: "query" - description: "Filter by name or email." - required: false - schema: - anyOf: - - type: "string" - - type: "null" - title: "Query" - description: "Filter by name or email." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/CustomerSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_Customer_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customers:read - - customers:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "customers" - x-speakeasy-name-override: "list" - post: - tags: - - "customers" - - "documented" - - "featured" - summary: "Create Customer" - description: "Create a customer." - operationId: "customers:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerCreate"} - required: true - responses: - "201": - description: "Customer created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Customer"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customers:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "customers" - x-speakeasy-name-override: "create" - "/v1/customers/{id}": - get: - tags: - - "customers" - - "documented" - - "featured" - summary: "Get Customer" - description: "Get a customer by ID." - operationId: "customers:get" - parameters: - - name: "id" - in: "path" - description: "The customer ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The customer ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/Customer"} - "404": - description: "Customer not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customers:read - - customers:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "customers" - x-speakeasy-name-override: "get" - delete: - tags: - - "customers" - - "documented" - - "featured" - summary: "Delete Customer" - description: "Delete a customer.\n\nImmediately cancels any active subscriptions and revokes any active benefits." - operationId: "customers:delete" - parameters: - - name: "id" - in: "path" - description: "The customer ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The customer ID." - responses: - "204": - description: "Customer deleted." - "404": - description: "Customer not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customers:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "customers" - x-speakeasy-name-override: "delete" - patch: - tags: - - "customers" - - "documented" - - "featured" - summary: "Update Customer" - description: "Update a customer." - operationId: "customers:update" - parameters: - - name: "id" - in: "path" - description: "The customer ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The customer ID." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerUpdate"} - required: true - responses: - "200": - description: "Customer updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Customer"} - "404": - description: "Customer not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customers:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "customers" - x-speakeasy-name-override: "update" - "/v1/customer-portal/benefit-grants/": - get: - tags: - - "customer_portal" - - "benefit-grants" - - "documented" - summary: "List Benefit Grants" - description: "List benefits grants of the authenticated customer or user." - operationId: "customer_portal:benefit-grants:list" - parameters: - - name: "type" - in: "query" - description: "Filter by benefit type." - required: false - schema: - anyOf: - - {"$ref": "#/components/schemas/BenefitType"} - - type: "array" - items: {"$ref": "#/components/schemas/BenefitType"} - - type: "null" - title: "BenefitType Filter" - description: "Filter by benefit type." - - name: "benefit_id" - in: "query" - description: "Filter by benefit ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "BenefitID Filter" - description: "Filter by benefit ID." - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "checkout_id" - in: "query" - description: "Filter by checkout ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "CheckoutID Filter" - description: "Filter by checkout ID." - - name: "order_id" - in: "query" - description: "Filter by order ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "OrderID Filter" - description: "Filter by order ID." - - name: "subscription_id" - in: "query" - description: "Filter by subscription ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "SubscriptionID Filter" - description: "Filter by subscription ID." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/CustomerBenefitGrantSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-granted_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_CustomerBenefitGrant_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "customer_portal.benefit-grants" - x-speakeasy-name-override: "list" - "/v1/customer-portal/benefit-grants/{id}": - get: - tags: - - "customer_portal" - - "benefit-grants" - - "documented" - summary: "Get Benefit Grant" - description: "Get a benefit grant by ID for the authenticated customer or user." - operationId: "customer_portal:benefit-grants:get" - parameters: - - name: "id" - in: "path" - description: "The benefit grant ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The benefit grant ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerBenefitGrant", "title": "CustomerBenefitGrant"} - "404": - description: "Benefit grant not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-group: "customer_portal.benefit-grants" - x-speakeasy-name-override: "get" - patch: - tags: - - "customer_portal" - - "benefit-grants" - - "documented" - summary: "Update Benefit Grant" - description: "Update a benefit grant for the authenticated customer or user." - operationId: "customer_portal:benefit-grants:update" - parameters: - - name: "id" - in: "path" - description: "The benefit grant ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The benefit grant ID." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerBenefitGrantUpdate", "title": "CustomerBenefitGrantUpdate"} - required: true - responses: - "200": - description: "Benefit grant updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerBenefitGrant", "title": "CustomerBenefitGrant"} - "403": - description: "The benefit grant is revoked and cannot be updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "Benefit grant not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-group: "customer_portal.benefit-grants" - x-speakeasy-name-override: "update" - "/v1/customer-portal/customers/{id}": - get: - tags: - - "customer_portal" - - "customers" - - "documented" - summary: "Get Customer" - description: "Get a customer by ID for the authenticated customer or user." - operationId: "customer_portal:customers:get" - parameters: - - name: "id" - in: "path" - description: "The customer ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The customer ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerPortalCustomer"} - "404": - description: "Customer not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-group: "customer_portal.customers" - x-speakeasy-name-override: "get" - "/v1/customer-portal/downloadables/": - get: - tags: - - "customer_portal" - - "downloadables" - - "documented" - summary: "List Downloadables" - operationId: "customer_portal:downloadables:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "benefit_id" - in: "query" - description: "Filter by benefit ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - - type: "null" - title: "BenefitID Filter" - description: "Filter by benefit ID." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_DownloadableRead_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "customer_portal.downloadables" - x-speakeasy-name-override: "list" - "/v1/customer-portal/downloadables/{token}": - get: - tags: - - "customer_portal" - - "downloadables" - - "documented" - summary: "Get Downloadable" - operationId: "customer_portal:downloadables:customer_portal.downloadables.get" - parameters: - - name: "token" - in: "path" - required: true - schema: - type: "string" - title: "Token" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "302": - description: "Redirected to download" - "400": - description: "Invalid signature" - "404": - description: "Downloadable not found" - "410": - description: "Expired signature" - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - x-speakeasy-group: "customer_portal.downloadables" - x-speakeasy-name-override: "get" - "/v1/customer-portal/license-keys/": - get: - tags: - - "customer_portal" - - "license_keys" - - "documented" - - "featured" - summary: "List License Keys" - operationId: "customer_portal:license_keys:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "benefit_id" - in: "query" - description: "Filter by a specific benefit" - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"resourceRoot": "/v1/benefits", "resourceName": "Benefit", "displayProperty": "description"} - - type: "null" - title: "Benefit Id" - description: "Filter by a specific benefit" - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_LicenseKeyRead_"} - "401": - description: "Not authorized to manage license key." - content: - "application/json": - schema: {"$ref": "#/components/schemas/Unauthorized"} - "404": - description: "License key not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "customer_portal.license_keys" - x-speakeasy-name-override: "list" - "/v1/customer-portal/license-keys/{id}": - get: - tags: - - "customer_portal" - - "license_keys" - - "documented" - - "featured" - summary: "Get License Key" - description: "Get a license key." - operationId: "customer_portal:license_keys:get" - parameters: - - name: "id" - in: "path" - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/LicenseKeyWithActivations"} - "404": - description: "License key not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-group: "customer_portal.license_keys" - x-speakeasy-name-override: "get" - "/v1/customer-portal/license-keys/validate": - post: - tags: - - "customer_portal" - - "license_keys" - - "documented" - - "featured" - summary: "Validate License Key" - description: "Validate a license key." - operationId: "customer_portal:license_keys:validate" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/LicenseKeyValidate"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ValidatedLicenseKey"} - "404": - description: "License key not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - x-speakeasy-group: "customer_portal.license_keys" - x-speakeasy-name-override: "validate" - "/v1/customer-portal/license-keys/activate": - post: - tags: - - "customer_portal" - - "license_keys" - - "documented" - - "featured" - summary: "Activate License Key" - description: "Activate a license key instance." - operationId: "customer_portal:license_keys:activate" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/LicenseKeyActivate"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/LicenseKeyActivationRead"} - "403": - description: "License key activation not required or permitted (limit reached)." - content: - "application/json": - schema: {"$ref": "#/components/schemas/NotPermitted"} - "404": - description: "License key not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - x-speakeasy-group: "customer_portal.license_keys" - x-speakeasy-name-override: "activate" - "/v1/customer-portal/license-keys/deactivate": - post: - tags: - - "customer_portal" - - "license_keys" - - "documented" - - "featured" - summary: "Deactivate License Key" - description: "Deactivate a license key instance." - operationId: "customer_portal:license_keys:deactivate" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/LicenseKeyDeactivate"} - required: true - responses: - "204": - description: "License key activation deactivated." - "404": - description: "License key not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - x-speakeasy-group: "customer_portal.license_keys" - x-speakeasy-name-override: "deactivate" - "/v1/customer-portal/orders/": - get: - tags: - - "customer_portal" - - "orders" - - "documented" - summary: "List Orders" - description: "List orders of the authenticated customer or user." - operationId: "customer_portal:orders:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "product_id" - in: "query" - description: "Filter by product ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "null" - title: "ProductID Filter" - description: "Filter by product ID." - - name: "product_price_type" - in: "query" - description: "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - required: false - schema: - anyOf: - - {"$ref": "#/components/schemas/ProductPriceType"} - - type: "array" - items: {"$ref": "#/components/schemas/ProductPriceType"} - - type: "null" - title: "ProductPriceType Filter" - description: "Filter by product price type. `recurring` will return orders corresponding to subscriptions creations or renewals. `one_time` will return orders corresponding to one-time purchases." - - name: "subscription_id" - in: "query" - description: "Filter by subscription ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "SubscriptionID Filter" - description: "Filter by subscription ID." - - name: "query" - in: "query" - description: "Search by product or organization name." - required: false - schema: - anyOf: - - type: "string" - - type: "null" - title: "Query" - description: "Search by product or organization name." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/CustomerOrderSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-created_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_CustomerOrder_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "customer_portal.orders" - x-speakeasy-name-override: "list" - "/v1/customer-portal/orders/{id}": - get: - tags: - - "customer_portal" - - "orders" - - "documented" - summary: "Get Order" - description: "Get an order by ID for the authenticated customer or user." - operationId: "customer_portal:orders:get" - parameters: - - name: "id" - in: "path" - description: "The order ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The order ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerOrder"} - "404": - description: "Order not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-group: "customer_portal.orders" - x-speakeasy-name-override: "get" - "/v1/customer-portal/orders/{id}/invoice": - get: - tags: - - "customer_portal" - - "orders" - - "documented" - summary: "Get Order Invoice" - description: "Get an order's invoice data." - operationId: "customer_portal:orders:invoice" - parameters: - - name: "id" - in: "path" - description: "The order ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The order ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerOrderInvoice"} - "404": - description: "Order not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-group: "customer_portal.orders" - x-speakeasy-name-override: "invoice" - "/v1/customer-portal/organizations/{slug}": - get: - tags: - - "customer_portal" - - "organizations" - - "documented" - summary: "Get Organization" - description: "Get a customer portal's organization by slug." - operationId: "customer_portal:organizations:get" - parameters: - - name: "slug" - in: "path" - description: "The organization slug." - required: true - schema: - type: "string" - title: "Slug" - description: "The organization slug." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/Organization"} - "404": - description: "Organization not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - x-speakeasy-group: "customer_portal.organizations" - x-speakeasy-name-override: "get" - "/v1/customer-portal/subscriptions/": - get: - tags: - - "customer_portal" - - "subscriptions" - - "documented" - - "featured" - summary: "List Subscriptions" - description: "List subscriptions of the authenticated customer or user." - operationId: "customer_portal:subscriptions:list" - parameters: - - name: "organization_id" - in: "query" - description: "Filter by organization ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"resourceRoot": "/v1/organizations", "resourceName": "Organization", "displayProperty": "name"} - - type: "null" - title: "OrganizationID Filter" - description: "Filter by organization ID." - - name: "product_id" - in: "query" - description: "Filter by product ID." - required: false - schema: - anyOf: - - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "array" - items: - type: "string" - format: "uuid4" - description: "The product ID." - x-polar-selector-widget: {"resourceRoot": "/v1/products", "resourceName": "Product", "displayProperty": "name"} - - type: "null" - title: "ProductID Filter" - description: "Filter by product ID." - - name: "active" - in: "query" - description: "Filter by active or cancelled subscription." - required: false - schema: - anyOf: - - type: "boolean" - - type: "null" - title: "Active" - description: "Filter by active or cancelled subscription." - - name: "query" - in: "query" - description: "Search by product or organization name." - required: false - schema: - anyOf: - - type: "string" - - type: "null" - title: "Query" - description: "Search by product or organization name." - - name: "page" - in: "query" - description: "Page number, defaults to 1." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Page" - description: "Page number, defaults to 1." - default: 1 - - name: "limit" - in: "query" - description: "Size of a page, defaults to 10. Maximum is 100." - required: false - schema: - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - description: "Size of a page, defaults to 10. Maximum is 100." - default: 10 - - name: "sorting" - in: "query" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - required: false - schema: - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/CustomerSubscriptionSortProperty"} - - type: "null" - title: "Sorting" - description: "Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order." - default: ["-started_at"] - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/ListResource_CustomerSubscription_"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-pagination: {"type": "offsetLimit", "inputs": [{"name": "page", "in": "parameters", "type": "page"}, {"name": "limit", "in": "parameters", "type": "limit"}], "outputs": {"results": "$.items", "numPages": "$.pagination.max_page"}} - x-speakeasy-group: "customer_portal.subscriptions" - x-speakeasy-name-override: "list" - "/v1/customer-portal/subscriptions/{id}": - get: - tags: - - "customer_portal" - - "subscriptions" - - "documented" - - "featured" - summary: "Get Subscription" - description: "Get a subscription for the authenticated customer or user." - operationId: "customer_portal:subscriptions:get" - parameters: - - name: "id" - in: "path" - description: "The subscription ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The subscription ID." - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerSubscription"} - "404": - description: "Subscription not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:read - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-group: "customer_portal.subscriptions" - x-speakeasy-name-override: "get" - delete: - tags: - - "customer_portal" - - "subscriptions" - - "documented" - - "featured" - summary: "Cancel Subscription" - description: "Cancel a subscription of the authenticated customer or user." - operationId: "customer_portal:subscriptions:cancel" - parameters: - - name: "id" - in: "path" - description: "The subscription ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The subscription ID." - responses: - "200": - description: "Subscription canceled." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerSubscription"} - "403": - description: "This subscription is already canceled or will be at the end of the period." - content: - "application/json": - schema: {"$ref": "#/components/schemas/AlreadyCanceledSubscription"} - "404": - description: "Subscription not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-group: "customer_portal.subscriptions" - x-speakeasy-name-override: "cancel" - patch: - tags: - - "customer_portal" - - "subscriptions" - - "documented" - - "featured" - summary: "Update Subscription" - description: "Update a subscription of the authenticated customer or user." - operationId: "customer_portal:subscriptions:update" - parameters: - - name: "id" - in: "path" - description: "The subscription ID." - required: true - schema: - type: "string" - title: "Id" - format: "uuid4" - description: "The subscription ID." - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerSubscriptionUpdate"} - required: true - responses: - "200": - description: "Subscription updated." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerSubscription"} - "404": - description: "Subscription not found." - content: - "application/json": - schema: {"$ref": "#/components/schemas/ResourceNotFound"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_portal:write - - pat: [] - - customer_session: [] - x-polar-allowed-subjects: ["Customer", "User"] - x-speakeasy-group: "customer_portal.subscriptions" - x-speakeasy-name-override: "update" - "/v1/customer-sessions/": - post: - tags: - - "customer-sessions" - - "documented" - - "featured" - summary: "Create Customer Session" - description: "Create a customer session." - operationId: "customer-sessions:create" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerSessionCreate"} - required: true - responses: - "201": - description: "Customer session created." - content: - "application/json": - schema: {"$ref": "#/components/schemas/CustomerSession"} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - security: - - oidc: - - customer_sessions:write - - pat: [] - x-polar-allowed-subjects: ["Organization", "User"] - x-speakeasy-group: "customer-sessions" - x-speakeasy-name-override: "create" -components: - schemas: - "Address": - type: "object" - properties: - "line1": - anyOf: - - type: "string" - - type: "null" - title: "Line1" - "line2": - anyOf: - - type: "string" - - type: "null" - title: "Line2" - "postal_code": - anyOf: - - type: "string" - - type: "null" - title: "Postal Code" - "city": - anyOf: - - type: "string" - - type: "null" - title: "City" - "state": - anyOf: - - type: "string" - - type: "null" - title: "State" - "country": - type: "string" - title: "Country" - pattern: "^\\w{2}$" - title: "Address" - required: - - "country" - "AdvertisementCampaign": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - "image_url": - type: "string" - title: "Image Url" - maxLength: 2083 - minLength: 1 - format: "uri" - "image_url_dark": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Image Url Dark" - "text": - type: "string" - title: "Text" - "link_url": - type: "string" - title: "Link Url" - maxLength: 2083 - minLength: 1 - format: "uri" - title: "AdvertisementCampaign" - required: - - "created_at" - - "modified_at" - - "id" - - "image_url" - - "image_url_dark" - - "text" - - "link_url" - "AdvertisementCampaignListResource": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/AdvertisementCampaign"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - "dimensions": - type: "array" - prefixItems: - - type: "integer" - - type: "integer" - items: - type: "integer" - title: "Dimensions" - maxItems: 2 - minItems: 2 - description: "The dimensions (width, height) in pixels of the advertisement images." - title: "AdvertisementCampaignListResource" - required: - - "items" - - "pagination" - - "dimensions" - "AdvertisementSortProperty": - type: "string" - title: "AdvertisementSortProperty" - enum: - - "created_at" - - "-created_at" - - "granted_at" - - "-granted_at" - - "views" - - "-views" - - "clicks" - - "-clicks" - "AlreadyCanceledSubscription": - type: "object" - properties: - "error": - type: "string" - title: "Error" - enum: - - "AlreadyCanceledSubscription" - const: "AlreadyCanceledSubscription" - "detail": - type: "string" - title: "Detail" - title: "AlreadyCanceledSubscription" - required: - - "error" - - "detail" - "Assignee": - type: "object" - properties: - "id": - type: "integer" - title: "Id" - "login": - type: "string" - title: "Login" - "html_url": - type: "string" - title: "Html Url" - maxLength: 2083 - minLength: 1 - format: "uri" - "avatar_url": - type: "string" - title: "Avatar Url" - maxLength: 2083 - minLength: 1 - format: "uri" - title: "Assignee" - required: - - "id" - - "login" - - "html_url" - - "avatar_url" - "AttachedCustomField": - type: "object" - properties: - "custom_field_id": - type: "string" - title: "Custom Field Id" - format: "uuid4" - description: "ID of the custom field." - "custom_field": {"$ref": "#/components/schemas/CustomField", "title": "CustomField"} - "order": - type: "integer" - title: "Order" - description: "Order of the custom field in the resource." - "required": - type: "boolean" - title: "Required" - description: "Whether the value is required for this custom field." - title: "AttachedCustomField" - required: - - "custom_field_id" - - "custom_field" - - "order" - - "required" - description: "Schema of a custom field attached to a resource." - "AttachedCustomFieldCreate": - type: "object" - properties: - "custom_field_id": - type: "string" - title: "Custom Field Id" - format: "uuid4" - description: "ID of the custom field to attach." - "required": - type: "boolean" - title: "Required" - description: "Whether the value is required for this custom field." - title: "AttachedCustomFieldCreate" - required: - - "custom_field_id" - - "required" - description: "Schema to attach a custom field to a resource." - "Author": - type: "object" - properties: - "id": - type: "integer" - title: "Id" - "login": - type: "string" - title: "Login" - "html_url": - type: "string" - title: "Html Url" - maxLength: 2083 - minLength: 1 - format: "uri" - "avatar_url": - type: "string" - title: "Avatar Url" - maxLength: 2083 - minLength: 1 - format: "uri" - title: "Author" - required: - - "id" - - "login" - - "html_url" - - "avatar_url" - "AuthorizeOrganization": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "slug": - type: "string" - title: "Slug" - "avatar_url": - anyOf: - - type: "string" - - type: "null" - title: "Avatar Url" - title: "AuthorizeOrganization" - required: - - "id" - - "slug" - - "avatar_url" - "AuthorizeResponseOrganization": - type: "object" - properties: - "client": {"$ref": "#/components/schemas/OAuth2ClientPublic"} - "sub_type": - type: "string" - title: "Sub Type" - enum: - - "organization" - const: "organization" - "sub": - anyOf: - - {"$ref": "#/components/schemas/AuthorizeOrganization"} - - type: "null" - "scopes": - type: "array" - items: {"$ref": "#/components/schemas/Scope"} - title: "Scopes" - "organizations": - type: "array" - items: {"$ref": "#/components/schemas/AuthorizeOrganization"} - title: "Organizations" - title: "AuthorizeResponseOrganization" - required: - - "client" - - "sub_type" - - "sub" - - "scopes" - - "organizations" - "AuthorizeResponseUser": - type: "object" - properties: - "client": {"$ref": "#/components/schemas/OAuth2ClientPublic"} - "sub_type": - type: "string" - title: "Sub Type" - enum: - - "user" - const: "user" - "sub": - anyOf: - - {"$ref": "#/components/schemas/AuthorizeUser"} - - type: "null" - "scopes": - type: "array" - items: {"$ref": "#/components/schemas/Scope"} - title: "Scopes" - title: "AuthorizeResponseUser" - required: - - "client" - - "sub_type" - - "sub" - - "scopes" - "AuthorizeUser": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "email": - type: "string" - title: "Email" - format: "email" - "avatar_url": - anyOf: - - type: "string" - - type: "null" - title: "Avatar Url" - title: "AuthorizeUser" - required: - - "id" - - "email" - - "avatar_url" - "Benefit": - anyOf: - - {"$ref": "#/components/schemas/BenefitAds"} - - {"$ref": "#/components/schemas/BenefitCustom"} - - {"$ref": "#/components/schemas/BenefitDiscord"} - - {"$ref": "#/components/schemas/BenefitGitHubRepository"} - - {"$ref": "#/components/schemas/BenefitDownloadables"} - - {"$ref": "#/components/schemas/BenefitLicenseKeys"} - "BenefitAds": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "ads" - const: "ads" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "properties": {"$ref": "#/components/schemas/BenefitAdsProperties"} - title: "BenefitAds" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "properties" - description: "A benefit of type `ads`.\n\nUse it so your backers can display ads on your README, website, etc." - "BenefitAdsCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "ads" - const: "ads" - "description": - type: "string" - title: "Description" - maxLength: 42 - minLength: 3 - description: "The description of the benefit. Will be displayed on products having this benefit." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/BenefitAdsProperties"} - title: "BenefitAdsCreate" - required: - - "type" - - "description" - - "properties" - "BenefitAdsProperties": - type: "object" - properties: - "image_height": - type: "integer" - title: "Image Height" - description: "The height of the displayed ad." - default: 400 - "image_width": - type: "integer" - title: "Image Width" - description: "The width of the displayed ad." - default: 400 - title: "BenefitAdsProperties" - description: "Properties for a benefit of type `ads`." - "BenefitAdsSubscriber": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "ads" - const: "ads" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "organization": {"$ref": "#/components/schemas/Organization"} - "properties": {"$ref": "#/components/schemas/BenefitAdsProperties"} - title: "BenefitAdsSubscriber" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "organization" - - "properties" - "BenefitAdsUpdate": - type: "object" - properties: - "description": - anyOf: - - type: "string" - maxLength: 42 - minLength: 3 - - type: "null" - title: "Description" - description: "The description of the benefit. Will be displayed on products having this benefit." - "type": - type: "string" - title: "Type" - enum: - - "ads" - const: "ads" - "properties": - anyOf: - - {"$ref": "#/components/schemas/BenefitAdsProperties"} - - type: "null" - title: "BenefitAdsUpdate" - required: - - "type" - "BenefitBase": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": {"$ref": "#/components/schemas/BenefitType", "description": "The type of the benefit."} - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - title: "BenefitBase" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - "BenefitCreate": - oneOf: - - {"$ref": "#/components/schemas/BenefitCustomCreate"} - - {"$ref": "#/components/schemas/BenefitAdsCreate"} - - {"$ref": "#/components/schemas/BenefitDiscordCreate"} - - {"$ref": "#/components/schemas/BenefitGitHubRepositoryCreate"} - - {"$ref": "#/components/schemas/BenefitDownloadablesCreate"} - - {"$ref": "#/components/schemas/BenefitLicenseKeysCreate"} - discriminator: - propertyName: "type" - mapping: - "ads": "#/components/schemas/BenefitAdsCreate" - "custom": "#/components/schemas/BenefitCustomCreate" - "discord": "#/components/schemas/BenefitDiscordCreate" - "downloadables": "#/components/schemas/BenefitDownloadablesCreate" - "github_repository": "#/components/schemas/BenefitGitHubRepositoryCreate" - "license_keys": "#/components/schemas/BenefitLicenseKeysCreate" - "BenefitCustom": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "custom" - const: "custom" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "properties": {"$ref": "#/components/schemas/BenefitCustomProperties"} - "is_tax_applicable": - type: "boolean" - title: "Is Tax Applicable" - deprecated: true - title: "BenefitCustom" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "properties" - - "is_tax_applicable" - description: "A benefit of type `custom`.\n\nUse it to grant any kind of benefit that doesn't fit in the other types." - "BenefitCustomCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "custom" - const: "custom" - "description": - type: "string" - title: "Description" - maxLength: 42 - minLength: 3 - description: "The description of the benefit. Will be displayed on products having this benefit." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/BenefitCustomCreateProperties"} - title: "BenefitCustomCreate" - required: - - "type" - - "description" - - "properties" - description: "Schema to create a benefit of type `custom`." - "BenefitCustomCreateProperties": - type: "object" - properties: - "note": - anyOf: - - anyOf: - - type: "string" - - type: "null" - description: "Private note to be shared with customers who have this benefit granted." - - type: "null" - title: "Note" - title: "BenefitCustomCreateProperties" - description: "Properties for creating a benefit of type `custom`." - "BenefitCustomProperties": - type: "object" - properties: - "note": - anyOf: - - anyOf: - - type: "string" - - type: "null" - description: "Private note to be shared with customers who have this benefit granted." - - type: "null" - title: "Note" - title: "BenefitCustomProperties" - required: - - "note" - description: "Properties for a benefit of type `custom`." - "BenefitCustomSubscriber": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "custom" - const: "custom" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "organization": {"$ref": "#/components/schemas/Organization"} - "properties": {"$ref": "#/components/schemas/BenefitCustomSubscriberProperties"} - title: "BenefitCustomSubscriber" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "organization" - - "properties" - "BenefitCustomSubscriberProperties": - type: "object" - properties: - "note": - anyOf: - - anyOf: - - type: "string" - - type: "null" - description: "Private note to be shared with customers who have this benefit granted." - - type: "null" - title: "Note" - title: "BenefitCustomSubscriberProperties" - required: - - "note" - description: "Properties available to subscribers for a benefit of type `custom`." - "BenefitCustomUpdate": - type: "object" - properties: - "description": - anyOf: - - type: "string" - maxLength: 42 - minLength: 3 - - type: "null" - title: "Description" - description: "The description of the benefit. Will be displayed on products having this benefit." - "type": - type: "string" - title: "Type" - enum: - - "custom" - const: "custom" - "properties": - anyOf: - - {"$ref": "#/components/schemas/BenefitCustomProperties"} - - type: "null" - title: "BenefitCustomUpdate" - required: - - "type" - "BenefitDiscord": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "discord" - const: "discord" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "properties": {"$ref": "#/components/schemas/BenefitDiscordProperties"} - title: "BenefitDiscord" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "properties" - description: "A benefit of type `discord`.\n\nUse it to automatically invite your backers to a Discord server." - "BenefitDiscordCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "discord" - const: "discord" - "description": - type: "string" - title: "Description" - maxLength: 42 - minLength: 3 - description: "The description of the benefit. Will be displayed on products having this benefit." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/BenefitDiscordCreateProperties"} - title: "BenefitDiscordCreate" - required: - - "type" - - "description" - - "properties" - "BenefitDiscordCreateProperties": - type: "object" - properties: - "guild_token": - type: "string" - title: "Guild Token" - "role_id": - type: "string" - title: "Role Id" - description: "The ID of the Discord role to grant." - title: "BenefitDiscordCreateProperties" - required: - - "guild_token" - - "role_id" - description: "Properties to create a benefit of type `discord`." - "BenefitDiscordProperties": - type: "object" - properties: - "guild_id": - type: "string" - title: "Guild Id" - description: "The ID of the Discord server." - "role_id": - type: "string" - title: "Role Id" - description: "The ID of the Discord role to grant." - "guild_token": - type: "string" - title: "Guild Token" - readOnly: true - title: "BenefitDiscordProperties" - required: - - "guild_id" - - "role_id" - - "guild_token" - description: "Properties for a benefit of type `discord`." - "BenefitDiscordSubscriber": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "discord" - const: "discord" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "organization": {"$ref": "#/components/schemas/Organization"} - "properties": {"$ref": "#/components/schemas/BenefitDiscordSubscriberProperties"} - title: "BenefitDiscordSubscriber" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "organization" - - "properties" - "BenefitDiscordSubscriberProperties": - type: "object" - properties: - "guild_id": - type: "string" - title: "Guild Id" - description: "The ID of the Discord server." - title: "BenefitDiscordSubscriberProperties" - required: - - "guild_id" - description: "Properties available to subscribers for a benefit of type `discord`." - "BenefitDiscordUpdate": - type: "object" - properties: - "description": - anyOf: - - type: "string" - maxLength: 42 - minLength: 3 - - type: "null" - title: "Description" - description: "The description of the benefit. Will be displayed on products having this benefit." - "type": - type: "string" - title: "Type" - enum: - - "discord" - const: "discord" - "properties": - anyOf: - - {"$ref": "#/components/schemas/BenefitDiscordCreateProperties"} - - type: "null" - title: "BenefitDiscordUpdate" - required: - - "type" - "BenefitDownloadables": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "downloadables" - const: "downloadables" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "properties": {"$ref": "#/components/schemas/BenefitDownloadablesProperties"} - title: "BenefitDownloadables" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "properties" - "BenefitDownloadablesCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "downloadables" - const: "downloadables" - "description": - type: "string" - title: "Description" - maxLength: 42 - minLength: 3 - description: "The description of the benefit. Will be displayed on products having this benefit." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/BenefitDownloadablesCreateProperties"} - title: "BenefitDownloadablesCreate" - required: - - "type" - - "description" - - "properties" - "BenefitDownloadablesCreateProperties": - type: "object" - properties: - "archived": - type: "object" - title: "Archived" - additionalProperties: - type: "boolean" - default: {} - "files": - type: "array" - items: - type: "string" - format: "uuid4" - title: "Files" - minItems: 1 - title: "BenefitDownloadablesCreateProperties" - required: - - "files" - "BenefitDownloadablesProperties": - type: "object" - properties: - "archived": - type: "object" - title: "Archived" - additionalProperties: - type: "boolean" - "files": - type: "array" - items: - type: "string" - format: "uuid4" - title: "Files" - title: "BenefitDownloadablesProperties" - required: - - "archived" - - "files" - "BenefitDownloadablesSubscriber": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "downloadables" - const: "downloadables" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "organization": {"$ref": "#/components/schemas/Organization"} - "properties": {"$ref": "#/components/schemas/BenefitDownloadablesSubscriberProperties"} - title: "BenefitDownloadablesSubscriber" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "organization" - - "properties" - "BenefitDownloadablesSubscriberProperties": - type: "object" - properties: - "active_files": - type: "array" - items: - type: "string" - format: "uuid4" - title: "Active Files" - title: "BenefitDownloadablesSubscriberProperties" - required: - - "active_files" - "BenefitDownloadablesUpdate": - type: "object" - properties: - "description": - anyOf: - - type: "string" - maxLength: 42 - minLength: 3 - - type: "null" - title: "Description" - description: "The description of the benefit. Will be displayed on products having this benefit." - "type": - type: "string" - title: "Type" - enum: - - "downloadables" - const: "downloadables" - "properties": - anyOf: - - {"$ref": "#/components/schemas/BenefitDownloadablesCreateProperties"} - - type: "null" - title: "BenefitDownloadablesUpdate" - required: - - "type" - "BenefitGitHubRepository": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "github_repository" - const: "github_repository" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "properties": {"$ref": "#/components/schemas/BenefitGitHubRepositoryProperties"} - title: "BenefitGitHubRepository" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "properties" - description: "A benefit of type `github_repository`.\n\nUse it to automatically invite your backers to a private GitHub repository." - "BenefitGitHubRepositoryCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "github_repository" - const: "github_repository" - "description": - type: "string" - title: "Description" - maxLength: 42 - minLength: 3 - description: "The description of the benefit. Will be displayed on products having this benefit." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/BenefitGitHubRepositoryCreateProperties"} - title: "BenefitGitHubRepositoryCreate" - required: - - "type" - - "description" - - "properties" - "BenefitGitHubRepositoryCreateProperties": - type: "object" - properties: - "repository_owner": - type: "string" - examples: - - "polarsource" - title: "Repository Owner" - description: "The owner of the repository." - "repository_name": - type: "string" - examples: - - "private_repo" - title: "Repository Name" - description: "The name of the repository." - "permission": - type: "string" - title: "Permission" - enum: - - "pull" - - "triage" - - "push" - - "maintain" - - "admin" - description: "The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)." - title: "BenefitGitHubRepositoryCreateProperties" - required: - - "repository_owner" - - "repository_name" - - "permission" - description: "Properties to create a benefit of type `github_repository`." - "BenefitGitHubRepositoryProperties": - type: "object" - properties: - "repository_owner": - type: "string" - examples: - - "polarsource" - title: "Repository Owner" - description: "The owner of the repository." - "repository_name": - type: "string" - examples: - - "private_repo" - title: "Repository Name" - description: "The name of the repository." - "permission": - type: "string" - title: "Permission" - enum: - - "pull" - - "triage" - - "push" - - "maintain" - - "admin" - description: "The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)." - "repository_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Repository Id" - deprecated: true - title: "BenefitGitHubRepositoryProperties" - required: - - "repository_owner" - - "repository_name" - - "permission" - description: "Properties for a benefit of type `github_repository`." - "BenefitGitHubRepositorySubscriber": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "github_repository" - const: "github_repository" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "organization": {"$ref": "#/components/schemas/Organization"} - "properties": {"$ref": "#/components/schemas/BenefitGitHubRepositorySubscriberProperties"} - title: "BenefitGitHubRepositorySubscriber" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "organization" - - "properties" - "BenefitGitHubRepositorySubscriberProperties": - type: "object" - properties: - "repository_owner": - type: "string" - examples: - - "polarsource" - title: "Repository Owner" - description: "The owner of the repository." - "repository_name": - type: "string" - examples: - - "private_repo" - title: "Repository Name" - description: "The name of the repository." - title: "BenefitGitHubRepositorySubscriberProperties" - required: - - "repository_owner" - - "repository_name" - description: "Properties available to subscribers for a benefit of type `github_repository`." - "BenefitGitHubRepositoryUpdate": - type: "object" - properties: - "description": - anyOf: - - type: "string" - maxLength: 42 - minLength: 3 - - type: "null" - title: "Description" - description: "The description of the benefit. Will be displayed on products having this benefit." - "type": - type: "string" - title: "Type" - enum: - - "github_repository" - const: "github_repository" - "properties": - anyOf: - - {"$ref": "#/components/schemas/BenefitGitHubRepositoryCreateProperties"} - - type: "null" - title: "BenefitGitHubRepositoryUpdate" - required: - - "type" - "BenefitGrant": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the grant." - "granted_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Granted At" - description: "The timestamp when the benefit was granted. If `None`, the benefit is not granted." - "is_granted": - type: "boolean" - title: "Is Granted" - description: "Whether the benefit is granted." - "revoked_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Revoked At" - description: "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked." - "is_revoked": - type: "boolean" - title: "Is Revoked" - description: "Whether the benefit is revoked." - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - description: "The ID of the subscription that granted this benefit." - "order_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Order Id" - description: "The ID of the order that granted this benefit." - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - description: "The ID of the customer concerned by this grant." - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - description: "The ID of the benefit concerned by this grant." - "properties": - anyOf: - - {"$ref": "#/components/schemas/BenefitGrantDiscordProperties"} - - {"$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties"} - - {"$ref": "#/components/schemas/BenefitGrantDownloadablesProperties"} - - {"$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties"} - - {"$ref": "#/components/schemas/BenefitGrantAdsProperties"} - - {"$ref": "#/components/schemas/BenefitGrantCustomProperties"} - title: "Properties" - title: "BenefitGrant" - required: - - "created_at" - - "modified_at" - - "id" - - "is_granted" - - "is_revoked" - - "subscription_id" - - "order_id" - - "customer_id" - - "user_id" - - "benefit_id" - - "properties" - "BenefitGrantAdsProperties": - type: "object" - properties: - "advertisement_campaign_id": - type: "string" - title: "Advertisement Campaign Id" - title: "BenefitGrantAdsProperties" - required: - - "advertisement_campaign_id" - "BenefitGrantCustomProperties": - type: "object" - title: "BenefitGrantCustomProperties" - "BenefitGrantDiscordProperties": - type: "object" - properties: - "account_id": - type: "string" - title: "Account Id" - "guild_id": - type: "string" - title: "Guild Id" - "role_id": - type: "string" - title: "Role Id" - title: "BenefitGrantDiscordProperties" - "BenefitGrantDownloadablesProperties": - type: "object" - properties: - "files": - type: "array" - items: - type: "string" - title: "Files" - title: "BenefitGrantDownloadablesProperties" - "BenefitGrantGitHubRepositoryProperties": - type: "object" - properties: - "account_id": - type: "string" - title: "Account Id" - "repository_owner": - type: "string" - title: "Repository Owner" - "repository_name": - type: "string" - title: "Repository Name" - "permission": - type: "string" - title: "Permission" - enum: - - "pull" - - "triage" - - "push" - - "maintain" - - "admin" - title: "BenefitGrantGitHubRepositoryProperties" - "BenefitGrantLicenseKeysProperties": - type: "object" - properties: - "license_key_id": - type: "string" - title: "License Key Id" - "display_key": - type: "string" - title: "Display Key" - title: "BenefitGrantLicenseKeysProperties" - "BenefitGrantWebhook": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the grant." - "granted_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Granted At" - description: "The timestamp when the benefit was granted. If `None`, the benefit is not granted." - "is_granted": - type: "boolean" - title: "Is Granted" - description: "Whether the benefit is granted." - "revoked_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Revoked At" - description: "The timestamp when the benefit was revoked. If `None`, the benefit is not revoked." - "is_revoked": - type: "boolean" - title: "Is Revoked" - description: "Whether the benefit is revoked." - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - description: "The ID of the subscription that granted this benefit." - "order_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Order Id" - description: "The ID of the order that granted this benefit." - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - description: "The ID of the customer concerned by this grant." - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - description: "The ID of the benefit concerned by this grant." - "properties": - anyOf: - - {"$ref": "#/components/schemas/BenefitGrantDiscordProperties"} - - {"$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties"} - - {"$ref": "#/components/schemas/BenefitGrantDownloadablesProperties"} - - {"$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties"} - - {"$ref": "#/components/schemas/BenefitGrantAdsProperties"} - - {"$ref": "#/components/schemas/BenefitGrantCustomProperties"} - title: "Properties" - "benefit": {"$ref": "#/components/schemas/Benefit", "title": "Benefit"} - "previous_properties": - anyOf: - - {"$ref": "#/components/schemas/BenefitGrantDiscordProperties"} - - {"$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties"} - - {"$ref": "#/components/schemas/BenefitGrantDownloadablesProperties"} - - {"$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties"} - - {"$ref": "#/components/schemas/BenefitGrantAdsProperties"} - - {"$ref": "#/components/schemas/BenefitGrantCustomProperties"} - - type: "null" - title: "Previous Properties" - title: "BenefitGrantWebhook" - required: - - "created_at" - - "modified_at" - - "id" - - "is_granted" - - "is_revoked" - - "subscription_id" - - "order_id" - - "customer_id" - - "user_id" - - "benefit_id" - - "properties" - - "benefit" - "BenefitLicenseKeyActivationProperties": - type: "object" - properties: - "limit": - exclusiveMinimum: 0 - type: "integer" - title: "Limit" - maximum: 50 - "enable_customer_admin": - type: "boolean" - title: "Enable Customer Admin" - title: "BenefitLicenseKeyActivationProperties" - required: - - "limit" - - "enable_customer_admin" - "BenefitLicenseKeyExpirationProperties": - type: "object" - properties: - "ttl": - exclusiveMinimum: 0 - type: "integer" - title: "Ttl" - "timeframe": - type: "string" - title: "Timeframe" - enum: - - "year" - - "month" - - "day" - title: "BenefitLicenseKeyExpirationProperties" - required: - - "ttl" - - "timeframe" - "BenefitLicenseKeys": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "license_keys" - const: "license_keys" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "properties": {"$ref": "#/components/schemas/BenefitLicenseKeysProperties"} - title: "BenefitLicenseKeys" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "properties" - "BenefitLicenseKeysCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "license_keys" - const: "license_keys" - "description": - type: "string" - title: "Description" - maxLength: 42 - minLength: 3 - description: "The description of the benefit. Will be displayed on products having this benefit." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the benefit. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/BenefitLicenseKeysCreateProperties"} - title: "BenefitLicenseKeysCreate" - required: - - "type" - - "description" - - "properties" - "BenefitLicenseKeysCreateProperties": - type: "object" - properties: - "prefix": - anyOf: - - type: "string" - - type: "null" - title: "Prefix" - "expires": - anyOf: - - {"$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties"} - - type: "null" - "activations": - anyOf: - - {"$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties"} - - type: "null" - "limit_usage": - anyOf: - - exclusiveMinimum: 0 - type: "integer" - - type: "null" - title: "Limit Usage" - title: "BenefitLicenseKeysCreateProperties" - "BenefitLicenseKeysProperties": - type: "object" - properties: - "prefix": - anyOf: - - type: "string" - - type: "null" - title: "Prefix" - "expires": - anyOf: - - {"$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties"} - - type: "null" - "activations": - anyOf: - - {"$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties"} - - type: "null" - "limit_usage": - anyOf: - - type: "integer" - - type: "null" - title: "Limit Usage" - title: "BenefitLicenseKeysProperties" - required: - - "prefix" - - "expires" - - "activations" - - "limit_usage" - "BenefitLicenseKeysSubscriber": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the benefit." - "type": - type: "string" - title: "Type" - enum: - - "license_keys" - const: "license_keys" - "description": - type: "string" - title: "Description" - description: "The description of the benefit." - "selectable": - type: "boolean" - title: "Selectable" - description: "Whether the benefit is selectable when creating a product." - "deletable": - type: "boolean" - title: "Deletable" - description: "Whether the benefit is deletable." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the benefit." - "organization": {"$ref": "#/components/schemas/Organization"} - "properties": {"$ref": "#/components/schemas/BenefitLicenseKeysSubscriberProperties"} - title: "BenefitLicenseKeysSubscriber" - required: - - "created_at" - - "modified_at" - - "id" - - "type" - - "description" - - "selectable" - - "deletable" - - "organization_id" - - "organization" - - "properties" - "BenefitLicenseKeysSubscriberProperties": - type: "object" - properties: - "prefix": - anyOf: - - type: "string" - - type: "null" - title: "Prefix" - "expires": - anyOf: - - {"$ref": "#/components/schemas/BenefitLicenseKeyExpirationProperties"} - - type: "null" - "activations": - anyOf: - - {"$ref": "#/components/schemas/BenefitLicenseKeyActivationProperties"} - - type: "null" - "limit_usage": - anyOf: - - type: "integer" - - type: "null" - title: "Limit Usage" - title: "BenefitLicenseKeysSubscriberProperties" - required: - - "prefix" - - "expires" - - "activations" - - "limit_usage" - "BenefitLicenseKeysUpdate": - type: "object" - properties: - "description": - anyOf: - - type: "string" - maxLength: 42 - minLength: 3 - - type: "null" - title: "Description" - description: "The description of the benefit. Will be displayed on products having this benefit." - "type": - type: "string" - title: "Type" - enum: - - "license_keys" - const: "license_keys" - "properties": - anyOf: - - {"$ref": "#/components/schemas/BenefitLicenseKeysCreateProperties"} - - type: "null" - title: "BenefitLicenseKeysUpdate" - required: - - "type" - "BenefitType": - type: "string" - title: "BenefitType" - enum: - - "custom" - - "ads" - - "discord" - - "github_repository" - - "downloadables" - - "license_keys" - "Checkout": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "custom_field_data": - type: "object" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "payment_processor": {"$ref": "#/components/schemas/PaymentProcessor", "description": "Payment processor used."} - "status": {"$ref": "#/components/schemas/CheckoutStatus", "description": "Status of the checkout session."} - "client_secret": - type: "string" - title: "Client Secret" - description: "Client secret used to update and complete the checkout session from the client." - "url": - type: "string" - title: "Url" - description: "URL where the customer can access the checkout session." - "expires_at": - type: "string" - title: "Expires At" - format: "date-time" - description: "Expiration date and time of the checkout session." - "success_url": - type: "string" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment." - "embed_origin": - anyOf: - - type: "string" - - type: "null" - title: "Embed Origin" - description: "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page." - "amount": - anyOf: - - type: "integer" - description: "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - - type: "null" - title: "Amount" - "tax_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Tax Amount" - description: "Computed tax amount to pay in cents." - "currency": - anyOf: - - type: "string" - - type: "null" - title: "Currency" - description: "Currency code of the checkout session." - "subtotal_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Subtotal Amount" - description: "Subtotal amount in cents, including discounts and before tax." - "total_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Total Amount" - description: "Total amount to pay in cents, including discounts and after tax." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "ID of the product to checkout." - "product_price_id": - type: "string" - title: "Product Price Id" - format: "uuid4" - description: "ID of the product price to checkout." - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount applied to the checkout." - "allow_discount_codes": - type: "boolean" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - "is_discount_applicable": - type: "boolean" - title: "Is Discount Applicable" - description: "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable." - "is_free_product_price": - type: "boolean" - title: "Is Free Product Price" - description: "Whether the product price is free, regardless of discounts." - "is_payment_required": - type: "boolean" - title: "Is Payment Required" - description: "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount." - "is_payment_setup_required": - type: "boolean" - title: "Is Payment Setup Required" - description: "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles." - "is_payment_form_required": - type: "boolean" - title: "Is Payment Form Required" - description: "Whether the checkout requires a payment form, whether because of a payment or payment method setup." - "customer_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Customer Id" - "customer_name": - anyOf: - - type: "string" - description: "Name of the customer." - - type: "null" - title: "Customer Name" - "customer_email": - anyOf: - - type: "string" - format: "email" - description: "Email address of the customer." - - type: "null" - title: "Customer Email" - "customer_ip_address": - anyOf: - - type: "string" - format: "ipvanyaddress" - description: "IP address of the customer. Used to detect tax location." - - type: "null" - title: "Customer Ip Address" - "customer_billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address", "description": "Billing address of the customer."} - - type: "null" - "customer_tax_id": - anyOf: - - type: "string" - - type: "null" - title: "Customer Tax Id" - "payment_processor_metadata": - type: "object" - title: "Payment Processor Metadata" - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "product": {"$ref": "#/components/schemas/CheckoutProduct"} - "product_price": {"$ref": "#/components/schemas/ProductPrice"} - "discount": - anyOf: - - oneOf: - - {"$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"} - - {"$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration"} - - {"$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"} - - {"$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration"} - - type: "null" - title: "Discount" - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - "attached_custom_fields": - type: "array" - items: {"$ref": "#/components/schemas/AttachedCustomField"} - title: "Attached Custom Fields" - "customer_metadata": - type: "object" - title: "Customer Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - title: "Checkout" - required: - - "created_at" - - "modified_at" - - "id" - - "payment_processor" - - "status" - - "client_secret" - - "url" - - "expires_at" - - "success_url" - - "embed_origin" - - "amount" - - "tax_amount" - - "currency" - - "subtotal_amount" - - "total_amount" - - "product_id" - - "product_price_id" - - "discount_id" - - "allow_discount_codes" - - "is_discount_applicable" - - "is_free_product_price" - - "is_payment_required" - - "is_payment_setup_required" - - "is_payment_form_required" - - "customer_id" - - "customer_name" - - "customer_email" - - "customer_ip_address" - - "customer_billing_address" - - "customer_tax_id" - - "payment_processor_metadata" - - "metadata" - - "product" - - "product_price" - - "discount" - - "subscription_id" - - "attached_custom_fields" - - "customer_metadata" - description: "Checkout session data retrieved using an access token." - "CheckoutConfirmStripe": - type: "object" - properties: - "custom_field_data": - anyOf: - - type: "object" - - type: "null" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "product_price_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Product Price Id" - description: "ID of the product price to checkout. Must correspond to a price linked to the same product." - "amount": - anyOf: - - type: "integer" - description: "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - - type: "null" - title: "Amount" - "customer_name": - anyOf: - - type: "string" - description: "Name of the customer." - - type: "null" - title: "Customer Name" - "customer_email": - anyOf: - - type: "string" - format: "email" - description: "Email address of the customer." - - type: "null" - title: "Customer Email" - "customer_billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address", "description": "Billing address of the customer."} - - type: "null" - "customer_tax_id": - anyOf: - - type: "string" - - type: "null" - title: "Customer Tax Id" - "discount_code": - anyOf: - - type: "string" - - type: "null" - title: "Discount Code" - description: "Discount code to apply to the checkout." - "confirmation_token_id": - anyOf: - - type: "string" - - type: "null" - title: "Confirmation Token Id" - description: "ID of the Stripe confirmation token. Required for fixed prices and custom prices." - title: "CheckoutConfirmStripe" - description: "Confirm a checkout session using a Stripe confirmation token." - "CheckoutCreate": - anyOf: - - {"$ref": "#/components/schemas/CheckoutProductCreate"} - - {"$ref": "#/components/schemas/CheckoutPriceCreate"} - "CheckoutDiscountFixedOnceForeverDuration": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "type": {"$ref": "#/components/schemas/DiscountType"} - "amount": - type: "integer" - title: "Amount" - "currency": - type: "string" - title: "Currency" - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "name": - type: "string" - title: "Name" - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - title: "CheckoutDiscountFixedOnceForeverDuration" - required: - - "duration" - - "type" - - "amount" - - "currency" - - "id" - - "name" - - "code" - description: "Schema for a fixed amount discount that is applied once or forever." - "CheckoutDiscountFixedRepeatDuration": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "duration_in_months": - type: "integer" - title: "Duration In Months" - "type": {"$ref": "#/components/schemas/DiscountType"} - "amount": - type: "integer" - title: "Amount" - "currency": - type: "string" - title: "Currency" - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "name": - type: "string" - title: "Name" - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - title: "CheckoutDiscountFixedRepeatDuration" - required: - - "duration" - - "duration_in_months" - - "type" - - "amount" - - "currency" - - "id" - - "name" - - "code" - description: "Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months." - "CheckoutDiscountPercentageOnceForeverDuration": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "type": {"$ref": "#/components/schemas/DiscountType"} - "basis_points": - type: "integer" - title: "Basis Points" - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "name": - type: "string" - title: "Name" - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - title: "CheckoutDiscountPercentageOnceForeverDuration" - required: - - "duration" - - "type" - - "basis_points" - - "id" - - "name" - - "code" - description: "Schema for a percentage discount that is applied once or forever." - "CheckoutDiscountPercentageRepeatDuration": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "duration_in_months": - type: "integer" - title: "Duration In Months" - "type": {"$ref": "#/components/schemas/DiscountType"} - "basis_points": - type: "integer" - title: "Basis Points" - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "name": - type: "string" - title: "Name" - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - title: "CheckoutDiscountPercentageRepeatDuration" - required: - - "duration" - - "duration_in_months" - - "type" - - "basis_points" - - "id" - - "name" - - "code" - description: "Schema for a percentage discount that is applied on every invoice\nfor a certain number of months." - "CheckoutLegacy": - type: "object" - properties: - "id": - type: "string" - title: "Id" - description: "The ID of the checkout." - "url": - anyOf: - - type: "string" - - type: "null" - title: "Url" - description: "URL the customer should be redirected to complete the purchase." - "customer_email": - anyOf: - - type: "string" - - type: "null" - title: "Customer Email" - "customer_name": - anyOf: - - type: "string" - - type: "null" - title: "Customer Name" - "product": {"$ref": "#/components/schemas/CheckoutProduct"} - "product_price": {"$ref": "#/components/schemas/ProductPrice"} - title: "CheckoutLegacy" - required: - - "id" - - "customer_email" - - "customer_name" - - "product" - - "product_price" - description: "A checkout session." - "CheckoutLegacyCreate": - type: "object" - properties: - "product_price_id": - type: "string" - title: "Product Price Id" - format: "uuid4" - description: "ID of the product price to subscribe to." - "success_url": - type: "string" - title: "Success Url" - minLength: 1 - format: "uri" - description: "URL where the customer will be redirected after a successful subscription. You can add the `session_id={CHECKOUT_SESSION_ID}` query parameter to retrieve the checkout session id." - "customer_email": - anyOf: - - type: "string" - format: "email" - - type: "null" - title: "Customer Email" - description: "If you already know the email of your customer, you can set it. It'll be pre-filled on the checkout page." - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - description: "ID of the subscription to update. If not provided, a new subscription will be created." - title: "CheckoutLegacyCreate" - required: - - "product_price_id" - - "success_url" - "CheckoutLink": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "payment_processor": {"$ref": "#/components/schemas/PaymentProcessor", "description": "Payment processor used."} - "client_secret": - type: "string" - title: "Client Secret" - description: "Client secret used to access the checkout link." - "success_url": - anyOf: - - type: "string" - - type: "null" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment." - "label": - anyOf: - - type: "string" - - type: "null" - title: "Label" - description: "Optional label to distinguish links internally" - "allow_discount_codes": - type: "boolean" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "ID of the product to checkout." - "product_price_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Product Price Id" - description: "ID of the product price to checkout. First available price will be selected unless an explicit price ID is set." - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - "product": {"$ref": "#/components/schemas/CheckoutLinkProduct"} - "product_price": - anyOf: - - {"$ref": "#/components/schemas/ProductPrice"} - - type: "null" - "discount": - anyOf: - - oneOf: - - {"$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase"} - - {"$ref": "#/components/schemas/DiscountFixedRepeatDurationBase"} - - {"$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase"} - - {"$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase"} - title: "CheckoutLinkDiscount" - - type: "null" - title: "Discount" - "url": - type: "string" - title: "Url" - readOnly: true - title: "CheckoutLink" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "payment_processor" - - "client_secret" - - "success_url" - - "label" - - "allow_discount_codes" - - "product_id" - - "product_price_id" - - "discount_id" - - "product" - - "product_price" - - "discount" - - "url" - description: "Checkout link data." - "CheckoutLinkCreate": - anyOf: - - {"$ref": "#/components/schemas/CheckoutLinkProductCreate"} - - {"$ref": "#/components/schemas/CheckoutLinkPriceCreate"} - "CheckoutLinkPriceCreate": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "payment_processor": - type: "string" - title: "Payment Processor" - enum: - - "stripe" - description: "Payment processor to use. Currently only Stripe is supported." - const: "stripe" - "label": - anyOf: - - type: "string" - - type: "null" - title: "Label" - description: "Optional label to distinguish links internally" - "allow_discount_codes": - type: "boolean" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - default: true - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - "success_url": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - "product_price_id": - type: "string" - title: "Product Price Id" - format: "uuid4" - description: "ID of the product price to checkout." - title: "CheckoutLinkPriceCreate" - required: - - "payment_processor" - - "product_price_id" - "CheckoutLinkProduct": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the product." - "name": - type: "string" - title: "Name" - description: "The name of the product." - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "is_recurring": - type: "boolean" - title: "Is Recurring" - description: "Whether the product is a subscription tier." - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the product is archived and no longer available." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the product." - "prices": - type: "array" - items: {"$ref": "#/components/schemas/ProductPrice"} - title: "Prices" - description: "List of prices for this product." - "benefits": - type: "array" - items: {"$ref": "#/components/schemas/BenefitBase"} - title: "BenefitPublic" - description: "List of benefits granted by the product." - "medias": - type: "array" - items: {"$ref": "#/components/schemas/ProductMediaFileRead"} - title: "Medias" - description: "List of medias associated to the product." - title: "CheckoutLinkProduct" - required: - - "created_at" - - "modified_at" - - "id" - - "name" - - "description" - - "is_recurring" - - "is_archived" - - "organization_id" - - "prices" - - "benefits" - - "medias" - description: "Product data for a checkout link." - "CheckoutLinkProductCreate": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "payment_processor": - type: "string" - title: "Payment Processor" - enum: - - "stripe" - description: "Payment processor to use. Currently only Stripe is supported." - const: "stripe" - "label": - anyOf: - - type: "string" - - type: "null" - title: "Label" - description: "Optional label to distinguish links internally" - "allow_discount_codes": - type: "boolean" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - default: true - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - "success_url": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "ID of the product to checkout. First available price will be selected." - title: "CheckoutLinkProductCreate" - required: - - "payment_processor" - - "product_id" - "CheckoutLinkSortProperty": - type: "string" - title: "CheckoutLinkSortProperty" - enum: - - "created_at" - - "-created_at" - "CheckoutLinkUpdate": - type: "object" - properties: - "metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Metadata" - "label": - anyOf: - - type: "string" - - type: "null" - title: "Label" - "allow_discount_codes": - anyOf: - - type: "boolean" - - type: "null" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - "product_price_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Product Price Id" - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored." - "success_url": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - title: "CheckoutLinkUpdate" - description: "Schema to update an existing checkout link." - "CheckoutPriceCreate": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "custom_field_data": - type: "object" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "payment_processor": - type: "string" - title: "Payment Processor" - enum: - - "stripe" - description: "Payment processor to use. Currently only Stripe is supported." - const: "stripe" - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount to apply to the checkout." - "allow_discount_codes": - type: "boolean" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - default: true - "amount": - anyOf: - - type: "integer" - description: "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - - type: "null" - title: "Amount" - "customer_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Customer Id" - description: "ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer." - "customer_name": - anyOf: - - type: "string" - description: "Name of the customer." - - type: "null" - title: "Customer Name" - "customer_email": - anyOf: - - type: "string" - format: "email" - description: "Email address of the customer." - - type: "null" - title: "Customer Email" - "customer_ip_address": - anyOf: - - type: "string" - format: "ipvanyaddress" - description: "IP address of the customer. Used to detect tax location." - - type: "null" - title: "Customer Ip Address" - "customer_billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address", "description": "Billing address of the customer."} - - type: "null" - "customer_tax_id": - anyOf: - - type: "string" - - type: "null" - title: "Customer Tax Id" - "customer_metadata": - type: "object" - title: "Customer Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - description: "ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten." - "success_url": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - "embed_origin": - anyOf: - - type: "string" - - type: "null" - title: "Embed Origin" - description: "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page." - "product_price_id": - type: "string" - title: "Product Price Id" - format: "uuid4" - description: "ID of the product price to checkout." - title: "CheckoutPriceCreate" - required: - - "payment_processor" - - "product_price_id" - description: "Create a new checkout session from a product price.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription." - "CheckoutProduct": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the product." - "name": - type: "string" - title: "Name" - description: "The name of the product." - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "is_recurring": - type: "boolean" - title: "Is Recurring" - description: "Whether the product is a subscription tier." - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the product is archived and no longer available." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the product." - "prices": - type: "array" - items: {"$ref": "#/components/schemas/ProductPrice"} - title: "Prices" - description: "List of prices for this product." - "benefits": - type: "array" - items: {"$ref": "#/components/schemas/BenefitBase"} - title: "BenefitPublic" - description: "List of benefits granted by the product." - "medias": - type: "array" - items: {"$ref": "#/components/schemas/ProductMediaFileRead"} - title: "Medias" - description: "List of medias associated to the product." - title: "CheckoutProduct" - required: - - "created_at" - - "modified_at" - - "id" - - "name" - - "description" - - "is_recurring" - - "is_archived" - - "organization_id" - - "prices" - - "benefits" - - "medias" - description: "Product data for a checkout session." - "CheckoutProductCreate": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "custom_field_data": - type: "object" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "payment_processor": - type: "string" - title: "Payment Processor" - enum: - - "stripe" - description: "Payment processor to use. Currently only Stripe is supported." - const: "stripe" - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount to apply to the checkout." - "allow_discount_codes": - type: "boolean" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - default: true - "amount": - anyOf: - - type: "integer" - description: "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - - type: "null" - title: "Amount" - "customer_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Customer Id" - description: "ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer." - "customer_name": - anyOf: - - type: "string" - description: "Name of the customer." - - type: "null" - title: "Customer Name" - "customer_email": - anyOf: - - type: "string" - format: "email" - description: "Email address of the customer." - - type: "null" - title: "Customer Email" - "customer_ip_address": - anyOf: - - type: "string" - format: "ipvanyaddress" - description: "IP address of the customer. Used to detect tax location." - - type: "null" - title: "Customer Ip Address" - "customer_billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address", "description": "Billing address of the customer."} - - type: "null" - "customer_tax_id": - anyOf: - - type: "string" - - type: "null" - title: "Customer Tax Id" - "customer_metadata": - type: "object" - title: "Customer Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - description: "ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten." - "success_url": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - "embed_origin": - anyOf: - - type: "string" - - type: "null" - title: "Embed Origin" - description: "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "ID of the product to checkout. First available price will be selected." - title: "CheckoutProductCreate" - required: - - "payment_processor" - - "product_id" - description: "Create a new checkout session from a product.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription." - "CheckoutPublic": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "custom_field_data": - type: "object" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "payment_processor": {"$ref": "#/components/schemas/PaymentProcessor", "description": "Payment processor used."} - "status": {"$ref": "#/components/schemas/CheckoutStatus", "description": "Status of the checkout session."} - "client_secret": - type: "string" - title: "Client Secret" - description: "Client secret used to update and complete the checkout session from the client." - "url": - type: "string" - title: "Url" - description: "URL where the customer can access the checkout session." - "expires_at": - type: "string" - title: "Expires At" - format: "date-time" - description: "Expiration date and time of the checkout session." - "success_url": - type: "string" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment." - "embed_origin": - anyOf: - - type: "string" - - type: "null" - title: "Embed Origin" - description: "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page." - "amount": - anyOf: - - type: "integer" - description: "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - - type: "null" - title: "Amount" - "tax_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Tax Amount" - description: "Computed tax amount to pay in cents." - "currency": - anyOf: - - type: "string" - - type: "null" - title: "Currency" - description: "Currency code of the checkout session." - "subtotal_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Subtotal Amount" - description: "Subtotal amount in cents, including discounts and before tax." - "total_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Total Amount" - description: "Total amount to pay in cents, including discounts and after tax." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "ID of the product to checkout." - "product_price_id": - type: "string" - title: "Product Price Id" - format: "uuid4" - description: "ID of the product price to checkout." - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount applied to the checkout." - "allow_discount_codes": - type: "boolean" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - "is_discount_applicable": - type: "boolean" - title: "Is Discount Applicable" - description: "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable." - "is_free_product_price": - type: "boolean" - title: "Is Free Product Price" - description: "Whether the product price is free, regardless of discounts." - "is_payment_required": - type: "boolean" - title: "Is Payment Required" - description: "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount." - "is_payment_setup_required": - type: "boolean" - title: "Is Payment Setup Required" - description: "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles." - "is_payment_form_required": - type: "boolean" - title: "Is Payment Form Required" - description: "Whether the checkout requires a payment form, whether because of a payment or payment method setup." - "customer_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Customer Id" - "customer_name": - anyOf: - - type: "string" - description: "Name of the customer." - - type: "null" - title: "Customer Name" - "customer_email": - anyOf: - - type: "string" - format: "email" - description: "Email address of the customer." - - type: "null" - title: "Customer Email" - "customer_ip_address": - anyOf: - - type: "string" - format: "ipvanyaddress" - description: "IP address of the customer. Used to detect tax location." - - type: "null" - title: "Customer Ip Address" - "customer_billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address", "description": "Billing address of the customer."} - - type: "null" - "customer_tax_id": - anyOf: - - type: "string" - - type: "null" - title: "Customer Tax Id" - "payment_processor_metadata": - type: "object" - title: "Payment Processor Metadata" - "product": {"$ref": "#/components/schemas/CheckoutProduct"} - "product_price": {"$ref": "#/components/schemas/ProductPrice"} - "discount": - anyOf: - - oneOf: - - {"$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"} - - {"$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration"} - - {"$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"} - - {"$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration"} - - type: "null" - title: "Discount" - "organization": {"$ref": "#/components/schemas/Organization"} - "attached_custom_fields": - type: "array" - items: {"$ref": "#/components/schemas/AttachedCustomField"} - title: "Attached Custom Fields" - title: "CheckoutPublic" - required: - - "created_at" - - "modified_at" - - "id" - - "payment_processor" - - "status" - - "client_secret" - - "url" - - "expires_at" - - "success_url" - - "embed_origin" - - "amount" - - "tax_amount" - - "currency" - - "subtotal_amount" - - "total_amount" - - "product_id" - - "product_price_id" - - "discount_id" - - "allow_discount_codes" - - "is_discount_applicable" - - "is_free_product_price" - - "is_payment_required" - - "is_payment_setup_required" - - "is_payment_form_required" - - "customer_id" - - "customer_name" - - "customer_email" - - "customer_ip_address" - - "customer_billing_address" - - "customer_tax_id" - - "payment_processor_metadata" - - "product" - - "product_price" - - "discount" - - "organization" - - "attached_custom_fields" - description: "Checkout session data retrieved using the client secret." - "CheckoutPublicConfirmed": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "custom_field_data": - type: "object" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "payment_processor": {"$ref": "#/components/schemas/PaymentProcessor", "description": "Payment processor used."} - "status": - type: "string" - title: "Status" - enum: - - "confirmed" - const: "confirmed" - "client_secret": - type: "string" - title: "Client Secret" - description: "Client secret used to update and complete the checkout session from the client." - "url": - type: "string" - title: "Url" - description: "URL where the customer can access the checkout session." - "expires_at": - type: "string" - title: "Expires At" - format: "date-time" - description: "Expiration date and time of the checkout session." - "success_url": - type: "string" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment." - "embed_origin": - anyOf: - - type: "string" - - type: "null" - title: "Embed Origin" - description: "When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page." - "amount": - anyOf: - - type: "integer" - description: "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - - type: "null" - title: "Amount" - "tax_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Tax Amount" - description: "Computed tax amount to pay in cents." - "currency": - anyOf: - - type: "string" - - type: "null" - title: "Currency" - description: "Currency code of the checkout session." - "subtotal_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Subtotal Amount" - description: "Subtotal amount in cents, including discounts and before tax." - "total_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Total Amount" - description: "Total amount to pay in cents, including discounts and after tax." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "ID of the product to checkout." - "product_price_id": - type: "string" - title: "Product Price Id" - format: "uuid4" - description: "ID of the product price to checkout." - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount applied to the checkout." - "allow_discount_codes": - type: "boolean" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - "is_discount_applicable": - type: "boolean" - title: "Is Discount Applicable" - description: "Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable." - "is_free_product_price": - type: "boolean" - title: "Is Free Product Price" - description: "Whether the product price is free, regardless of discounts." - "is_payment_required": - type: "boolean" - title: "Is Payment Required" - description: "Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount." - "is_payment_setup_required": - type: "boolean" - title: "Is Payment Setup Required" - description: "Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles." - "is_payment_form_required": - type: "boolean" - title: "Is Payment Form Required" - description: "Whether the checkout requires a payment form, whether because of a payment or payment method setup." - "customer_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Customer Id" - "customer_name": - anyOf: - - type: "string" - description: "Name of the customer." - - type: "null" - title: "Customer Name" - "customer_email": - anyOf: - - type: "string" - format: "email" - description: "Email address of the customer." - - type: "null" - title: "Customer Email" - "customer_ip_address": - anyOf: - - type: "string" - format: "ipvanyaddress" - description: "IP address of the customer. Used to detect tax location." - - type: "null" - title: "Customer Ip Address" - "customer_billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address", "description": "Billing address of the customer."} - - type: "null" - "customer_tax_id": - anyOf: - - type: "string" - - type: "null" - title: "Customer Tax Id" - "payment_processor_metadata": - type: "object" - title: "Payment Processor Metadata" - "product": {"$ref": "#/components/schemas/CheckoutProduct"} - "product_price": {"$ref": "#/components/schemas/ProductPrice"} - "discount": - anyOf: - - oneOf: - - {"$ref": "#/components/schemas/CheckoutDiscountFixedOnceForeverDuration"} - - {"$ref": "#/components/schemas/CheckoutDiscountFixedRepeatDuration"} - - {"$ref": "#/components/schemas/CheckoutDiscountPercentageOnceForeverDuration"} - - {"$ref": "#/components/schemas/CheckoutDiscountPercentageRepeatDuration"} - - type: "null" - title: "Discount" - "organization": {"$ref": "#/components/schemas/Organization"} - "attached_custom_fields": - type: "array" - items: {"$ref": "#/components/schemas/AttachedCustomField"} - title: "Attached Custom Fields" - "customer_session_token": - type: "string" - title: "Customer Session Token" - title: "CheckoutPublicConfirmed" - required: - - "created_at" - - "modified_at" - - "id" - - "payment_processor" - - "status" - - "client_secret" - - "url" - - "expires_at" - - "success_url" - - "embed_origin" - - "amount" - - "tax_amount" - - "currency" - - "subtotal_amount" - - "total_amount" - - "product_id" - - "product_price_id" - - "discount_id" - - "allow_discount_codes" - - "is_discount_applicable" - - "is_free_product_price" - - "is_payment_required" - - "is_payment_setup_required" - - "is_payment_form_required" - - "customer_id" - - "customer_name" - - "customer_email" - - "customer_ip_address" - - "customer_billing_address" - - "customer_tax_id" - - "payment_processor_metadata" - - "product" - - "product_price" - - "discount" - - "organization" - - "attached_custom_fields" - - "customer_session_token" - description: "Checkout session data retrieved using the client secret after confirmation.\n\nIt contains a customer session token to retrieve order information\nright after the checkout." - "CheckoutSortProperty": - type: "string" - title: "CheckoutSortProperty" - enum: - - "created_at" - - "-created_at" - - "expires_at" - - "-expires_at" - "CheckoutStatus": - type: "string" - title: "CheckoutStatus" - enum: - - "open" - - "expired" - - "confirmed" - - "succeeded" - - "failed" - "CheckoutUpdate": - type: "object" - properties: - "custom_field_data": - anyOf: - - type: "object" - - type: "null" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "product_price_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Product Price Id" - description: "ID of the product price to checkout. Must correspond to a price linked to the same product." - "amount": - anyOf: - - type: "integer" - description: "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - - type: "null" - title: "Amount" - "customer_name": - anyOf: - - type: "string" - description: "Name of the customer." - - type: "null" - title: "Customer Name" - "customer_email": - anyOf: - - type: "string" - format: "email" - description: "Email address of the customer." - - type: "null" - title: "Customer Email" - "customer_billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address", "description": "Billing address of the customer."} - - type: "null" - "customer_tax_id": - anyOf: - - type: "string" - - type: "null" - title: "Customer Tax Id" - "metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Metadata" - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - description: "ID of the discount to apply to the checkout." - "allow_discount_codes": - anyOf: - - type: "boolean" - - type: "null" - title: "Allow Discount Codes" - description: "Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it." - "customer_ip_address": - anyOf: - - type: "string" - format: "ipvanyaddress" - description: "IP address of the customer. Used to detect tax location." - - type: "null" - title: "Customer Ip Address" - "customer_metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Customer Metadata" - description: "Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "success_url": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Success Url" - description: "URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id." - "embed_origin": - anyOf: - - type: "string" - - type: "null" - title: "Embed Origin" - description: "If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page." - title: "CheckoutUpdate" - description: "Update an existing checkout session using an access token." - "CheckoutUpdatePublic": - type: "object" - properties: - "custom_field_data": - anyOf: - - type: "object" - - type: "null" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "product_price_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Product Price Id" - description: "ID of the product price to checkout. Must correspond to a price linked to the same product." - "amount": - anyOf: - - type: "integer" - description: "Amount to pay in cents. Only useful for custom prices, it'll be ignored for fixed and free prices." - - type: "null" - title: "Amount" - "customer_name": - anyOf: - - type: "string" - description: "Name of the customer." - - type: "null" - title: "Customer Name" - "customer_email": - anyOf: - - type: "string" - format: "email" - description: "Email address of the customer." - - type: "null" - title: "Customer Email" - "customer_billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address", "description": "Billing address of the customer."} - - type: "null" - "customer_tax_id": - anyOf: - - type: "string" - - type: "null" - title: "Customer Tax Id" - "discount_code": - anyOf: - - type: "string" - - type: "null" - title: "Discount Code" - description: "Discount code to apply to the checkout." - title: "CheckoutUpdatePublic" - description: "Update an existing checkout session using the client secret." - "CurrencyAmount": - type: "object" - properties: - "currency": - type: "string" - title: "Currency" - description: "Three letter currency code (eg: USD)" - "amount": - type: "integer" - title: "Amount" - description: "Amount in the currencies smallest unit (cents if currency is USD)" - title: "CurrencyAmount" - required: - - "currency" - - "amount" - "CustomField": - oneOf: - - {"$ref": "#/components/schemas/CustomFieldText"} - - {"$ref": "#/components/schemas/CustomFieldNumber"} - - {"$ref": "#/components/schemas/CustomFieldDate"} - - {"$ref": "#/components/schemas/CustomFieldCheckbox"} - - {"$ref": "#/components/schemas/CustomFieldSelect"} - discriminator: - propertyName: "type" - mapping: - "checkbox": "#/components/schemas/CustomFieldCheckbox" - "date": "#/components/schemas/CustomFieldDate" - "number": "#/components/schemas/CustomFieldNumber" - "select": "#/components/schemas/CustomFieldSelect" - "text": "#/components/schemas/CustomFieldText" - "CustomFieldCheckbox": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "type": - type: "string" - title: "Type" - enum: - - "checkbox" - const: "checkbox" - "slug": - type: "string" - title: "Slug" - description: "Identifier of the custom field. It'll be used as key when storing the value." - "name": - type: "string" - title: "Name" - description: "Name of the custom field." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the custom field." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "properties": {"$ref": "#/components/schemas/CustomFieldCheckboxProperties"} - title: "CustomFieldCheckbox" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "type" - - "slug" - - "name" - - "organization_id" - - "properties" - description: "Schema for a custom field of type checkbox." - "CustomFieldCheckboxProperties": - type: "object" - properties: - "form_label": - type: "string" - title: "Form Label" - minLength: 1 - "form_help_text": - type: "string" - title: "Form Help Text" - minLength: 1 - "form_placeholder": - type: "string" - title: "Form Placeholder" - minLength: 1 - title: "CustomFieldCheckboxProperties" - "CustomFieldCreate": - oneOf: - - {"$ref": "#/components/schemas/CustomFieldCreateText"} - - {"$ref": "#/components/schemas/CustomFieldCreateNumber"} - - {"$ref": "#/components/schemas/CustomFieldCreateDate"} - - {"$ref": "#/components/schemas/CustomFieldCreateCheckbox"} - - {"$ref": "#/components/schemas/CustomFieldCreateSelect"} - discriminator: - propertyName: "type" - mapping: - "checkbox": "#/components/schemas/CustomFieldCreateCheckbox" - "date": "#/components/schemas/CustomFieldCreateDate" - "number": "#/components/schemas/CustomFieldCreateNumber" - "select": "#/components/schemas/CustomFieldCreateSelect" - "text": "#/components/schemas/CustomFieldCreateText" - "CustomFieldCreateCheckbox": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "type": - type: "string" - title: "Type" - enum: - - "checkbox" - const: "checkbox" - "slug": - type: "string" - title: "Slug" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - "name": - type: "string" - title: "Name" - minLength: 1 - description: "Name of the custom field." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/CustomFieldCheckboxProperties"} - title: "CustomFieldCreateCheckbox" - required: - - "type" - - "slug" - - "name" - - "properties" - description: "Schema to create a custom field of type checkbox." - "CustomFieldCreateDate": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "type": - type: "string" - title: "Type" - enum: - - "date" - const: "date" - "slug": - type: "string" - title: "Slug" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - "name": - type: "string" - title: "Name" - minLength: 1 - description: "Name of the custom field." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/CustomFieldDateProperties"} - title: "CustomFieldCreateDate" - required: - - "type" - - "slug" - - "name" - - "properties" - description: "Schema to create a custom field of type date." - "CustomFieldCreateNumber": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "type": - type: "string" - title: "Type" - enum: - - "number" - const: "number" - "slug": - type: "string" - title: "Slug" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - "name": - type: "string" - title: "Name" - minLength: 1 - description: "Name of the custom field." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/CustomFieldNumberProperties"} - title: "CustomFieldCreateNumber" - required: - - "type" - - "slug" - - "name" - - "properties" - description: "Schema to create a custom field of type number." - "CustomFieldCreateSelect": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "type": - type: "string" - title: "Type" - enum: - - "select" - const: "select" - "slug": - type: "string" - title: "Slug" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - "name": - type: "string" - title: "Name" - minLength: 1 - description: "Name of the custom field." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/CustomFieldSelectProperties"} - title: "CustomFieldCreateSelect" - required: - - "type" - - "slug" - - "name" - - "properties" - description: "Schema to create a custom field of type select." - "CustomFieldCreateText": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "type": - type: "string" - title: "Type" - enum: - - "text" - const: "text" - "slug": - type: "string" - title: "Slug" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - "name": - type: "string" - title: "Name" - minLength: 1 - description: "Name of the custom field." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the custom field. **Required unless you use an organization token.**" - "properties": {"$ref": "#/components/schemas/CustomFieldTextProperties"} - title: "CustomFieldCreateText" - required: - - "type" - - "slug" - - "name" - - "properties" - description: "Schema to create a custom field of type text." - "CustomFieldDate": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "type": - type: "string" - title: "Type" - enum: - - "date" - const: "date" - "slug": - type: "string" - title: "Slug" - description: "Identifier of the custom field. It'll be used as key when storing the value." - "name": - type: "string" - title: "Name" - description: "Name of the custom field." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the custom field." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "properties": {"$ref": "#/components/schemas/CustomFieldDateProperties"} - title: "CustomFieldDate" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "type" - - "slug" - - "name" - - "organization_id" - - "properties" - description: "Schema for a custom field of type date." - "CustomFieldDateProperties": - type: "object" - properties: - "form_label": - type: "string" - title: "Form Label" - minLength: 1 - "form_help_text": - type: "string" - title: "Form Help Text" - minLength: 1 - "form_placeholder": - type: "string" - title: "Form Placeholder" - minLength: 1 - "ge": - type: "integer" - title: "Ge" - "le": - type: "integer" - title: "Le" - title: "CustomFieldDateProperties" - "CustomFieldNumber": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "type": - type: "string" - title: "Type" - enum: - - "number" - const: "number" - "slug": - type: "string" - title: "Slug" - description: "Identifier of the custom field. It'll be used as key when storing the value." - "name": - type: "string" - title: "Name" - description: "Name of the custom field." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the custom field." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "properties": {"$ref": "#/components/schemas/CustomFieldNumberProperties"} - title: "CustomFieldNumber" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "type" - - "slug" - - "name" - - "organization_id" - - "properties" - description: "Schema for a custom field of type number." - "CustomFieldNumberProperties": - type: "object" - properties: - "form_label": - type: "string" - title: "Form Label" - minLength: 1 - "form_help_text": - type: "string" - title: "Form Help Text" - minLength: 1 - "form_placeholder": - type: "string" - title: "Form Placeholder" - minLength: 1 - "ge": - type: "integer" - title: "Ge" - "le": - type: "integer" - title: "Le" - title: "CustomFieldNumberProperties" - "CustomFieldSelect": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "type": - type: "string" - title: "Type" - enum: - - "select" - const: "select" - "slug": - type: "string" - title: "Slug" - description: "Identifier of the custom field. It'll be used as key when storing the value." - "name": - type: "string" - title: "Name" - description: "Name of the custom field." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the custom field." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "properties": {"$ref": "#/components/schemas/CustomFieldSelectProperties"} - title: "CustomFieldSelect" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "type" - - "slug" - - "name" - - "organization_id" - - "properties" - description: "Schema for a custom field of type select." - "CustomFieldSelectOption": - type: "object" - properties: - "value": - type: "string" - title: "Value" - minLength: 1 - "label": - type: "string" - title: "Label" - minLength: 1 - title: "CustomFieldSelectOption" - required: - - "value" - - "label" - "CustomFieldSelectProperties": - type: "object" - properties: - "form_label": - type: "string" - title: "Form Label" - minLength: 1 - "form_help_text": - type: "string" - title: "Form Help Text" - minLength: 1 - "form_placeholder": - type: "string" - title: "Form Placeholder" - minLength: 1 - "options": - type: "array" - items: {"$ref": "#/components/schemas/CustomFieldSelectOption"} - title: "Options" - title: "CustomFieldSelectProperties" - required: - - "options" - "CustomFieldSortProperty": - type: "string" - title: "CustomFieldSortProperty" - enum: - - "created_at" - - "-created_at" - - "slug" - - "-slug" - - "name" - - "-name" - - "type" - - "-type" - "CustomFieldText": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "type": - type: "string" - title: "Type" - enum: - - "text" - const: "text" - "slug": - type: "string" - title: "Slug" - description: "Identifier of the custom field. It'll be used as key when storing the value." - "name": - type: "string" - title: "Name" - description: "Name of the custom field." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the custom field." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "properties": {"$ref": "#/components/schemas/CustomFieldTextProperties"} - title: "CustomFieldText" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "type" - - "slug" - - "name" - - "organization_id" - - "properties" - description: "Schema for a custom field of type text." - "CustomFieldTextProperties": - type: "object" - properties: - "form_label": - type: "string" - title: "Form Label" - minLength: 1 - "form_help_text": - type: "string" - title: "Form Help Text" - minLength: 1 - "form_placeholder": - type: "string" - title: "Form Placeholder" - minLength: 1 - "textarea": - type: "boolean" - title: "Textarea" - "min_length": - type: "integer" - title: "Min Length" - minimum: 0 - "max_length": - type: "integer" - title: "Max Length" - minimum: 0 - title: "CustomFieldTextProperties" - "CustomFieldType": - type: "string" - title: "CustomFieldType" - enum: - - "text" - - "number" - - "date" - - "checkbox" - - "select" - "CustomFieldUpdate": - oneOf: - - {"$ref": "#/components/schemas/CustomFieldUpdateText"} - - {"$ref": "#/components/schemas/CustomFieldUpdateNumber"} - - {"$ref": "#/components/schemas/CustomFieldUpdateDate"} - - {"$ref": "#/components/schemas/CustomFieldUpdateCheckbox"} - - {"$ref": "#/components/schemas/CustomFieldUpdateSelect"} - discriminator: - propertyName: "type" - mapping: - "checkbox": "#/components/schemas/CustomFieldUpdateCheckbox" - "date": "#/components/schemas/CustomFieldUpdateDate" - "number": "#/components/schemas/CustomFieldUpdateNumber" - "select": "#/components/schemas/CustomFieldUpdateSelect" - "text": "#/components/schemas/CustomFieldUpdateText" - "CustomFieldUpdateCheckbox": - type: "object" - properties: - "metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Metadata" - "name": - anyOf: - - type: "string" - minLength: 1 - description: "Name of the custom field." - - type: "null" - title: "Name" - "slug": - anyOf: - - type: "string" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - - type: "null" - title: "Slug" - "type": - type: "string" - title: "Type" - enum: - - "checkbox" - const: "checkbox" - "properties": - anyOf: - - {"$ref": "#/components/schemas/CustomFieldCheckboxProperties"} - - type: "null" - title: "CustomFieldUpdateCheckbox" - required: - - "type" - description: "Schema to update a custom field of type checkbox." - "CustomFieldUpdateDate": - type: "object" - properties: - "metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Metadata" - "name": - anyOf: - - type: "string" - minLength: 1 - description: "Name of the custom field." - - type: "null" - title: "Name" - "slug": - anyOf: - - type: "string" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - - type: "null" - title: "Slug" - "type": - type: "string" - title: "Type" - enum: - - "date" - const: "date" - "properties": - anyOf: - - {"$ref": "#/components/schemas/CustomFieldDateProperties"} - - type: "null" - title: "CustomFieldUpdateDate" - required: - - "type" - description: "Schema to update a custom field of type date." - "CustomFieldUpdateNumber": - type: "object" - properties: - "metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Metadata" - "name": - anyOf: - - type: "string" - minLength: 1 - description: "Name of the custom field." - - type: "null" - title: "Name" - "slug": - anyOf: - - type: "string" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - - type: "null" - title: "Slug" - "type": - type: "string" - title: "Type" - enum: - - "number" - const: "number" - "properties": - anyOf: - - {"$ref": "#/components/schemas/CustomFieldNumberProperties"} - - type: "null" - title: "CustomFieldUpdateNumber" - required: - - "type" - description: "Schema to update a custom field of type number." - "CustomFieldUpdateSelect": - type: "object" - properties: - "metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Metadata" - "name": - anyOf: - - type: "string" - minLength: 1 - description: "Name of the custom field." - - type: "null" - title: "Name" - "slug": - anyOf: - - type: "string" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - - type: "null" - title: "Slug" - "type": - type: "string" - title: "Type" - enum: - - "select" - const: "select" - "properties": - anyOf: - - {"$ref": "#/components/schemas/CustomFieldSelectProperties"} - - type: "null" - title: "CustomFieldUpdateSelect" - required: - - "type" - description: "Schema to update a custom field of type select." - "CustomFieldUpdateText": - type: "object" - properties: - "metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Metadata" - "name": - anyOf: - - type: "string" - minLength: 1 - description: "Name of the custom field." - - type: "null" - title: "Name" - "slug": - anyOf: - - type: "string" - minLength: 1 - pattern: "^[a-z0-9-_]+$" - description: "Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens." - - type: "null" - title: "Slug" - "type": - type: "string" - title: "Type" - enum: - - "text" - const: "text" - "properties": - anyOf: - - {"$ref": "#/components/schemas/CustomFieldTextProperties"} - - type: "null" - title: "CustomFieldUpdateText" - required: - - "type" - description: "Schema to update a custom field of type text." - "Customer": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "email": - type: "string" - title: "Email" - "email_verified": - type: "boolean" - title: "Email Verified" - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - "billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address"} - - type: "null" - "tax_id": - anyOf: - - type: "array" - prefixItems: - - type: "string" - - {"$ref": "#/components/schemas/TaxIDFormat"} - maxItems: 2 - minItems: 2 - - type: "null" - title: "Tax Id" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "avatar_url": - type: "string" - title: "Avatar Url" - readOnly: true - title: "Customer" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "email" - - "email_verified" - - "name" - - "billing_address" - - "tax_id" - - "organization_id" - - "avatar_url" - description: "A customer in an organization." - "CustomerBenefitGrant": - anyOf: - - {"$ref": "#/components/schemas/CustomerBenefitGrantDiscord"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepository"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantDownloadables"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantLicenseKeys"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantAds"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantCustom"} - "CustomerBenefitGrantAds": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "granted_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Granted At" - "revoked_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Revoked At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - "order_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Order Id" - "is_granted": - type: "boolean" - title: "Is Granted" - "is_revoked": - type: "boolean" - title: "Is Revoked" - "benefit": {"$ref": "#/components/schemas/BenefitAdsSubscriber"} - "properties": {"$ref": "#/components/schemas/BenefitGrantAdsProperties"} - title: "CustomerBenefitGrantAds" - required: - - "created_at" - - "modified_at" - - "id" - - "granted_at" - - "revoked_at" - - "customer_id" - - "benefit_id" - - "subscription_id" - - "order_id" - - "is_granted" - - "is_revoked" - - "benefit" - - "properties" - "CustomerBenefitGrantAdsUpdate": - type: "object" - properties: - "benefit_type": - type: "string" - title: "Benefit Type" - enum: - - "ads" - const: "ads" - title: "CustomerBenefitGrantAdsUpdate" - required: - - "benefit_type" - "CustomerBenefitGrantCustom": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "granted_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Granted At" - "revoked_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Revoked At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - "order_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Order Id" - "is_granted": - type: "boolean" - title: "Is Granted" - "is_revoked": - type: "boolean" - title: "Is Revoked" - "benefit": {"$ref": "#/components/schemas/BenefitCustomSubscriber"} - "properties": {"$ref": "#/components/schemas/BenefitGrantCustomProperties"} - title: "CustomerBenefitGrantCustom" - required: - - "created_at" - - "modified_at" - - "id" - - "granted_at" - - "revoked_at" - - "customer_id" - - "benefit_id" - - "subscription_id" - - "order_id" - - "is_granted" - - "is_revoked" - - "benefit" - - "properties" - "CustomerBenefitGrantCustomUpdate": - type: "object" - properties: - "benefit_type": - type: "string" - title: "Benefit Type" - enum: - - "custom" - const: "custom" - title: "CustomerBenefitGrantCustomUpdate" - required: - - "benefit_type" - "CustomerBenefitGrantDiscord": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "granted_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Granted At" - "revoked_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Revoked At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - "order_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Order Id" - "is_granted": - type: "boolean" - title: "Is Granted" - "is_revoked": - type: "boolean" - title: "Is Revoked" - "benefit": {"$ref": "#/components/schemas/BenefitDiscordSubscriber"} - "properties": {"$ref": "#/components/schemas/BenefitGrantDiscordProperties"} - title: "CustomerBenefitGrantDiscord" - required: - - "created_at" - - "modified_at" - - "id" - - "granted_at" - - "revoked_at" - - "customer_id" - - "benefit_id" - - "subscription_id" - - "order_id" - - "is_granted" - - "is_revoked" - - "benefit" - - "properties" - "CustomerBenefitGrantDiscordPropertiesUpdate": - type: "object" - properties: - "account_id": - type: "string" - title: "Account Id" - title: "CustomerBenefitGrantDiscordPropertiesUpdate" - required: - - "account_id" - "CustomerBenefitGrantDiscordUpdate": - type: "object" - properties: - "benefit_type": - type: "string" - title: "Benefit Type" - enum: - - "discord" - const: "discord" - "properties": {"$ref": "#/components/schemas/CustomerBenefitGrantDiscordPropertiesUpdate"} - title: "CustomerBenefitGrantDiscordUpdate" - required: - - "benefit_type" - - "properties" - "CustomerBenefitGrantDownloadables": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "granted_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Granted At" - "revoked_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Revoked At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - "order_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Order Id" - "is_granted": - type: "boolean" - title: "Is Granted" - "is_revoked": - type: "boolean" - title: "Is Revoked" - "benefit": {"$ref": "#/components/schemas/BenefitDownloadablesSubscriber"} - "properties": {"$ref": "#/components/schemas/BenefitGrantDownloadablesProperties"} - title: "CustomerBenefitGrantDownloadables" - required: - - "created_at" - - "modified_at" - - "id" - - "granted_at" - - "revoked_at" - - "customer_id" - - "benefit_id" - - "subscription_id" - - "order_id" - - "is_granted" - - "is_revoked" - - "benefit" - - "properties" - "CustomerBenefitGrantDownloadablesUpdate": - type: "object" - properties: - "benefit_type": - type: "string" - title: "Benefit Type" - enum: - - "downloadables" - const: "downloadables" - title: "CustomerBenefitGrantDownloadablesUpdate" - required: - - "benefit_type" - "CustomerBenefitGrantGitHubRepository": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "granted_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Granted At" - "revoked_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Revoked At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - "order_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Order Id" - "is_granted": - type: "boolean" - title: "Is Granted" - "is_revoked": - type: "boolean" - title: "Is Revoked" - "benefit": {"$ref": "#/components/schemas/BenefitGitHubRepositorySubscriber"} - "properties": {"$ref": "#/components/schemas/BenefitGrantGitHubRepositoryProperties"} - title: "CustomerBenefitGrantGitHubRepository" - required: - - "created_at" - - "modified_at" - - "id" - - "granted_at" - - "revoked_at" - - "customer_id" - - "benefit_id" - - "subscription_id" - - "order_id" - - "is_granted" - - "is_revoked" - - "benefit" - - "properties" - "CustomerBenefitGrantGitHubRepositoryPropertiesUpdate": - type: "object" - properties: - "account_id": - type: "string" - title: "Account Id" - title: "CustomerBenefitGrantGitHubRepositoryPropertiesUpdate" - required: - - "account_id" - "CustomerBenefitGrantGitHubRepositoryUpdate": - type: "object" - properties: - "benefit_type": - type: "string" - title: "Benefit Type" - enum: - - "github_repository" - const: "github_repository" - "properties": {"$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryPropertiesUpdate"} - title: "CustomerBenefitGrantGitHubRepositoryUpdate" - required: - - "benefit_type" - - "properties" - "CustomerBenefitGrantLicenseKeys": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "granted_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Granted At" - "revoked_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Revoked At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - "order_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Order Id" - "is_granted": - type: "boolean" - title: "Is Granted" - "is_revoked": - type: "boolean" - title: "Is Revoked" - "benefit": {"$ref": "#/components/schemas/BenefitLicenseKeysSubscriber"} - "properties": {"$ref": "#/components/schemas/BenefitGrantLicenseKeysProperties"} - title: "CustomerBenefitGrantLicenseKeys" - required: - - "created_at" - - "modified_at" - - "id" - - "granted_at" - - "revoked_at" - - "customer_id" - - "benefit_id" - - "subscription_id" - - "order_id" - - "is_granted" - - "is_revoked" - - "benefit" - - "properties" - "CustomerBenefitGrantLicenseKeysUpdate": - type: "object" - properties: - "benefit_type": - type: "string" - title: "Benefit Type" - enum: - - "license_keys" - const: "license_keys" - title: "CustomerBenefitGrantLicenseKeysUpdate" - required: - - "benefit_type" - "CustomerBenefitGrantSortProperty": - type: "string" - title: "CustomerBenefitGrantSortProperty" - enum: - - "granted_at" - - "-granted_at" - - "type" - - "-type" - - "organization" - - "-organization" - "CustomerBenefitGrantUpdate": - oneOf: - - {"$ref": "#/components/schemas/CustomerBenefitGrantDiscordUpdate"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantDownloadablesUpdate"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantAdsUpdate"} - - {"$ref": "#/components/schemas/CustomerBenefitGrantCustomUpdate"} - discriminator: - propertyName: "benefit_type" - mapping: - "ads": "#/components/schemas/CustomerBenefitGrantAdsUpdate" - "custom": "#/components/schemas/CustomerBenefitGrantCustomUpdate" - "discord": "#/components/schemas/CustomerBenefitGrantDiscordUpdate" - "downloadables": "#/components/schemas/CustomerBenefitGrantDownloadablesUpdate" - "github_repository": "#/components/schemas/CustomerBenefitGrantGitHubRepositoryUpdate" - "license_keys": "#/components/schemas/CustomerBenefitGrantLicenseKeysUpdate" - "CustomerCreate": - type: "object" - properties: - "email": - type: "string" - title: "Email" - format: "email" - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - "billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address"} - - type: "null" - "tax_id": - anyOf: - - type: "array" - prefixItems: - - type: "string" - - {"$ref": "#/components/schemas/TaxIDFormat"} - maxItems: 2 - minItems: 2 - - type: "null" - title: "Tax Id" - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the customer. **Required unless you use an organization token.**" - title: "CustomerCreate" - required: - - "email" - "CustomerOrder": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - "amount": - type: "integer" - title: "Amount" - "tax_amount": - type: "integer" - title: "Tax Amount" - "currency": - type: "string" - title: "Currency" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - "product_price_id": - type: "string" - title: "Product Price Id" - format: "uuid4" - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - "product": {"$ref": "#/components/schemas/CustomerOrderProduct"} - "product_price": {"$ref": "#/components/schemas/ProductPrice"} - "subscription": - anyOf: - - {"$ref": "#/components/schemas/CustomerOrderSubscription"} - - type: "null" - title: "CustomerOrder" - required: - - "created_at" - - "modified_at" - - "id" - - "amount" - - "tax_amount" - - "currency" - - "customer_id" - - "product_id" - - "product_price_id" - - "subscription_id" - - "user_id" - - "product" - - "product_price" - - "subscription" - "CustomerOrderInvoice": - type: "object" - properties: - "url": - type: "string" - title: "Url" - description: "The URL to the invoice." - title: "CustomerOrderInvoice" - required: - - "url" - description: "Order's invoice data." - "CustomerOrderProduct": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the product." - "name": - type: "string" - title: "Name" - description: "The name of the product." - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "is_recurring": - type: "boolean" - title: "Is Recurring" - description: "Whether the product is a subscription tier." - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the product is archived and no longer available." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the product." - "prices": - type: "array" - items: {"$ref": "#/components/schemas/ProductPrice"} - title: "Prices" - description: "List of prices for this product." - "benefits": - type: "array" - items: {"$ref": "#/components/schemas/BenefitBase"} - title: "BenefitPublic" - description: "List of benefits granted by the product." - "medias": - type: "array" - items: {"$ref": "#/components/schemas/ProductMediaFileRead"} - title: "Medias" - description: "List of medias associated to the product." - "organization": {"$ref": "#/components/schemas/Organization"} - title: "CustomerOrderProduct" - required: - - "created_at" - - "modified_at" - - "id" - - "name" - - "description" - - "is_recurring" - - "is_archived" - - "organization_id" - - "prices" - - "benefits" - - "medias" - - "organization" - "CustomerOrderSortProperty": - type: "string" - title: "CustomerOrderSortProperty" - enum: - - "created_at" - - "-created_at" - - "amount" - - "-amount" - - "organization" - - "-organization" - - "product" - - "-product" - - "subscription" - - "-subscription" - "CustomerOrderSubscription": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "amount": - anyOf: - - type: "integer" - - type: "null" - title: "Amount" - "currency": - anyOf: - - type: "string" - - type: "null" - title: "Currency" - "recurring_interval": {"$ref": "#/components/schemas/SubscriptionRecurringInterval"} - "status": {"$ref": "#/components/schemas/SubscriptionStatus"} - "current_period_start": - type: "string" - title: "Current Period Start" - format: "date-time" - "current_period_end": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Current Period End" - "cancel_at_period_end": - type: "boolean" - title: "Cancel At Period End" - "started_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Started At" - "ended_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ended At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - "price_id": - type: "string" - title: "Price Id" - format: "uuid4" - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - "checkout_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Checkout Id" - title: "CustomerOrderSubscription" - required: - - "created_at" - - "modified_at" - - "id" - - "amount" - - "currency" - - "recurring_interval" - - "status" - - "current_period_start" - - "current_period_end" - - "cancel_at_period_end" - - "started_at" - - "ended_at" - - "customer_id" - - "product_id" - - "price_id" - - "discount_id" - - "checkout_id" - "CustomerPortalCustomer": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "email": - type: "string" - title: "Email" - "email_verified": - type: "boolean" - title: "Email Verified" - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - "billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address"} - - type: "null" - "tax_id": - anyOf: - - type: "array" - prefixItems: - - type: "string" - - {"$ref": "#/components/schemas/TaxIDFormat"} - maxItems: 2 - minItems: 2 - - type: "null" - title: "Tax Id" - "oauth_accounts": - type: "object" - title: "Oauth Accounts" - additionalProperties: {"$ref": "#/components/schemas/CustomerPortalOAuthAccount"} - title: "CustomerPortalCustomer" - required: - - "created_at" - - "modified_at" - - "id" - - "email" - - "email_verified" - - "name" - - "billing_address" - - "tax_id" - - "oauth_accounts" - "CustomerPortalOAuthAccount": - type: "object" - properties: - "account_id": - type: "string" - title: "Account Id" - "account_username": - anyOf: - - type: "string" - - type: "null" - title: "Account Username" - title: "CustomerPortalOAuthAccount" - required: - - "account_id" - - "account_username" - "CustomerSession": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "token": - type: "string" - title: "Token" - "expires_at": - type: "string" - title: "Expires At" - format: "date-time" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "customer": {"$ref": "#/components/schemas/Customer"} - title: "CustomerSession" - required: - - "created_at" - - "modified_at" - - "id" - - "token" - - "expires_at" - - "customer_id" - - "customer" - description: "A customer session that can be used to authenticate as a customer." - "CustomerSessionCreate": - type: "object" - properties: - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - description: "ID of the customer to create a session for." - title: "CustomerSessionCreate" - required: - - "customer_id" - description: "Schema for creating a customer session." - "CustomerSortProperty": - type: "string" - title: "CustomerSortProperty" - enum: - - "created_at" - - "-created_at" - - "email" - - "-email" - - "name" - - "-name" - "CustomerSubscription": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "amount": - anyOf: - - type: "integer" - - type: "null" - title: "Amount" - "currency": - anyOf: - - type: "string" - - type: "null" - title: "Currency" - "recurring_interval": {"$ref": "#/components/schemas/SubscriptionRecurringInterval"} - "status": {"$ref": "#/components/schemas/SubscriptionStatus"} - "current_period_start": - type: "string" - title: "Current Period Start" - format: "date-time" - "current_period_end": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Current Period End" - "cancel_at_period_end": - type: "boolean" - title: "Cancel At Period End" - "started_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Started At" - "ended_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ended At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - "price_id": - type: "string" - title: "Price Id" - format: "uuid4" - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - "checkout_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Checkout Id" - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - "product": {"$ref": "#/components/schemas/CustomerSubscriptionProduct"} - "price": {"$ref": "#/components/schemas/ProductPrice"} - title: "CustomerSubscription" - required: - - "created_at" - - "modified_at" - - "id" - - "amount" - - "currency" - - "recurring_interval" - - "status" - - "current_period_start" - - "current_period_end" - - "cancel_at_period_end" - - "started_at" - - "ended_at" - - "customer_id" - - "product_id" - - "price_id" - - "discount_id" - - "checkout_id" - - "user_id" - - "product" - - "price" - "CustomerSubscriptionProduct": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the product." - "name": - type: "string" - title: "Name" - description: "The name of the product." - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "is_recurring": - type: "boolean" - title: "Is Recurring" - description: "Whether the product is a subscription tier." - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the product is archived and no longer available." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the product." - "prices": - type: "array" - items: {"$ref": "#/components/schemas/ProductPrice"} - title: "Prices" - description: "List of prices for this product." - "benefits": - type: "array" - items: {"$ref": "#/components/schemas/BenefitBase"} - title: "BenefitPublic" - description: "List of benefits granted by the product." - "medias": - type: "array" - items: {"$ref": "#/components/schemas/ProductMediaFileRead"} - title: "Medias" - description: "List of medias associated to the product." - "organization": {"$ref": "#/components/schemas/Organization"} - title: "CustomerSubscriptionProduct" - required: - - "created_at" - - "modified_at" - - "id" - - "name" - - "description" - - "is_recurring" - - "is_archived" - - "organization_id" - - "prices" - - "benefits" - - "medias" - - "organization" - "CustomerSubscriptionSortProperty": - type: "string" - title: "CustomerSubscriptionSortProperty" - enum: - - "started_at" - - "-started_at" - - "amount" - - "-amount" - - "status" - - "-status" - - "organization" - - "-organization" - - "product" - - "-product" - "CustomerSubscriptionUpdate": - type: "object" - properties: - "product_price_id": - type: "string" - title: "Product Price Id" - format: "uuid4" - title: "CustomerSubscriptionUpdate" - required: - - "product_price_id" - "CustomerUpdate": - type: "object" - properties: - "email": - anyOf: - - type: "string" - format: "email" - - type: "null" - title: "Email" - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - "billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address"} - - type: "null" - "tax_id": - anyOf: - - type: "array" - prefixItems: - - type: "string" - - {"$ref": "#/components/schemas/TaxIDFormat"} - maxItems: 2 - minItems: 2 - - type: "null" - title: "Tax Id" - title: "CustomerUpdate" - "Discount": - oneOf: - - {"$ref": "#/components/schemas/DiscountFixedOnceForeverDuration"} - - {"$ref": "#/components/schemas/DiscountFixedRepeatDuration"} - - {"$ref": "#/components/schemas/DiscountPercentageOnceForeverDuration"} - - {"$ref": "#/components/schemas/DiscountPercentageRepeatDuration"} - "DiscountCreate": - oneOf: - - {"$ref": "#/components/schemas/DiscountFixedOnceForeverDurationCreate"} - - {"$ref": "#/components/schemas/DiscountFixedRepeatDurationCreate"} - - {"$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationCreate"} - - {"$ref": "#/components/schemas/DiscountPercentageRepeatDurationCreate"} - "DiscountDuration": - type: "string" - title: "DiscountDuration" - enum: - - "once" - - "forever" - - "repeating" - "DiscountFixedOnceForeverDuration": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "type": {"$ref": "#/components/schemas/DiscountType"} - "amount": - type: "integer" - title: "Amount" - "currency": - type: "string" - title: "Currency" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "name": - type: "string" - title: "Name" - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - - type: "null" - title: "Max Redemptions" - description: "Maximum number of times the discount can be redeemed." - "redemptions_count": - type: "integer" - title: "Redemptions Count" - description: "Number of times the discount has been redeemed." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "products": - type: "array" - items: {"$ref": "#/components/schemas/DiscountProduct"} - title: "Products" - title: "DiscountFixedOnceForeverDuration" - required: - - "duration" - - "type" - - "amount" - - "currency" - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "name" - - "code" - - "starts_at" - - "ends_at" - - "max_redemptions" - - "redemptions_count" - - "organization_id" - - "products" - description: "Schema for a fixed amount discount that is applied once or forever." - "DiscountFixedOnceForeverDurationBase": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "type": {"$ref": "#/components/schemas/DiscountType"} - "amount": - type: "integer" - title: "Amount" - "currency": - type: "string" - title: "Currency" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "name": - type: "string" - title: "Name" - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - - type: "null" - title: "Max Redemptions" - description: "Maximum number of times the discount can be redeemed." - "redemptions_count": - type: "integer" - title: "Redemptions Count" - description: "Number of times the discount has been redeemed." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - title: "DiscountFixedOnceForeverDurationBase" - required: - - "duration" - - "type" - - "amount" - - "currency" - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "name" - - "code" - - "starts_at" - - "ends_at" - - "max_redemptions" - - "redemptions_count" - - "organization_id" - "DiscountFixedOnceForeverDurationCreate": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "type": {"$ref": "#/components/schemas/DiscountType", "description": "Type of the discount."} - "amount": - type: "integer" - title: "Amount" - minimum: 0 - description: "Fixed amount to discount from the invoice total." - "currency": - type: "string" - title: "Currency" - pattern: "usd" - description: "The currency. Currently, only `usd` is supported." - default: "usd" - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "name": - type: "string" - title: "Name" - minLength: 1 - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Optional timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Optional timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - minimum: 1 - - type: "null" - title: "Max Redemptions" - description: "Optional maximum number of times the discount can be redeemed." - "products": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - description: "List of product IDs the discount can be applied to." - - type: "null" - title: "Products" - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the discount. **Required unless you use an organization token.**" - title: "DiscountFixedOnceForeverDurationCreate" - required: - - "duration" - - "type" - - "amount" - - "name" - description: "Schema to create a fixed amount discount that is applied once or forever." - "DiscountFixedRepeatDuration": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "duration_in_months": - type: "integer" - title: "Duration In Months" - "type": {"$ref": "#/components/schemas/DiscountType"} - "amount": - type: "integer" - title: "Amount" - "currency": - type: "string" - title: "Currency" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "name": - type: "string" - title: "Name" - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - - type: "null" - title: "Max Redemptions" - description: "Maximum number of times the discount can be redeemed." - "redemptions_count": - type: "integer" - title: "Redemptions Count" - description: "Number of times the discount has been redeemed." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "products": - type: "array" - items: {"$ref": "#/components/schemas/DiscountProduct"} - title: "Products" - title: "DiscountFixedRepeatDuration" - required: - - "duration" - - "duration_in_months" - - "type" - - "amount" - - "currency" - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "name" - - "code" - - "starts_at" - - "ends_at" - - "max_redemptions" - - "redemptions_count" - - "organization_id" - - "products" - description: "Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months." - "DiscountFixedRepeatDurationBase": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "duration_in_months": - type: "integer" - title: "Duration In Months" - "type": {"$ref": "#/components/schemas/DiscountType"} - "amount": - type: "integer" - title: "Amount" - "currency": - type: "string" - title: "Currency" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "name": - type: "string" - title: "Name" - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - - type: "null" - title: "Max Redemptions" - description: "Maximum number of times the discount can be redeemed." - "redemptions_count": - type: "integer" - title: "Redemptions Count" - description: "Number of times the discount has been redeemed." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - title: "DiscountFixedRepeatDurationBase" - required: - - "duration" - - "duration_in_months" - - "type" - - "amount" - - "currency" - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "name" - - "code" - - "starts_at" - - "ends_at" - - "max_redemptions" - - "redemptions_count" - - "organization_id" - "DiscountFixedRepeatDurationCreate": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "duration_in_months": - type: "integer" - title: "Duration In Months" - minimum: 1 - description: "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24." - "type": {"$ref": "#/components/schemas/DiscountType", "description": "Type of the discount."} - "amount": - type: "integer" - title: "Amount" - minimum: 0 - description: "Fixed amount to discount from the invoice total." - "currency": - type: "string" - title: "Currency" - pattern: "usd" - description: "The currency. Currently, only `usd` is supported." - default: "usd" - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "name": - type: "string" - title: "Name" - minLength: 1 - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Optional timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Optional timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - minimum: 1 - - type: "null" - title: "Max Redemptions" - description: "Optional maximum number of times the discount can be redeemed." - "products": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - description: "List of product IDs the discount can be applied to." - - type: "null" - title: "Products" - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the discount. **Required unless you use an organization token.**" - title: "DiscountFixedRepeatDurationCreate" - required: - - "duration" - - "duration_in_months" - - "type" - - "amount" - - "name" - description: "Schema to create a fixed amount discount that is applied on every invoice\nfor a certain number of months." - "DiscountPercentageOnceForeverDuration": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "type": {"$ref": "#/components/schemas/DiscountType"} - "basis_points": - type: "integer" - title: "Basis Points" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "name": - type: "string" - title: "Name" - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - - type: "null" - title: "Max Redemptions" - description: "Maximum number of times the discount can be redeemed." - "redemptions_count": - type: "integer" - title: "Redemptions Count" - description: "Number of times the discount has been redeemed." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "products": - type: "array" - items: {"$ref": "#/components/schemas/DiscountProduct"} - title: "Products" - title: "DiscountPercentageOnceForeverDuration" - required: - - "duration" - - "type" - - "basis_points" - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "name" - - "code" - - "starts_at" - - "ends_at" - - "max_redemptions" - - "redemptions_count" - - "organization_id" - - "products" - description: "Schema for a percentage discount that is applied once or forever." - "DiscountPercentageOnceForeverDurationBase": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "type": {"$ref": "#/components/schemas/DiscountType"} - "basis_points": - type: "integer" - title: "Basis Points" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "name": - type: "string" - title: "Name" - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - - type: "null" - title: "Max Redemptions" - description: "Maximum number of times the discount can be redeemed." - "redemptions_count": - type: "integer" - title: "Redemptions Count" - description: "Number of times the discount has been redeemed." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - title: "DiscountPercentageOnceForeverDurationBase" - required: - - "duration" - - "type" - - "basis_points" - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "name" - - "code" - - "starts_at" - - "ends_at" - - "max_redemptions" - - "redemptions_count" - - "organization_id" - "DiscountPercentageOnceForeverDurationCreate": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "type": {"$ref": "#/components/schemas/DiscountType", "description": "Type of the discount."} - "basis_points": - type: "integer" - title: "Basis Points" - maximum: 10000 - minimum: 1 - description: "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550." - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "name": - type: "string" - title: "Name" - minLength: 1 - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Optional timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Optional timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - minimum: 1 - - type: "null" - title: "Max Redemptions" - description: "Optional maximum number of times the discount can be redeemed." - "products": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - description: "List of product IDs the discount can be applied to." - - type: "null" - title: "Products" - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the discount. **Required unless you use an organization token.**" - title: "DiscountPercentageOnceForeverDurationCreate" - required: - - "duration" - - "type" - - "basis_points" - - "name" - description: "Schema to create a percentage discount that is applied once or forever." - "DiscountPercentageRepeatDuration": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "duration_in_months": - type: "integer" - title: "Duration In Months" - "type": {"$ref": "#/components/schemas/DiscountType"} - "basis_points": - type: "integer" - title: "Basis Points" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "name": - type: "string" - title: "Name" - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - - type: "null" - title: "Max Redemptions" - description: "Maximum number of times the discount can be redeemed." - "redemptions_count": - type: "integer" - title: "Redemptions Count" - description: "Number of times the discount has been redeemed." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "products": - type: "array" - items: {"$ref": "#/components/schemas/DiscountProduct"} - title: "Products" - title: "DiscountPercentageRepeatDuration" - required: - - "duration" - - "duration_in_months" - - "type" - - "basis_points" - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "name" - - "code" - - "starts_at" - - "ends_at" - - "max_redemptions" - - "redemptions_count" - - "organization_id" - - "products" - description: "Schema for a percentage discount that is applied on every invoice\nfor a certain number of months." - "DiscountPercentageRepeatDurationBase": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "duration_in_months": - type: "integer" - title: "Duration In Months" - "type": {"$ref": "#/components/schemas/DiscountType"} - "basis_points": - type: "integer" - title: "Basis Points" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "name": - type: "string" - title: "Name" - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - - type: "null" - title: "Max Redemptions" - description: "Maximum number of times the discount can be redeemed." - "redemptions_count": - type: "integer" - title: "Redemptions Count" - description: "Number of times the discount has been redeemed." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - title: "DiscountPercentageRepeatDurationBase" - required: - - "duration" - - "duration_in_months" - - "type" - - "basis_points" - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "name" - - "code" - - "starts_at" - - "ends_at" - - "max_redemptions" - - "redemptions_count" - - "organization_id" - "DiscountPercentageRepeatDurationCreate": - type: "object" - properties: - "duration": {"$ref": "#/components/schemas/DiscountDuration"} - "duration_in_months": - type: "integer" - title: "Duration In Months" - minimum: 1 - description: "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24." - "type": {"$ref": "#/components/schemas/DiscountType", "description": "Type of the discount."} - "basis_points": - type: "integer" - title: "Basis Points" - maximum: 10000 - minimum: 1 - description: "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550." - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "name": - type: "string" - title: "Name" - minLength: 1 - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - "code": - anyOf: - - type: "string" - - type: "null" - title: "Code" - description: "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - "starts_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Starts At" - description: "Optional timestamp after which the discount is redeemable." - "ends_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ends At" - description: "Optional timestamp after which the discount is no longer redeemable." - "max_redemptions": - anyOf: - - type: "integer" - minimum: 1 - - type: "null" - title: "Max Redemptions" - description: "Optional maximum number of times the discount can be redeemed." - "products": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - description: "List of product IDs the discount can be applied to." - - type: "null" - title: "Products" - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the discount. **Required unless you use an organization token.**" - title: "DiscountPercentageRepeatDurationCreate" - required: - - "duration" - - "duration_in_months" - - "type" - - "basis_points" - - "name" - description: "Schema to create a percentage discount that is applied on every invoice\nfor a certain number of months." - "DiscountProduct": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the product." - "name": - type: "string" - title: "Name" - description: "The name of the product." - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "is_recurring": - type: "boolean" - title: "Is Recurring" - description: "Whether the product is a subscription tier." - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the product is archived and no longer available." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the product." - title: "DiscountProduct" - required: - - "created_at" - - "modified_at" - - "id" - - "name" - - "description" - - "is_recurring" - - "is_archived" - - "organization_id" - description: "A product that a discount can be applied to." - "DiscountSortProperty": - type: "string" - title: "DiscountSortProperty" - enum: - - "created_at" - - "-created_at" - - "name" - - "-name" - - "code" - - "-code" - - "redemptions_count" - - "-redemptions_count" - "DiscountType": - type: "string" - title: "DiscountType" - enum: - - "fixed" - - "percentage" - "DiscountUpdate": - type: "object" - properties: - "metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Metadata" - "name": - anyOf: - - type: "string" - minLength: 1 - description: "Name of the discount. Will be displayed to the customer when the discount is applied." - - type: "null" - title: "Name" - "code": - anyOf: - - anyOf: - - type: "string" - - type: "null" - description: "Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API." - - type: "null" - title: "Code" - "starts_at": - anyOf: - - anyOf: - - type: "string" - format: "date-time" - - type: "null" - description: "Optional timestamp after which the discount is redeemable." - - type: "null" - title: "Starts At" - "ends_at": - anyOf: - - anyOf: - - type: "string" - format: "date-time" - - type: "null" - description: "Optional timestamp after which the discount is no longer redeemable." - - type: "null" - title: "Ends At" - "max_redemptions": - anyOf: - - anyOf: - - type: "integer" - minimum: 1 - - type: "null" - description: "Optional maximum number of times the discount can be redeemed." - - type: "null" - title: "Max Redemptions" - "duration": - anyOf: - - {"$ref": "#/components/schemas/DiscountDuration"} - - type: "null" - "duration_in_months": - anyOf: - - type: "integer" - minimum: 1 - description: "Number of months the discount should be applied.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24." - - type: "null" - title: "Duration In Months" - "type": - anyOf: - - {"$ref": "#/components/schemas/DiscountType"} - - type: "null" - "amount": - anyOf: - - type: "integer" - minimum: 0 - description: "Fixed amount to discount from the invoice total." - - type: "null" - title: "Amount" - "currency": - anyOf: - - type: "string" - pattern: "usd" - description: "The currency. Currently, only `usd` is supported." - default: "usd" - - type: "null" - title: "Currency" - "basis_points": - anyOf: - - type: "integer" - maximum: 10000 - minimum: 1 - description: "Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550." - - type: "null" - title: "Basis Points" - "products": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - description: "List of product IDs the discount can be applied to." - - type: "null" - title: "Products" - title: "DiscountUpdate" - description: "Schema to update a discount." - "DownloadableFileCreate": - type: "object" - properties: - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - "name": - type: "string" - title: "Name" - "mime_type": - type: "string" - title: "Mime Type" - "size": - type: "integer" - title: "Size" - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - "upload": {"$ref": "#/components/schemas/S3FileCreateMultipart"} - "service": - type: "string" - title: "Service" - enum: - - "downloadable" - const: "downloadable" - "version": - anyOf: - - type: "string" - - type: "null" - title: "Version" - title: "DownloadableFileCreate" - required: - - "name" - - "mime_type" - - "size" - - "upload" - - "service" - description: "Schema to create a file to be associated with the downloadables benefit." - "DownloadableFileRead": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "name": - type: "string" - title: "Name" - "path": - type: "string" - title: "Path" - "mime_type": - type: "string" - title: "Mime Type" - "size": - type: "integer" - title: "Size" - "storage_version": - anyOf: - - type: "string" - - type: "null" - title: "Storage Version" - "checksum_etag": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Etag" - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - "checksum_sha256_hex": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Hex" - "last_modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Last Modified At" - "version": - anyOf: - - type: "string" - - type: "null" - title: "Version" - "service": - type: "string" - title: "Service" - enum: - - "downloadable" - const: "downloadable" - "is_uploaded": - type: "boolean" - title: "Is Uploaded" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - "size_readable": - type: "string" - title: "Size Readable" - readOnly: true - title: "DownloadableFileRead" - required: - - "id" - - "organization_id" - - "name" - - "path" - - "mime_type" - - "size" - - "storage_version" - - "checksum_etag" - - "checksum_sha256_base64" - - "checksum_sha256_hex" - - "last_modified_at" - - "version" - - "service" - - "is_uploaded" - - "created_at" - - "size_readable" - description: "File to be associated with the downloadables benefit." - "DownloadableRead": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - "file": {"$ref": "#/components/schemas/FileDownload"} - title: "DownloadableRead" - required: - - "id" - - "benefit_id" - - "file" - "ExistingProductPrice": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - title: "ExistingProductPrice" - required: - - "id" - description: "A price that already exists for this product.\n\nUseful when updating a product if you want to keep an existing price." - "ExternalOrganization": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid" - "platform": {"$ref": "#/components/schemas/Platforms"} - "name": - type: "string" - title: "Name" - "avatar_url": - type: "string" - title: "Avatar Url" - "is_personal": - type: "boolean" - title: "Is Personal" - "bio": - anyOf: - - type: "string" - - type: "null" - title: "Bio" - "pretty_name": - anyOf: - - type: "string" - - type: "null" - title: "Pretty Name" - "company": - anyOf: - - type: "string" - - type: "null" - title: "Company" - "blog": - anyOf: - - type: "string" - - type: "null" - title: "Blog" - "location": - anyOf: - - type: "string" - - type: "null" - title: "Location" - "email": - anyOf: - - type: "string" - - type: "null" - title: "Email" - "twitter_username": - anyOf: - - type: "string" - - type: "null" - title: "Twitter Username" - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - title: "ExternalOrganization" - required: - - "id" - - "platform" - - "name" - - "avatar_url" - - "is_personal" - - "bio" - - "pretty_name" - - "company" - - "blog" - - "location" - - "email" - - "twitter_username" - - "organization_id" - "ExternalOrganizationSortProperty": - type: "string" - title: "ExternalOrganizationSortProperty" - enum: - - "created_at" - - "-created_at" - - "name" - - "-name" - "FileCreate": - oneOf: - - {"$ref": "#/components/schemas/DownloadableFileCreate"} - - {"$ref": "#/components/schemas/ProductMediaFileCreate"} - - {"$ref": "#/components/schemas/OrganizationAvatarFileCreate"} - discriminator: - propertyName: "service" - mapping: - "downloadable": "#/components/schemas/DownloadableFileCreate" - "organization_avatar": "#/components/schemas/OrganizationAvatarFileCreate" - "product_media": "#/components/schemas/ProductMediaFileCreate" - "FileDownload": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "name": - type: "string" - title: "Name" - "path": - type: "string" - title: "Path" - "mime_type": - type: "string" - title: "Mime Type" - "size": - type: "integer" - title: "Size" - "storage_version": - anyOf: - - type: "string" - - type: "null" - title: "Storage Version" - "checksum_etag": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Etag" - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - "checksum_sha256_hex": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Hex" - "last_modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Last Modified At" - "download": {"$ref": "#/components/schemas/S3DownloadURL"} - "version": - anyOf: - - type: "string" - - type: "null" - title: "Version" - "is_uploaded": - type: "boolean" - title: "Is Uploaded" - "service": {"$ref": "#/components/schemas/FileServiceTypes"} - "size_readable": - type: "string" - title: "Size Readable" - readOnly: true - title: "FileDownload" - required: - - "id" - - "organization_id" - - "name" - - "path" - - "mime_type" - - "size" - - "storage_version" - - "checksum_etag" - - "checksum_sha256_base64" - - "checksum_sha256_hex" - - "last_modified_at" - - "download" - - "version" - - "is_uploaded" - - "service" - - "size_readable" - "FilePatch": - type: "object" - properties: - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - "version": - anyOf: - - type: "string" - - type: "null" - title: "Version" - title: "FilePatch" - "FileServiceTypes": - type: "string" - title: "FileServiceTypes" - enum: - - "downloadable" - - "product_media" - - "organization_avatar" - "FileUpload": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "name": - type: "string" - title: "Name" - "path": - type: "string" - title: "Path" - "mime_type": - type: "string" - title: "Mime Type" - "size": - type: "integer" - title: "Size" - "storage_version": - anyOf: - - type: "string" - - type: "null" - title: "Storage Version" - "checksum_etag": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Etag" - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - "checksum_sha256_hex": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Hex" - "last_modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Last Modified At" - "upload": {"$ref": "#/components/schemas/S3FileUploadMultipart"} - "version": - anyOf: - - type: "string" - - type: "null" - title: "Version" - "is_uploaded": - type: "boolean" - title: "Is Uploaded" - default: false - "service": {"$ref": "#/components/schemas/FileServiceTypes"} - "size_readable": - type: "string" - title: "Size Readable" - readOnly: true - title: "FileUpload" - required: - - "id" - - "organization_id" - - "name" - - "path" - - "mime_type" - - "size" - - "storage_version" - - "checksum_etag" - - "checksum_sha256_base64" - - "checksum_sha256_hex" - - "last_modified_at" - - "upload" - - "version" - - "service" - - "size_readable" - "FileUploadCompleted": - type: "object" - properties: - "id": - type: "string" - title: "Id" - "path": - type: "string" - title: "Path" - "parts": - type: "array" - items: {"$ref": "#/components/schemas/S3FileUploadCompletedPart"} - title: "Parts" - title: "FileUploadCompleted" - required: - - "id" - - "path" - - "parts" - "Funding": - type: "object" - properties: - "funding_goal": - anyOf: - - {"$ref": "#/components/schemas/CurrencyAmount"} - - type: "null" - "pledges_sum": - anyOf: - - {"$ref": "#/components/schemas/CurrencyAmount"} - - type: "null" - description: "Sum of pledges to this isuse (including currently open pledges and pledges that have been paid out). Always in USD." - title: "Funding" - "HTTPValidationError": - type: "object" - properties: - "detail": - type: "array" - items: {"$ref": "#/components/schemas/ValidationError"} - title: "Detail" - title: "HTTPValidationError" - "Interval": - type: "string" - title: "Interval" - enum: - - "year" - - "month" - - "week" - - "day" - - "hour" - "IntrospectTokenResponse": - type: "object" - properties: - "active": - type: "boolean" - title: "Active" - "client_id": - type: "string" - title: "Client Id" - "token_type": - type: "string" - title: "Token Type" - enum: - - "access_token" - - "refresh_token" - "scope": - type: "string" - title: "Scope" - "sub_type": {"$ref": "#/components/schemas/SubType"} - "sub": - type: "string" - title: "Sub" - "aud": - type: "string" - title: "Aud" - "iss": - type: "string" - title: "Iss" - "exp": - type: "integer" - title: "Exp" - "iat": - type: "integer" - title: "Iat" - title: "IntrospectTokenResponse" - required: - - "active" - - "client_id" - - "token_type" - - "scope" - - "sub_type" - - "sub" - - "aud" - - "iss" - - "exp" - - "iat" - "Issue": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid" - "platform": {"$ref": "#/components/schemas/Platforms", "description": "Issue platform (currently always GitHub)"} - "number": - type: "integer" - title: "Number" - description: "GitHub #number" - "title": - type: "string" - title: "Title" - description: "GitHub issue title" - "body": - anyOf: - - type: "string" - - type: "null" - title: "Body" - description: "GitHub issue body" - "comments": - anyOf: - - type: "integer" - - type: "null" - title: "Comments" - description: "Number of GitHub comments made on the issue" - "labels": - type: "array" - items: {"$ref": "#/components/schemas/Label"} - title: "Labels" - default: [] - "author": - anyOf: - - {"$ref": "#/components/schemas/Author"} - - type: "null" - description: "GitHub author" - "assignees": - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/Assignee"} - - type: "null" - title: "Assignees" - description: "GitHub assignees" - "reactions": - anyOf: - - {"$ref": "#/components/schemas/Reactions"} - - type: "null" - description: "GitHub reactions" - "state": {"$ref": "#/components/schemas/State"} - "issue_closed_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Issue Closed At" - "issue_modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Issue Modified At" - "issue_created_at": - type: "string" - title: "Issue Created At" - format: "date-time" - "needs_confirmation_solved": - type: "boolean" - title: "Needs Confirmation Solved" - description: "If a maintainer needs to mark this issue as solved" - "confirmed_solved_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Confirmed Solved At" - description: "If this issue has been marked as confirmed solved through Polar" - "funding": {"$ref": "#/components/schemas/Funding"} - "repository": {"$ref": "#/components/schemas/Repository", "description": "The repository that the issue is in"} - "upfront_split_to_contributors": - anyOf: - - type: "integer" - - type: "null" - title: "Upfront Split To Contributors" - description: "Share of rewrads that will be rewarded to contributors of this issue. A number between 0 and 100 (inclusive)." - "pledge_badge_currently_embedded": - type: "boolean" - title: "Pledge Badge Currently Embedded" - description: "If this issue currently has the Polar badge SVG embedded" - "badge_custom_content": - anyOf: - - type: "string" - - type: "null" - title: "Badge Custom Content" - description: "Optional custom badge SVG promotional content" - title: "Issue" - required: - - "id" - - "platform" - - "number" - - "title" - - "state" - - "issue_created_at" - - "needs_confirmation_solved" - - "funding" - - "repository" - - "pledge_badge_currently_embedded" - "Label": - type: "object" - properties: - "name": - type: "string" - title: "Name" - "color": - type: "string" - title: "Color" - title: "Label" - required: - - "name" - - "color" - "LicenseKeyActivate": - type: "object" - properties: - "key": - type: "string" - title: "Key" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "label": - type: "string" - title: "Label" - "conditions": - type: "object" - title: "Conditions" - default: {} - "meta": - type: "object" - title: "Meta" - default: {} - title: "LicenseKeyActivate" - required: - - "key" - - "organization_id" - - "label" - "LicenseKeyActivationBase": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "license_key_id": - type: "string" - title: "License Key Id" - format: "uuid4" - "label": - type: "string" - title: "Label" - "meta": - type: "object" - title: "Meta" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - title: "LicenseKeyActivationBase" - required: - - "id" - - "license_key_id" - - "label" - - "meta" - - "created_at" - - "modified_at" - "LicenseKeyActivationRead": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "license_key_id": - type: "string" - title: "License Key Id" - format: "uuid4" - "label": - type: "string" - title: "Label" - "meta": - type: "object" - title: "Meta" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - "license_key": {"$ref": "#/components/schemas/LicenseKeyRead"} - title: "LicenseKeyActivationRead" - required: - - "id" - - "license_key_id" - - "label" - - "meta" - - "created_at" - - "modified_at" - - "license_key" - "LicenseKeyCustomer": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "email": - type: "string" - title: "Email" - "email_verified": - type: "boolean" - title: "Email Verified" - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - "billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address"} - - type: "null" - "tax_id": - anyOf: - - type: "array" - prefixItems: - - type: "string" - - {"$ref": "#/components/schemas/TaxIDFormat"} - maxItems: 2 - minItems: 2 - - type: "null" - title: "Tax Id" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "avatar_url": - type: "string" - title: "Avatar Url" - readOnly: true - title: "LicenseKeyCustomer" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "email" - - "email_verified" - - "name" - - "billing_address" - - "tax_id" - - "organization_id" - - "avatar_url" - "LicenseKeyDeactivate": - type: "object" - properties: - "key": - type: "string" - title: "Key" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "activation_id": - type: "string" - title: "Activation Id" - format: "uuid4" - title: "LicenseKeyDeactivate" - required: - - "key" - - "organization_id" - - "activation_id" - "LicenseKeyRead": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "user": {"$ref": "#/components/schemas/LicenseKeyUser", "deprecated": true} - "customer": {"$ref": "#/components/schemas/LicenseKeyCustomer"} - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"displayProperty": "description", "resourceName": "Benefit", "resourceRoot": "/v1/benefits"} - "key": - type: "string" - title: "Key" - "display_key": - type: "string" - title: "Display Key" - "status": {"$ref": "#/components/schemas/LicenseKeyStatus"} - "limit_activations": - anyOf: - - type: "integer" - - type: "null" - title: "Limit Activations" - "usage": - type: "integer" - title: "Usage" - "limit_usage": - anyOf: - - type: "integer" - - type: "null" - title: "Limit Usage" - "validations": - type: "integer" - title: "Validations" - "last_validated_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Last Validated At" - "expires_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Expires At" - title: "LicenseKeyRead" - required: - - "id" - - "organization_id" - - "user_id" - - "customer_id" - - "user" - - "customer" - - "benefit_id" - - "key" - - "display_key" - - "status" - - "limit_activations" - - "usage" - - "limit_usage" - - "validations" - - "last_validated_at" - - "expires_at" - "LicenseKeyStatus": - type: "string" - title: "LicenseKeyStatus" - enum: - - "granted" - - "revoked" - - "disabled" - "LicenseKeyUpdate": - type: "object" - properties: - "status": - anyOf: - - {"$ref": "#/components/schemas/LicenseKeyStatus"} - - type: "null" - "usage": - type: "integer" - title: "Usage" - default: 0 - "limit_activations": - anyOf: - - exclusiveMinimum: 0 - type: "integer" - maximum: 50 - - type: "null" - title: "Limit Activations" - "limit_usage": - anyOf: - - exclusiveMinimum: 0 - type: "integer" - - type: "null" - title: "Limit Usage" - "expires_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Expires At" - title: "LicenseKeyUpdate" - "LicenseKeyUser": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "email": - type: "string" - title: "Email" - "public_name": - type: "string" - title: "Public Name" - "avatar_url": - anyOf: - - type: "string" - - type: "null" - title: "Avatar Url" - title: "LicenseKeyUser" - required: - - "id" - - "email" - - "public_name" - "LicenseKeyValidate": - type: "object" - properties: - "key": - type: "string" - title: "Key" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "activation_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Activation Id" - "benefit_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"displayProperty": "description", "resourceName": "Benefit", "resourceRoot": "/v1/benefits"} - - type: "null" - title: "Benefit Id" - "customer_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Customer Id" - "increment_usage": - anyOf: - - type: "integer" - - type: "null" - title: "Increment Usage" - "conditions": - type: "object" - title: "Conditions" - default: {} - title: "LicenseKeyValidate" - required: - - "key" - - "organization_id" - "LicenseKeyWithActivations": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "user": {"$ref": "#/components/schemas/LicenseKeyUser", "deprecated": true} - "customer": {"$ref": "#/components/schemas/LicenseKeyCustomer"} - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"displayProperty": "description", "resourceName": "Benefit", "resourceRoot": "/v1/benefits"} - "key": - type: "string" - title: "Key" - "display_key": - type: "string" - title: "Display Key" - "status": {"$ref": "#/components/schemas/LicenseKeyStatus"} - "limit_activations": - anyOf: - - type: "integer" - - type: "null" - title: "Limit Activations" - "usage": - type: "integer" - title: "Usage" - "limit_usage": - anyOf: - - type: "integer" - - type: "null" - title: "Limit Usage" - "validations": - type: "integer" - title: "Validations" - "last_validated_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Last Validated At" - "expires_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Expires At" - "activations": - type: "array" - items: {"$ref": "#/components/schemas/LicenseKeyActivationBase"} - title: "Activations" - title: "LicenseKeyWithActivations" - required: - - "id" - - "organization_id" - - "user_id" - - "customer_id" - - "user" - - "customer" - - "benefit_id" - - "key" - - "display_key" - - "status" - - "limit_activations" - - "usage" - - "limit_usage" - - "validations" - - "last_validated_at" - - "expires_at" - - "activations" - "ListResource_BenefitGrant_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/BenefitGrant"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[BenefitGrant]" - required: - - "items" - - "pagination" - "ListResource_Benefit_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/Benefit", "title": "Benefit"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[Benefit]" - required: - - "items" - - "pagination" - "ListResource_CheckoutLink_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/CheckoutLink"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[CheckoutLink]" - required: - - "items" - - "pagination" - "ListResource_Checkout_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/Checkout"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[Checkout]" - required: - - "items" - - "pagination" - "ListResource_CustomField_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/CustomField", "title": "CustomField"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[CustomField]" - required: - - "items" - - "pagination" - "ListResource_CustomerBenefitGrant_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/CustomerBenefitGrant", "title": "CustomerBenefitGrant"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[CustomerBenefitGrant]" - required: - - "items" - - "pagination" - "ListResource_CustomerOrder_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/CustomerOrder"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[CustomerOrder]" - required: - - "items" - - "pagination" - "ListResource_CustomerSubscription_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/CustomerSubscription"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[CustomerSubscription]" - required: - - "items" - - "pagination" - "ListResource_Customer_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/Customer"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[Customer]" - required: - - "items" - - "pagination" - "ListResource_Discount_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/Discount", "title": "Discount"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[Discount]" - required: - - "items" - - "pagination" - "ListResource_DownloadableRead_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/DownloadableRead"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[DownloadableRead]" - required: - - "items" - - "pagination" - "ListResource_ExternalOrganization_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/ExternalOrganization"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[ExternalOrganization]" - required: - - "items" - - "pagination" - "ListResource_FileRead_": - type: "object" - properties: - "items": - type: "array" - items: - oneOf: - - {"$ref": "#/components/schemas/DownloadableFileRead"} - - {"$ref": "#/components/schemas/ProductMediaFileRead"} - - {"$ref": "#/components/schemas/OrganizationAvatarFileRead"} - discriminator: - propertyName: "service" - mapping: - "downloadable": "#/components/schemas/DownloadableFileRead" - "organization_avatar": "#/components/schemas/OrganizationAvatarFileRead" - "product_media": "#/components/schemas/ProductMediaFileRead" - title: "FileRead" - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[FileRead]" - required: - - "items" - - "pagination" - "ListResource_LicenseKeyRead_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/LicenseKeyRead"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[LicenseKeyRead]" - required: - - "items" - - "pagination" - "ListResource_OAuth2Client_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/OAuth2Client"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[OAuth2Client]" - required: - - "items" - - "pagination" - "ListResource_Order_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/Order"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[Order]" - required: - - "items" - - "pagination" - "ListResource_Organization_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/Organization"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[Organization]" - required: - - "items" - - "pagination" - "ListResource_Product_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/Product"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[Product]" - required: - - "items" - - "pagination" - "ListResource_Repository_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/Repository"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[Repository]" - required: - - "items" - - "pagination" - "ListResource_Subscription_": - type: "object" - properties: - "items": - type: "array" - items: {"$ref": "#/components/schemas/Subscription"} - title: "Items" - "pagination": {"$ref": "#/components/schemas/Pagination"} - title: "ListResource[Subscription]" - required: - - "items" - - "pagination" - "Metric": - type: "object" - properties: - "slug": - type: "string" - title: "Slug" - description: "Unique identifier for the metric." - "display_name": - type: "string" - title: "Display Name" - description: "Human-readable name for the metric." - "type": {"$ref": "#/components/schemas/MetricType", "description": "Type of the metric, useful to know the unit or format of the value."} - title: "Metric" - required: - - "slug" - - "display_name" - - "type" - description: "Information about a metric." - "MetricPeriod": - type: "object" - properties: - "timestamp": - type: "string" - title: "Timestamp" - format: "date-time" - description: "Timestamp of this period data." - "orders": - type: "integer" - title: "Orders" - "revenue": - type: "integer" - title: "Revenue" - "average_order_value": - type: "integer" - title: "Average Order Value" - "one_time_products": - type: "integer" - title: "One Time Products" - "one_time_products_revenue": - type: "integer" - title: "One Time Products Revenue" - "new_subscriptions": - type: "integer" - title: "New Subscriptions" - "new_subscriptions_revenue": - type: "integer" - title: "New Subscriptions Revenue" - "renewed_subscriptions": - type: "integer" - title: "Renewed Subscriptions" - "renewed_subscriptions_revenue": - type: "integer" - title: "Renewed Subscriptions Revenue" - "active_subscriptions": - type: "integer" - title: "Active Subscriptions" - "monthly_recurring_revenue": - type: "integer" - title: "Monthly Recurring Revenue" - title: "MetricPeriod" - required: - - "timestamp" - - "orders" - - "revenue" - - "average_order_value" - - "one_time_products" - - "one_time_products_revenue" - - "new_subscriptions" - - "new_subscriptions_revenue" - - "renewed_subscriptions" - - "renewed_subscriptions_revenue" - - "active_subscriptions" - - "monthly_recurring_revenue" - "MetricType": - type: "string" - title: "MetricType" - enum: - - "scalar" - - "currency" - "Metrics": - type: "object" - properties: - "orders": {"$ref": "#/components/schemas/Metric"} - "revenue": {"$ref": "#/components/schemas/Metric"} - "average_order_value": {"$ref": "#/components/schemas/Metric"} - "one_time_products": {"$ref": "#/components/schemas/Metric"} - "one_time_products_revenue": {"$ref": "#/components/schemas/Metric"} - "new_subscriptions": {"$ref": "#/components/schemas/Metric"} - "new_subscriptions_revenue": {"$ref": "#/components/schemas/Metric"} - "renewed_subscriptions": {"$ref": "#/components/schemas/Metric"} - "renewed_subscriptions_revenue": {"$ref": "#/components/schemas/Metric"} - "active_subscriptions": {"$ref": "#/components/schemas/Metric"} - "monthly_recurring_revenue": {"$ref": "#/components/schemas/Metric"} - title: "Metrics" - required: - - "orders" - - "revenue" - - "average_order_value" - - "one_time_products" - - "one_time_products_revenue" - - "new_subscriptions" - - "new_subscriptions_revenue" - - "renewed_subscriptions" - - "renewed_subscriptions_revenue" - - "active_subscriptions" - - "monthly_recurring_revenue" - "MetricsIntervalLimit": - type: "object" - properties: - "max_days": - type: "integer" - title: "Max Days" - description: "Maximum number of days for this interval." - title: "MetricsIntervalLimit" - required: - - "max_days" - description: "Date interval limit to get metrics for a given interval." - "MetricsIntervalsLimits": - type: "object" - properties: - "hour": {"$ref": "#/components/schemas/MetricsIntervalLimit", "description": "Limits for the hour interval."} - "day": {"$ref": "#/components/schemas/MetricsIntervalLimit", "description": "Limits for the day interval."} - "week": {"$ref": "#/components/schemas/MetricsIntervalLimit", "description": "Limits for the week interval."} - "month": {"$ref": "#/components/schemas/MetricsIntervalLimit", "description": "Limits for the month interval."} - "year": {"$ref": "#/components/schemas/MetricsIntervalLimit", "description": "Limits for the year interval."} - title: "MetricsIntervalsLimits" - required: - - "hour" - - "day" - - "week" - - "month" - - "year" - description: "Date interval limits to get metrics for each interval." - "MetricsLimits": - type: "object" - properties: - "min_date": - type: "string" - title: "Min Date" - format: "date" - description: "Minimum date to get metrics." - "intervals": {"$ref": "#/components/schemas/MetricsIntervalsLimits", "description": "Limits for each interval."} - title: "MetricsLimits" - required: - - "min_date" - - "intervals" - description: "Date limits to get metrics." - "MetricsResponse": - type: "object" - properties: - "periods": - type: "array" - items: {"$ref": "#/components/schemas/MetricPeriod"} - title: "Periods" - description: "List of data for each timestamp." - "metrics": {"$ref": "#/components/schemas/Metrics", "description": "Information about the returned metrics."} - title: "MetricsResponse" - required: - - "periods" - - "metrics" - description: "Metrics response schema." - "NotPermitted": - type: "object" - properties: - "error": - type: "string" - title: "Error" - enum: - - "NotPermitted" - const: "NotPermitted" - "detail": - type: "string" - title: "Detail" - title: "NotPermitted" - required: - - "error" - - "detail" - "OAuth2Client": - type: "object" - properties: - "redirect_uris": - type: "array" - items: - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - title: "Redirect Uris" - "token_endpoint_auth_method": - type: "string" - title: "Token Endpoint Auth Method" - enum: - - "client_secret_basic" - - "client_secret_post" - - "none" - default: "client_secret_post" - "grant_types": - type: "array" - items: - type: "string" - enum: - - "authorization_code" - - "refresh_token" - title: "Grant Types" - default: ["authorization_code", "refresh_token"] - "response_types": - type: "array" - items: - type: "string" - enum: - - "code" - const: "code" - title: "Response Types" - default: ["code"] - "scope": - type: "string" - title: "Scope" - default: "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write" - "client_name": - type: "string" - title: "Client Name" - "client_uri": - anyOf: - - type: "string" - - type: "null" - title: "Client Uri" - "logo_uri": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Logo Uri" - "tos_uri": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Tos Uri" - "policy_uri": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Policy Uri" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "client_id": - type: "string" - title: "Client Id" - "client_secret": - type: "string" - title: "Client Secret" - "client_id_issued_at": - type: "integer" - title: "Client Id Issued At" - "client_secret_expires_at": - type: "integer" - title: "Client Secret Expires At" - title: "OAuth2Client" - required: - - "redirect_uris" - - "client_name" - - "created_at" - - "modified_at" - - "client_id" - - "client_secret" - - "client_id_issued_at" - - "client_secret_expires_at" - "OAuth2ClientConfiguration": - type: "object" - properties: - "redirect_uris": - type: "array" - items: - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - title: "Redirect Uris" - "token_endpoint_auth_method": - type: "string" - title: "Token Endpoint Auth Method" - enum: - - "client_secret_basic" - - "client_secret_post" - - "none" - default: "client_secret_post" - "grant_types": - type: "array" - items: - type: "string" - enum: - - "authorization_code" - - "refresh_token" - title: "Grant Types" - default: ["authorization_code", "refresh_token"] - "response_types": - type: "array" - items: - type: "string" - enum: - - "code" - const: "code" - title: "Response Types" - default: ["code"] - "scope": - type: "string" - title: "Scope" - default: "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write" - "client_name": - type: "string" - title: "Client Name" - "client_uri": - anyOf: - - type: "string" - - type: "null" - title: "Client Uri" - "logo_uri": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Logo Uri" - "tos_uri": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Tos Uri" - "policy_uri": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Policy Uri" - title: "OAuth2ClientConfiguration" - required: - - "redirect_uris" - - "client_name" - "OAuth2ClientConfigurationUpdate": - type: "object" - properties: - "redirect_uris": - type: "array" - items: - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - title: "Redirect Uris" - "token_endpoint_auth_method": - type: "string" - title: "Token Endpoint Auth Method" - enum: - - "client_secret_basic" - - "client_secret_post" - - "none" - default: "client_secret_post" - "grant_types": - type: "array" - items: - type: "string" - enum: - - "authorization_code" - - "refresh_token" - title: "Grant Types" - default: ["authorization_code", "refresh_token"] - "response_types": - type: "array" - items: - type: "string" - enum: - - "code" - const: "code" - title: "Response Types" - default: ["code"] - "scope": - type: "string" - title: "Scope" - default: "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write" - "client_name": - type: "string" - title: "Client Name" - "client_uri": - anyOf: - - type: "string" - - type: "null" - title: "Client Uri" - "logo_uri": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Logo Uri" - "tos_uri": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Tos Uri" - "policy_uri": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Policy Uri" - "client_id": - type: "string" - title: "Client Id" - title: "OAuth2ClientConfigurationUpdate" - required: - - "redirect_uris" - - "client_name" - - "client_id" - "OAuth2ClientPublic": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "client_id": - type: "string" - title: "Client Id" - "client_name": - anyOf: - - type: "string" - - type: "null" - title: "Client Name" - "client_uri": - anyOf: - - type: "string" - - type: "null" - title: "Client Uri" - "logo_uri": - anyOf: - - type: "string" - - type: "null" - title: "Logo Uri" - "tos_uri": - anyOf: - - type: "string" - - type: "null" - title: "Tos Uri" - "policy_uri": - anyOf: - - type: "string" - - type: "null" - title: "Policy Uri" - title: "OAuth2ClientPublic" - required: - - "created_at" - - "modified_at" - - "client_id" - - "client_name" - - "client_uri" - - "logo_uri" - - "tos_uri" - - "policy_uri" - "Order": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "custom_field_data": - type: "object" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "amount": - type: "integer" - title: "Amount" - "tax_amount": - type: "integer" - title: "Tax Amount" - "currency": - type: "string" - title: "Currency" - "billing_reason": {"$ref": "#/components/schemas/OrderBillingReason"} - "billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address"} - - type: "null" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - "product_price_id": - type: "string" - title: "Product Price Id" - format: "uuid4" - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - "subscription_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Subscription Id" - "checkout_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Checkout Id" - "customer": {"$ref": "#/components/schemas/OrderCustomer"} - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - "user": {"$ref": "#/components/schemas/OrderUser", "deprecated": true} - "product": {"$ref": "#/components/schemas/OrderProduct"} - "product_price": {"$ref": "#/components/schemas/ProductPrice"} - "discount": - anyOf: - - oneOf: - - {"$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase"} - - {"$ref": "#/components/schemas/DiscountFixedRepeatDurationBase"} - - {"$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase"} - - {"$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase"} - title: "OrderDiscount" - - type: "null" - title: "Discount" - "subscription": - anyOf: - - {"$ref": "#/components/schemas/OrderSubscription"} - - type: "null" - title: "Order" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "amount" - - "tax_amount" - - "currency" - - "billing_reason" - - "billing_address" - - "customer_id" - - "product_id" - - "product_price_id" - - "discount_id" - - "subscription_id" - - "checkout_id" - - "customer" - - "user_id" - - "user" - - "product" - - "product_price" - - "discount" - - "subscription" - "OrderBillingReason": - type: "string" - title: "OrderBillingReason" - enum: - - "purchase" - - "subscription_create" - - "subscription_cycle" - - "subscription_update" - "OrderCustomer": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "email": - type: "string" - title: "Email" - "email_verified": - type: "boolean" - title: "Email Verified" - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - "billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address"} - - type: "null" - "tax_id": - anyOf: - - type: "array" - prefixItems: - - type: "string" - - {"$ref": "#/components/schemas/TaxIDFormat"} - maxItems: 2 - minItems: 2 - - type: "null" - title: "Tax Id" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "avatar_url": - type: "string" - title: "Avatar Url" - readOnly: true - title: "OrderCustomer" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "email" - - "email_verified" - - "name" - - "billing_address" - - "tax_id" - - "organization_id" - - "avatar_url" - "OrderInvoice": - type: "object" - properties: - "url": - type: "string" - title: "Url" - description: "The URL to the invoice." - title: "OrderInvoice" - required: - - "url" - description: "Order's invoice data." - "OrderProduct": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the product." - "name": - type: "string" - title: "Name" - description: "The name of the product." - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "is_recurring": - type: "boolean" - title: "Is Recurring" - description: "Whether the product is a subscription tier." - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the product is archived and no longer available." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the product." - title: "OrderProduct" - required: - - "created_at" - - "modified_at" - - "id" - - "name" - - "description" - - "is_recurring" - - "is_archived" - - "organization_id" - "OrderSortProperty": - type: "string" - title: "OrderSortProperty" - enum: - - "created_at" - - "-created_at" - - "amount" - - "-amount" - - "customer" - - "-customer" - - "product" - - "-product" - - "discount" - - "-discount" - - "subscription" - - "-subscription" - "OrderSubscription": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "amount": - anyOf: - - type: "integer" - - type: "null" - title: "Amount" - "currency": - anyOf: - - type: "string" - - type: "null" - title: "Currency" - "recurring_interval": {"$ref": "#/components/schemas/SubscriptionRecurringInterval"} - "status": {"$ref": "#/components/schemas/SubscriptionStatus"} - "current_period_start": - type: "string" - title: "Current Period Start" - format: "date-time" - "current_period_end": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Current Period End" - "cancel_at_period_end": - type: "boolean" - title: "Cancel At Period End" - "started_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Started At" - "ended_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ended At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - "price_id": - type: "string" - title: "Price Id" - format: "uuid4" - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - "checkout_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Checkout Id" - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - title: "OrderSubscription" - required: - - "metadata" - - "created_at" - - "modified_at" - - "id" - - "amount" - - "currency" - - "recurring_interval" - - "status" - - "current_period_start" - - "current_period_end" - - "cancel_at_period_end" - - "started_at" - - "ended_at" - - "customer_id" - - "product_id" - - "price_id" - - "discount_id" - - "checkout_id" - - "user_id" - "OrderUser": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "email": - type: "string" - title: "Email" - "public_name": - type: "string" - title: "Public Name" - "avatar_url": - anyOf: - - type: "string" - - type: "null" - title: "Avatar Url" - "github_username": - anyOf: - - type: "string" - - type: "null" - title: "Github Username" - title: "OrderUser" - required: - - "id" - - "email" - - "public_name" - "Organization": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - "name": - type: "string" - title: "Name" - "slug": - type: "string" - title: "Slug" - "avatar_url": - anyOf: - - type: "string" - - type: "null" - title: "Avatar Url" - "bio": - anyOf: - - type: "string" - - type: "null" - title: "Bio" - "company": - anyOf: - - type: "string" - - type: "null" - title: "Company" - "blog": - anyOf: - - type: "string" - - type: "null" - title: "Blog" - "location": - anyOf: - - type: "string" - - type: "null" - title: "Location" - "email": - anyOf: - - type: "string" - - type: "null" - title: "Email" - "twitter_username": - anyOf: - - type: "string" - - type: "null" - title: "Twitter Username" - "pledge_minimum_amount": - type: "integer" - title: "Pledge Minimum Amount" - "pledge_badge_show_amount": - type: "boolean" - title: "Pledge Badge Show Amount" - "default_upfront_split_to_contributors": - anyOf: - - type: "integer" - - type: "null" - title: "Default Upfront Split To Contributors" - "profile_settings": - anyOf: - - {"$ref": "#/components/schemas/OrganizationProfileSettings"} - - type: "null" - description: "Settings for the organization profile" - "feature_settings": - anyOf: - - {"$ref": "#/components/schemas/OrganizationFeatureSettings"} - - type: "null" - description: "Settings for the organization features" - title: "Organization" - required: - - "created_at" - - "modified_at" - - "id" - - "name" - - "slug" - - "avatar_url" - - "bio" - - "company" - - "blog" - - "location" - - "email" - - "twitter_username" - - "pledge_minimum_amount" - - "pledge_badge_show_amount" - - "default_upfront_split_to_contributors" - - "profile_settings" - - "feature_settings" - "OrganizationAvatarFileCreate": - type: "object" - properties: - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - "name": - type: "string" - title: "Name" - "mime_type": - type: "string" - title: "Mime Type" - pattern: "^image\\/(jpeg|png|gif|webp|svg\\+xml)$" - description: "MIME type of the file. Only images are supported for this type of file." - "size": - type: "integer" - title: "Size" - maximum: 1048576 - description: "Size of the file. A maximum of 1 MB is allowed for this type of file." - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - "upload": {"$ref": "#/components/schemas/S3FileCreateMultipart"} - "service": - type: "string" - title: "Service" - enum: - - "organization_avatar" - const: "organization_avatar" - "version": - anyOf: - - type: "string" - - type: "null" - title: "Version" - title: "OrganizationAvatarFileCreate" - required: - - "name" - - "mime_type" - - "size" - - "upload" - - "service" - description: "Schema to create a file to be used as an organization avatar." - "OrganizationAvatarFileRead": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "name": - type: "string" - title: "Name" - "path": - type: "string" - title: "Path" - "mime_type": - type: "string" - title: "Mime Type" - "size": - type: "integer" - title: "Size" - "storage_version": - anyOf: - - type: "string" - - type: "null" - title: "Storage Version" - "checksum_etag": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Etag" - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - "checksum_sha256_hex": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Hex" - "last_modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Last Modified At" - "version": - anyOf: - - type: "string" - - type: "null" - title: "Version" - "service": - type: "string" - title: "Service" - enum: - - "organization_avatar" - const: "organization_avatar" - "is_uploaded": - type: "boolean" - title: "Is Uploaded" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - "size_readable": - type: "string" - title: "Size Readable" - readOnly: true - "public_url": - type: "string" - title: "Public Url" - readOnly: true - title: "OrganizationAvatarFileRead" - required: - - "id" - - "organization_id" - - "name" - - "path" - - "mime_type" - - "size" - - "storage_version" - - "checksum_etag" - - "checksum_sha256_base64" - - "checksum_sha256_hex" - - "last_modified_at" - - "version" - - "service" - - "is_uploaded" - - "created_at" - - "size_readable" - - "public_url" - description: "File to be used as an organization avatar." - "OrganizationCreate": - type: "object" - properties: - "name": - type: "string" - title: "Name" - minLength: 3 - "slug": - type: "string" - title: "Slug" - minLength: 3 - "avatar_url": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Avatar Url" - "feature_settings": - anyOf: - - {"$ref": "#/components/schemas/OrganizationFeatureSettings"} - - type: "null" - title: "OrganizationCreate" - required: - - "name" - - "slug" - "OrganizationFeatureSettings": - type: "object" - properties: - "issue_funding_enabled": - type: "boolean" - title: "Issue Funding Enabled" - description: "If this organization has issue funding enabled" - default: false - title: "OrganizationFeatureSettings" - "OrganizationProfileSettings": - type: "object" - properties: - "enabled": - anyOf: - - type: "boolean" - - type: "null" - title: "Enabled" - description: "If this organization has a profile enabled" - "description": - anyOf: - - type: "string" - maxLength: 160 - - type: "null" - title: "Description" - description: "A description of the organization" - "featured_projects": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "Featured Projects" - description: "A list of featured projects" - "featured_organizations": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "Featured Organizations" - description: "A list of featured organizations" - "links": - anyOf: - - type: "array" - items: - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Links" - description: "A list of links associated with the organization" - "subscribe": - anyOf: - - {"$ref": "#/components/schemas/OrganizationSubscribePromoteSettings"} - - type: "null" - description: "Subscription promotion settings" - default: {"promote": true, "show_count": true, "count_free": true} - "accent_color": - anyOf: - - type: "string" - - type: "null" - title: "Accent Color" - description: "Accent color for the organization" - title: "OrganizationProfileSettings" - "OrganizationSortProperty": - type: "string" - title: "OrganizationSortProperty" - enum: - - "created_at" - - "-created_at" - - "name" - - "-name" - "OrganizationSubscribePromoteSettings": - type: "object" - properties: - "promote": - type: "boolean" - title: "Promote" - description: "Promote email subscription (free)" - default: true - "show_count": - type: "boolean" - title: "Show Count" - description: "Show subscription count publicly" - default: true - "count_free": - type: "boolean" - title: "Count Free" - description: "Include free subscribers in total count" - default: true - title: "OrganizationSubscribePromoteSettings" - "OrganizationUpdate": - type: "object" - properties: - "name": - anyOf: - - type: "string" - minLength: 3 - - type: "null" - title: "Name" - "avatar_url": - anyOf: - - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Avatar Url" - "default_upfront_split_to_contributors": - anyOf: - - type: "integer" - maximum: 100 - minimum: 0 - - type: "null" - title: "Default Upfront Split To Contributors" - "pledge_badge_show_amount": - type: "boolean" - title: "Pledge Badge Show Amount" - default: false - "billing_email": - anyOf: - - type: "string" - - type: "null" - title: "Billing Email" - "default_badge_custom_content": - anyOf: - - type: "string" - - type: "null" - title: "Default Badge Custom Content" - "pledge_minimum_amount": - type: "integer" - title: "Pledge Minimum Amount" - default: 2000 - "total_monthly_spending_limit": - anyOf: - - type: "integer" - - type: "null" - title: "Total Monthly Spending Limit" - "per_user_monthly_spending_limit": - anyOf: - - type: "integer" - - type: "null" - title: "Per User Monthly Spending Limit" - "profile_settings": - anyOf: - - {"$ref": "#/components/schemas/OrganizationProfileSettings"} - - type: "null" - "feature_settings": - anyOf: - - {"$ref": "#/components/schemas/OrganizationFeatureSettings"} - - type: "null" - title: "OrganizationUpdate" - "Pagination": - type: "object" - properties: - "total_count": - type: "integer" - title: "Total Count" - "max_page": - type: "integer" - title: "Max Page" - title: "Pagination" - required: - - "total_count" - - "max_page" - "PaymentProcessor": - type: "string" - title: "PaymentProcessor" - enum: - - "stripe" - const: "stripe" - "Platforms": - type: "string" - title: "Platforms" - enum: - - "github" - const: "github" - "Pledge": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "amount": - type: "integer" - title: "Amount" - description: "Amount pledged towards the issue" - "currency": - type: "string" - title: "Currency" - "state": {"$ref": "#/components/schemas/PledgeState", "description": "Current state of the pledge"} - "type": {"$ref": "#/components/schemas/PledgeType", "description": "Type of pledge"} - "refunded_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Refunded At" - description: "If and when the pledge was refunded to the pledger" - "scheduled_payout_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Scheduled Payout At" - description: "When the payout is scheduled to be made to the maintainers behind the issue. Disputes must be made before this date." - "issue": {"$ref": "#/components/schemas/Issue", "description": "The issue that the pledge was made towards"} - "pledger": - anyOf: - - {"$ref": "#/components/schemas/Pledger"} - - type: "null" - description: "The user or organization that made this pledge" - "hosted_invoice_url": - anyOf: - - type: "string" - - type: "null" - title: "Hosted Invoice Url" - description: "URL of invoice for this pledge" - "authed_can_admin_sender": - type: "boolean" - title: "Authed Can Admin Sender" - description: "If the currently authenticated subject can perform admin actions on behalf of the maker of the peldge" - default: false - "authed_can_admin_received": - type: "boolean" - title: "Authed Can Admin Received" - description: "If the currently authenticated subject can perform admin actions on behalf of the receiver of the peldge" - default: false - "created_by": - anyOf: - - {"$ref": "#/components/schemas/Pledger"} - - type: "null" - description: "For pledges made by an organization, or on behalf of an organization. This is the user that made the pledge. Only visible for members of said organization." - title: "Pledge" - required: - - "created_at" - - "modified_at" - - "id" - - "amount" - - "currency" - - "state" - - "type" - - "issue" - "PledgeState": - type: "string" - title: "PledgeState" - enum: - - "initiated" - - "created" - - "pending" - - "refunded" - - "disputed" - - "charge_disputed" - - "cancelled" - "PledgeType": - type: "string" - title: "PledgeType" - enum: - - "pay_upfront" - - "pay_on_completion" - - "pay_directly" - "Pledger": - type: "object" - properties: - "name": - type: "string" - title: "Name" - "github_username": - anyOf: - - type: "string" - - type: "null" - title: "Github Username" - "avatar_url": - anyOf: - - type: "string" - - type: "null" - title: "Avatar Url" - title: "Pledger" - required: - - "name" - - "github_username" - - "avatar_url" - "Product": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the product." - "name": - type: "string" - title: "Name" - description: "The name of the product." - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "is_recurring": - type: "boolean" - title: "Is Recurring" - description: "Whether the product is a subscription tier." - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the product is archived and no longer available." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - description: "The ID of the organization owning the product." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "prices": - type: "array" - items: {"$ref": "#/components/schemas/ProductPrice"} - title: "Prices" - description: "List of prices for this product." - "benefits": - type: "array" - items: {"$ref": "#/components/schemas/Benefit", "title": "Benefit"} - title: "Benefits" - description: "List of benefits granted by the product." - "medias": - type: "array" - items: {"$ref": "#/components/schemas/ProductMediaFileRead"} - title: "Medias" - description: "List of medias associated to the product." - "attached_custom_fields": - type: "array" - items: {"$ref": "#/components/schemas/AttachedCustomField"} - title: "Attached Custom Fields" - description: "List of custom fields attached to the product." - title: "Product" - required: - - "created_at" - - "modified_at" - - "id" - - "name" - - "description" - - "is_recurring" - - "is_archived" - - "organization_id" - - "metadata" - - "prices" - - "benefits" - - "medias" - - "attached_custom_fields" - description: "A product." - "ProductBenefitsUpdate": - type: "object" - properties: - "benefits": - type: "array" - items: - type: "string" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"displayProperty": "description", "resourceName": "Benefit", "resourceRoot": "/v1/benefits"} - title: "Benefits" - description: "List of benefit IDs. Each one must be on the same organization as the product." - title: "ProductBenefitsUpdate" - required: - - "benefits" - description: "Schema to update the benefits granted by a product." - "ProductCreate": - anyOf: - - {"$ref": "#/components/schemas/ProductRecurringCreate"} - - {"$ref": "#/components/schemas/ProductOneTimeCreate"} - "ProductMediaFileCreate": - type: "object" - properties: - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - "name": - type: "string" - title: "Name" - "mime_type": - type: "string" - title: "Mime Type" - pattern: "^image\\/(jpeg|png|gif|webp|svg\\+xml)$" - description: "MIME type of the file. Only images are supported for this type of file." - "size": - type: "integer" - title: "Size" - maximum: 10485760 - description: "Size of the file. A maximum of 10 MB is allowed for this type of file." - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - "upload": {"$ref": "#/components/schemas/S3FileCreateMultipart"} - "service": - type: "string" - title: "Service" - enum: - - "product_media" - const: "product_media" - "version": - anyOf: - - type: "string" - - type: "null" - title: "Version" - title: "ProductMediaFileCreate" - required: - - "name" - - "mime_type" - - "size" - - "upload" - - "service" - description: "Schema to create a file to be used as a product media file." - "ProductMediaFileRead": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "name": - type: "string" - title: "Name" - "path": - type: "string" - title: "Path" - "mime_type": - type: "string" - title: "Mime Type" - "size": - type: "integer" - title: "Size" - "storage_version": - anyOf: - - type: "string" - - type: "null" - title: "Storage Version" - "checksum_etag": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Etag" - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - "checksum_sha256_hex": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Hex" - "last_modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Last Modified At" - "version": - anyOf: - - type: "string" - - type: "null" - title: "Version" - "service": - type: "string" - title: "Service" - enum: - - "product_media" - const: "product_media" - "is_uploaded": - type: "boolean" - title: "Is Uploaded" - "created_at": - type: "string" - title: "Created At" - format: "date-time" - "size_readable": - type: "string" - title: "Size Readable" - readOnly: true - "public_url": - type: "string" - title: "Public Url" - readOnly: true - title: "ProductMediaFileRead" - required: - - "id" - - "organization_id" - - "name" - - "path" - - "mime_type" - - "size" - - "storage_version" - - "checksum_etag" - - "checksum_sha256_base64" - - "checksum_sha256_hex" - - "last_modified_at" - - "version" - - "service" - - "is_uploaded" - - "created_at" - - "size_readable" - - "public_url" - description: "File to be used as a product media file." - "ProductOneTimeCreate": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "name": - type: "string" - title: "Name" - minLength: 3 - description: "The name of the product." - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "prices": - type: "array" - items: - anyOf: - - {"$ref": "#/components/schemas/ProductPriceOneTimeFixedCreate"} - - {"$ref": "#/components/schemas/ProductPriceOneTimeCustomCreate"} - - {"$ref": "#/components/schemas/ProductPriceOneTimeFreeCreate"} - title: "ProductPriceOneTimeCreate" - maxItems: 1 - minItems: 1 - description: "List of available prices for this product." - "medias": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "Medias" - description: "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded." - "attached_custom_fields": - type: "array" - items: {"$ref": "#/components/schemas/AttachedCustomFieldCreate"} - title: "Attached Custom Fields" - description: "List of custom fields to attach." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the product. **Required unless you use an organization token.**" - title: "ProductOneTimeCreate" - required: - - "name" - - "prices" - description: "Schema to create a one-time product." - "ProductPrice": - oneOf: - - {"$ref": "#/components/schemas/ProductPriceRecurring"} - - {"$ref": "#/components/schemas/ProductPriceOneTime"} - discriminator: - propertyName: "type" - mapping: - "one_time": "#/components/schemas/ProductPriceOneTime" - "recurring": "#/components/schemas/ProductPriceRecurring" - "ProductPriceOneTime": - oneOf: - - {"$ref": "#/components/schemas/ProductPriceOneTimeFixed"} - - {"$ref": "#/components/schemas/ProductPriceOneTimeCustom"} - - {"$ref": "#/components/schemas/ProductPriceOneTimeFree"} - discriminator: - propertyName: "amount_type" - mapping: - "custom": "#/components/schemas/ProductPriceOneTimeCustom" - "fixed": "#/components/schemas/ProductPriceOneTimeFixed" - "free": "#/components/schemas/ProductPriceOneTimeFree" - "ProductPriceOneTimeCustom": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the price." - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "custom" - const: "custom" - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the price is archived and no longer available." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "The ID of the product owning the price." - "price_currency": - type: "string" - title: "Price Currency" - description: "The currency." - "minimum_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Minimum Amount" - description: "The minimum amount the customer can pay." - "maximum_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Maximum Amount" - description: "The maximum amount the customer can pay." - "preset_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Preset Amount" - description: "The initial amount shown to the customer." - "type": - type: "string" - title: "Type" - enum: - - "one_time" - description: "The type of the price." - const: "one_time" - title: "ProductPriceOneTimeCustom" - required: - - "created_at" - - "modified_at" - - "id" - - "amount_type" - - "is_archived" - - "product_id" - - "price_currency" - - "minimum_amount" - - "maximum_amount" - - "preset_amount" - - "type" - description: "A pay-what-you-want price for a one-time product." - "ProductPriceOneTimeCustomCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "one_time" - const: "one_time" - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "custom" - const: "custom" - "price_currency": - type: "string" - title: "Price Currency" - pattern: "usd" - description: "The currency. Currently, only `usd` is supported." - default: "usd" - "minimum_amount": - anyOf: - - type: "integer" - maximum: 99999999 - minimum: 50 - description: "The price in cents." - - type: "null" - title: "Minimum Amount" - description: "The minimum amount the customer can pay." - "maximum_amount": - anyOf: - - type: "integer" - maximum: 99999999 - minimum: 50 - description: "The price in cents." - - type: "null" - title: "Maximum Amount" - description: "The maximum amount the customer can pay." - "preset_amount": - anyOf: - - type: "integer" - maximum: 99999999 - minimum: 50 - description: "The price in cents." - - type: "null" - title: "Preset Amount" - description: "The initial amount shown to the customer." - title: "ProductPriceOneTimeCustomCreate" - required: - - "type" - - "amount_type" - description: "Schema to create a pay-what-you-want price for a one-time product." - "ProductPriceOneTimeFixed": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the price." - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "fixed" - const: "fixed" - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the price is archived and no longer available." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "The ID of the product owning the price." - "price_currency": - type: "string" - title: "Price Currency" - description: "The currency." - "price_amount": - type: "integer" - title: "Price Amount" - description: "The price in cents." - "type": - type: "string" - title: "Type" - enum: - - "one_time" - description: "The type of the price." - const: "one_time" - title: "ProductPriceOneTimeFixed" - required: - - "created_at" - - "modified_at" - - "id" - - "amount_type" - - "is_archived" - - "product_id" - - "price_currency" - - "price_amount" - - "type" - description: "A one-time price for a product." - "ProductPriceOneTimeFixedCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "one_time" - const: "one_time" - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "fixed" - const: "fixed" - "price_amount": - type: "integer" - title: "Price Amount" - maximum: 99999999 - minimum: 50 - description: "The price in cents." - "price_currency": - type: "string" - title: "Price Currency" - pattern: "usd" - description: "The currency. Currently, only `usd` is supported." - default: "usd" - title: "ProductPriceOneTimeFixedCreate" - required: - - "type" - - "amount_type" - - "price_amount" - description: "Schema to create a one-time product price." - "ProductPriceOneTimeFree": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the price." - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "free" - const: "free" - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the price is archived and no longer available." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "The ID of the product owning the price." - "type": - type: "string" - title: "Type" - enum: - - "one_time" - description: "The type of the price." - const: "one_time" - title: "ProductPriceOneTimeFree" - required: - - "created_at" - - "modified_at" - - "id" - - "amount_type" - - "is_archived" - - "product_id" - - "type" - description: "A free one-time price for a product." - "ProductPriceOneTimeFreeCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "one_time" - const: "one_time" - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "free" - const: "free" - title: "ProductPriceOneTimeFreeCreate" - required: - - "type" - - "amount_type" - description: "Schema to create a free one-time product price." - "ProductPriceRecurring": - oneOf: - - {"$ref": "#/components/schemas/ProductPriceRecurringFixed"} - - {"$ref": "#/components/schemas/ProductPriceRecurringCustom"} - - {"$ref": "#/components/schemas/ProductPriceRecurringFree"} - discriminator: - propertyName: "amount_type" - mapping: - "custom": "#/components/schemas/ProductPriceRecurringCustom" - "fixed": "#/components/schemas/ProductPriceRecurringFixed" - "free": "#/components/schemas/ProductPriceRecurringFree" - "ProductPriceRecurringCustom": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the price." - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "custom" - const: "custom" - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the price is archived and no longer available." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "The ID of the product owning the price." - "price_currency": - type: "string" - title: "Price Currency" - description: "The currency." - "minimum_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Minimum Amount" - description: "The minimum amount the customer can pay." - "maximum_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Maximum Amount" - description: "The maximum amount the customer can pay." - "preset_amount": - anyOf: - - type: "integer" - - type: "null" - title: "Preset Amount" - description: "The initial amount shown to the customer." - "type": - type: "string" - title: "Type" - enum: - - "recurring" - description: "The type of the price." - const: "recurring" - "recurring_interval": {"$ref": "#/components/schemas/SubscriptionRecurringInterval", "description": "The recurring interval of the price."} - title: "ProductPriceRecurringCustom" - required: - - "created_at" - - "modified_at" - - "id" - - "amount_type" - - "is_archived" - - "product_id" - - "price_currency" - - "minimum_amount" - - "maximum_amount" - - "preset_amount" - - "type" - - "recurring_interval" - description: "A pay-what-you-want recurring price for a product, i.e. a subscription." - "ProductPriceRecurringFixed": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the price." - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "fixed" - const: "fixed" - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the price is archived and no longer available." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "The ID of the product owning the price." - "price_currency": - type: "string" - title: "Price Currency" - description: "The currency." - "price_amount": - type: "integer" - title: "Price Amount" - description: "The price in cents." - "type": - type: "string" - title: "Type" - enum: - - "recurring" - description: "The type of the price." - const: "recurring" - "recurring_interval": {"$ref": "#/components/schemas/SubscriptionRecurringInterval", "description": "The recurring interval of the price."} - title: "ProductPriceRecurringFixed" - required: - - "created_at" - - "modified_at" - - "id" - - "amount_type" - - "is_archived" - - "product_id" - - "price_currency" - - "price_amount" - - "type" - - "recurring_interval" - description: "A recurring price for a product, i.e. a subscription." - "ProductPriceRecurringFixedCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "recurring" - const: "recurring" - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "fixed" - const: "fixed" - "price_amount": - type: "integer" - title: "Price Amount" - maximum: 99999999 - minimum: 50 - description: "The price in cents." - "price_currency": - type: "string" - title: "Price Currency" - pattern: "usd" - description: "The currency. Currently, only `usd` is supported." - default: "usd" - "recurring_interval": {"$ref": "#/components/schemas/SubscriptionRecurringInterval", "description": "The recurring interval of the price."} - title: "ProductPriceRecurringFixedCreate" - required: - - "type" - - "amount_type" - - "price_amount" - - "recurring_interval" - description: "Schema to create a recurring product price, i.e. a subscription." - "ProductPriceRecurringFree": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the price." - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "free" - const: "free" - "is_archived": - type: "boolean" - title: "Is Archived" - description: "Whether the price is archived and no longer available." - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - description: "The ID of the product owning the price." - "type": - type: "string" - title: "Type" - enum: - - "recurring" - description: "The type of the price." - const: "recurring" - "recurring_interval": {"$ref": "#/components/schemas/SubscriptionRecurringInterval", "description": "The recurring interval of the price."} - title: "ProductPriceRecurringFree" - required: - - "created_at" - - "modified_at" - - "id" - - "amount_type" - - "is_archived" - - "product_id" - - "type" - - "recurring_interval" - description: "A free recurring price for a product, i.e. a subscription." - "ProductPriceRecurringFreeCreate": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "recurring" - const: "recurring" - "amount_type": - type: "string" - title: "Amount Type" - enum: - - "free" - const: "free" - "recurring_interval": {"$ref": "#/components/schemas/SubscriptionRecurringInterval", "description": "The recurring interval of the price."} - title: "ProductPriceRecurringFreeCreate" - required: - - "type" - - "amount_type" - - "recurring_interval" - description: "Schema to create a free recurring product price, i.e. a subscription." - "ProductPriceType": - type: "string" - title: "ProductPriceType" - enum: - - "one_time" - - "recurring" - "ProductRecurringCreate": - type: "object" - properties: - "metadata": - type: "object" - title: "Metadata" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - "name": - type: "string" - title: "Name" - minLength: 3 - description: "The name of the product." - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "prices": - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/ProductPriceRecurringFixedCreate"} - title: "ProductPriceRecurringFixedCreate" - maxItems: 2 - minItems: 1 - description: "List of recurring prices. Only one price per interval (one monthly and one yearly) is allowed." - - type: "array" - items: {"$ref": "#/components/schemas/ProductPriceRecurringFreeCreate"} - title: "ProductPriceRecurringFreeCreate" - maxItems: 1 - minItems: 1 - description: "List with a single free recurring price." - title: "Prices" - description: "List of available prices for this product." - "medias": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "Medias" - description: "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded." - "attached_custom_fields": - type: "array" - items: {"$ref": "#/components/schemas/AttachedCustomFieldCreate"} - title: "Attached Custom Fields" - description: "List of custom fields to attach." - "organization_id": - anyOf: - - type: "string" - format: "uuid4" - description: "The organization ID." - x-polar-selector-widget: {"displayProperty": "name", "resourceName": "Organization", "resourceRoot": "/v1/organizations"} - - type: "null" - title: "Organization Id" - description: "The ID of the organization owning the product. **Required unless you use an organization token.**" - title: "ProductRecurringCreate" - required: - - "name" - - "prices" - description: "Schema to create a recurring product, i.e. a subscription." - "ProductSortProperty": - type: "string" - title: "ProductSortProperty" - enum: - - "created_at" - - "-created_at" - - "name" - - "-name" - - "price_type" - - "-price_type" - - "price_amount_type" - - "-price_amount_type" - - "price_amount" - - "-price_amount" - "ProductUpdate": - type: "object" - properties: - "metadata": - anyOf: - - type: "object" - maxProperties: 50 - additionalProperties: - anyOf: - - type: "string" - maxLength: 500 - minLength: 1 - - type: "integer" - - type: "boolean" - description: "Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A boolean\n\nYou can store up to **50 key-value pairs**." - - type: "null" - title: "Metadata" - "name": - anyOf: - - type: "string" - minLength: 3 - description: "The name of the product." - - type: "null" - title: "Name" - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - description: "The description of the product." - "is_archived": - anyOf: - - type: "boolean" - - type: "null" - title: "Is Archived" - description: "Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally." - "prices": - anyOf: - - type: "array" - items: - anyOf: - - {"$ref": "#/components/schemas/ExistingProductPrice"} - - {"$ref": "#/components/schemas/ProductPriceRecurringFixedCreate"} - - {"$ref": "#/components/schemas/ProductPriceRecurringFreeCreate"} - - {"$ref": "#/components/schemas/ProductPriceOneTimeFixedCreate"} - - {"$ref": "#/components/schemas/ProductPriceOneTimeCustomCreate"} - - {"$ref": "#/components/schemas/ProductPriceOneTimeFreeCreate"} - - type: "null" - title: "Prices" - description: "List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object." - "medias": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "Medias" - description: "List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded." - "attached_custom_fields": - anyOf: - - type: "array" - items: {"$ref": "#/components/schemas/AttachedCustomFieldCreate"} - description: "List of custom fields to attach." - - type: "null" - title: "Attached Custom Fields" - title: "ProductUpdate" - description: "Schema to update a product." - "Reactions": - type: "object" - properties: - "total_count": - type: "integer" - title: "Total Count" - "plus_one": - type: "integer" - title: "Plus One" - "minus_one": - type: "integer" - title: "Minus One" - "laugh": - type: "integer" - title: "Laugh" - "hooray": - type: "integer" - title: "Hooray" - "confused": - type: "integer" - title: "Confused" - "heart": - type: "integer" - title: "Heart" - "rocket": - type: "integer" - title: "Rocket" - "eyes": - type: "integer" - title: "Eyes" - title: "Reactions" - required: - - "total_count" - - "plus_one" - - "minus_one" - - "laugh" - - "hooray" - - "confused" - - "heart" - - "rocket" - - "eyes" - "Repository": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid" - "platform": {"$ref": "#/components/schemas/Platforms"} - "is_private": - type: "boolean" - title: "Is Private" - "name": - type: "string" - examples: - - "MyOrg" - title: "Name" - "description": - anyOf: - - type: "string" - - type: "null" - title: "Description" - "stars": - anyOf: - - type: "integer" - - type: "null" - examples: - - 1337 - title: "Stars" - "license": - anyOf: - - type: "string" - - type: "null" - title: "License" - "homepage": - anyOf: - - type: "string" - - type: "null" - title: "Homepage" - "profile_settings": - anyOf: - - {"$ref": "#/components/schemas/RepositoryProfileSettings"} - - type: "null" - description: "Settings for the repository profile" - "organization": {"$ref": "#/components/schemas/ExternalOrganization"} - "internal_organization": - anyOf: - - {"$ref": "#/components/schemas/Organization"} - - type: "null" - title: "Repository" - required: - - "id" - - "platform" - - "is_private" - - "name" - - "description" - - "stars" - - "license" - - "homepage" - - "profile_settings" - - "organization" - - "internal_organization" - "RepositoryProfileSettings": - type: "object" - properties: - "description": - anyOf: - - type: "string" - maxLength: 240 - - type: "null" - title: "Description" - description: "A description of the repository" - "cover_image_url": - anyOf: - - type: "string" - - type: "null" - title: "Cover Image Url" - description: "A URL to a cover image" - "featured_organizations": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "Featured Organizations" - description: "A list of featured organizations" - "highlighted_subscription_tiers": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "Highlighted Subscription Tiers" - description: "A list of highlighted subscription tiers" - "links": - anyOf: - - type: "array" - items: - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Links" - description: "A list of links related to the repository" - title: "RepositoryProfileSettings" - "RepositoryProfileSettingsUpdate": - type: "object" - properties: - "set_description": - anyOf: - - type: "boolean" - - type: "null" - title: "Set Description" - "description": - anyOf: - - type: "string" - maxLength: 240 - - type: "null" - title: "Description" - "set_cover_image_url": - anyOf: - - type: "boolean" - - type: "null" - title: "Set Cover Image Url" - "cover_image_url": - anyOf: - - type: "string" - - type: "null" - title: "Cover Image Url" - "featured_organizations": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - - type: "null" - title: "Featured Organizations" - "highlighted_subscription_tiers": - anyOf: - - type: "array" - items: - type: "string" - format: "uuid4" - maxItems: 3 - - type: "null" - title: "Highlighted Subscription Tiers" - "links": - anyOf: - - type: "array" - items: - type: "string" - maxLength: 2083 - minLength: 1 - format: "uri" - - type: "null" - title: "Links" - title: "RepositoryProfileSettingsUpdate" - "RepositorySortProperty": - type: "string" - title: "RepositorySortProperty" - enum: - - "created_at" - - "-created_at" - - "name" - - "-name" - - "stars" - - "-stars" - "RepositoryUpdate": - type: "object" - properties: - "profile_settings": - anyOf: - - {"$ref": "#/components/schemas/RepositoryProfileSettingsUpdate"} - - type: "null" - title: "RepositoryUpdate" - "ResourceNotFound": - type: "object" - properties: - "error": - type: "string" - title: "Error" - enum: - - "ResourceNotFound" - const: "ResourceNotFound" - "detail": - type: "string" - title: "Detail" - title: "ResourceNotFound" - required: - - "error" - - "detail" - "RevokeTokenResponse": - type: "object" - title: "RevokeTokenResponse" - "S3DownloadURL": - type: "object" - properties: - "url": - type: "string" - title: "Url" - "headers": - type: "object" - title: "Headers" - additionalProperties: - type: "string" - default: {} - "expires_at": - type: "string" - title: "Expires At" - format: "date-time" - title: "S3DownloadURL" - required: - - "url" - - "expires_at" - "S3FileCreateMultipart": - type: "object" - properties: - "parts": - type: "array" - items: {"$ref": "#/components/schemas/S3FileCreatePart"} - title: "Parts" - title: "S3FileCreateMultipart" - required: - - "parts" - "S3FileCreatePart": - type: "object" - properties: - "number": - type: "integer" - title: "Number" - "chunk_start": - type: "integer" - title: "Chunk Start" - "chunk_end": - type: "integer" - title: "Chunk End" - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - title: "S3FileCreatePart" - required: - - "number" - - "chunk_start" - - "chunk_end" - "S3FileUploadCompletedPart": - type: "object" - properties: - "number": - type: "integer" - title: "Number" - "checksum_etag": - type: "string" - title: "Checksum Etag" - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - title: "S3FileUploadCompletedPart" - required: - - "number" - - "checksum_etag" - - "checksum_sha256_base64" - "S3FileUploadMultipart": - type: "object" - properties: - "id": - type: "string" - title: "Id" - "path": - type: "string" - title: "Path" - "parts": - type: "array" - items: {"$ref": "#/components/schemas/S3FileUploadPart"} - title: "Parts" - title: "S3FileUploadMultipart" - required: - - "id" - - "path" - - "parts" - "S3FileUploadPart": - type: "object" - properties: - "number": - type: "integer" - title: "Number" - "chunk_start": - type: "integer" - title: "Chunk Start" - "chunk_end": - type: "integer" - title: "Chunk End" - "checksum_sha256_base64": - anyOf: - - type: "string" - - type: "null" - title: "Checksum Sha256 Base64" - "url": - type: "string" - title: "Url" - "expires_at": - type: "string" - title: "Expires At" - format: "date-time" - "headers": - type: "object" - title: "Headers" - additionalProperties: - type: "string" - default: {} - title: "S3FileUploadPart" - required: - - "number" - - "chunk_start" - - "chunk_end" - - "url" - - "expires_at" - "Scope": - type: "string" - title: "Scope" - enum: - - "openid" - - "profile" - - "email" - - "user:read" - - "admin" - - "web_default" - - "organizations:read" - - "organizations:write" - - "custom_fields:read" - - "custom_fields:write" - - "discounts:read" - - "discounts:write" - - "checkout_links:read" - - "checkout_links:write" - - "checkouts:read" - - "checkouts:write" - - "products:read" - - "products:write" - - "benefits:read" - - "benefits:write" - - "files:read" - - "files:write" - - "subscriptions:read" - - "subscriptions:write" - - "customers:read" - - "customers:write" - - "customer_sessions:write" - - "orders:read" - - "metrics:read" - - "webhooks:read" - - "webhooks:write" - - "external_organizations:read" - - "license_keys:read" - - "license_keys:write" - - "repositories:read" - - "repositories:write" - - "issues:read" - - "issues:write" - - "customer_portal:read" - - "customer_portal:write" - "State": - type: "string" - title: "State" - enum: - - "open" - - "closed" - "SubType": - type: "string" - title: "SubType" - enum: - - "user" - - "organization" - "Subscription": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "amount": - anyOf: - - type: "integer" - - type: "null" - title: "Amount" - "currency": - anyOf: - - type: "string" - - type: "null" - title: "Currency" - "recurring_interval": {"$ref": "#/components/schemas/SubscriptionRecurringInterval"} - "status": {"$ref": "#/components/schemas/SubscriptionStatus"} - "current_period_start": - type: "string" - title: "Current Period Start" - format: "date-time" - "current_period_end": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Current Period End" - "cancel_at_period_end": - type: "boolean" - title: "Cancel At Period End" - "started_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Started At" - "ended_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Ended At" - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "product_id": - type: "string" - title: "Product Id" - format: "uuid4" - "price_id": - type: "string" - title: "Price Id" - format: "uuid4" - "discount_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Discount Id" - "checkout_id": - anyOf: - - type: "string" - format: "uuid4" - - type: "null" - title: "Checkout Id" - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "custom_field_data": - type: "object" - title: "Custom Field Data" - description: "Key-value object storing custom field values." - "customer": {"$ref": "#/components/schemas/SubscriptionCustomer"} - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - "user": {"$ref": "#/components/schemas/SubscriptionUser", "deprecated": true} - "product": {"$ref": "#/components/schemas/Product"} - "price": {"$ref": "#/components/schemas/ProductPriceRecurring"} - "discount": - anyOf: - - oneOf: - - {"$ref": "#/components/schemas/DiscountFixedOnceForeverDurationBase"} - - {"$ref": "#/components/schemas/DiscountFixedRepeatDurationBase"} - - {"$ref": "#/components/schemas/DiscountPercentageOnceForeverDurationBase"} - - {"$ref": "#/components/schemas/DiscountPercentageRepeatDurationBase"} - title: "SubscriptionDiscount" - - type: "null" - title: "Discount" - title: "Subscription" - required: - - "created_at" - - "modified_at" - - "id" - - "amount" - - "currency" - - "recurring_interval" - - "status" - - "current_period_start" - - "current_period_end" - - "cancel_at_period_end" - - "started_at" - - "ended_at" - - "customer_id" - - "product_id" - - "price_id" - - "discount_id" - - "checkout_id" - - "metadata" - - "customer" - - "user_id" - - "user" - - "product" - - "price" - - "discount" - "SubscriptionCustomer": - type: "object" - properties: - "created_at": - type: "string" - title: "Created At" - format: "date-time" - description: "Creation timestamp of the object." - "modified_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Modified At" - description: "Last modification timestamp of the object." - "id": - type: "string" - title: "Id" - format: "uuid4" - description: "The ID of the object." - "metadata": - type: "object" - title: "Metadata" - additionalProperties: - anyOf: - - type: "string" - - type: "integer" - - type: "boolean" - "email": - type: "string" - title: "Email" - "email_verified": - type: "boolean" - title: "Email Verified" - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - "billing_address": - anyOf: - - {"$ref": "#/components/schemas/Address"} - - type: "null" - "tax_id": - anyOf: - - type: "array" - prefixItems: - - type: "string" - - {"$ref": "#/components/schemas/TaxIDFormat"} - maxItems: 2 - minItems: 2 - - type: "null" - title: "Tax Id" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "avatar_url": - type: "string" - title: "Avatar Url" - readOnly: true - title: "SubscriptionCustomer" - required: - - "created_at" - - "modified_at" - - "id" - - "metadata" - - "email" - - "email_verified" - - "name" - - "billing_address" - - "tax_id" - - "organization_id" - - "avatar_url" - "SubscriptionRecurringInterval": - type: "string" - title: "SubscriptionRecurringInterval" - enum: - - "month" - - "year" - "SubscriptionSortProperty": - type: "string" - title: "SubscriptionSortProperty" - enum: - - "customer" - - "-customer" - - "status" - - "-status" - - "started_at" - - "-started_at" - - "current_period_end" - - "-current_period_end" - - "amount" - - "-amount" - - "product" - - "-product" - - "discount" - - "-discount" - "SubscriptionStatus": - type: "string" - title: "SubscriptionStatus" - enum: - - "incomplete" - - "incomplete_expired" - - "trialing" - - "active" - - "past_due" - - "canceled" - - "unpaid" - "SubscriptionUser": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "email": - type: "string" - title: "Email" - "public_name": - type: "string" - title: "Public Name" - "avatar_url": - anyOf: - - type: "string" - - type: "null" - title: "Avatar Url" - "github_username": - anyOf: - - type: "string" - - type: "null" - title: "Github Username" - title: "SubscriptionUser" - required: - - "id" - - "email" - - "public_name" - "TaxIDFormat": - type: "string" - title: "TaxIDFormat" - enum: - - "ad_nrt" - - "ae_trn" - - "ar_cuit" - - "au_abn" - - "au_arn" - - "bg_uic" - - "bh_vat" - - "bo_tin" - - "br_cnpj" - - "br_cpf" - - "ca_bn" - - "ca_gst_hst" - - "ca_pst_bc" - - "ca_pst_mb" - - "ca_pst_sk" - - "ca_qst" - - "ch_uid" - - "ch_vat" - - "cl_tin" - - "cn_tin" - - "co_nit" - - "cr_tin" - - "de_stn" - - "do_rcn" - - "ec_ruc" - - "eg_tin" - - "es_cif" - - "eu_oss_vat" - - "eu_vat" - - "gb_vat" - - "ge_vat" - - "hk_br" - - "hr_oib" - - "hu_tin" - - "id_npwp" - - "il_vat" - - "in_gst" - - "is_vat" - - "jp_cn" - - "jp_rn" - - "jp_trn" - - "ke_pin" - - "kr_brn" - - "kz_bin" - - "li_uid" - - "mx_rfc" - - "my_frp" - - "my_itn" - - "my_sst" - - "ng_tin" - - "no_vat" - - "no_voec" - - "nz_gst" - - "om_vat" - - "pe_ruc" - - "ph_tin" - - "ro_tin" - - "rs_pib" - - "ru_inn" - - "ru_kpp" - - "sa_vat" - - "sg_gst" - - "sg_uen" - - "si_tin" - - "sv_nit" - - "th_vat" - - "tr_tin" - - "tw_vat" - - "ua_vat" - - "us_ein" - - "uy_ruc" - - "ve_rif" - - "vn_tin" - - "za_vat" - description: "List of supported tax ID formats.\n\nRef: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id" - "TokenResponse": - type: "object" - properties: - "access_token": - type: "string" - title: "Access Token" - "token_type": - type: "string" - title: "Token Type" - enum: - - "Bearer" - const: "Bearer" - "expires_in": - type: "integer" - title: "Expires In" - "refresh_token": - anyOf: - - type: "string" - - type: "null" - title: "Refresh Token" - "scope": - type: "string" - title: "Scope" - "id_token": - type: "string" - title: "Id Token" - title: "TokenResponse" - required: - - "access_token" - - "token_type" - - "expires_in" - - "refresh_token" - - "scope" - - "id_token" - "Unauthorized": - type: "object" - properties: - "error": - type: "string" - title: "Error" - enum: - - "Unauthorized" - const: "Unauthorized" - "detail": - type: "string" - title: "Detail" - title: "Unauthorized" - required: - - "error" - - "detail" - "UserInfoOrganization": - type: "object" - properties: - "sub": - type: "string" - title: "Sub" - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - title: "UserInfoOrganization" - required: - - "sub" - "UserInfoUser": - type: "object" - properties: - "sub": - type: "string" - title: "Sub" - "name": - anyOf: - - type: "string" - - type: "null" - title: "Name" - "email": - anyOf: - - type: "string" - - type: "null" - title: "Email" - "email_verified": - anyOf: - - type: "boolean" - - type: "null" - title: "Email Verified" - title: "UserInfoUser" - required: - - "sub" - "ValidatedLicenseKey": - type: "object" - properties: - "id": - type: "string" - title: "Id" - format: "uuid4" - "organization_id": - type: "string" - title: "Organization Id" - format: "uuid4" - "user_id": - type: "string" - title: "User Id" - format: "uuid4" - deprecated: true - "customer_id": - type: "string" - title: "Customer Id" - format: "uuid4" - "user": {"$ref": "#/components/schemas/LicenseKeyUser", "deprecated": true} - "customer": {"$ref": "#/components/schemas/LicenseKeyCustomer"} - "benefit_id": - type: "string" - title: "Benefit Id" - format: "uuid4" - description: "The benefit ID." - x-polar-selector-widget: {"displayProperty": "description", "resourceName": "Benefit", "resourceRoot": "/v1/benefits"} - "key": - type: "string" - title: "Key" - "display_key": - type: "string" - title: "Display Key" - "status": {"$ref": "#/components/schemas/LicenseKeyStatus"} - "limit_activations": - anyOf: - - type: "integer" - - type: "null" - title: "Limit Activations" - "usage": - type: "integer" - title: "Usage" - "limit_usage": - anyOf: - - type: "integer" - - type: "null" - title: "Limit Usage" - "validations": - type: "integer" - title: "Validations" - "last_validated_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Last Validated At" - "expires_at": - anyOf: - - type: "string" - format: "date-time" - - type: "null" - title: "Expires At" - "activation": - anyOf: - - {"$ref": "#/components/schemas/LicenseKeyActivationBase"} - - type: "null" - title: "ValidatedLicenseKey" - required: - - "id" - - "organization_id" - - "user_id" - - "customer_id" - - "user" - - "customer" - - "benefit_id" - - "key" - - "display_key" - - "status" - - "limit_activations" - - "usage" - - "limit_usage" - - "validations" - - "last_validated_at" - - "expires_at" - "ValidationError": - type: "object" - properties: - "loc": - type: "array" - items: - anyOf: - - type: "string" - - type: "integer" - title: "Location" - "msg": - type: "string" - title: "Message" - "type": - type: "string" - title: "Error Type" - title: "ValidationError" - required: - - "loc" - - "msg" - - "type" - "WebhookBenefitCreatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "benefit.created" - const: "benefit.created" - "data": {"$ref": "#/components/schemas/Benefit", "title": "Benefit"} - title: "WebhookBenefitCreatedPayload" - required: - - "type" - - "data" - description: "Sent when a new benefit is created.\n\n**Discord & Slack support:** Basic" - "WebhookBenefitGrantCreatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "benefit_grant.created" - const: "benefit_grant.created" - "data": {"$ref": "#/components/schemas/BenefitGrantWebhook"} - title: "WebhookBenefitGrantCreatedPayload" - required: - - "type" - - "data" - description: "Sent when a new benefit grant is created.\n\n**Discord & Slack support:** Basic" - "WebhookBenefitGrantRevokedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "benefit_grant.revoked" - const: "benefit_grant.revoked" - "data": {"$ref": "#/components/schemas/BenefitGrantWebhook"} - title: "WebhookBenefitGrantRevokedPayload" - required: - - "type" - - "data" - description: "Sent when a new benefit grant is revoked.\n\n**Discord & Slack support:** Basic" - "WebhookBenefitGrantUpdatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "benefit_grant.updated" - const: "benefit_grant.updated" - "data": {"$ref": "#/components/schemas/BenefitGrantWebhook"} - title: "WebhookBenefitGrantUpdatedPayload" - required: - - "type" - - "data" - description: "Sent when a new benefit grant is updated.\n\n**Discord & Slack support:** Basic" - "WebhookBenefitUpdatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "benefit.updated" - const: "benefit.updated" - "data": {"$ref": "#/components/schemas/Benefit", "title": "Benefit"} - title: "WebhookBenefitUpdatedPayload" - required: - - "type" - - "data" - description: "Sent when a benefit is updated.\n\n**Discord & Slack support:** Basic" - "WebhookCheckoutCreatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "checkout.created" - const: "checkout.created" - "data": {"$ref": "#/components/schemas/Checkout"} - title: "WebhookCheckoutCreatedPayload" - required: - - "type" - - "data" - description: "Sent when a new checkout is created.\n\n**Discord & Slack support:** Basic" - "WebhookCheckoutUpdatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "checkout.updated" - const: "checkout.updated" - "data": {"$ref": "#/components/schemas/Checkout"} - title: "WebhookCheckoutUpdatedPayload" - required: - - "type" - - "data" - description: "Sent when a checkout is updated.\n\n**Discord & Slack support:** Basic" - "WebhookOrderCreatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "order.created" - const: "order.created" - "data": {"$ref": "#/components/schemas/Order"} - title: "WebhookOrderCreatedPayload" - required: - - "type" - - "data" - description: "Sent when a new order is created.\n\n**Discord & Slack support:** Full" - "WebhookOrganizationUpdatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "organization.updated" - const: "organization.updated" - "data": {"$ref": "#/components/schemas/Organization"} - title: "WebhookOrganizationUpdatedPayload" - required: - - "type" - - "data" - description: "Sent when a organization is updated.\n\n**Discord & Slack support:** Basic" - "WebhookPledgeCreatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "pledge.created" - const: "pledge.created" - "data": {"$ref": "#/components/schemas/Pledge"} - title: "WebhookPledgeCreatedPayload" - required: - - "type" - - "data" - description: "Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord & Slack support:** Full" - "WebhookPledgeUpdatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "pledge.updated" - const: "pledge.updated" - "data": {"$ref": "#/components/schemas/Pledge"} - title: "WebhookPledgeUpdatedPayload" - required: - - "type" - - "data" - description: "Sent when a pledge is updated.\n\n**Discord & Slack support:** Basic" - "WebhookProductCreatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "product.created" - const: "product.created" - "data": {"$ref": "#/components/schemas/Product"} - title: "WebhookProductCreatedPayload" - required: - - "type" - - "data" - description: "Sent when a new product is created.\n\n**Discord & Slack support:** Basic" - "WebhookProductUpdatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "product.updated" - const: "product.updated" - "data": {"$ref": "#/components/schemas/Product"} - title: "WebhookProductUpdatedPayload" - required: - - "type" - - "data" - description: "Sent when a product is updated.\n\n**Discord & Slack support:** Basic" - "WebhookSubscriptionActivePayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "subscription.active" - const: "subscription.active" - "data": {"$ref": "#/components/schemas/Subscription"} - title: "WebhookSubscriptionActivePayload" - required: - - "type" - - "data" - description: "Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord & Slack support:** Full" - "WebhookSubscriptionCanceledPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "subscription.canceled" - const: "subscription.canceled" - "data": {"$ref": "#/components/schemas/Subscription"} - title: "WebhookSubscriptionCanceledPayload" - required: - - "type" - - "data" - description: "Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord & Slack support:** Full" - "WebhookSubscriptionCreatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "subscription.created" - const: "subscription.created" - "data": {"$ref": "#/components/schemas/Subscription"} - title: "WebhookSubscriptionCreatedPayload" - required: - - "type" - - "data" - description: "Sent when a new subscription is created.\n\n**Discord & Slack support:** Full" - "WebhookSubscriptionRevokedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "subscription.revoked" - const: "subscription.revoked" - "data": {"$ref": "#/components/schemas/Subscription"} - title: "WebhookSubscriptionRevokedPayload" - required: - - "type" - - "data" - description: "Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord & Slack support:** Full" - "WebhookSubscriptionUpdatedPayload": - type: "object" - properties: - "type": - type: "string" - title: "Type" - enum: - - "subscription.updated" - const: "subscription.updated" - "data": {"$ref": "#/components/schemas/Subscription"} - title: "WebhookSubscriptionUpdatedPayload" - required: - - "type" - - "data" - description: "Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord & Slack support:** On cancellation and revocation. Renewals are skipped." - securitySchemes: - "oidc": - type: "openIdConnect" - openIdConnectUrl: "/.well-known/openid-configuration" - "pat": - type: "http" - description: "You can generate a **Personal Access Token** from your [settings](https://polar.sh/settings)." - scheme: "bearer" - "customer_session": - type: "http" - scheme: "bearer" -tags: - - name: "private" - description: "Endpoints that should appear in the schema only in development to generate our internal JS SDK." - - name: "documented" - description: "Endpoints shown and documented in the Polar API documentation." - - name: "featured" - description: "Endpoints featured in the Polar API documentation for their interest in common use-cases." - - name: "issue_funding" - description: "Endpoints related to issue funding and rewards in the Polar API." -webhooks: - "checkout.created": - post: - summary: "checkout.created" - description: "Sent when a new checkout is created.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointcheckout_created_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookCheckoutCreatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "checkout.updated": - post: - summary: "checkout.updated" - description: "Sent when a checkout is updated.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointcheckout_updated_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookCheckoutUpdatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "order.created": - post: - summary: "order.created" - description: "Sent when a new order is created.\n\n**Discord & Slack support:** Full" - operationId: "_endpointorder_created_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookOrderCreatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "subscription.created": - post: - summary: "subscription.created" - description: "Sent when a new subscription is created.\n\n**Discord & Slack support:** Full" - operationId: "_endpointsubscription_created_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookSubscriptionCreatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "subscription.updated": - post: - summary: "subscription.updated" - description: "Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n\nIf you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`.\n\nTo listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n\n**Discord & Slack support:** On cancellation and revocation. Renewals are skipped." - operationId: "_endpointsubscription_updated_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookSubscriptionUpdatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "subscription.active": - post: - summary: "subscription.active" - description: "Sent when a subscription becomes active,\nwhether because it's a new paid subscription or because payment was recovered.\n\n**Discord & Slack support:** Full" - operationId: "_endpointsubscription_active_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookSubscriptionActivePayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "subscription.canceled": - post: - summary: "subscription.canceled" - description: "Sent when a subscription is canceled by the user.\nThey might still have access until the end of the current period.\n\n**Discord & Slack support:** Full" - operationId: "_endpointsubscription_canceled_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookSubscriptionCanceledPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "subscription.revoked": - post: - summary: "subscription.revoked" - description: "Sent when a subscription is revoked, the user looses access immediately.\nHappens when the subscription is canceled, or payment is past due.\n\n**Discord & Slack support:** Full" - operationId: "_endpointsubscription_revoked_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookSubscriptionRevokedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "product.created": - post: - summary: "product.created" - description: "Sent when a new product is created.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointproduct_created_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookProductCreatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "product.updated": - post: - summary: "product.updated" - description: "Sent when a product is updated.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointproduct_updated_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookProductUpdatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "pledge.created": - post: - summary: "pledge.created" - description: "Sent when a new pledge is created. Note that this does mean that the pledge has been paid yet.\n\n**Discord & Slack support:** Full" - operationId: "_endpointpledge_created_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookPledgeCreatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "pledge.updated": - post: - summary: "pledge.updated" - description: "Sent when a pledge is updated.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointpledge_updated_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookPledgeUpdatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "organization.updated": - post: - summary: "organization.updated" - description: "Sent when a organization is updated.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointorganization_updated_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookOrganizationUpdatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "benefit.created": - post: - summary: "benefit.created" - description: "Sent when a new benefit is created.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointbenefit_created_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookBenefitCreatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "benefit.updated": - post: - summary: "benefit.updated" - description: "Sent when a benefit is updated.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointbenefit_updated_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookBenefitUpdatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "benefit_grant.created": - post: - summary: "benefit_grant.created" - description: "Sent when a new benefit grant is created.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointbenefit_grant_created_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookBenefitGrantCreatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "benefit_grant.updated": - post: - summary: "benefit_grant.updated" - description: "Sent when a new benefit grant is updated.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointbenefit_grant_updated_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookBenefitGrantUpdatedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} - "benefit_grant.revoked": - post: - summary: "benefit_grant.revoked" - description: "Sent when a new benefit grant is revoked.\n\n**Discord & Slack support:** Basic" - operationId: "_endpointbenefit_grant_revoked_post" - requestBody: - content: - "application/json": - schema: {"$ref": "#/components/schemas/WebhookBenefitGrantRevokedPayload"} - required: true - responses: - "200": - description: "Successful Response" - content: - "application/json": - schema: {} - "422": - description: "Validation Error" - content: - "application/json": - schema: {"$ref": "#/components/schemas/HTTPValidationError"} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock new file mode 100644 index 0000000..6fc3cf7 --- /dev/null +++ b/.speakeasy/workflow.lock @@ -0,0 +1,27 @@ +speakeasyVersion: 1.541.2 +sources: {} +targets: + polar: + source: Polar-OAS +workflow: + workflowVersion: 1.0.0 + speakeasyVersion: latest + sources: + Polar-OAS: + inputs: + - location: https://api.polar.sh/openapi.json + overlays: + - location: https://raw.githubusercontent.com/polarsource/polar/main/sdk/overlays/security.yml + - location: https://raw.githubusercontent.com/polarsource/polar/main/sdk/overlays/type_parameter.yml + - location: https://raw.githubusercontent.com/polarsource/polar/main/sdk/overlays/product_price_discriminator.yml + - location: https://raw.githubusercontent.com/polarsource/polar/main/sdk/overlays/read_only.yml + registry: + location: registry.speakeasyapi.dev/polar/polar/polar-oas + targets: + polar: + target: ruby + source: Polar-OAS + codeSamples: + registry: + location: registry.speakeasyapi.dev/polar/polar/polar-api-ruby-code-samples + blocking: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d585717 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to This Repository + +Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. + +## How to Report Issues + +If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: + +- A clear and descriptive title +- Steps to reproduce the issue +- Expected and actual behavior +- Any relevant logs, screenshots, or error messages +- Information about your environment (e.g., operating system, software versions) + - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed + +## Issue Triage and Upstream Fixes + +We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. + +## Contact + +If you have any questions or need further assistance, please feel free to reach out by opening an issue. + +Thank you for your understanding and cooperation! + +The Maintainers diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..b0ea405 --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +# Specify your gem's dependencies in openapi.gemspec +gemspec diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..1fbf78b --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,116 @@ +PATH + remote: . + specs: + polar-sdk (0.0.1) + faraday + faraday-multipart + faraday-retry + rack + rake + sorbet + +GEM + remote: https://rubygems.org/ + specs: + ast (2.4.2) + erubi (1.13.0) + faraday (2.12.2) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-multipart (1.1.0) + multipart-post (~> 2.0) + faraday-net_http (3.4.0) + net-http (>= 0.5.0) + faraday-retry (2.2.1) + faraday (~> 2.0) + json (2.8.2) + language_server-protocol (3.17.0.4) + lint_roller (1.1.0) + logger (1.6.6) + minitest (5.25.2) + minitest-focus (1.4.0) + minitest (>= 4, < 6) + multipart-post (2.4.1) + net-http (0.6.0) + uri + netrc (0.11.0) + parallel (1.26.3) + parser (3.3.7.1) + ast (~> 2.4.1) + racc + prism (0.27.0) + racc (1.8.1) + rack (3.1.11) + rainbow (3.1.1) + rake (13.2.1) + rbi (0.1.12) + prism (>= 0.18.0, < 0.28) + sorbet-runtime (>= 0.5.9204) + regexp_parser (2.10.0) + rubocop (1.73.2) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.38.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.38.1) + parser (>= 3.3.1.0) + rubocop-minitest (0.37.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + ruby-progressbar (1.13.0) + sorbet (0.5.11668) + sorbet-static (= 0.5.11668) + sorbet-runtime (0.5.11668) + sorbet-static (0.5.11668-aarch64-linux) + sorbet-static (0.5.11668-universal-darwin) + sorbet-static (0.5.11668-x86_64-linux) + sorbet-static-and-runtime (0.5.11668) + sorbet (= 0.5.11668) + sorbet-runtime (= 0.5.11668) + spoom (1.3.2) + erubi (>= 1.10.0) + prism (>= 0.19.0) + sorbet-static-and-runtime (>= 0.5.10187) + thor (>= 0.19.2) + tapioca (0.13.3) + bundler (>= 2.2.25) + netrc (>= 0.11.0) + parallel (>= 1.21.0) + rbi (>= 0.1.4, < 0.2) + sorbet-static-and-runtime (>= 0.5.11087) + spoom (>= 1.2.0) + thor (>= 1.2.0) + yard-sorbet + thor (1.3.2) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + uri (1.0.3) + yard (0.9.37) + yard-sorbet (0.8.1) + sorbet-runtime (>= 0.5) + yard (>= 0.9) + +PLATFORMS + aarch64-linux + arm64-darwin-23 + arm64-darwin-24 + x86_64-linux + +DEPENDENCIES + minitest + polar-sdk! + rubocop (~> 1.60.2) + sorbet-runtime + tapioca + +BUNDLED WITH + 2.5.23 diff --git a/README.md b/README.md new file mode 100644 index 0000000..1b1d5a9 --- /dev/null +++ b/README.md @@ -0,0 +1,665 @@ +# polar-sdk + +Developer-friendly & type-safe Ruby SDK specifically catered to leverage *polar-sdk* API. + +
+ + + + +
+ + +

+> [!IMPORTANT] +> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/sagar-demo/sagar-demo). Delete this section before > publishing to a package manager. + + +## Summary + +Polar API: Polar HTTP and Webhooks API + +Read the docs at https://docs.polar.sh/api-reference + + + +## Table of Contents + +* [polar-sdk](#polar-sdk) + * [SDK Installation](#sdk-installation) + * [SDK Example Usage](#sdk-example-usage) + * [Authentication](#authentication) + * [Available Resources and Operations](#available-resources-and-operations) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) +* [Development](#development) + * [Maturity](#maturity) + * [Contributions](#contributions) + + + + +## SDK Installation + +The SDK can be installed using [RubyGems](https://rubygems.org/): + +```bash +gem install specific_install +gem specific_install +``` + + + +## SDK Example Usage + +### Example + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Shared::WebhookCheckoutCreatedPayload.new( + type: "checkout.created", + data: Models::Shared::Checkout.new( + created_at: DateTime.iso8601('2025-11-12T14:26:42.882Z'), + modified_at: DateTime.iso8601('2024-05-27T05:08:06.235Z'), + id: "", + payment_processor: Models::Shared::PaymentProcessor::STRIPE, + status: Models::Shared::CheckoutStatus::FAILED, + client_secret: "", + url: "https://heavy-beret.com/", + expires_at: DateTime.iso8601('2023-02-25T02:26:48.460Z'), + success_url: "https://sardonic-final.info/", + embed_origin: "", + amount: 962_818, + discount_amount: 6400, + net_amount: 426_090, + tax_amount: 648_726, + total_amount: 210_702, + currency: "Riel", + product_id: "", + product_price_id: "", + discount_id: "", + allow_discount_codes: false, + require_billing_address: false, + is_discount_applicable: false, + is_free_product_price: false, + is_payment_required: false, + is_payment_setup_required: false, + is_payment_form_required: false, + customer_id: "", + customer_name: "", + customer_email: "", + customer_ip_address: "", + customer_billing_address: Models::Shared::Address.new( + country: "FR", + ), + customer_tax_id: "", + payment_processor_metadata: { + "key": "", + }, + metadata: { + "key": 5003.72, + }, + customer_external_id: "", + products: [ + Models::Shared::CheckoutProduct.new( + created_at: DateTime.iso8601('2025-01-24T18:08:49.597Z'), + modified_at: DateTime.iso8601('2025-07-22T12:18:02.066Z'), + id: "", + name: "", + description: "gosh really capitalize um restructure prickly rationale certainly these", + recurring_interval: Models::Shared::SubscriptionRecurringInterval::YEAR, + is_recurring: false, + is_archived: false, + organization_id: "", + prices: [ + Models::Shared::ProductPriceFixed.new( + created_at: DateTime.iso8601('2025-08-22T02:17:20.661Z'), + modified_at: DateTime.iso8601('2025-09-12T19:41:14.261Z'), + id: "", + amount_type: "", + is_archived: false, + product_id: "", + type: Models::Shared::ProductPriceType::ONE_TIME, + recurring_interval: Models::Shared::SubscriptionRecurringInterval::YEAR, + price_currency: "", + price_amount: 991_185, + ), + ], + benefits: [ + Models::Shared::BenefitPublic.new( + id: "", + created_at: DateTime.iso8601('2024-06-16T08:01:15.524Z'), + modified_at: DateTime.iso8601('2025-06-29T02:23:28.661Z'), + type: Models::Shared::BenefitType::GITHUB_REPOSITORY, + description: "provided publicize astride oof mockingly if opposite coagulate pro", + selectable: false, + deletable: false, + organization_id: "", + ), + ], + medias: [ + Models::Shared::ProductMediaFileRead.new( + id: "", + organization_id: "", + name: "", + path: "/opt/lib", + mime_type: "", + size: 877_199, + storage_version: "", + checksum_etag: "", + checksum_sha256_base64: "", + checksum_sha256_hex: "", + last_modified_at: DateTime.iso8601('2024-12-28T06:38:59.235Z'), + version: "", + service: "", + is_uploaded: false, + created_at: DateTime.iso8601('2025-12-23T03:24:50.631Z'), + size_readable: "", + public_url: "https://inconsequential-tenement.net/", + ), + ], + ), + ], + product: Models::Shared::CheckoutProduct.new( + created_at: DateTime.iso8601('2025-03-11T01:07:03.723Z'), + modified_at: DateTime.iso8601('2023-07-06T04:03:30.465Z'), + id: "", + name: "", + description: "but reluctantly easily litter", + recurring_interval: Models::Shared::SubscriptionRecurringInterval::YEAR, + is_recurring: false, + is_archived: false, + organization_id: "", + prices: [ + Models::Shared::ProductPriceFree.new( + created_at: DateTime.iso8601('2024-02-10T10:32:57.489Z'), + modified_at: DateTime.iso8601('2024-07-14T23:53:19.831Z'), + id: "", + amount_type: "", + is_archived: false, + product_id: "", + type: Models::Shared::ProductPriceType::ONE_TIME, + recurring_interval: Models::Shared::SubscriptionRecurringInterval::YEAR, + ), + ], + benefits: [ + Models::Shared::BenefitPublic.new( + id: "", + created_at: DateTime.iso8601('2025-03-02T02:06:06.947Z'), + modified_at: DateTime.iso8601('2024-01-11T18:56:38.677Z'), + type: Models::Shared::BenefitType::METER_CREDIT, + description: "offensively painfully what questionably destock pish ironclad", + selectable: false, + deletable: false, + organization_id: "", + ), + ], + medias: [ + Models::Shared::ProductMediaFileRead.new( + id: "", + organization_id: "", + name: "", + path: "/usr/bin", + mime_type: "", + size: 721_205, + storage_version: "", + checksum_etag: "", + checksum_sha256_base64: "", + checksum_sha256_hex: "", + last_modified_at: DateTime.iso8601('2024-03-02T18:57:38.880Z'), + version: "", + service: "", + is_uploaded: false, + created_at: DateTime.iso8601('2024-09-21T20:33:41.052Z'), + size_readable: "", + public_url: "https://sardonic-cannon.org/", + ), + ], + ), + product_price: Models::Shared::LegacyRecurringProductPriceFree.new( + created_at: DateTime.iso8601('2023-01-13T03:58:12.376Z'), + modified_at: DateTime.iso8601('2025-02-04T17:46:21.813Z'), + id: "", + amount_type: "", + is_archived: false, + product_id: "", + type: "", + recurring_interval: Models::Shared::SubscriptionRecurringInterval::MONTH, + legacy: false, + ), + discount: Models::Shared::CheckoutDiscountPercentageOnceForeverDuration.new( + duration: Models::Shared::DiscountDuration::FOREVER, + type: Models::Shared::DiscountType::PERCENTAGE, + basis_points: 247_960, + id: "", + name: "", + code: "", + ), + subscription_id: "", + attached_custom_fields: [ + Models::Shared::AttachedCustomField.new( + custom_field_id: "", + custom_field: Models::Shared::CustomFieldDate.new( + created_at: DateTime.iso8601('2025-03-29T02:39:20.427Z'), + modified_at: DateTime.iso8601('2024-05-17T17:07:35.182Z'), + id: "", + metadata: { + "key": 548_991, + }, + type: "", + slug: "", + name: "", + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + properties: Models::Shared::CustomFieldDateProperties.new(), + ), + order: 907_325, + required: false, + ), + ], + customer_metadata: { + "key": "", + }, + customer_billing_address_fields: Models::Shared::CheckoutCustomerBillingAddressFields.new( + country: false, + state: false, + city: false, + postal_code: false, + line1: false, + line2: false, + ), + ), +) + +res = s.endpointcheckout_created_post(req) + +if ! res.any.nil? + # handle response +end + +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| -------------- | ---- | ----------- | +| `access_token` | http | HTTP Bearer | + +To authenticate with the API the `access_token` parameter must be set when initializing the SDK client instance. For example: +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.organizations.list(slug="", page=768_578, limit=547_272, sorting=[ + Models::Shared::OrganizationSortProperty::NAME, +]) + +if ! res.list_resource_organization.nil? + # handle response +end + +``` + +### Per-Operation Security Schemes + +Some operations in this SDK require the security scheme to be specified at the request level. For example: +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Operations::CustomerPortalBenefitGrantsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.customer_portal_benefit_grants.list(security: Models::Operations::CustomerPortalBenefitGrantsListSecurity.new( + customer_session: "", + ), req, Models::Operations::CustomerPortalBenefitGrantsListSecurity.new( + customer_session: "", + )) + +if ! res.list_resource_customer_benefit_grant.nil? + # handle response +end + +``` + + + +## Available Resources and Operations + +
+Available methods + +### [benefits](docs/sdks/benefits/README.md) + +* [list](docs/sdks/benefits/README.md#list) - List Benefits +* [create](docs/sdks/benefits/README.md#create) - Create Benefit +* [get](docs/sdks/benefits/README.md#get) - Get Benefit +* [update](docs/sdks/benefits/README.md#update) - Update Benefit +* [delete](docs/sdks/benefits/README.md#delete) - Delete Benefit +* [grants](docs/sdks/benefits/README.md#grants) - List Benefit Grants + +### [checkout_links](docs/sdks/checkoutlinks/README.md) + +* [list](docs/sdks/checkoutlinks/README.md#list) - List Checkout Links +* [create](docs/sdks/checkoutlinks/README.md#create) - Create Checkout Link +* [get](docs/sdks/checkoutlinks/README.md#get) - Get Checkout Link +* [update](docs/sdks/checkoutlinks/README.md#update) - Update Checkout Link +* [delete](docs/sdks/checkoutlinks/README.md#delete) - Delete Checkout Link + +### [checkouts](docs/sdks/checkouts/README.md) + +* [list](docs/sdks/checkouts/README.md#list) - List Checkout Sessions +* [create](docs/sdks/checkouts/README.md#create) - Create Checkout Session +* [get](docs/sdks/checkouts/README.md#get) - Get Checkout Session +* [client_get](docs/sdks/checkouts/README.md#client_get) - Get Checkout Session from Client + +### [custom_fields](docs/sdks/customfields/README.md) + +* [list](docs/sdks/customfields/README.md#list) - List Custom Fields +* [create](docs/sdks/customfields/README.md#create) - Create Custom Field +* [get](docs/sdks/customfields/README.md#get) - Get Custom Field +* [update](docs/sdks/customfields/README.md#update) - Update Custom Field +* [delete](docs/sdks/customfields/README.md#delete) - Delete Custom Field + +### [customer_meters](docs/sdks/customermeters/README.md) + +* [list](docs/sdks/customermeters/README.md#list) - List Customer Meters +* [get](docs/sdks/customermeters/README.md#get) - Get Customer Meter + +### [customer_portal_benefit_grants](docs/sdks/customerportalbenefitgrants/README.md) + +* [list](docs/sdks/customerportalbenefitgrants/README.md#list) - List Benefit Grants +* [get](docs/sdks/customerportalbenefitgrants/README.md#get) - Get Benefit Grant +* [update](docs/sdks/customerportalbenefitgrants/README.md#update) - Update Benefit Grant + +### [customer_portal_customer_meters](docs/sdks/customerportalcustomermeters/README.md) + +* [list](docs/sdks/customerportalcustomermeters/README.md#list) - List Meters +* [get](docs/sdks/customerportalcustomermeters/README.md#get) - Get Customer Meter + +### [customer_portal_customers](docs/sdks/customerportalcustomers/README.md) + +* [get](docs/sdks/customerportalcustomers/README.md#get) - Get Customer +* [update](docs/sdks/customerportalcustomers/README.md#update) - Update Customer +* [get_payment_methods](docs/sdks/customerportalcustomers/README.md#get_payment_methods) - Get Customer Payment Methods +* [add_payment_method](docs/sdks/customerportalcustomers/README.md#add_payment_method) - Add Customer Payment Method +* [delete_payment_method](docs/sdks/customerportalcustomers/README.md#delete_payment_method) - Delete Customer Payment Method + +### [customer_portal_downloadables](docs/sdks/customerportaldownloadables/README.md) + +* [list](docs/sdks/customerportaldownloadables/README.md#list) - List Downloadables +* [get](docs/sdks/customerportaldownloadables/README.md#get) - Get Downloadable + +### [customer_portal_license_keys](docs/sdks/customerportallicensekeys/README.md) + +* [list](docs/sdks/customerportallicensekeys/README.md#list) - List License Keys +* [get](docs/sdks/customerportallicensekeys/README.md#get) - Get License Key +* [validate](docs/sdks/customerportallicensekeys/README.md#validate) - Validate License Key +* [activate](docs/sdks/customerportallicensekeys/README.md#activate) - Activate License Key +* [deactivate](docs/sdks/customerportallicensekeys/README.md#deactivate) - Deactivate License Key + +### [customer_portal_orders](docs/sdks/customerportalorders/README.md) + +* [list](docs/sdks/customerportalorders/README.md#list) - List Orders +* [get](docs/sdks/customerportalorders/README.md#get) - Get Order +* [invoice](docs/sdks/customerportalorders/README.md#invoice) - Get Order Invoice + +### [customer_portal_organizations](docs/sdks/customerportalorganizations/README.md) + +* [get](docs/sdks/customerportalorganizations/README.md#get) - Get Organization + +### [customer_portal_subscriptions](docs/sdks/customerportalsubscriptions/README.md) + +* [list](docs/sdks/customerportalsubscriptions/README.md#list) - List Subscriptions +* [get](docs/sdks/customerportalsubscriptions/README.md#get) - Get Subscription +* [update](docs/sdks/customerportalsubscriptions/README.md#update) - Update Subscription +* [cancel](docs/sdks/customerportalsubscriptions/README.md#cancel) - Cancel Subscription + +### [customer_sessions](docs/sdks/customersessions/README.md) + +* [create](docs/sdks/customersessions/README.md#create) - Create Customer Session + +### [customers](docs/sdks/customers/README.md) + +* [list](docs/sdks/customers/README.md#list) - List Customers +* [create](docs/sdks/customers/README.md#create) - Create Customer +* [get](docs/sdks/customers/README.md#get) - Get Customer +* [update](docs/sdks/customers/README.md#update) - Update Customer +* [delete](docs/sdks/customers/README.md#delete) - Delete Customer +* [get_external](docs/sdks/customers/README.md#get_external) - Get Customer by External ID +* [update_external](docs/sdks/customers/README.md#update_external) - Update Customer by External ID +* [delete_external](docs/sdks/customers/README.md#delete_external) - Delete Customer by External ID +* [get_state](docs/sdks/customers/README.md#get_state) - Get Customer State +* [get_state_external](docs/sdks/customers/README.md#get_state_external) - Get Customer State by External ID + +### [discounts](docs/sdks/discounts/README.md) + +* [list](docs/sdks/discounts/README.md#list) - List Discounts +* [create](docs/sdks/discounts/README.md#create) - Create Discount +* [get](docs/sdks/discounts/README.md#get) - Get Discount +* [update](docs/sdks/discounts/README.md#update) - Update Discount +* [delete](docs/sdks/discounts/README.md#delete) - Delete Discount + +### [events](docs/sdks/events/README.md) + +* [list](docs/sdks/events/README.md#list) - List Events +* [list_names](docs/sdks/events/README.md#list_names) - List Event Names +* [get](docs/sdks/events/README.md#get) - Get Event +* [ingest](docs/sdks/events/README.md#ingest) - Ingest Events + +### [files](docs/sdks/files/README.md) + +* [list](docs/sdks/files/README.md#list) - List Files +* [create](docs/sdks/files/README.md#create) - Create File +* [uploaded](docs/sdks/files/README.md#uploaded) - Complete File Upload +* [update](docs/sdks/files/README.md#update) - Update File +* [delete](docs/sdks/files/README.md#delete) - Delete File + +### [license_keys](docs/sdks/licensekeys/README.md) + +* [list](docs/sdks/licensekeys/README.md#list) - List License Keys +* [get](docs/sdks/licensekeys/README.md#get) - Get License Key +* [update](docs/sdks/licensekeys/README.md#update) - Update License Key +* [get_activation](docs/sdks/licensekeys/README.md#get_activation) - Get Activation + +### [meters](docs/sdks/meters/README.md) + +* [list](docs/sdks/meters/README.md#list) - List Meters +* [create](docs/sdks/meters/README.md#create) - Create Meter +* [get](docs/sdks/meters/README.md#get) - Get Meter +* [update](docs/sdks/meters/README.md#update) - Update Meter +* [quantities](docs/sdks/meters/README.md#quantities) - Get Meter Quantities + +### [metrics](docs/sdks/metrics/README.md) + +* [get](docs/sdks/metrics/README.md#get) - Get Metrics +* [limits](docs/sdks/metrics/README.md#limits) - Get Metrics Limits + +### [oauth2](docs/sdks/oauth2/README.md) + +* [authorize](docs/sdks/oauth2/README.md#authorize) - Authorize +* [token](docs/sdks/oauth2/README.md#token) - Request Token +* [revoke](docs/sdks/oauth2/README.md#revoke) - Revoke Token +* [introspect](docs/sdks/oauth2/README.md#introspect) - Introspect Token +* [userinfo](docs/sdks/oauth2/README.md#userinfo) - Get User Info + +### [oauth2_clients](docs/sdks/oauth2clients/README.md) + +* [list](docs/sdks/oauth2clients/README.md#list) - List Clients +* [create](docs/sdks/oauth2clients/README.md#create) - Create Client +* [get](docs/sdks/oauth2clients/README.md#get) - Get Client +* [update](docs/sdks/oauth2clients/README.md#update) - Update Client +* [delete](docs/sdks/oauth2clients/README.md#delete) - Delete Client + +### [orders](docs/sdks/orders/README.md) + +* [list](docs/sdks/orders/README.md#list) - List Orders +* [get](docs/sdks/orders/README.md#get) - Get Order +* [invoice](docs/sdks/orders/README.md#invoice) - Get Order Invoice + +### [organizations](docs/sdks/organizations/README.md) + +* [list](docs/sdks/organizations/README.md#list) - List Organizations +* [create](docs/sdks/organizations/README.md#create) - Create Organization +* [get](docs/sdks/organizations/README.md#get) - Get Organization +* [update](docs/sdks/organizations/README.md#update) - Update Organization + + +### [products](docs/sdks/products/README.md) + +* [list](docs/sdks/products/README.md#list) - List Products +* [create](docs/sdks/products/README.md#create) - Create Product +* [get](docs/sdks/products/README.md#get) - Get Product +* [update](docs/sdks/products/README.md#update) - Update Product +* [update_benefits](docs/sdks/products/README.md#update_benefits) - Update Product Benefits + +### [refunds](docs/sdks/refunds/README.md) + +* [list](docs/sdks/refunds/README.md#list) - List Refunds +* [create](docs/sdks/refunds/README.md#create) - Create Refund + +### [subscriptions](docs/sdks/subscriptions/README.md) + +* [list](docs/sdks/subscriptions/README.md#list) - List Subscriptions +* [export](docs/sdks/subscriptions/README.md#export) - Export Subscriptions +* [get](docs/sdks/subscriptions/README.md#get) - Get Subscription +* [update](docs/sdks/subscriptions/README.md#update) - Update Subscription +* [revoke](docs/sdks/subscriptions/README.md#revoke) - Revoke Subscription + +
+ + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. + +By default an API error will raise a `Errors::APIError`, which has the following properties: + +| Property | Type | Description | +|----------------|-----------------------------------------|-----------------------| +| `message` | *string* | The error message | +| `status_code` | *int* | The HTTP status code | +| `raw_response` | *Faraday::Response* | The raw HTTP response | +| `body` | *string* | The response content | + +When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list` method throws the following exceptions: + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------- | ---------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +### Example + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +begin + res = s.organizations.list(slug="", page=768_578, limit=547_272, sorting=[ + Models::Shared::OrganizationSortProperty::NAME, + ]) + + if ! res.list_resource_organization.nil? + # handle response + end +rescue Models::Errors::HTTPValidationError => e + # handle $e->$container data + throw $e; +rescue Errors::APIError => e + # handle default exception + raise e +end + +``` + + + +## Server Selection + +### Select Server by Name + +You can override the default server globally by passing a server name to the `server (Symbol)` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers: + +| Name | Server | Description | +| ------------ | ------------------------------ | ---------------------- | +| `production` | `https://api.polar.sh` | Production environment | +| `sandbox` | `https://sandbox-api.polar.sh` | Sandbox environment | + +#### Example + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + server: "sandbox", + access_token: "", + ) + +res = s.organizations.list(slug="", page=768_578, limit=547_272, sorting=[ + Models::Shared::OrganizationSortProperty::NAME, +]) + +if ! res.list_resource_organization.nil? + # handle response +end + +``` + +### Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `server_url (String)` optional parameter when initializing the SDK client instance. For example: +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + server_url: "https://api.polar.sh", + access_token: "", + ) + +res = s.organizations.list(slug="", page=768_578, limit=547_272, sorting=[ + Models::Shared::OrganizationSortProperty::NAME, +]) + +if ! res.list_resource_organization.nil? + # handle response +end + +``` + + + + +# Development + +## Maturity + +This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage +to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally +looking for the latest version. + +## Contributions + +While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. +We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release. + +### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=polar-sdk&utm_campaign=ruby) diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..18fbd6d --- /dev/null +++ b/Rakefile @@ -0,0 +1,23 @@ +# typed: true +# frozen_string_literal: true + +require 'bundler/gem_tasks' +require 'minitest/test_task' +require 'rubocop/rake_task' + +RuboCop::RakeTask.new + +Minitest::TestTask.create + +task :default => :test + + +# Developers can run all tests with: +# +# $ rake test +# +# Developers can run individual test files with: +# +# $ rake test test/parameter_test +# +# and run individual tests by adding `focus` to the line before the test definition. \ No newline at end of file diff --git a/USAGE.md b/USAGE.md new file mode 100644 index 0000000..2765f37 --- /dev/null +++ b/USAGE.md @@ -0,0 +1,18 @@ + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.organizations.list(slug="", page=768_578, limit=547_272, sorting=[ + Models::Shared::OrganizationSortProperty::NAME, +]) + +if ! res.list_resource_organization.nil? + # handle response +end + +``` + \ No newline at end of file diff --git a/docs/models/errors/alreadycanceledsubscription.md b/docs/models/errors/alreadycanceledsubscription.md new file mode 100644 index 0000000..557f8f2 --- /dev/null +++ b/docs/models/errors/alreadycanceledsubscription.md @@ -0,0 +1,9 @@ +# AlreadyCanceledSubscription + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `error` | *::String* | :heavy_check_mark: | N/A | AlreadyCanceledSubscription | +| `detail` | *::String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/errors/expiredcheckouterror.md b/docs/models/errors/expiredcheckouterror.md new file mode 100644 index 0000000..0c3a199 --- /dev/null +++ b/docs/models/errors/expiredcheckouterror.md @@ -0,0 +1,9 @@ +# ExpiredCheckoutError + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| `error` | *::String* | :heavy_check_mark: | N/A | ExpiredCheckoutError | +| `detail` | *::String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/errors/httpvalidationerror.md b/docs/models/errors/httpvalidationerror.md new file mode 100644 index 0000000..a23c588 --- /dev/null +++ b/docs/models/errors/httpvalidationerror.md @@ -0,0 +1,8 @@ +# HTTPValidationError + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `detail` | T::Array<[Models::Shared::ValidationError](../../models/shared/validationerror.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/notpermitted.md b/docs/models/errors/notpermitted.md new file mode 100644 index 0000000..c32b4da --- /dev/null +++ b/docs/models/errors/notpermitted.md @@ -0,0 +1,9 @@ +# NotPermitted + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `error` | *::String* | :heavy_check_mark: | N/A | NotPermitted | +| `detail` | *::String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/errors/refundamounttoohigh.md b/docs/models/errors/refundamounttoohigh.md new file mode 100644 index 0000000..74ee496 --- /dev/null +++ b/docs/models/errors/refundamounttoohigh.md @@ -0,0 +1,9 @@ +# RefundAmountTooHigh + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `error` | *::String* | :heavy_check_mark: | N/A | RefundAmountTooHigh | +| `detail` | *::String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/errors/refundedalready.md b/docs/models/errors/refundedalready.md new file mode 100644 index 0000000..e11881b --- /dev/null +++ b/docs/models/errors/refundedalready.md @@ -0,0 +1,9 @@ +# RefundedAlready + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `error` | *::String* | :heavy_check_mark: | N/A | RefundedAlready | +| `detail` | *::String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/errors/resourcenotfound.md b/docs/models/errors/resourcenotfound.md new file mode 100644 index 0000000..c807db0 --- /dev/null +++ b/docs/models/errors/resourcenotfound.md @@ -0,0 +1,9 @@ +# ResourceNotFound + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `error` | *::String* | :heavy_check_mark: | N/A | ResourceNotFound | +| `detail` | *::String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/errors/unauthorized.md b/docs/models/errors/unauthorized.md new file mode 100644 index 0000000..4ae8b67 --- /dev/null +++ b/docs/models/errors/unauthorized.md @@ -0,0 +1,9 @@ +# Unauthorized + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `error` | *::String* | :heavy_check_mark: | N/A | Unauthorized | +| `detail` | *::String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/benefitidfilter.md b/docs/models/operations/benefitidfilter.md new file mode 100644 index 0000000..f9aefc7 --- /dev/null +++ b/docs/models/operations/benefitidfilter.md @@ -0,0 +1,4 @@ +# BenefitIDFilter + +Filter products granting specific benefit. + diff --git a/docs/models/operations/benefitscreateresponse.md b/docs/models/operations/benefitscreateresponse.md new file mode 100644 index 0000000..1dab280 --- /dev/null +++ b/docs/models/operations/benefitscreateresponse.md @@ -0,0 +1,11 @@ +# BenefitsCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `benefit` | [T.nilable(T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit))](../../models/shared/benefit.md) | :heavy_minus_sign: | Benefit created. | \ No newline at end of file diff --git a/docs/models/operations/benefitsdeleterequest.md b/docs/models/operations/benefitsdeleterequest.md new file mode 100644 index 0000000..34da6b7 --- /dev/null +++ b/docs/models/operations/benefitsdeleterequest.md @@ -0,0 +1,8 @@ +# BenefitsDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/benefitsdeleteresponse.md b/docs/models/operations/benefitsdeleteresponse.md new file mode 100644 index 0000000..3ff4003 --- /dev/null +++ b/docs/models/operations/benefitsdeleteresponse.md @@ -0,0 +1,10 @@ +# BenefitsDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/benefitsgetrequest.md b/docs/models/operations/benefitsgetrequest.md new file mode 100644 index 0000000..f8d438b --- /dev/null +++ b/docs/models/operations/benefitsgetrequest.md @@ -0,0 +1,8 @@ +# BenefitsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/benefitsgetresponse.md b/docs/models/operations/benefitsgetresponse.md new file mode 100644 index 0000000..58c8313 --- /dev/null +++ b/docs/models/operations/benefitsgetresponse.md @@ -0,0 +1,11 @@ +# BenefitsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `benefit` | [T.nilable(T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit))](../../models/shared/benefit.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/benefitsgrantsrequest.md b/docs/models/operations/benefitsgrantsrequest.md new file mode 100644 index 0000000..2017cfd --- /dev/null +++ b/docs/models/operations/benefitsgrantsrequest.md @@ -0,0 +1,12 @@ +# BenefitsGrantsRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `is_granted` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. | +| `customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparamcustomeridfilter.md) | :heavy_minus_sign: | Filter by customer. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | \ No newline at end of file diff --git a/docs/models/operations/benefitsgrantsresponse.md b/docs/models/operations/benefitsgrantsresponse.md new file mode 100644 index 0000000..fedcc44 --- /dev/null +++ b/docs/models/operations/benefitsgrantsresponse.md @@ -0,0 +1,11 @@ +# BenefitsGrantsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_benefit_grant` | [T.nilable(Models::Shared::ListResourceBenefitGrant)](../../models/shared/listresourcebenefitgrant.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/benefitslistrequest.md b/docs/models/operations/benefitslistrequest.md new file mode 100644 index 0000000..c5b86e4 --- /dev/null +++ b/docs/models/operations/benefitslistrequest.md @@ -0,0 +1,13 @@ +# BenefitsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `type_filter` | [T.nilable(T.any(Models::Shared::BenefitType, T::Array[Models::Shared::BenefitType]))](../../models/operations/benefittypefilter.md) | :heavy_minus_sign: | Filter by benefit type. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by description. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::BenefitSortProperty](../../models/shared/benefitsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/benefitslistresponse.md b/docs/models/operations/benefitslistresponse.md new file mode 100644 index 0000000..d3d6902 --- /dev/null +++ b/docs/models/operations/benefitslistresponse.md @@ -0,0 +1,11 @@ +# BenefitsListResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_benefit` | [T.nilable(Models::Shared::ListResourceBenefit)](../../models/shared/listresourcebenefit.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/benefitsupdatebenefitupdate.md b/docs/models/operations/benefitsupdatebenefitupdate.md new file mode 100644 index 0000000..084ebaa --- /dev/null +++ b/docs/models/operations/benefitsupdatebenefitupdate.md @@ -0,0 +1,2 @@ +# BenefitsUpdateBenefitUpdate + diff --git a/docs/models/operations/benefitsupdaterequest.md b/docs/models/operations/benefitsupdaterequest.md new file mode 100644 index 0000000..73864c6 --- /dev/null +++ b/docs/models/operations/benefitsupdaterequest.md @@ -0,0 +1,9 @@ +# BenefitsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `request_body` | [T.any(Models::Shared::BenefitCustomUpdate, Models::Shared::BenefitDiscordUpdate, Models::Shared::BenefitGitHubRepositoryUpdate, Models::Shared::BenefitDownloadablesUpdate, Models::Shared::BenefitLicenseKeysUpdate, Models::Shared::BenefitMeterCreditUpdate)](../../models/operations/benefitsupdatebenefitupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/benefitsupdateresponse.md b/docs/models/operations/benefitsupdateresponse.md new file mode 100644 index 0000000..9f33201 --- /dev/null +++ b/docs/models/operations/benefitsupdateresponse.md @@ -0,0 +1,11 @@ +# BenefitsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `benefit` | [T.nilable(T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit))](../../models/shared/benefit.md) | :heavy_minus_sign: | Benefit updated. | \ No newline at end of file diff --git a/docs/models/operations/benefittypefilter.md b/docs/models/operations/benefittypefilter.md new file mode 100644 index 0000000..6f43b64 --- /dev/null +++ b/docs/models/operations/benefittypefilter.md @@ -0,0 +1,4 @@ +# BenefitTypeFilter + +Filter by benefit type. + diff --git a/docs/models/operations/checkoutidfilter.md b/docs/models/operations/checkoutidfilter.md new file mode 100644 index 0000000..cd5b411 --- /dev/null +++ b/docs/models/operations/checkoutidfilter.md @@ -0,0 +1,4 @@ +# CheckoutIDFilter + +Filter by checkout ID. + diff --git a/docs/models/operations/checkoutlinkscreatecheckoutlinkcreate.md b/docs/models/operations/checkoutlinkscreatecheckoutlinkcreate.md new file mode 100644 index 0000000..2e3529a --- /dev/null +++ b/docs/models/operations/checkoutlinkscreatecheckoutlinkcreate.md @@ -0,0 +1,2 @@ +# CheckoutLinksCreateCheckoutLinkCreate + diff --git a/docs/models/operations/checkoutlinkscreateresponse.md b/docs/models/operations/checkoutlinkscreateresponse.md new file mode 100644 index 0000000..ede8fa9 --- /dev/null +++ b/docs/models/operations/checkoutlinkscreateresponse.md @@ -0,0 +1,11 @@ +# CheckoutLinksCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `checkout_link` | [T.nilable(Models::Shared::CheckoutLink)](../../models/shared/checkoutlink.md) | :heavy_minus_sign: | Checkout link created. | \ No newline at end of file diff --git a/docs/models/operations/checkoutlinksdeleterequest.md b/docs/models/operations/checkoutlinksdeleterequest.md new file mode 100644 index 0000000..10342b3 --- /dev/null +++ b/docs/models/operations/checkoutlinksdeleterequest.md @@ -0,0 +1,8 @@ +# CheckoutLinksDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `id` | *::String* | :heavy_check_mark: | The checkout link ID. | \ No newline at end of file diff --git a/docs/models/operations/checkoutlinksdeleteresponse.md b/docs/models/operations/checkoutlinksdeleteresponse.md new file mode 100644 index 0000000..3ff92f6 --- /dev/null +++ b/docs/models/operations/checkoutlinksdeleteresponse.md @@ -0,0 +1,10 @@ +# CheckoutLinksDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/checkoutlinksgetrequest.md b/docs/models/operations/checkoutlinksgetrequest.md new file mode 100644 index 0000000..007dd0d --- /dev/null +++ b/docs/models/operations/checkoutlinksgetrequest.md @@ -0,0 +1,8 @@ +# CheckoutLinksGetRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `id` | *::String* | :heavy_check_mark: | The checkout link ID. | \ No newline at end of file diff --git a/docs/models/operations/checkoutlinksgetresponse.md b/docs/models/operations/checkoutlinksgetresponse.md new file mode 100644 index 0000000..000f816 --- /dev/null +++ b/docs/models/operations/checkoutlinksgetresponse.md @@ -0,0 +1,11 @@ +# CheckoutLinksGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `checkout_link` | [T.nilable(Models::Shared::CheckoutLink)](../../models/shared/checkoutlink.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/checkoutlinkslistqueryparamorganizationidfilter.md b/docs/models/operations/checkoutlinkslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..d362334 --- /dev/null +++ b/docs/models/operations/checkoutlinkslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CheckoutLinksListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/checkoutlinkslistqueryparamproductidfilter.md b/docs/models/operations/checkoutlinkslistqueryparamproductidfilter.md new file mode 100644 index 0000000..3393e9e --- /dev/null +++ b/docs/models/operations/checkoutlinkslistqueryparamproductidfilter.md @@ -0,0 +1,4 @@ +# CheckoutLinksListQueryParamProductIDFilter + +Filter by product ID. + diff --git a/docs/models/operations/checkoutlinkslistrequest.md b/docs/models/operations/checkoutlinkslistrequest.md new file mode 100644 index 0000000..2c2a25b --- /dev/null +++ b/docs/models/operations/checkoutlinkslistrequest.md @@ -0,0 +1,12 @@ +# CheckoutLinksListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/checkoutlinkslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `product_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/checkoutlinkslistqueryparamproductidfilter.md) | :heavy_minus_sign: | Filter by product ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::CheckoutLinkSortProperty](../../models/shared/checkoutlinksortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/checkoutlinkslistresponse.md b/docs/models/operations/checkoutlinkslistresponse.md new file mode 100644 index 0000000..7b820c1 --- /dev/null +++ b/docs/models/operations/checkoutlinkslistresponse.md @@ -0,0 +1,11 @@ +# CheckoutLinksListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_checkout_link` | [T.nilable(Models::Shared::ListResourceCheckoutLink)](../../models/shared/listresourcecheckoutlink.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/checkoutlinksupdaterequest.md b/docs/models/operations/checkoutlinksupdaterequest.md new file mode 100644 index 0000000..02b0f34 --- /dev/null +++ b/docs/models/operations/checkoutlinksupdaterequest.md @@ -0,0 +1,9 @@ +# CheckoutLinksUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The checkout link ID. | +| `checkout_link_update` | [Models::Shared::CheckoutLinkUpdate](../../models/shared/checkoutlinkupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/checkoutlinksupdateresponse.md b/docs/models/operations/checkoutlinksupdateresponse.md new file mode 100644 index 0000000..0089ec7 --- /dev/null +++ b/docs/models/operations/checkoutlinksupdateresponse.md @@ -0,0 +1,11 @@ +# CheckoutLinksUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `checkout_link` | [T.nilable(Models::Shared::CheckoutLink)](../../models/shared/checkoutlink.md) | :heavy_minus_sign: | Checkout link updated. | \ No newline at end of file diff --git a/docs/models/operations/checkoutsclientgetrequest.md b/docs/models/operations/checkoutsclientgetrequest.md new file mode 100644 index 0000000..7d88fdf --- /dev/null +++ b/docs/models/operations/checkoutsclientgetrequest.md @@ -0,0 +1,8 @@ +# CheckoutsClientGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `client_secret` | *::String* | :heavy_check_mark: | The checkout session client secret. | \ No newline at end of file diff --git a/docs/models/operations/checkoutsclientgetresponse.md b/docs/models/operations/checkoutsclientgetresponse.md new file mode 100644 index 0000000..65f9e41 --- /dev/null +++ b/docs/models/operations/checkoutsclientgetresponse.md @@ -0,0 +1,11 @@ +# CheckoutsClientGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `checkout_public` | [T.nilable(Models::Shared::CheckoutPublic)](../../models/shared/checkoutpublic.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/checkoutscreateresponse.md b/docs/models/operations/checkoutscreateresponse.md new file mode 100644 index 0000000..3d9c63f --- /dev/null +++ b/docs/models/operations/checkoutscreateresponse.md @@ -0,0 +1,11 @@ +# CheckoutsCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `checkout` | [T.nilable(Models::Shared::Checkout)](../../models/shared/checkout.md) | :heavy_minus_sign: | Checkout session created. | \ No newline at end of file diff --git a/docs/models/operations/checkoutsgetrequest.md b/docs/models/operations/checkoutsgetrequest.md new file mode 100644 index 0000000..e1c272d --- /dev/null +++ b/docs/models/operations/checkoutsgetrequest.md @@ -0,0 +1,8 @@ +# CheckoutsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `id` | *::String* | :heavy_check_mark: | The checkout session ID. | \ No newline at end of file diff --git a/docs/models/operations/checkoutsgetresponse.md b/docs/models/operations/checkoutsgetresponse.md new file mode 100644 index 0000000..817bd23 --- /dev/null +++ b/docs/models/operations/checkoutsgetresponse.md @@ -0,0 +1,11 @@ +# CheckoutsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `checkout` | [T.nilable(Models::Shared::Checkout)](../../models/shared/checkout.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/checkoutslistqueryparamorganizationidfilter.md b/docs/models/operations/checkoutslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..8a45588 --- /dev/null +++ b/docs/models/operations/checkoutslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CheckoutsListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/checkoutslistqueryparamproductidfilter.md b/docs/models/operations/checkoutslistqueryparamproductidfilter.md new file mode 100644 index 0000000..e3f2ee0 --- /dev/null +++ b/docs/models/operations/checkoutslistqueryparamproductidfilter.md @@ -0,0 +1,4 @@ +# CheckoutsListQueryParamProductIDFilter + +Filter by product ID. + diff --git a/docs/models/operations/checkoutslistrequest.md b/docs/models/operations/checkoutslistrequest.md new file mode 100644 index 0000000..73873f5 --- /dev/null +++ b/docs/models/operations/checkoutslistrequest.md @@ -0,0 +1,12 @@ +# CheckoutsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/checkoutslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `product_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/checkoutslistqueryparamproductidfilter.md) | :heavy_minus_sign: | Filter by product ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::CheckoutSortProperty](../../models/shared/checkoutsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/checkoutslistresponse.md b/docs/models/operations/checkoutslistresponse.md new file mode 100644 index 0000000..48a20ff --- /dev/null +++ b/docs/models/operations/checkoutslistresponse.md @@ -0,0 +1,11 @@ +# CheckoutsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_checkout` | [T.nilable(Models::Shared::ListResourceCheckout)](../../models/shared/listresourcecheckout.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customeridfilter.md b/docs/models/operations/customeridfilter.md new file mode 100644 index 0000000..384e687 --- /dev/null +++ b/docs/models/operations/customeridfilter.md @@ -0,0 +1,4 @@ +# CustomerIDFilter + +Filter by customer ID. + diff --git a/docs/models/operations/customermetersgetrequest.md b/docs/models/operations/customermetersgetrequest.md new file mode 100644 index 0000000..333772f --- /dev/null +++ b/docs/models/operations/customermetersgetrequest.md @@ -0,0 +1,8 @@ +# CustomerMetersGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `id` | *::String* | :heavy_check_mark: | The customer meter ID. | \ No newline at end of file diff --git a/docs/models/operations/customermetersgetresponse.md b/docs/models/operations/customermetersgetresponse.md new file mode 100644 index 0000000..7394064 --- /dev/null +++ b/docs/models/operations/customermetersgetresponse.md @@ -0,0 +1,11 @@ +# CustomerMetersGetResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_meter` | [T.nilable(Models::Shared::CustomerMeter)](../../models/shared/customermeter.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customermeterslistqueryparamcustomeridfilter.md b/docs/models/operations/customermeterslistqueryparamcustomeridfilter.md new file mode 100644 index 0000000..df00e3a --- /dev/null +++ b/docs/models/operations/customermeterslistqueryparamcustomeridfilter.md @@ -0,0 +1,4 @@ +# CustomerMetersListQueryParamCustomerIDFilter + +Filter by customer ID. + diff --git a/docs/models/operations/customermeterslistqueryparamexternalcustomeridfilter.md b/docs/models/operations/customermeterslistqueryparamexternalcustomeridfilter.md new file mode 100644 index 0000000..1bf93ea --- /dev/null +++ b/docs/models/operations/customermeterslistqueryparamexternalcustomeridfilter.md @@ -0,0 +1,4 @@ +# CustomerMetersListQueryParamExternalCustomerIDFilter + +Filter by external customer ID. + diff --git a/docs/models/operations/customermeterslistqueryparamorganizationidfilter.md b/docs/models/operations/customermeterslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..6415da3 --- /dev/null +++ b/docs/models/operations/customermeterslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CustomerMetersListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/customermeterslistrequest.md b/docs/models/operations/customermeterslistrequest.md new file mode 100644 index 0000000..1f38a96 --- /dev/null +++ b/docs/models/operations/customermeterslistrequest.md @@ -0,0 +1,14 @@ +# CustomerMetersListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customermeterslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customermeterslistqueryparamcustomeridfilter.md) | :heavy_minus_sign: | Filter by customer ID. | +| `external_customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customermeterslistqueryparamexternalcustomeridfilter.md) | :heavy_minus_sign: | Filter by external customer ID. | +| `meter_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparammeteridfilter.md) | :heavy_minus_sign: | Filter by meter ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::CustomerMeterSortProperty](../../models/shared/customermetersortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/customermeterslistresponse.md b/docs/models/operations/customermeterslistresponse.md new file mode 100644 index 0000000..2881c76 --- /dev/null +++ b/docs/models/operations/customermeterslistresponse.md @@ -0,0 +1,11 @@ +# CustomerMetersListResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_customer_meter` | [T.nilable(Models::Shared::ListResourceCustomerMeter)](../../models/shared/listresourcecustomermeter.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalbenefitgrantsgetrequest.md b/docs/models/operations/customerportalbenefitgrantsgetrequest.md new file mode 100644 index 0000000..3a1a3af --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantsgetrequest.md @@ -0,0 +1,8 @@ +# CustomerPortalBenefitGrantsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `id` | *::String* | :heavy_check_mark: | The benefit grant ID. | \ No newline at end of file diff --git a/docs/models/operations/customerportalbenefitgrantsgetresponse.md b/docs/models/operations/customerportalbenefitgrantsgetresponse.md new file mode 100644 index 0000000..1b7d0e3 --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantsgetresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalBenefitGrantsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_benefit_grant` | [T.nilable(T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit))](../../models/shared/customerbenefitgrant.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalbenefitgrantsgetsecurity.md b/docs/models/operations/customerportalbenefitgrantsgetsecurity.md new file mode 100644 index 0000000..4124c9d --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantsgetsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalBenefitGrantsGetSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalbenefitgrantslistqueryparambenefitidfilter.md b/docs/models/operations/customerportalbenefitgrantslistqueryparambenefitidfilter.md new file mode 100644 index 0000000..4a0bfd8 --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantslistqueryparambenefitidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalBenefitGrantsListQueryParamBenefitIDFilter + +Filter by benefit ID. + diff --git a/docs/models/operations/customerportalbenefitgrantslistqueryparamorganizationidfilter.md b/docs/models/operations/customerportalbenefitgrantslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..d78a8dd --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalBenefitGrantsListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/customerportalbenefitgrantslistrequest.md b/docs/models/operations/customerportalbenefitgrantslistrequest.md new file mode 100644 index 0000000..baeee67 --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantslistrequest.md @@ -0,0 +1,16 @@ +# CustomerPortalBenefitGrantsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type_filter` | [T.nilable(T.any(Models::Shared::BenefitType, T::Array[Models::Shared::BenefitType]))](../../models/operations/queryparambenefittypefilter.md) | :heavy_minus_sign: | Filter by benefit type. | +| `benefit_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportalbenefitgrantslistqueryparambenefitidfilter.md) | :heavy_minus_sign: | Filter by benefit ID. | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportalbenefitgrantslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `checkout_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparamcheckoutidfilter.md) | :heavy_minus_sign: | Filter by checkout ID. | +| `order_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparamorderidfilter.md) | :heavy_minus_sign: | Filter by order ID. | +| `subscription_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparamsubscriptionidfilter.md) | :heavy_minus_sign: | Filter by subscription ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::CustomerBenefitGrantSortProperty](../../models/shared/customerbenefitgrantsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/customerportalbenefitgrantslistresponse.md b/docs/models/operations/customerportalbenefitgrantslistresponse.md new file mode 100644 index 0000000..9bf6459 --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantslistresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalBenefitGrantsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_customer_benefit_grant` | [T.nilable(Models::Shared::ListResourceCustomerBenefitGrant)](../../models/shared/listresourcecustomerbenefitgrant.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalbenefitgrantslistsecurity.md b/docs/models/operations/customerportalbenefitgrantslistsecurity.md new file mode 100644 index 0000000..9a153d5 --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantslistsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalBenefitGrantsListSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalbenefitgrantsupdaterequest.md b/docs/models/operations/customerportalbenefitgrantsupdaterequest.md new file mode 100644 index 0000000..e5081e9 --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantsupdaterequest.md @@ -0,0 +1,9 @@ +# CustomerPortalBenefitGrantsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The benefit grant ID. | +| `customer_benefit_grant_update` | [T.any(Models::Shared::CustomerBenefitGrantDiscordUpdate, Models::Shared::CustomerBenefitGrantGitHubRepositoryUpdate, Models::Shared::CustomerBenefitGrantDownloadablesUpdate, Models::Shared::CustomerBenefitGrantLicenseKeysUpdate, Models::Shared::CustomerBenefitGrantCustomUpdate, Models::Shared::CustomerBenefitGrantMeterCreditUpdate)](../../models/shared/customerbenefitgrantupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalbenefitgrantsupdateresponse.md b/docs/models/operations/customerportalbenefitgrantsupdateresponse.md new file mode 100644 index 0000000..c25534a --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantsupdateresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalBenefitGrantsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_benefit_grant` | [T.nilable(T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit))](../../models/shared/customerbenefitgrant.md) | :heavy_minus_sign: | Benefit grant updated. | \ No newline at end of file diff --git a/docs/models/operations/customerportalbenefitgrantsupdatesecurity.md b/docs/models/operations/customerportalbenefitgrantsupdatesecurity.md new file mode 100644 index 0000000..619a6d1 --- /dev/null +++ b/docs/models/operations/customerportalbenefitgrantsupdatesecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalBenefitGrantsUpdateSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomermetersgetrequest.md b/docs/models/operations/customerportalcustomermetersgetrequest.md new file mode 100644 index 0000000..dd3e43a --- /dev/null +++ b/docs/models/operations/customerportalcustomermetersgetrequest.md @@ -0,0 +1,8 @@ +# CustomerPortalCustomerMetersGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `id` | *::String* | :heavy_check_mark: | The customer meter ID. | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomermetersgetresponse.md b/docs/models/operations/customerportalcustomermetersgetresponse.md new file mode 100644 index 0000000..0ee2389 --- /dev/null +++ b/docs/models/operations/customerportalcustomermetersgetresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalCustomerMetersGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_customer_meter` | [T.nilable(Models::Shared::CustomerCustomerMeter)](../../models/shared/customercustomermeter.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomermetersgetsecurity.md b/docs/models/operations/customerportalcustomermetersgetsecurity.md new file mode 100644 index 0000000..012e14b --- /dev/null +++ b/docs/models/operations/customerportalcustomermetersgetsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalCustomerMetersGetSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomermeterslistrequest.md b/docs/models/operations/customerportalcustomermeterslistrequest.md new file mode 100644 index 0000000..ba5df16 --- /dev/null +++ b/docs/models/operations/customerportalcustomermeterslistrequest.md @@ -0,0 +1,12 @@ +# CustomerPortalCustomerMetersListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `meter_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/meteridfilter.md) | :heavy_minus_sign: | Filter by meter ID. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by meter name. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::CustomerCustomerMeterSortProperty](../../models/shared/customercustomermetersortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomermeterslistresponse.md b/docs/models/operations/customerportalcustomermeterslistresponse.md new file mode 100644 index 0000000..db6b136 --- /dev/null +++ b/docs/models/operations/customerportalcustomermeterslistresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalCustomerMetersListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_customer_customer_meter` | [T.nilable(Models::Shared::ListResourceCustomerCustomerMeter)](../../models/shared/listresourcecustomercustomermeter.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomermeterslistsecurity.md b/docs/models/operations/customerportalcustomermeterslistsecurity.md new file mode 100644 index 0000000..f2e7fac --- /dev/null +++ b/docs/models/operations/customerportalcustomermeterslistsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalCustomerMetersListSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersaddpaymentmethodresponse.md b/docs/models/operations/customerportalcustomersaddpaymentmethodresponse.md new file mode 100644 index 0000000..8553074 --- /dev/null +++ b/docs/models/operations/customerportalcustomersaddpaymentmethodresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalCustomersAddPaymentMethodResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `response_customer_portal_customers_add_payment_method` | [T.nilable(T.any(Models::Shared::PaymentMethodCard, Models::Shared::PaymentMethodGeneric))](../../models/operations/customerportalcustomersaddpaymentmethodresponsecustomerportalcustomersaddpaymentmethod.md) | :heavy_minus_sign: | Payment method created. | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersaddpaymentmethodresponsecustomerportalcustomersaddpaymentmethod.md b/docs/models/operations/customerportalcustomersaddpaymentmethodresponsecustomerportalcustomersaddpaymentmethod.md new file mode 100644 index 0000000..b1d3708 --- /dev/null +++ b/docs/models/operations/customerportalcustomersaddpaymentmethodresponsecustomerportalcustomersaddpaymentmethod.md @@ -0,0 +1,4 @@ +# CustomerPortalCustomersAddPaymentMethodResponseCustomerPortalCustomersAddPaymentMethod + +Payment method created. + diff --git a/docs/models/operations/customerportalcustomersaddpaymentmethodsecurity.md b/docs/models/operations/customerportalcustomersaddpaymentmethodsecurity.md new file mode 100644 index 0000000..b6ab451 --- /dev/null +++ b/docs/models/operations/customerportalcustomersaddpaymentmethodsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalCustomersAddPaymentMethodSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersdeletepaymentmethodrequest.md b/docs/models/operations/customerportalcustomersdeletepaymentmethodrequest.md new file mode 100644 index 0000000..8eb8fc5 --- /dev/null +++ b/docs/models/operations/customerportalcustomersdeletepaymentmethodrequest.md @@ -0,0 +1,8 @@ +# CustomerPortalCustomersDeletePaymentMethodRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersdeletepaymentmethodresponse.md b/docs/models/operations/customerportalcustomersdeletepaymentmethodresponse.md new file mode 100644 index 0000000..21c66a9 --- /dev/null +++ b/docs/models/operations/customerportalcustomersdeletepaymentmethodresponse.md @@ -0,0 +1,10 @@ +# CustomerPortalCustomersDeletePaymentMethodResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersdeletepaymentmethodsecurity.md b/docs/models/operations/customerportalcustomersdeletepaymentmethodsecurity.md new file mode 100644 index 0000000..a96e090 --- /dev/null +++ b/docs/models/operations/customerportalcustomersdeletepaymentmethodsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalCustomersDeletePaymentMethodSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersgetpaymentmethodsrequest.md b/docs/models/operations/customerportalcustomersgetpaymentmethodsrequest.md new file mode 100644 index 0000000..4b7e216 --- /dev/null +++ b/docs/models/operations/customerportalcustomersgetpaymentmethodsrequest.md @@ -0,0 +1,9 @@ +# CustomerPortalCustomersGetPaymentMethodsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersgetpaymentmethodsresponse.md b/docs/models/operations/customerportalcustomersgetpaymentmethodsresponse.md new file mode 100644 index 0000000..8b222dd --- /dev/null +++ b/docs/models/operations/customerportalcustomersgetpaymentmethodsresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalCustomersGetPaymentMethodsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_union_payment_method_card_payment_method_generic` | [T.nilable(Models::Shared::ListResourceUnionPaymentMethodCardPaymentMethodGeneric)](../../models/shared/listresourceunionpaymentmethodcardpaymentmethodgeneric.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersgetpaymentmethodssecurity.md b/docs/models/operations/customerportalcustomersgetpaymentmethodssecurity.md new file mode 100644 index 0000000..b94a089 --- /dev/null +++ b/docs/models/operations/customerportalcustomersgetpaymentmethodssecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalCustomersGetPaymentMethodsSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersgetresponse.md b/docs/models/operations/customerportalcustomersgetresponse.md new file mode 100644 index 0000000..af56893 --- /dev/null +++ b/docs/models/operations/customerportalcustomersgetresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalCustomersGetResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_portal_customer` | [T.nilable(Models::Shared::CustomerPortalCustomer)](../../models/shared/customerportalcustomer.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersgetsecurity.md b/docs/models/operations/customerportalcustomersgetsecurity.md new file mode 100644 index 0000000..7c4da47 --- /dev/null +++ b/docs/models/operations/customerportalcustomersgetsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalCustomersGetSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersupdateresponse.md b/docs/models/operations/customerportalcustomersupdateresponse.md new file mode 100644 index 0000000..355bb41 --- /dev/null +++ b/docs/models/operations/customerportalcustomersupdateresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalCustomersUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_portal_customer` | [T.nilable(Models::Shared::CustomerPortalCustomer)](../../models/shared/customerportalcustomer.md) | :heavy_minus_sign: | Customer updated. | \ No newline at end of file diff --git a/docs/models/operations/customerportalcustomersupdatesecurity.md b/docs/models/operations/customerportalcustomersupdatesecurity.md new file mode 100644 index 0000000..049a493 --- /dev/null +++ b/docs/models/operations/customerportalcustomersupdatesecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalCustomersUpdateSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportaldownloadablescustomerportaldownloadablesgetrequest.md b/docs/models/operations/customerportaldownloadablescustomerportaldownloadablesgetrequest.md new file mode 100644 index 0000000..1c3548b --- /dev/null +++ b/docs/models/operations/customerportaldownloadablescustomerportaldownloadablesgetrequest.md @@ -0,0 +1,8 @@ +# CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `token` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportaldownloadablescustomerportaldownloadablesgetresponse.md b/docs/models/operations/customerportaldownloadablescustomerportaldownloadablesgetresponse.md new file mode 100644 index 0000000..bf1cf95 --- /dev/null +++ b/docs/models/operations/customerportaldownloadablescustomerportaldownloadablesgetresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalDownloadablesCustomerPortalDownloadablesGetResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportaldownloadableslistqueryparambenefitidfilter.md b/docs/models/operations/customerportaldownloadableslistqueryparambenefitidfilter.md new file mode 100644 index 0000000..37a7fea --- /dev/null +++ b/docs/models/operations/customerportaldownloadableslistqueryparambenefitidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalDownloadablesListQueryParamBenefitIDFilter + +Filter by benefit ID. + diff --git a/docs/models/operations/customerportaldownloadableslistqueryparamorganizationidfilter.md b/docs/models/operations/customerportaldownloadableslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..91c39e9 --- /dev/null +++ b/docs/models/operations/customerportaldownloadableslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalDownloadablesListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/customerportaldownloadableslistrequest.md b/docs/models/operations/customerportaldownloadableslistrequest.md new file mode 100644 index 0000000..a954479 --- /dev/null +++ b/docs/models/operations/customerportaldownloadableslistrequest.md @@ -0,0 +1,11 @@ +# CustomerPortalDownloadablesListRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportaldownloadableslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `benefit_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportaldownloadableslistqueryparambenefitidfilter.md) | :heavy_minus_sign: | Filter by benefit ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | \ No newline at end of file diff --git a/docs/models/operations/customerportaldownloadableslistresponse.md b/docs/models/operations/customerportaldownloadableslistresponse.md new file mode 100644 index 0000000..d6bf077 --- /dev/null +++ b/docs/models/operations/customerportaldownloadableslistresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalDownloadablesListResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_downloadable_read` | [T.nilable(Models::Shared::ListResourceDownloadableRead)](../../models/shared/listresourcedownloadableread.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportaldownloadableslistsecurity.md b/docs/models/operations/customerportaldownloadableslistsecurity.md new file mode 100644 index 0000000..fdb12f0 --- /dev/null +++ b/docs/models/operations/customerportaldownloadableslistsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalDownloadablesListSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportallicensekeysactivateresponse.md b/docs/models/operations/customerportallicensekeysactivateresponse.md new file mode 100644 index 0000000..2cdc5bf --- /dev/null +++ b/docs/models/operations/customerportallicensekeysactivateresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalLicenseKeysActivateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `license_key_activation_read` | [T.nilable(Models::Shared::LicenseKeyActivationRead)](../../models/shared/licensekeyactivationread.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportallicensekeysdeactivateresponse.md b/docs/models/operations/customerportallicensekeysdeactivateresponse.md new file mode 100644 index 0000000..5a67db7 --- /dev/null +++ b/docs/models/operations/customerportallicensekeysdeactivateresponse.md @@ -0,0 +1,10 @@ +# CustomerPortalLicenseKeysDeactivateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/customerportallicensekeysgetrequest.md b/docs/models/operations/customerportallicensekeysgetrequest.md new file mode 100644 index 0000000..7ef1765 --- /dev/null +++ b/docs/models/operations/customerportallicensekeysgetrequest.md @@ -0,0 +1,8 @@ +# CustomerPortalLicenseKeysGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportallicensekeysgetresponse.md b/docs/models/operations/customerportallicensekeysgetresponse.md new file mode 100644 index 0000000..8b4e120 --- /dev/null +++ b/docs/models/operations/customerportallicensekeysgetresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalLicenseKeysGetResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `license_key_with_activations` | [T.nilable(Models::Shared::LicenseKeyWithActivations)](../../models/shared/licensekeywithactivations.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportallicensekeysgetsecurity.md b/docs/models/operations/customerportallicensekeysgetsecurity.md new file mode 100644 index 0000000..10d970c --- /dev/null +++ b/docs/models/operations/customerportallicensekeysgetsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalLicenseKeysGetSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportallicensekeyslistqueryparamorganizationidfilter.md b/docs/models/operations/customerportallicensekeyslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..cc7b2d6 --- /dev/null +++ b/docs/models/operations/customerportallicensekeyslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalLicenseKeysListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/customerportallicensekeyslistrequest.md b/docs/models/operations/customerportallicensekeyslistrequest.md new file mode 100644 index 0000000..c898ede --- /dev/null +++ b/docs/models/operations/customerportallicensekeyslistrequest.md @@ -0,0 +1,11 @@ +# CustomerPortalLicenseKeysListRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportallicensekeyslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `benefit_id` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by a specific benefit | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | \ No newline at end of file diff --git a/docs/models/operations/customerportallicensekeyslistresponse.md b/docs/models/operations/customerportallicensekeyslistresponse.md new file mode 100644 index 0000000..3c76ac8 --- /dev/null +++ b/docs/models/operations/customerportallicensekeyslistresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalLicenseKeysListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_license_key_read` | [T.nilable(Models::Shared::ListResourceLicenseKeyRead)](../../models/shared/listresourcelicensekeyread.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportallicensekeyslistsecurity.md b/docs/models/operations/customerportallicensekeyslistsecurity.md new file mode 100644 index 0000000..9b1920a --- /dev/null +++ b/docs/models/operations/customerportallicensekeyslistsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalLicenseKeysListSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportallicensekeysvalidateresponse.md b/docs/models/operations/customerportallicensekeysvalidateresponse.md new file mode 100644 index 0000000..8bd8093 --- /dev/null +++ b/docs/models/operations/customerportallicensekeysvalidateresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalLicenseKeysValidateResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `validated_license_key` | [T.nilable(Models::Shared::ValidatedLicenseKey)](../../models/shared/validatedlicensekey.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalordersgetrequest.md b/docs/models/operations/customerportalordersgetrequest.md new file mode 100644 index 0000000..8657bf0 --- /dev/null +++ b/docs/models/operations/customerportalordersgetrequest.md @@ -0,0 +1,8 @@ +# CustomerPortalOrdersGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The order ID. | \ No newline at end of file diff --git a/docs/models/operations/customerportalordersgetresponse.md b/docs/models/operations/customerportalordersgetresponse.md new file mode 100644 index 0000000..18daede --- /dev/null +++ b/docs/models/operations/customerportalordersgetresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalOrdersGetResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_order` | [T.nilable(Models::Shared::CustomerOrder)](../../models/shared/customerorder.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalordersgetsecurity.md b/docs/models/operations/customerportalordersgetsecurity.md new file mode 100644 index 0000000..b85b34d --- /dev/null +++ b/docs/models/operations/customerportalordersgetsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalOrdersGetSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalordersinvoicerequest.md b/docs/models/operations/customerportalordersinvoicerequest.md new file mode 100644 index 0000000..d9e78c0 --- /dev/null +++ b/docs/models/operations/customerportalordersinvoicerequest.md @@ -0,0 +1,8 @@ +# CustomerPortalOrdersInvoiceRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The order ID. | \ No newline at end of file diff --git a/docs/models/operations/customerportalordersinvoiceresponse.md b/docs/models/operations/customerportalordersinvoiceresponse.md new file mode 100644 index 0000000..50991cd --- /dev/null +++ b/docs/models/operations/customerportalordersinvoiceresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalOrdersInvoiceResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_order_invoice` | [T.nilable(Models::Shared::CustomerOrderInvoice)](../../models/shared/customerorderinvoice.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalordersinvoicesecurity.md b/docs/models/operations/customerportalordersinvoicesecurity.md new file mode 100644 index 0000000..f9ec2f3 --- /dev/null +++ b/docs/models/operations/customerportalordersinvoicesecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalOrdersInvoiceSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalorderslistqueryparamorganizationidfilter.md b/docs/models/operations/customerportalorderslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..2a538eb --- /dev/null +++ b/docs/models/operations/customerportalorderslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalOrdersListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/customerportalorderslistqueryparamproductbillingtypefilter.md b/docs/models/operations/customerportalorderslistqueryparamproductbillingtypefilter.md new file mode 100644 index 0000000..b7e5215 --- /dev/null +++ b/docs/models/operations/customerportalorderslistqueryparamproductbillingtypefilter.md @@ -0,0 +1,4 @@ +# CustomerPortalOrdersListQueryParamProductBillingTypeFilter + +Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. + diff --git a/docs/models/operations/customerportalorderslistqueryparamproductidfilter.md b/docs/models/operations/customerportalorderslistqueryparamproductidfilter.md new file mode 100644 index 0000000..25ac973 --- /dev/null +++ b/docs/models/operations/customerportalorderslistqueryparamproductidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalOrdersListQueryParamProductIDFilter + +Filter by product ID. + diff --git a/docs/models/operations/customerportalorderslistqueryparamsubscriptionidfilter.md b/docs/models/operations/customerportalorderslistqueryparamsubscriptionidfilter.md new file mode 100644 index 0000000..7e0fa26 --- /dev/null +++ b/docs/models/operations/customerportalorderslistqueryparamsubscriptionidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalOrdersListQueryParamSubscriptionIDFilter + +Filter by subscription ID. + diff --git a/docs/models/operations/customerportalorderslistrequest.md b/docs/models/operations/customerportalorderslistrequest.md new file mode 100644 index 0000000..dd9ed97 --- /dev/null +++ b/docs/models/operations/customerportalorderslistrequest.md @@ -0,0 +1,15 @@ +# CustomerPortalOrdersListRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportalorderslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `product_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportalorderslistqueryparamproductidfilter.md) | :heavy_minus_sign: | Filter by product ID. | +| `product_billing_type` | [T.nilable(T.any(Models::Shared::ProductBillingType, T::Array[Models::Shared::ProductBillingType]))](../../models/operations/customerportalorderslistqueryparamproductbillingtypefilter.md) | :heavy_minus_sign: | Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. | +| `subscription_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportalorderslistqueryparamsubscriptionidfilter.md) | :heavy_minus_sign: | Filter by subscription ID. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Search by product or organization name. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::CustomerOrderSortProperty](../../models/shared/customerordersortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/customerportalorderslistresponse.md b/docs/models/operations/customerportalorderslistresponse.md new file mode 100644 index 0000000..2d4bbc3 --- /dev/null +++ b/docs/models/operations/customerportalorderslistresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalOrdersListResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_customer_order` | [T.nilable(Models::Shared::ListResourceCustomerOrder)](../../models/shared/listresourcecustomerorder.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalorderslistsecurity.md b/docs/models/operations/customerportalorderslistsecurity.md new file mode 100644 index 0000000..064c6bc --- /dev/null +++ b/docs/models/operations/customerportalorderslistsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalOrdersListSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalorganizationsgetrequest.md b/docs/models/operations/customerportalorganizationsgetrequest.md new file mode 100644 index 0000000..c606426 --- /dev/null +++ b/docs/models/operations/customerportalorganizationsgetrequest.md @@ -0,0 +1,8 @@ +# CustomerPortalOrganizationsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `slug` | *::String* | :heavy_check_mark: | The organization slug. | \ No newline at end of file diff --git a/docs/models/operations/customerportalorganizationsgetresponse.md b/docs/models/operations/customerportalorganizationsgetresponse.md new file mode 100644 index 0000000..993837e --- /dev/null +++ b/docs/models/operations/customerportalorganizationsgetresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalOrganizationsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_organization` | [T.nilable(Models::Shared::CustomerOrganization)](../../models/shared/customerorganization.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionscancelrequest.md b/docs/models/operations/customerportalsubscriptionscancelrequest.md new file mode 100644 index 0000000..1c0bb12 --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionscancelrequest.md @@ -0,0 +1,8 @@ +# CustomerPortalSubscriptionsCancelRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionscancelresponse.md b/docs/models/operations/customerportalsubscriptionscancelresponse.md new file mode 100644 index 0000000..39193ff --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionscancelresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalSubscriptionsCancelResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_subscription` | [T.nilable(Models::Shared::CustomerSubscription)](../../models/shared/customersubscription.md) | :heavy_minus_sign: | Customer subscription is canceled. | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionscancelsecurity.md b/docs/models/operations/customerportalsubscriptionscancelsecurity.md new file mode 100644 index 0000000..f5716ba --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionscancelsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalSubscriptionsCancelSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionsgetrequest.md b/docs/models/operations/customerportalsubscriptionsgetrequest.md new file mode 100644 index 0000000..1153b78 --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionsgetrequest.md @@ -0,0 +1,8 @@ +# CustomerPortalSubscriptionsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionsgetresponse.md b/docs/models/operations/customerportalsubscriptionsgetresponse.md new file mode 100644 index 0000000..598bce2 --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionsgetresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalSubscriptionsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_subscription` | [T.nilable(Models::Shared::CustomerSubscription)](../../models/shared/customersubscription.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionsgetsecurity.md b/docs/models/operations/customerportalsubscriptionsgetsecurity.md new file mode 100644 index 0000000..82aa08c --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionsgetsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalSubscriptionsGetSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionslistqueryparamorganizationidfilter.md b/docs/models/operations/customerportalsubscriptionslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..c025d91 --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalSubscriptionsListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/customerportalsubscriptionslistqueryparamproductidfilter.md b/docs/models/operations/customerportalsubscriptionslistqueryparamproductidfilter.md new file mode 100644 index 0000000..b52f398 --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionslistqueryparamproductidfilter.md @@ -0,0 +1,4 @@ +# CustomerPortalSubscriptionsListQueryParamProductIDFilter + +Filter by product ID. + diff --git a/docs/models/operations/customerportalsubscriptionslistrequest.md b/docs/models/operations/customerportalsubscriptionslistrequest.md new file mode 100644 index 0000000..a5483f4 --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionslistrequest.md @@ -0,0 +1,14 @@ +# CustomerPortalSubscriptionsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportalsubscriptionslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `product_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportalsubscriptionslistqueryparamproductidfilter.md) | :heavy_minus_sign: | Filter by product ID. | +| `active` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Filter by active or cancelled subscription. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Search by product or organization name. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::CustomerSubscriptionSortProperty](../../models/shared/customersubscriptionsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionslistresponse.md b/docs/models/operations/customerportalsubscriptionslistresponse.md new file mode 100644 index 0000000..29a820b --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionslistresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalSubscriptionsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_customer_subscription` | [T.nilable(Models::Shared::ListResourceCustomerSubscription)](../../models/shared/listresourcecustomersubscription.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionslistsecurity.md b/docs/models/operations/customerportalsubscriptionslistsecurity.md new file mode 100644 index 0000000..516d819 --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionslistsecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalSubscriptionsListSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionsupdaterequest.md b/docs/models/operations/customerportalsubscriptionsupdaterequest.md new file mode 100644 index 0000000..a05d2ff --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionsupdaterequest.md @@ -0,0 +1,9 @@ +# CustomerPortalSubscriptionsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | +| `customer_subscription_update` | [T.any(Models::Shared::CustomerSubscriptionUpdateProduct, Models::Shared::CustomerSubscriptionCancel)](../../models/shared/customersubscriptionupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionsupdateresponse.md b/docs/models/operations/customerportalsubscriptionsupdateresponse.md new file mode 100644 index 0000000..ea4285a --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionsupdateresponse.md @@ -0,0 +1,11 @@ +# CustomerPortalSubscriptionsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_subscription` | [T.nilable(Models::Shared::CustomerSubscription)](../../models/shared/customersubscription.md) | :heavy_minus_sign: | Customer subscription updated. | \ No newline at end of file diff --git a/docs/models/operations/customerportalsubscriptionsupdatesecurity.md b/docs/models/operations/customerportalsubscriptionsupdatesecurity.md new file mode 100644 index 0000000..09fbc87 --- /dev/null +++ b/docs/models/operations/customerportalsubscriptionsupdatesecurity.md @@ -0,0 +1,8 @@ +# CustomerPortalSubscriptionsUpdateSecurity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `customer_session` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customerscreateresponse.md b/docs/models/operations/customerscreateresponse.md new file mode 100644 index 0000000..a0d0441 --- /dev/null +++ b/docs/models/operations/customerscreateresponse.md @@ -0,0 +1,11 @@ +# CustomersCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer` | [T.nilable(Models::Shared::Customer)](../../models/shared/customer.md) | :heavy_minus_sign: | Customer created. | \ No newline at end of file diff --git a/docs/models/operations/customersdeleteexternalrequest.md b/docs/models/operations/customersdeleteexternalrequest.md new file mode 100644 index 0000000..9ad2a28 --- /dev/null +++ b/docs/models/operations/customersdeleteexternalrequest.md @@ -0,0 +1,8 @@ +# CustomersDeleteExternalRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `external_id` | *::String* | :heavy_check_mark: | The customer external ID. | \ No newline at end of file diff --git a/docs/models/operations/customersdeleteexternalresponse.md b/docs/models/operations/customersdeleteexternalresponse.md new file mode 100644 index 0000000..0bf14b0 --- /dev/null +++ b/docs/models/operations/customersdeleteexternalresponse.md @@ -0,0 +1,10 @@ +# CustomersDeleteExternalResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/customersdeleterequest.md b/docs/models/operations/customersdeleterequest.md new file mode 100644 index 0000000..7124f16 --- /dev/null +++ b/docs/models/operations/customersdeleterequest.md @@ -0,0 +1,8 @@ +# CustomersDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The customer ID. | \ No newline at end of file diff --git a/docs/models/operations/customersdeleteresponse.md b/docs/models/operations/customersdeleteresponse.md new file mode 100644 index 0000000..ab2d20f --- /dev/null +++ b/docs/models/operations/customersdeleteresponse.md @@ -0,0 +1,10 @@ +# CustomersDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/customersessionscreatecustomersessioncreate.md b/docs/models/operations/customersessionscreatecustomersessioncreate.md new file mode 100644 index 0000000..e0410b0 --- /dev/null +++ b/docs/models/operations/customersessionscreatecustomersessioncreate.md @@ -0,0 +1,2 @@ +# CustomerSessionsCreateCustomerSessionCreate + diff --git a/docs/models/operations/customersessionscreateresponse.md b/docs/models/operations/customersessionscreateresponse.md new file mode 100644 index 0000000..be6d732 --- /dev/null +++ b/docs/models/operations/customersessionscreateresponse.md @@ -0,0 +1,11 @@ +# CustomerSessionsCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_session` | [T.nilable(Models::Shared::CustomerSession)](../../models/shared/customersession.md) | :heavy_minus_sign: | Customer session created. | \ No newline at end of file diff --git a/docs/models/operations/customersgetexternalrequest.md b/docs/models/operations/customersgetexternalrequest.md new file mode 100644 index 0000000..0cae0be --- /dev/null +++ b/docs/models/operations/customersgetexternalrequest.md @@ -0,0 +1,8 @@ +# CustomersGetExternalRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `external_id` | *::String* | :heavy_check_mark: | The customer external ID. | \ No newline at end of file diff --git a/docs/models/operations/customersgetexternalresponse.md b/docs/models/operations/customersgetexternalresponse.md new file mode 100644 index 0000000..8ae81b1 --- /dev/null +++ b/docs/models/operations/customersgetexternalresponse.md @@ -0,0 +1,11 @@ +# CustomersGetExternalResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer` | [T.nilable(Models::Shared::Customer)](../../models/shared/customer.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customersgetrequest.md b/docs/models/operations/customersgetrequest.md new file mode 100644 index 0000000..b2ef110 --- /dev/null +++ b/docs/models/operations/customersgetrequest.md @@ -0,0 +1,8 @@ +# CustomersGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The customer ID. | \ No newline at end of file diff --git a/docs/models/operations/customersgetresponse.md b/docs/models/operations/customersgetresponse.md new file mode 100644 index 0000000..f2eae2c --- /dev/null +++ b/docs/models/operations/customersgetresponse.md @@ -0,0 +1,11 @@ +# CustomersGetResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer` | [T.nilable(Models::Shared::Customer)](../../models/shared/customer.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customersgetstateexternalrequest.md b/docs/models/operations/customersgetstateexternalrequest.md new file mode 100644 index 0000000..3ef0c7b --- /dev/null +++ b/docs/models/operations/customersgetstateexternalrequest.md @@ -0,0 +1,8 @@ +# CustomersGetStateExternalRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `external_id` | *::String* | :heavy_check_mark: | The customer external ID. | \ No newline at end of file diff --git a/docs/models/operations/customersgetstateexternalresponse.md b/docs/models/operations/customersgetstateexternalresponse.md new file mode 100644 index 0000000..a7f0345 --- /dev/null +++ b/docs/models/operations/customersgetstateexternalresponse.md @@ -0,0 +1,11 @@ +# CustomersGetStateExternalResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_state` | [T.nilable(Models::Shared::CustomerState)](../../models/shared/customerstate.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customersgetstaterequest.md b/docs/models/operations/customersgetstaterequest.md new file mode 100644 index 0000000..b116349 --- /dev/null +++ b/docs/models/operations/customersgetstaterequest.md @@ -0,0 +1,8 @@ +# CustomersGetStateRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The customer ID. | \ No newline at end of file diff --git a/docs/models/operations/customersgetstateresponse.md b/docs/models/operations/customersgetstateresponse.md new file mode 100644 index 0000000..cf6fa91 --- /dev/null +++ b/docs/models/operations/customersgetstateresponse.md @@ -0,0 +1,11 @@ +# CustomersGetStateResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer_state` | [T.nilable(Models::Shared::CustomerState)](../../models/shared/customerstate.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customerslistqueryparamorganizationidfilter.md b/docs/models/operations/customerslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..173bc0b --- /dev/null +++ b/docs/models/operations/customerslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CustomersListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/customerslistrequest.md b/docs/models/operations/customerslistrequest.md new file mode 100644 index 0000000..fba9815 --- /dev/null +++ b/docs/models/operations/customerslistrequest.md @@ -0,0 +1,14 @@ +# CustomersListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by exact email. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by name or email. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::CustomerSortProperty](../../models/shared/customersortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean, T::Array[::String], T::Array[::Integer], T::Array[T::Boolean])](../../models/shared/metadataquery.md)] | :heavy_minus_sign: | Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`. | \ No newline at end of file diff --git a/docs/models/operations/customerslistresponse.md b/docs/models/operations/customerslistresponse.md new file mode 100644 index 0000000..2a4ba50 --- /dev/null +++ b/docs/models/operations/customerslistresponse.md @@ -0,0 +1,11 @@ +# CustomersListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_customer` | [T.nilable(Models::Shared::ListResourceCustomer)](../../models/shared/listresourcecustomer.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customersupdateexternalrequest.md b/docs/models/operations/customersupdateexternalrequest.md new file mode 100644 index 0000000..9b3e98a --- /dev/null +++ b/docs/models/operations/customersupdateexternalrequest.md @@ -0,0 +1,9 @@ +# CustomersUpdateExternalRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `external_id` | *::String* | :heavy_check_mark: | The customer external ID. | +| `customer_update_external_id` | [Models::Shared::CustomerUpdateExternalID](../../models/shared/customerupdateexternalid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customersupdateexternalresponse.md b/docs/models/operations/customersupdateexternalresponse.md new file mode 100644 index 0000000..60c2188 --- /dev/null +++ b/docs/models/operations/customersupdateexternalresponse.md @@ -0,0 +1,11 @@ +# CustomersUpdateExternalResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer` | [T.nilable(Models::Shared::Customer)](../../models/shared/customer.md) | :heavy_minus_sign: | Customer updated. | \ No newline at end of file diff --git a/docs/models/operations/customersupdaterequest.md b/docs/models/operations/customersupdaterequest.md new file mode 100644 index 0000000..739e67b --- /dev/null +++ b/docs/models/operations/customersupdaterequest.md @@ -0,0 +1,9 @@ +# CustomersUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The customer ID. | +| `customer_update` | [Models::Shared::CustomerUpdate](../../models/shared/customerupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customersupdateresponse.md b/docs/models/operations/customersupdateresponse.md new file mode 100644 index 0000000..d58709a --- /dev/null +++ b/docs/models/operations/customersupdateresponse.md @@ -0,0 +1,11 @@ +# CustomersUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `customer` | [T.nilable(Models::Shared::Customer)](../../models/shared/customer.md) | :heavy_minus_sign: | Customer updated. | \ No newline at end of file diff --git a/docs/models/operations/customfieldscreateresponse.md b/docs/models/operations/customfieldscreateresponse.md new file mode 100644 index 0000000..2062a20 --- /dev/null +++ b/docs/models/operations/customfieldscreateresponse.md @@ -0,0 +1,11 @@ +# CustomFieldsCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `custom_field` | [T.nilable(T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect))](../../models/shared/customfield.md) | :heavy_minus_sign: | Custom field created. | \ No newline at end of file diff --git a/docs/models/operations/customfieldsdeleterequest.md b/docs/models/operations/customfieldsdeleterequest.md new file mode 100644 index 0000000..cf30e11 --- /dev/null +++ b/docs/models/operations/customfieldsdeleterequest.md @@ -0,0 +1,8 @@ +# CustomFieldsDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The custom field ID. | \ No newline at end of file diff --git a/docs/models/operations/customfieldsdeleteresponse.md b/docs/models/operations/customfieldsdeleteresponse.md new file mode 100644 index 0000000..215826d --- /dev/null +++ b/docs/models/operations/customfieldsdeleteresponse.md @@ -0,0 +1,10 @@ +# CustomFieldsDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/customfieldsgetrequest.md b/docs/models/operations/customfieldsgetrequest.md new file mode 100644 index 0000000..32a8cdc --- /dev/null +++ b/docs/models/operations/customfieldsgetrequest.md @@ -0,0 +1,8 @@ +# CustomFieldsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The custom field ID. | \ No newline at end of file diff --git a/docs/models/operations/customfieldsgetresponse.md b/docs/models/operations/customfieldsgetresponse.md new file mode 100644 index 0000000..0cc39e6 --- /dev/null +++ b/docs/models/operations/customfieldsgetresponse.md @@ -0,0 +1,11 @@ +# CustomFieldsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `custom_field` | [T.nilable(T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect))](../../models/shared/customfield.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customfieldslistqueryparamorganizationidfilter.md b/docs/models/operations/customfieldslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..faa05c9 --- /dev/null +++ b/docs/models/operations/customfieldslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# CustomFieldsListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/customfieldslistrequest.md b/docs/models/operations/customfieldslistrequest.md new file mode 100644 index 0000000..a680146 --- /dev/null +++ b/docs/models/operations/customfieldslistrequest.md @@ -0,0 +1,13 @@ +# CustomFieldsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customfieldslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by custom field name or slug. | +| `type_filter` | [T.nilable(T.any(Models::Shared::CustomFieldType, T::Array[Models::Shared::CustomFieldType]))](../../models/operations/customfieldtypefilter.md) | :heavy_minus_sign: | Filter by custom field type. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::CustomFieldSortProperty](../../models/shared/customfieldsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/customfieldslistresponse.md b/docs/models/operations/customfieldslistresponse.md new file mode 100644 index 0000000..e5f36fc --- /dev/null +++ b/docs/models/operations/customfieldslistresponse.md @@ -0,0 +1,11 @@ +# CustomFieldsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_custom_field` | [T.nilable(Models::Shared::ListResourceCustomField)](../../models/shared/listresourcecustomfield.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/customfieldsupdaterequest.md b/docs/models/operations/customfieldsupdaterequest.md new file mode 100644 index 0000000..fddb640 --- /dev/null +++ b/docs/models/operations/customfieldsupdaterequest.md @@ -0,0 +1,9 @@ +# CustomFieldsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *::String* | :heavy_check_mark: | The custom field ID. | +| `custom_field_update` | [T.any(Models::Shared::CustomFieldUpdateText, Models::Shared::CustomFieldUpdateNumber, Models::Shared::CustomFieldUpdateDate, Models::Shared::CustomFieldUpdateCheckbox, Models::Shared::CustomFieldUpdateSelect)](../../models/shared/customfieldupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customfieldsupdateresponse.md b/docs/models/operations/customfieldsupdateresponse.md new file mode 100644 index 0000000..3b00b02 --- /dev/null +++ b/docs/models/operations/customfieldsupdateresponse.md @@ -0,0 +1,11 @@ +# CustomFieldsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `custom_field` | [T.nilable(T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect))](../../models/shared/customfield.md) | :heavy_minus_sign: | Custom field updated. | \ No newline at end of file diff --git a/docs/models/operations/customfieldtypefilter.md b/docs/models/operations/customfieldtypefilter.md new file mode 100644 index 0000000..7466287 --- /dev/null +++ b/docs/models/operations/customfieldtypefilter.md @@ -0,0 +1,4 @@ +# CustomFieldTypeFilter + +Filter by custom field type. + diff --git a/docs/models/operations/discountidfilter.md b/docs/models/operations/discountidfilter.md new file mode 100644 index 0000000..191df12 --- /dev/null +++ b/docs/models/operations/discountidfilter.md @@ -0,0 +1,4 @@ +# DiscountIDFilter + +Filter by discount ID. + diff --git a/docs/models/operations/discountscreateresponse.md b/docs/models/operations/discountscreateresponse.md new file mode 100644 index 0000000..d2b53ba --- /dev/null +++ b/docs/models/operations/discountscreateresponse.md @@ -0,0 +1,11 @@ +# DiscountsCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `discount` | [T.nilable(T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration))](../../models/shared/discount.md) | :heavy_minus_sign: | Discount created. | \ No newline at end of file diff --git a/docs/models/operations/discountsdeleterequest.md b/docs/models/operations/discountsdeleterequest.md new file mode 100644 index 0000000..d50a2e8 --- /dev/null +++ b/docs/models/operations/discountsdeleterequest.md @@ -0,0 +1,8 @@ +# DiscountsDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The discount ID. | \ No newline at end of file diff --git a/docs/models/operations/discountsdeleteresponse.md b/docs/models/operations/discountsdeleteresponse.md new file mode 100644 index 0000000..2879106 --- /dev/null +++ b/docs/models/operations/discountsdeleteresponse.md @@ -0,0 +1,10 @@ +# DiscountsDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/discountsgetrequest.md b/docs/models/operations/discountsgetrequest.md new file mode 100644 index 0000000..3310921 --- /dev/null +++ b/docs/models/operations/discountsgetrequest.md @@ -0,0 +1,8 @@ +# DiscountsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The discount ID. | \ No newline at end of file diff --git a/docs/models/operations/discountsgetresponse.md b/docs/models/operations/discountsgetresponse.md new file mode 100644 index 0000000..56eed83 --- /dev/null +++ b/docs/models/operations/discountsgetresponse.md @@ -0,0 +1,11 @@ +# DiscountsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `discount` | [T.nilable(T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration))](../../models/shared/discount.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/discountslistqueryparamorganizationidfilter.md b/docs/models/operations/discountslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..9a02241 --- /dev/null +++ b/docs/models/operations/discountslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# DiscountsListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/discountslistrequest.md b/docs/models/operations/discountslistrequest.md new file mode 100644 index 0000000..d1305ab --- /dev/null +++ b/docs/models/operations/discountslistrequest.md @@ -0,0 +1,12 @@ +# DiscountsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/discountslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by name. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::DiscountSortProperty](../../models/shared/discountsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/discountslistresponse.md b/docs/models/operations/discountslistresponse.md new file mode 100644 index 0000000..6194c81 --- /dev/null +++ b/docs/models/operations/discountslistresponse.md @@ -0,0 +1,11 @@ +# DiscountsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_discount` | [T.nilable(Models::Shared::ListResourceDiscount)](../../models/shared/listresourcediscount.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/discountsupdaterequest.md b/docs/models/operations/discountsupdaterequest.md new file mode 100644 index 0000000..fe436db --- /dev/null +++ b/docs/models/operations/discountsupdaterequest.md @@ -0,0 +1,9 @@ +# DiscountsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The discount ID. | +| `discount_update` | [Models::Shared::DiscountUpdate](../../models/shared/discountupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/discountsupdateresponse.md b/docs/models/operations/discountsupdateresponse.md new file mode 100644 index 0000000..bf2a600 --- /dev/null +++ b/docs/models/operations/discountsupdateresponse.md @@ -0,0 +1,11 @@ +# DiscountsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `discount` | [T.nilable(T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration))](../../models/shared/discount.md) | :heavy_minus_sign: | Discount updated. | \ No newline at end of file diff --git a/docs/models/operations/eventsgetrequest.md b/docs/models/operations/eventsgetrequest.md new file mode 100644 index 0000000..33f7b3d --- /dev/null +++ b/docs/models/operations/eventsgetrequest.md @@ -0,0 +1,8 @@ +# EventsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The event ID. | \ No newline at end of file diff --git a/docs/models/operations/eventsgetresponse.md b/docs/models/operations/eventsgetresponse.md new file mode 100644 index 0000000..80bf802 --- /dev/null +++ b/docs/models/operations/eventsgetresponse.md @@ -0,0 +1,11 @@ +# EventsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `event` | [T.nilable(Models::Shared::Event)](../../models/shared/event.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/eventsingestresponse.md b/docs/models/operations/eventsingestresponse.md new file mode 100644 index 0000000..61d5a58 --- /dev/null +++ b/docs/models/operations/eventsingestresponse.md @@ -0,0 +1,11 @@ +# EventsIngestResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `events_ingest_response` | [T.nilable(Models::Shared::EventsIngestResponse)](../../models/shared/eventsingestresponse.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/eventslistnamesqueryparamcustomeridfilter.md b/docs/models/operations/eventslistnamesqueryparamcustomeridfilter.md new file mode 100644 index 0000000..6b287c3 --- /dev/null +++ b/docs/models/operations/eventslistnamesqueryparamcustomeridfilter.md @@ -0,0 +1,4 @@ +# EventsListNamesQueryParamCustomerIDFilter + +Filter by customer ID. + diff --git a/docs/models/operations/eventslistnamesqueryparamorganizationidfilter.md b/docs/models/operations/eventslistnamesqueryparamorganizationidfilter.md new file mode 100644 index 0000000..ceb168e --- /dev/null +++ b/docs/models/operations/eventslistnamesqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# EventsListNamesQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/eventslistnamesrequest.md b/docs/models/operations/eventslistnamesrequest.md new file mode 100644 index 0000000..bf4a2cd --- /dev/null +++ b/docs/models/operations/eventslistnamesrequest.md @@ -0,0 +1,15 @@ +# EventsListNamesRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/eventslistnamesqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/eventslistnamesqueryparamcustomeridfilter.md) | :heavy_minus_sign: | Filter by customer ID. | +| `external_customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparamexternalcustomeridfilter.md) | :heavy_minus_sign: | Filter by external customer ID. | +| `source` | [T.nilable(T.any(Models::Shared::EventSource, T::Array[Models::Shared::EventSource]))](../../models/operations/queryparamsourcefilter.md) | :heavy_minus_sign: | Filter by event source. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Query to filter event names. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::EventNamesSortProperty](../../models/shared/eventnamessortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/eventslistnamesresponse.md b/docs/models/operations/eventslistnamesresponse.md new file mode 100644 index 0000000..043323a --- /dev/null +++ b/docs/models/operations/eventslistnamesresponse.md @@ -0,0 +1,11 @@ +# EventsListNamesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_event_name` | [T.nilable(Models::Shared::ListResourceEventName)](../../models/shared/listresourceeventname.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/eventslistqueryparamcustomeridfilter.md b/docs/models/operations/eventslistqueryparamcustomeridfilter.md new file mode 100644 index 0000000..04060b1 --- /dev/null +++ b/docs/models/operations/eventslistqueryparamcustomeridfilter.md @@ -0,0 +1,4 @@ +# EventsListQueryParamCustomerIDFilter + +Filter by customer ID. + diff --git a/docs/models/operations/eventslistqueryparamorganizationidfilter.md b/docs/models/operations/eventslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..b83dcd8 --- /dev/null +++ b/docs/models/operations/eventslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# EventsListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/eventslistrequest.md b/docs/models/operations/eventslistrequest.md new file mode 100644 index 0000000..fd93392 --- /dev/null +++ b/docs/models/operations/eventslistrequest.md @@ -0,0 +1,20 @@ +# EventsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `filter` | *T.nilable(::String)* | :heavy_minus_sign: | Filter events following filter clauses. JSON string following the same schema a meter filter clause. | +| `start_timestamp` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Filter events after this timestamp. | +| `end_timestamp` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Filter events before this timestamp. | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/eventslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/eventslistqueryparamcustomeridfilter.md) | :heavy_minus_sign: | Filter by customer ID. | +| `external_customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/externalcustomeridfilter.md) | :heavy_minus_sign: | Filter by external customer ID. | +| `meter_id` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by a meter filter clause. | +| `name` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/namefilter.md) | :heavy_minus_sign: | Filter by event name. | +| `source` | [T.nilable(T.any(Models::Shared::EventSource, T::Array[Models::Shared::EventSource]))](../../models/operations/sourcefilter.md) | :heavy_minus_sign: | Filter by event source. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::EventSortProperty](../../models/shared/eventsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean, T::Array[::String], T::Array[::Integer], T::Array[T::Boolean])](../../models/shared/metadataquery.md)] | :heavy_minus_sign: | Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`. | \ No newline at end of file diff --git a/docs/models/operations/eventslistresponse.md b/docs/models/operations/eventslistresponse.md new file mode 100644 index 0000000..640e182 --- /dev/null +++ b/docs/models/operations/eventslistresponse.md @@ -0,0 +1,11 @@ +# EventsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_event` | [T.nilable(Models::Shared::ListResourceEvent)](../../models/shared/listresourceevent.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/externalcustomeridfilter.md b/docs/models/operations/externalcustomeridfilter.md new file mode 100644 index 0000000..736ce02 --- /dev/null +++ b/docs/models/operations/externalcustomeridfilter.md @@ -0,0 +1,4 @@ +# ExternalCustomerIDFilter + +Filter by external customer ID. + diff --git a/docs/models/operations/filescreateresponse.md b/docs/models/operations/filescreateresponse.md new file mode 100644 index 0000000..bc3c55b --- /dev/null +++ b/docs/models/operations/filescreateresponse.md @@ -0,0 +1,11 @@ +# FilesCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `file_upload` | [T.nilable(Models::Shared::FileUpload)](../../models/shared/fileupload.md) | :heavy_minus_sign: | File created. | \ No newline at end of file diff --git a/docs/models/operations/filesdeleterequest.md b/docs/models/operations/filesdeleterequest.md new file mode 100644 index 0000000..6de77eb --- /dev/null +++ b/docs/models/operations/filesdeleterequest.md @@ -0,0 +1,8 @@ +# FilesDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/filesdeleteresponse.md b/docs/models/operations/filesdeleteresponse.md new file mode 100644 index 0000000..86ec1dc --- /dev/null +++ b/docs/models/operations/filesdeleteresponse.md @@ -0,0 +1,10 @@ +# FilesDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/fileslistrequest.md b/docs/models/operations/fileslistrequest.md new file mode 100644 index 0000000..cb2ab84 --- /dev/null +++ b/docs/models/operations/fileslistrequest.md @@ -0,0 +1,11 @@ +# FilesListRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `ids` | T::Array<*::String*> | :heavy_minus_sign: | List of file IDs to get. | | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | | \ No newline at end of file diff --git a/docs/models/operations/fileslistresponse.md b/docs/models/operations/fileslistresponse.md new file mode 100644 index 0000000..899f56d --- /dev/null +++ b/docs/models/operations/fileslistresponse.md @@ -0,0 +1,11 @@ +# FilesListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_file_read` | [T.nilable(Models::Shared::ListResourceFileRead)](../../models/shared/listresourcefileread.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/filesupdaterequest.md b/docs/models/operations/filesupdaterequest.md new file mode 100644 index 0000000..d531a46 --- /dev/null +++ b/docs/models/operations/filesupdaterequest.md @@ -0,0 +1,9 @@ +# FilesUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The file ID. | +| `file_patch` | [Models::Shared::FilePatch](../../models/shared/filepatch.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/filesupdateresponse.md b/docs/models/operations/filesupdateresponse.md new file mode 100644 index 0000000..a7f194f --- /dev/null +++ b/docs/models/operations/filesupdateresponse.md @@ -0,0 +1,11 @@ +# FilesUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `response_files_update` | [T.nilable(T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead))](../../models/operations/filesupdateresponsefilesupdate.md) | :heavy_minus_sign: | File updated. | \ No newline at end of file diff --git a/docs/models/operations/filesupdateresponsefilesupdate.md b/docs/models/operations/filesupdateresponsefilesupdate.md new file mode 100644 index 0000000..75a5082 --- /dev/null +++ b/docs/models/operations/filesupdateresponsefilesupdate.md @@ -0,0 +1,4 @@ +# FilesUpdateResponseFilesUpdate + +File updated. + diff --git a/docs/models/operations/filesuploadedrequest.md b/docs/models/operations/filesuploadedrequest.md new file mode 100644 index 0000000..80843d8 --- /dev/null +++ b/docs/models/operations/filesuploadedrequest.md @@ -0,0 +1,9 @@ +# FilesUploadedRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The file ID. | +| `file_upload_completed` | [Models::Shared::FileUploadCompleted](../../models/shared/fileuploadcompleted.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/filesuploadedresponse.md b/docs/models/operations/filesuploadedresponse.md new file mode 100644 index 0000000..a33a854 --- /dev/null +++ b/docs/models/operations/filesuploadedresponse.md @@ -0,0 +1,11 @@ +# FilesUploadedResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `response_files_uploaded` | [T.nilable(T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead))](../../models/operations/filesuploadedresponsefilesuploaded.md) | :heavy_minus_sign: | File upload completed. | \ No newline at end of file diff --git a/docs/models/operations/filesuploadedresponsefilesuploaded.md b/docs/models/operations/filesuploadedresponsefilesuploaded.md new file mode 100644 index 0000000..4c50efb --- /dev/null +++ b/docs/models/operations/filesuploadedresponsefilesuploaded.md @@ -0,0 +1,4 @@ +# FilesUploadedResponseFilesUploaded + +File upload completed. + diff --git a/docs/models/operations/licensekeysgetactivationrequest.md b/docs/models/operations/licensekeysgetactivationrequest.md new file mode 100644 index 0000000..2d55240 --- /dev/null +++ b/docs/models/operations/licensekeysgetactivationrequest.md @@ -0,0 +1,9 @@ +# LicenseKeysGetActivationRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `activation_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/licensekeysgetactivationresponse.md b/docs/models/operations/licensekeysgetactivationresponse.md new file mode 100644 index 0000000..510d73e --- /dev/null +++ b/docs/models/operations/licensekeysgetactivationresponse.md @@ -0,0 +1,11 @@ +# LicenseKeysGetActivationResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `license_key_activation_read` | [T.nilable(Models::Shared::LicenseKeyActivationRead)](../../models/shared/licensekeyactivationread.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/licensekeysgetrequest.md b/docs/models/operations/licensekeysgetrequest.md new file mode 100644 index 0000000..121f3c1 --- /dev/null +++ b/docs/models/operations/licensekeysgetrequest.md @@ -0,0 +1,8 @@ +# LicenseKeysGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/licensekeysgetresponse.md b/docs/models/operations/licensekeysgetresponse.md new file mode 100644 index 0000000..473c270 --- /dev/null +++ b/docs/models/operations/licensekeysgetresponse.md @@ -0,0 +1,11 @@ +# LicenseKeysGetResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `license_key_with_activations` | [T.nilable(Models::Shared::LicenseKeyWithActivations)](../../models/shared/licensekeywithactivations.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/licensekeyslistqueryparamorganizationidfilter.md b/docs/models/operations/licensekeyslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..72f3cfa --- /dev/null +++ b/docs/models/operations/licensekeyslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# LicenseKeysListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/licensekeyslistrequest.md b/docs/models/operations/licensekeyslistrequest.md new file mode 100644 index 0000000..9ed4749 --- /dev/null +++ b/docs/models/operations/licensekeyslistrequest.md @@ -0,0 +1,11 @@ +# LicenseKeysListRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/licensekeyslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `benefit_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparambenefitidfilter.md) | :heavy_minus_sign: | Filter by benefit ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | \ No newline at end of file diff --git a/docs/models/operations/licensekeyslistresponse.md b/docs/models/operations/licensekeyslistresponse.md new file mode 100644 index 0000000..97da9c6 --- /dev/null +++ b/docs/models/operations/licensekeyslistresponse.md @@ -0,0 +1,11 @@ +# LicenseKeysListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_license_key_read` | [T.nilable(Models::Shared::ListResourceLicenseKeyRead)](../../models/shared/listresourcelicensekeyread.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/licensekeysupdaterequest.md b/docs/models/operations/licensekeysupdaterequest.md new file mode 100644 index 0000000..b160b6a --- /dev/null +++ b/docs/models/operations/licensekeysupdaterequest.md @@ -0,0 +1,9 @@ +# LicenseKeysUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `license_key_update` | [Models::Shared::LicenseKeyUpdate](../../models/shared/licensekeyupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/licensekeysupdateresponse.md b/docs/models/operations/licensekeysupdateresponse.md new file mode 100644 index 0000000..9da584d --- /dev/null +++ b/docs/models/operations/licensekeysupdateresponse.md @@ -0,0 +1,11 @@ +# LicenseKeysUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `license_key_read` | [T.nilable(Models::Shared::LicenseKeyRead)](../../models/shared/licensekeyread.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/meteridfilter.md b/docs/models/operations/meteridfilter.md new file mode 100644 index 0000000..624e285 --- /dev/null +++ b/docs/models/operations/meteridfilter.md @@ -0,0 +1,4 @@ +# MeterIDFilter + +Filter by meter ID. + diff --git a/docs/models/operations/meterscreateresponse.md b/docs/models/operations/meterscreateresponse.md new file mode 100644 index 0000000..66f39bf --- /dev/null +++ b/docs/models/operations/meterscreateresponse.md @@ -0,0 +1,11 @@ +# MetersCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `meter` | [T.nilable(Models::Shared::Meter)](../../models/shared/meter.md) | :heavy_minus_sign: | Meter created. | \ No newline at end of file diff --git a/docs/models/operations/metersgetrequest.md b/docs/models/operations/metersgetrequest.md new file mode 100644 index 0000000..d1fc77f --- /dev/null +++ b/docs/models/operations/metersgetrequest.md @@ -0,0 +1,8 @@ +# MetersGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The meter ID. | \ No newline at end of file diff --git a/docs/models/operations/metersgetresponse.md b/docs/models/operations/metersgetresponse.md new file mode 100644 index 0000000..b9d131a --- /dev/null +++ b/docs/models/operations/metersgetresponse.md @@ -0,0 +1,11 @@ +# MetersGetResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `meter` | [T.nilable(Models::Shared::Meter)](../../models/shared/meter.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/meterslistqueryparamorganizationidfilter.md b/docs/models/operations/meterslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..e648339 --- /dev/null +++ b/docs/models/operations/meterslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# MetersListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/meterslistrequest.md b/docs/models/operations/meterslistrequest.md new file mode 100644 index 0000000..ece97a8 --- /dev/null +++ b/docs/models/operations/meterslistrequest.md @@ -0,0 +1,13 @@ +# MetersListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/meterslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by name. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::MeterSortProperty](../../models/shared/metersortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean, T::Array[::String], T::Array[::Integer], T::Array[T::Boolean])](../../models/shared/metadataquery.md)] | :heavy_minus_sign: | Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`. | \ No newline at end of file diff --git a/docs/models/operations/meterslistresponse.md b/docs/models/operations/meterslistresponse.md new file mode 100644 index 0000000..a9d5137 --- /dev/null +++ b/docs/models/operations/meterslistresponse.md @@ -0,0 +1,11 @@ +# MetersListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_meter` | [T.nilable(Models::Shared::ListResourceMeter)](../../models/shared/listresourcemeter.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/metersquantitiesqueryparamcustomeridfilter.md b/docs/models/operations/metersquantitiesqueryparamcustomeridfilter.md new file mode 100644 index 0000000..6f68dc7 --- /dev/null +++ b/docs/models/operations/metersquantitiesqueryparamcustomeridfilter.md @@ -0,0 +1,4 @@ +# MetersQuantitiesQueryParamCustomerIDFilter + +Filter by customer ID. + diff --git a/docs/models/operations/metersquantitiesqueryparamexternalcustomeridfilter.md b/docs/models/operations/metersquantitiesqueryparamexternalcustomeridfilter.md new file mode 100644 index 0000000..bcc8d3a --- /dev/null +++ b/docs/models/operations/metersquantitiesqueryparamexternalcustomeridfilter.md @@ -0,0 +1,4 @@ +# MetersQuantitiesQueryParamExternalCustomerIDFilter + +Filter by external customer ID. + diff --git a/docs/models/operations/metersquantitiesrequest.md b/docs/models/operations/metersquantitiesrequest.md new file mode 100644 index 0000000..6244b8a --- /dev/null +++ b/docs/models/operations/metersquantitiesrequest.md @@ -0,0 +1,13 @@ +# MetersQuantitiesRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The meter ID. | +| `start_timestamp` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Start timestamp. | +| `end_timestamp` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | End timestamp. | +| `interval` | [Models::Shared::TimeInterval](../../models/shared/timeinterval.md) | :heavy_check_mark: | Interval between two timestamps. | +| `customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/metersquantitiesqueryparamcustomeridfilter.md) | :heavy_minus_sign: | Filter by customer ID. | +| `external_customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/metersquantitiesqueryparamexternalcustomeridfilter.md) | :heavy_minus_sign: | Filter by external customer ID. | \ No newline at end of file diff --git a/docs/models/operations/metersquantitiesresponse.md b/docs/models/operations/metersquantitiesresponse.md new file mode 100644 index 0000000..ceab337 --- /dev/null +++ b/docs/models/operations/metersquantitiesresponse.md @@ -0,0 +1,11 @@ +# MetersQuantitiesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `meter_quantities` | [T.nilable(Models::Shared::MeterQuantities)](../../models/shared/meterquantities.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/metersupdaterequest.md b/docs/models/operations/metersupdaterequest.md new file mode 100644 index 0000000..64b96e0 --- /dev/null +++ b/docs/models/operations/metersupdaterequest.md @@ -0,0 +1,9 @@ +# MetersUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The meter ID. | +| `meter_update` | [Models::Shared::MeterUpdate](../../models/shared/meterupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/metersupdateresponse.md b/docs/models/operations/metersupdateresponse.md new file mode 100644 index 0000000..1ea9a38 --- /dev/null +++ b/docs/models/operations/metersupdateresponse.md @@ -0,0 +1,11 @@ +# MetersUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `meter` | [T.nilable(Models::Shared::Meter)](../../models/shared/meter.md) | :heavy_minus_sign: | Meter updated. | \ No newline at end of file diff --git a/docs/models/operations/metricsgetqueryparamcustomeridfilter.md b/docs/models/operations/metricsgetqueryparamcustomeridfilter.md new file mode 100644 index 0000000..5b277eb --- /dev/null +++ b/docs/models/operations/metricsgetqueryparamcustomeridfilter.md @@ -0,0 +1,4 @@ +# MetricsGetQueryParamCustomerIDFilter + +Filter by customer ID. + diff --git a/docs/models/operations/metricsgetqueryparamorganizationidfilter.md b/docs/models/operations/metricsgetqueryparamorganizationidfilter.md new file mode 100644 index 0000000..a344c6c --- /dev/null +++ b/docs/models/operations/metricsgetqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# MetricsGetQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/metricsgetqueryparamproductidfilter.md b/docs/models/operations/metricsgetqueryparamproductidfilter.md new file mode 100644 index 0000000..e49b0e8 --- /dev/null +++ b/docs/models/operations/metricsgetqueryparamproductidfilter.md @@ -0,0 +1,4 @@ +# MetricsGetQueryParamProductIDFilter + +Filter by product ID. + diff --git a/docs/models/operations/metricsgetrequest.md b/docs/models/operations/metricsgetrequest.md new file mode 100644 index 0000000..2e56056 --- /dev/null +++ b/docs/models/operations/metricsgetrequest.md @@ -0,0 +1,14 @@ +# MetricsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `start_date` | [DateTime](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime.html) | :heavy_check_mark: | Start date. | +| `end_date` | [DateTime](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime.html) | :heavy_check_mark: | End date. | +| `interval` | [Models::Shared::TimeInterval](../../models/shared/timeinterval.md) | :heavy_check_mark: | Interval between two timestamps. | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/metricsgetqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `product_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/metricsgetqueryparamproductidfilter.md) | :heavy_minus_sign: | Filter by product ID. | +| `billing_type` | [T.nilable(T.any(Models::Shared::ProductBillingType, T::Array[Models::Shared::ProductBillingType]))](../../models/operations/queryparamproductbillingtypefilter.md) | :heavy_minus_sign: | Filter by billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. | +| `customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/metricsgetqueryparamcustomeridfilter.md) | :heavy_minus_sign: | Filter by customer ID. | \ No newline at end of file diff --git a/docs/models/operations/metricsgetresponse.md b/docs/models/operations/metricsgetresponse.md new file mode 100644 index 0000000..55edc75 --- /dev/null +++ b/docs/models/operations/metricsgetresponse.md @@ -0,0 +1,11 @@ +# MetricsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `metrics_response` | [T.nilable(Models::Shared::MetricsResponse)](../../models/shared/metricsresponse.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/metricslimitsresponse.md b/docs/models/operations/metricslimitsresponse.md new file mode 100644 index 0000000..6dc154e --- /dev/null +++ b/docs/models/operations/metricslimitsresponse.md @@ -0,0 +1,11 @@ +# MetricsLimitsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `metrics_limits` | [T.nilable(Models::Shared::MetricsLimits)](../../models/shared/metricslimits.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/namefilter.md b/docs/models/operations/namefilter.md new file mode 100644 index 0000000..c8062cb --- /dev/null +++ b/docs/models/operations/namefilter.md @@ -0,0 +1,4 @@ +# NameFilter + +Filter by event name. + diff --git a/docs/models/operations/oauth2authorizeresponse.md b/docs/models/operations/oauth2authorizeresponse.md new file mode 100644 index 0000000..b928c75 --- /dev/null +++ b/docs/models/operations/oauth2authorizeresponse.md @@ -0,0 +1,11 @@ +# Oauth2AuthorizeResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `response_oauth2_authorize` | [T.nilable(T.any(Models::Shared::AuthorizeResponseUser, Models::Shared::AuthorizeResponseOrganization))](../../models/operations/oauth2authorizeresponseoauth2authorize.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2authorizeresponseoauth2authorize.md b/docs/models/operations/oauth2authorizeresponseoauth2authorize.md new file mode 100644 index 0000000..7797d14 --- /dev/null +++ b/docs/models/operations/oauth2authorizeresponseoauth2authorize.md @@ -0,0 +1,4 @@ +# Oauth2AuthorizeResponseOauth2Authorize + +Successful Response + diff --git a/docs/models/operations/oauth2clientslistrequest.md b/docs/models/operations/oauth2clientslistrequest.md new file mode 100644 index 0000000..183d1f4 --- /dev/null +++ b/docs/models/operations/oauth2clientslistrequest.md @@ -0,0 +1,9 @@ +# Oauth2ClientsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | \ No newline at end of file diff --git a/docs/models/operations/oauth2clientslistresponse.md b/docs/models/operations/oauth2clientslistresponse.md new file mode 100644 index 0000000..efb3b53 --- /dev/null +++ b/docs/models/operations/oauth2clientslistresponse.md @@ -0,0 +1,11 @@ +# Oauth2ClientsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_o_auth2_client` | [T.nilable(Models::Shared::ListResourceOAuth2Client)](../../models/shared/listresourceoauth2client.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2clientsoauth2createclientresponse.md b/docs/models/operations/oauth2clientsoauth2createclientresponse.md new file mode 100644 index 0000000..8cb8b7d --- /dev/null +++ b/docs/models/operations/oauth2clientsoauth2createclientresponse.md @@ -0,0 +1,11 @@ +# Oauth2ClientsOauth2CreateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2clientsoauth2deleteclientrequest.md b/docs/models/operations/oauth2clientsoauth2deleteclientrequest.md new file mode 100644 index 0000000..ca9f3d0 --- /dev/null +++ b/docs/models/operations/oauth2clientsoauth2deleteclientrequest.md @@ -0,0 +1,8 @@ +# Oauth2ClientsOauth2DeleteClientRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `client_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/oauth2clientsoauth2deleteclientresponse.md b/docs/models/operations/oauth2clientsoauth2deleteclientresponse.md new file mode 100644 index 0000000..60d07e3 --- /dev/null +++ b/docs/models/operations/oauth2clientsoauth2deleteclientresponse.md @@ -0,0 +1,11 @@ +# Oauth2ClientsOauth2DeleteClientResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2clientsoauth2getclientrequest.md b/docs/models/operations/oauth2clientsoauth2getclientrequest.md new file mode 100644 index 0000000..7697efd --- /dev/null +++ b/docs/models/operations/oauth2clientsoauth2getclientrequest.md @@ -0,0 +1,8 @@ +# Oauth2ClientsOauth2GetClientRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `client_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/oauth2clientsoauth2getclientresponse.md b/docs/models/operations/oauth2clientsoauth2getclientresponse.md new file mode 100644 index 0000000..5652c94 --- /dev/null +++ b/docs/models/operations/oauth2clientsoauth2getclientresponse.md @@ -0,0 +1,11 @@ +# Oauth2ClientsOauth2GetClientResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2clientsoauth2updateclientrequest.md b/docs/models/operations/oauth2clientsoauth2updateclientrequest.md new file mode 100644 index 0000000..3545fa7 --- /dev/null +++ b/docs/models/operations/oauth2clientsoauth2updateclientrequest.md @@ -0,0 +1,9 @@ +# Oauth2ClientsOauth2UpdateClientRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `client_id` | *::String* | :heavy_check_mark: | N/A | +| `o_auth2_client_configuration_update` | [Models::Shared::OAuth2ClientConfigurationUpdate](../../models/shared/oauth2clientconfigurationupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/oauth2clientsoauth2updateclientresponse.md b/docs/models/operations/oauth2clientsoauth2updateclientresponse.md new file mode 100644 index 0000000..34f02ac --- /dev/null +++ b/docs/models/operations/oauth2clientsoauth2updateclientresponse.md @@ -0,0 +1,11 @@ +# Oauth2ClientsOauth2UpdateClientResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2introspecttokenresponse.md b/docs/models/operations/oauth2introspecttokenresponse.md new file mode 100644 index 0000000..d2ec1a8 --- /dev/null +++ b/docs/models/operations/oauth2introspecttokenresponse.md @@ -0,0 +1,11 @@ +# Oauth2IntrospectTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `introspect_token_response` | [T.nilable(Models::Shared::IntrospectTokenResponse)](../../models/shared/introspecttokenresponse.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2requesttokenrequestbody.md b/docs/models/operations/oauth2requesttokenrequestbody.md new file mode 100644 index 0000000..60d98af --- /dev/null +++ b/docs/models/operations/oauth2requesttokenrequestbody.md @@ -0,0 +1,2 @@ +# Oauth2RequestTokenRequestBody + diff --git a/docs/models/operations/oauth2requesttokenresponse.md b/docs/models/operations/oauth2requesttokenresponse.md new file mode 100644 index 0000000..00c7202 --- /dev/null +++ b/docs/models/operations/oauth2requesttokenresponse.md @@ -0,0 +1,11 @@ +# Oauth2RequestTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `token_response` | [T.nilable(Models::Shared::TokenResponse)](../../models/shared/tokenresponse.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2revoketokenresponse.md b/docs/models/operations/oauth2revoketokenresponse.md new file mode 100644 index 0000000..236242e --- /dev/null +++ b/docs/models/operations/oauth2revoketokenresponse.md @@ -0,0 +1,11 @@ +# Oauth2RevokeTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `revoke_token_response` | [T.nilable(Models::Shared::RevokeTokenResponse)](../../models/shared/revoketokenresponse.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2userinforesponse.md b/docs/models/operations/oauth2userinforesponse.md new file mode 100644 index 0000000..226cac4 --- /dev/null +++ b/docs/models/operations/oauth2userinforesponse.md @@ -0,0 +1,11 @@ +# Oauth2UserinfoResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `response_oauth2_userinfo` | [T.nilable(T.any(Models::Shared::UserInfoUser, Models::Shared::UserInfoOrganization))](../../models/operations/oauth2userinforesponseoauth2userinfo.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/oauth2userinforesponseoauth2userinfo.md b/docs/models/operations/oauth2userinforesponseoauth2userinfo.md new file mode 100644 index 0000000..0329722 --- /dev/null +++ b/docs/models/operations/oauth2userinforesponseoauth2userinfo.md @@ -0,0 +1,4 @@ +# Oauth2UserinfoResponseOauth2Userinfo + +Successful Response + diff --git a/docs/models/operations/orderidfilter.md b/docs/models/operations/orderidfilter.md new file mode 100644 index 0000000..ed5c8bf --- /dev/null +++ b/docs/models/operations/orderidfilter.md @@ -0,0 +1,4 @@ +# OrderIDFilter + +Filter by order ID. + diff --git a/docs/models/operations/ordersgetrequest.md b/docs/models/operations/ordersgetrequest.md new file mode 100644 index 0000000..a65631f --- /dev/null +++ b/docs/models/operations/ordersgetrequest.md @@ -0,0 +1,8 @@ +# OrdersGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The order ID. | \ No newline at end of file diff --git a/docs/models/operations/ordersgetresponse.md b/docs/models/operations/ordersgetresponse.md new file mode 100644 index 0000000..9148add --- /dev/null +++ b/docs/models/operations/ordersgetresponse.md @@ -0,0 +1,11 @@ +# OrdersGetResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `order` | [T.nilable(Models::Shared::Order)](../../models/shared/order.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/ordersinvoicerequest.md b/docs/models/operations/ordersinvoicerequest.md new file mode 100644 index 0000000..e4cc62f --- /dev/null +++ b/docs/models/operations/ordersinvoicerequest.md @@ -0,0 +1,8 @@ +# OrdersInvoiceRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The order ID. | \ No newline at end of file diff --git a/docs/models/operations/ordersinvoiceresponse.md b/docs/models/operations/ordersinvoiceresponse.md new file mode 100644 index 0000000..26e537e --- /dev/null +++ b/docs/models/operations/ordersinvoiceresponse.md @@ -0,0 +1,11 @@ +# OrdersInvoiceResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `order_invoice` | [T.nilable(Models::Shared::OrderInvoice)](../../models/shared/orderinvoice.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/orderslistqueryparamcustomeridfilter.md b/docs/models/operations/orderslistqueryparamcustomeridfilter.md new file mode 100644 index 0000000..a5aa8bf --- /dev/null +++ b/docs/models/operations/orderslistqueryparamcustomeridfilter.md @@ -0,0 +1,4 @@ +# OrdersListQueryParamCustomerIDFilter + +Filter by customer ID. + diff --git a/docs/models/operations/orderslistqueryparamorganizationidfilter.md b/docs/models/operations/orderslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..8275838 --- /dev/null +++ b/docs/models/operations/orderslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# OrdersListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/orderslistqueryparamproductidfilter.md b/docs/models/operations/orderslistqueryparamproductidfilter.md new file mode 100644 index 0000000..593e511 --- /dev/null +++ b/docs/models/operations/orderslistqueryparamproductidfilter.md @@ -0,0 +1,4 @@ +# OrdersListQueryParamProductIDFilter + +Filter by product ID. + diff --git a/docs/models/operations/orderslistrequest.md b/docs/models/operations/orderslistrequest.md new file mode 100644 index 0000000..4d08577 --- /dev/null +++ b/docs/models/operations/orderslistrequest.md @@ -0,0 +1,16 @@ +# OrdersListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/orderslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `product_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/orderslistqueryparamproductidfilter.md) | :heavy_minus_sign: | Filter by product ID. | +| `product_billing_type` | [T.nilable(T.any(Models::Shared::ProductBillingType, T::Array[Models::Shared::ProductBillingType]))](../../models/operations/productbillingtypefilter.md) | :heavy_minus_sign: | Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. | +| `discount_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparamdiscountidfilter.md) | :heavy_minus_sign: | Filter by discount ID. | +| `customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/orderslistqueryparamcustomeridfilter.md) | :heavy_minus_sign: | Filter by customer ID. | +| `checkout_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/checkoutidfilter.md) | :heavy_minus_sign: | Filter by checkout ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::OrderSortProperty](../../models/shared/ordersortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/orderslistresponse.md b/docs/models/operations/orderslistresponse.md new file mode 100644 index 0000000..a701126 --- /dev/null +++ b/docs/models/operations/orderslistresponse.md @@ -0,0 +1,11 @@ +# OrdersListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_order` | [T.nilable(Models::Shared::ListResourceOrder)](../../models/shared/listresourceorder.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/organizationid.md b/docs/models/operations/organizationid.md new file mode 100644 index 0000000..e769262 --- /dev/null +++ b/docs/models/operations/organizationid.md @@ -0,0 +1,4 @@ +# OrganizationId + +Filter by organization ID. + diff --git a/docs/models/operations/organizationidfilter.md b/docs/models/operations/organizationidfilter.md new file mode 100644 index 0000000..509ae35 --- /dev/null +++ b/docs/models/operations/organizationidfilter.md @@ -0,0 +1,4 @@ +# OrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/organizationscreateresponse.md b/docs/models/operations/organizationscreateresponse.md new file mode 100644 index 0000000..f0b42b0 --- /dev/null +++ b/docs/models/operations/organizationscreateresponse.md @@ -0,0 +1,11 @@ +# OrganizationsCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organization` | [T.nilable(Models::Shared::Organization)](../../models/shared/organization.md) | :heavy_minus_sign: | Organization created. | \ No newline at end of file diff --git a/docs/models/operations/organizationsgetrequest.md b/docs/models/operations/organizationsgetrequest.md new file mode 100644 index 0000000..1a8e312 --- /dev/null +++ b/docs/models/operations/organizationsgetrequest.md @@ -0,0 +1,8 @@ +# OrganizationsGetRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/operations/organizationsgetresponse.md b/docs/models/operations/organizationsgetresponse.md new file mode 100644 index 0000000..628d7e8 --- /dev/null +++ b/docs/models/operations/organizationsgetresponse.md @@ -0,0 +1,11 @@ +# OrganizationsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organization` | [T.nilable(Models::Shared::Organization)](../../models/shared/organization.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/organizationslistrequest.md b/docs/models/operations/organizationslistrequest.md new file mode 100644 index 0000000..8d0b8d8 --- /dev/null +++ b/docs/models/operations/organizationslistrequest.md @@ -0,0 +1,11 @@ +# OrganizationsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `slug` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by slug. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::OrganizationSortProperty](../../models/shared/organizationsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/organizationslistresponse.md b/docs/models/operations/organizationslistresponse.md new file mode 100644 index 0000000..2138c66 --- /dev/null +++ b/docs/models/operations/organizationslistresponse.md @@ -0,0 +1,11 @@ +# OrganizationsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_organization` | [T.nilable(Models::Shared::ListResourceOrganization)](../../models/shared/listresourceorganization.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/organizationsupdaterequest.md b/docs/models/operations/organizationsupdaterequest.md new file mode 100644 index 0000000..59fd6a9 --- /dev/null +++ b/docs/models/operations/organizationsupdaterequest.md @@ -0,0 +1,9 @@ +# OrganizationsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `organization_update` | [Models::Shared::OrganizationUpdate](../../models/shared/organizationupdate.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/organizationsupdateresponse.md b/docs/models/operations/organizationsupdateresponse.md new file mode 100644 index 0000000..153bdf7 --- /dev/null +++ b/docs/models/operations/organizationsupdateresponse.md @@ -0,0 +1,11 @@ +# OrganizationsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organization` | [T.nilable(Models::Shared::Organization)](../../models/shared/organization.md) | :heavy_minus_sign: | Organization updated. | \ No newline at end of file diff --git a/docs/models/operations/productbillingtypefilter.md b/docs/models/operations/productbillingtypefilter.md new file mode 100644 index 0000000..dc79ee0 --- /dev/null +++ b/docs/models/operations/productbillingtypefilter.md @@ -0,0 +1,4 @@ +# ProductBillingTypeFilter + +Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. + diff --git a/docs/models/operations/productidfilter.md b/docs/models/operations/productidfilter.md new file mode 100644 index 0000000..9e8edd2 --- /dev/null +++ b/docs/models/operations/productidfilter.md @@ -0,0 +1,4 @@ +# ProductIDFilter + +Filter by product ID. + diff --git a/docs/models/operations/productscreateresponse.md b/docs/models/operations/productscreateresponse.md new file mode 100644 index 0000000..c8c3178 --- /dev/null +++ b/docs/models/operations/productscreateresponse.md @@ -0,0 +1,11 @@ +# ProductsCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `product` | [T.nilable(Models::Shared::Product)](../../models/shared/product.md) | :heavy_minus_sign: | Product created. | \ No newline at end of file diff --git a/docs/models/operations/productsgetrequest.md b/docs/models/operations/productsgetrequest.md new file mode 100644 index 0000000..4e2e37b --- /dev/null +++ b/docs/models/operations/productsgetrequest.md @@ -0,0 +1,8 @@ +# ProductsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/productsgetresponse.md b/docs/models/operations/productsgetresponse.md new file mode 100644 index 0000000..073bdb4 --- /dev/null +++ b/docs/models/operations/productsgetresponse.md @@ -0,0 +1,11 @@ +# ProductsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `product` | [T.nilable(Models::Shared::Product)](../../models/shared/product.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/productslistqueryparamorganizationidfilter.md b/docs/models/operations/productslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..0994849 --- /dev/null +++ b/docs/models/operations/productslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# ProductsListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/productslistrequest.md b/docs/models/operations/productslistrequest.md new file mode 100644 index 0000000..ebac80b --- /dev/null +++ b/docs/models/operations/productslistrequest.md @@ -0,0 +1,16 @@ +# ProductsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparamproductidfilter.md) | :heavy_minus_sign: | Filter by product ID. | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/productslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `query` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by product name. | +| `is_archived` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Filter on archived products. | +| `is_recurring` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. | +| `benefit_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/benefitidfilter.md) | :heavy_minus_sign: | Filter products granting specific benefit. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::ProductSortProperty](../../models/shared/productsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/productslistresponse.md b/docs/models/operations/productslistresponse.md new file mode 100644 index 0000000..be8fe24 --- /dev/null +++ b/docs/models/operations/productslistresponse.md @@ -0,0 +1,11 @@ +# ProductsListResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_product` | [T.nilable(Models::Shared::ListResourceProduct)](../../models/shared/listresourceproduct.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/productsupdatebenefitsrequest.md b/docs/models/operations/productsupdatebenefitsrequest.md new file mode 100644 index 0000000..36b0357 --- /dev/null +++ b/docs/models/operations/productsupdatebenefitsrequest.md @@ -0,0 +1,9 @@ +# ProductsUpdateBenefitsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `product_benefits_update` | [Models::Shared::ProductBenefitsUpdate](../../models/shared/productbenefitsupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/productsupdatebenefitsresponse.md b/docs/models/operations/productsupdatebenefitsresponse.md new file mode 100644 index 0000000..4ce725d --- /dev/null +++ b/docs/models/operations/productsupdatebenefitsresponse.md @@ -0,0 +1,11 @@ +# ProductsUpdateBenefitsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `product` | [T.nilable(Models::Shared::Product)](../../models/shared/product.md) | :heavy_minus_sign: | Product benefits updated. | \ No newline at end of file diff --git a/docs/models/operations/productsupdaterequest.md b/docs/models/operations/productsupdaterequest.md new file mode 100644 index 0000000..e82645b --- /dev/null +++ b/docs/models/operations/productsupdaterequest.md @@ -0,0 +1,9 @@ +# ProductsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `product_update` | [Models::Shared::ProductUpdate](../../models/shared/productupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/productsupdateresponse.md b/docs/models/operations/productsupdateresponse.md new file mode 100644 index 0000000..fc96785 --- /dev/null +++ b/docs/models/operations/productsupdateresponse.md @@ -0,0 +1,11 @@ +# ProductsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `product` | [T.nilable(Models::Shared::Product)](../../models/shared/product.md) | :heavy_minus_sign: | Product updated. | \ No newline at end of file diff --git a/docs/models/operations/queryparambenefitidfilter.md b/docs/models/operations/queryparambenefitidfilter.md new file mode 100644 index 0000000..bec04c3 --- /dev/null +++ b/docs/models/operations/queryparambenefitidfilter.md @@ -0,0 +1,4 @@ +# QueryParamBenefitIDFilter + +Filter by benefit ID. + diff --git a/docs/models/operations/queryparambenefittypefilter.md b/docs/models/operations/queryparambenefittypefilter.md new file mode 100644 index 0000000..38af8df --- /dev/null +++ b/docs/models/operations/queryparambenefittypefilter.md @@ -0,0 +1,4 @@ +# QueryParamBenefitTypeFilter + +Filter by benefit type. + diff --git a/docs/models/operations/queryparamcheckoutidfilter.md b/docs/models/operations/queryparamcheckoutidfilter.md new file mode 100644 index 0000000..3f6dbf6 --- /dev/null +++ b/docs/models/operations/queryparamcheckoutidfilter.md @@ -0,0 +1,4 @@ +# QueryParamCheckoutIDFilter + +Filter by checkout ID. + diff --git a/docs/models/operations/queryparamcustomeridfilter.md b/docs/models/operations/queryparamcustomeridfilter.md new file mode 100644 index 0000000..bfe1ab3 --- /dev/null +++ b/docs/models/operations/queryparamcustomeridfilter.md @@ -0,0 +1,4 @@ +# QueryParamCustomerIDFilter + +Filter by customer. + diff --git a/docs/models/operations/queryparamdiscountidfilter.md b/docs/models/operations/queryparamdiscountidfilter.md new file mode 100644 index 0000000..68b52c2 --- /dev/null +++ b/docs/models/operations/queryparamdiscountidfilter.md @@ -0,0 +1,4 @@ +# QueryParamDiscountIDFilter + +Filter by discount ID. + diff --git a/docs/models/operations/queryparamexternalcustomeridfilter.md b/docs/models/operations/queryparamexternalcustomeridfilter.md new file mode 100644 index 0000000..545b295 --- /dev/null +++ b/docs/models/operations/queryparamexternalcustomeridfilter.md @@ -0,0 +1,4 @@ +# QueryParamExternalCustomerIDFilter + +Filter by external customer ID. + diff --git a/docs/models/operations/queryparammeteridfilter.md b/docs/models/operations/queryparammeteridfilter.md new file mode 100644 index 0000000..2ad1f9c --- /dev/null +++ b/docs/models/operations/queryparammeteridfilter.md @@ -0,0 +1,4 @@ +# QueryParamMeterIDFilter + +Filter by meter ID. + diff --git a/docs/models/operations/queryparamorderidfilter.md b/docs/models/operations/queryparamorderidfilter.md new file mode 100644 index 0000000..7d008ec --- /dev/null +++ b/docs/models/operations/queryparamorderidfilter.md @@ -0,0 +1,4 @@ +# QueryParamOrderIDFilter + +Filter by order ID. + diff --git a/docs/models/operations/queryparamorganizationidfilter.md b/docs/models/operations/queryparamorganizationidfilter.md new file mode 100644 index 0000000..8d69e53 --- /dev/null +++ b/docs/models/operations/queryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# QueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/queryparamproductbillingtypefilter.md b/docs/models/operations/queryparamproductbillingtypefilter.md new file mode 100644 index 0000000..b209ea4 --- /dev/null +++ b/docs/models/operations/queryparamproductbillingtypefilter.md @@ -0,0 +1,4 @@ +# QueryParamProductBillingTypeFilter + +Filter by billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. + diff --git a/docs/models/operations/queryparamproductidfilter.md b/docs/models/operations/queryparamproductidfilter.md new file mode 100644 index 0000000..b1ff3fb --- /dev/null +++ b/docs/models/operations/queryparamproductidfilter.md @@ -0,0 +1,4 @@ +# QueryParamProductIDFilter + +Filter by product ID. + diff --git a/docs/models/operations/queryparamsourcefilter.md b/docs/models/operations/queryparamsourcefilter.md new file mode 100644 index 0000000..08f9448 --- /dev/null +++ b/docs/models/operations/queryparamsourcefilter.md @@ -0,0 +1,4 @@ +# QueryParamSourceFilter + +Filter by event source. + diff --git a/docs/models/operations/queryparamsubscriptionidfilter.md b/docs/models/operations/queryparamsubscriptionidfilter.md new file mode 100644 index 0000000..fa94291 --- /dev/null +++ b/docs/models/operations/queryparamsubscriptionidfilter.md @@ -0,0 +1,4 @@ +# QueryParamSubscriptionIDFilter + +Filter by subscription ID. + diff --git a/docs/models/operations/refundidfilter.md b/docs/models/operations/refundidfilter.md new file mode 100644 index 0000000..5034955 --- /dev/null +++ b/docs/models/operations/refundidfilter.md @@ -0,0 +1,4 @@ +# RefundIDFilter + +Filter by refund ID. + diff --git a/docs/models/operations/refundscreateresponse.md b/docs/models/operations/refundscreateresponse.md new file mode 100644 index 0000000..e379a0f --- /dev/null +++ b/docs/models/operations/refundscreateresponse.md @@ -0,0 +1,11 @@ +# RefundsCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `refund` | [T.nilable(Models::Shared::Refund)](../../models/shared/refund.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/refundslistqueryparamcustomeridfilter.md b/docs/models/operations/refundslistqueryparamcustomeridfilter.md new file mode 100644 index 0000000..9424ff8 --- /dev/null +++ b/docs/models/operations/refundslistqueryparamcustomeridfilter.md @@ -0,0 +1,4 @@ +# RefundsListQueryParamCustomerIDFilter + +Filter by customer ID. + diff --git a/docs/models/operations/refundslistqueryparamorganizationidfilter.md b/docs/models/operations/refundslistqueryparamorganizationidfilter.md new file mode 100644 index 0000000..2054a38 --- /dev/null +++ b/docs/models/operations/refundslistqueryparamorganizationidfilter.md @@ -0,0 +1,4 @@ +# RefundsListQueryParamOrganizationIDFilter + +Filter by organization ID. + diff --git a/docs/models/operations/refundslistrequest.md b/docs/models/operations/refundslistrequest.md new file mode 100644 index 0000000..073528a --- /dev/null +++ b/docs/models/operations/refundslistrequest.md @@ -0,0 +1,16 @@ +# RefundsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/refundidfilter.md) | :heavy_minus_sign: | Filter by refund ID. | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/refundslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `order_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/orderidfilter.md) | :heavy_minus_sign: | Filter by order ID. | +| `subscription_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/subscriptionidfilter.md) | :heavy_minus_sign: | Filter by subscription ID. | +| `customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/refundslistqueryparamcustomeridfilter.md) | :heavy_minus_sign: | Filter by customer ID. | +| `succeeded` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Filter by `succeeded`. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::RefundSortProperty](../../models/shared/refundsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/refundslistresponse.md b/docs/models/operations/refundslistresponse.md new file mode 100644 index 0000000..2f3b7d5 --- /dev/null +++ b/docs/models/operations/refundslistresponse.md @@ -0,0 +1,11 @@ +# RefundsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_refund` | [T.nilable(Models::Shared::ListResourceRefund)](../../models/shared/listresourcerefund.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/sourcefilter.md b/docs/models/operations/sourcefilter.md new file mode 100644 index 0000000..519198b --- /dev/null +++ b/docs/models/operations/sourcefilter.md @@ -0,0 +1,4 @@ +# SourceFilter + +Filter by event source. + diff --git a/docs/models/operations/subscriptionidfilter.md b/docs/models/operations/subscriptionidfilter.md new file mode 100644 index 0000000..17eee73 --- /dev/null +++ b/docs/models/operations/subscriptionidfilter.md @@ -0,0 +1,4 @@ +# SubscriptionIDFilter + +Filter by subscription ID. + diff --git a/docs/models/operations/subscriptionsexportrequest.md b/docs/models/operations/subscriptionsexportrequest.md new file mode 100644 index 0000000..3849695 --- /dev/null +++ b/docs/models/operations/subscriptionsexportrequest.md @@ -0,0 +1,8 @@ +# SubscriptionsExportRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/organizationid.md) | :heavy_minus_sign: | Filter by organization ID. | \ No newline at end of file diff --git a/docs/models/operations/subscriptionsexportresponse.md b/docs/models/operations/subscriptionsexportresponse.md new file mode 100644 index 0000000..6715f90 --- /dev/null +++ b/docs/models/operations/subscriptionsexportresponse.md @@ -0,0 +1,11 @@ +# SubscriptionsExportResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/subscriptionsgetrequest.md b/docs/models/operations/subscriptionsgetrequest.md new file mode 100644 index 0000000..ff07120 --- /dev/null +++ b/docs/models/operations/subscriptionsgetrequest.md @@ -0,0 +1,8 @@ +# SubscriptionsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | \ No newline at end of file diff --git a/docs/models/operations/subscriptionsgetresponse.md b/docs/models/operations/subscriptionsgetresponse.md new file mode 100644 index 0000000..cfc1904 --- /dev/null +++ b/docs/models/operations/subscriptionsgetresponse.md @@ -0,0 +1,11 @@ +# SubscriptionsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `subscription` | [T.nilable(Models::Shared::Subscription)](../../models/shared/subscription.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/subscriptionslistrequest.md b/docs/models/operations/subscriptionslistrequest.md new file mode 100644 index 0000000..0535d25 --- /dev/null +++ b/docs/models/operations/subscriptionslistrequest.md @@ -0,0 +1,15 @@ +# SubscriptionsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/organizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `product_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/productidfilter.md) | :heavy_minus_sign: | Filter by product ID. | +| `customer_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customeridfilter.md) | :heavy_minus_sign: | Filter by customer ID. | +| `discount_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/discountidfilter.md) | :heavy_minus_sign: | Filter by discount ID. | +| `active` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Filter by active or inactive subscription. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::SubscriptionSortProperty](../../models/shared/subscriptionsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/subscriptionslistresponse.md b/docs/models/operations/subscriptionslistresponse.md new file mode 100644 index 0000000..9704a4a --- /dev/null +++ b/docs/models/operations/subscriptionslistresponse.md @@ -0,0 +1,11 @@ +# SubscriptionsListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `list_resource_subscription` | [T.nilable(Models::Shared::ListResourceSubscription)](../../models/shared/listresourcesubscription.md) | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/operations/subscriptionsrevokerequest.md b/docs/models/operations/subscriptionsrevokerequest.md new file mode 100644 index 0000000..e6caac7 --- /dev/null +++ b/docs/models/operations/subscriptionsrevokerequest.md @@ -0,0 +1,8 @@ +# SubscriptionsRevokeRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | \ No newline at end of file diff --git a/docs/models/operations/subscriptionsrevokeresponse.md b/docs/models/operations/subscriptionsrevokeresponse.md new file mode 100644 index 0000000..fbddb3b --- /dev/null +++ b/docs/models/operations/subscriptionsrevokeresponse.md @@ -0,0 +1,11 @@ +# SubscriptionsRevokeResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `subscription` | [T.nilable(Models::Shared::Subscription)](../../models/shared/subscription.md) | :heavy_minus_sign: | Subscription revoked. | \ No newline at end of file diff --git a/docs/models/operations/subscriptionsupdaterequest.md b/docs/models/operations/subscriptionsupdaterequest.md new file mode 100644 index 0000000..b41c79a --- /dev/null +++ b/docs/models/operations/subscriptionsupdaterequest.md @@ -0,0 +1,9 @@ +# SubscriptionsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | +| `subscription_update` | [T.any(Models::Shared::SubscriptionUpdateProduct, Models::Shared::SubscriptionCancel, Models::Shared::SubscriptionRevoke)](../../models/shared/subscriptionupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/subscriptionsupdateresponse.md b/docs/models/operations/subscriptionsupdateresponse.md new file mode 100644 index 0000000..d3a47d9 --- /dev/null +++ b/docs/models/operations/subscriptionsupdateresponse.md @@ -0,0 +1,11 @@ +# SubscriptionsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `subscription` | [T.nilable(Models::Shared::Subscription)](../../models/shared/subscription.md) | :heavy_minus_sign: | Subscription updated. | \ No newline at end of file diff --git a/docs/models/shared/address.md b/docs/models/shared/address.md new file mode 100644 index 0000000..51717a0 --- /dev/null +++ b/docs/models/shared/address.md @@ -0,0 +1,13 @@ +# Address + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | +| `line1` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | +| `line2` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | +| `postal_code` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | +| `city` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | +| `state` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | +| `country` | *::String* | :heavy_check_mark: | N/A | US | \ No newline at end of file diff --git a/docs/models/shared/aggregation.md b/docs/models/shared/aggregation.md new file mode 100644 index 0000000..140aec3 --- /dev/null +++ b/docs/models/shared/aggregation.md @@ -0,0 +1,2 @@ +# Aggregation + diff --git a/docs/models/shared/attachedcustomfield.md b/docs/models/shared/attachedcustomfield.md new file mode 100644 index 0000000..93c2d52 --- /dev/null +++ b/docs/models/shared/attachedcustomfield.md @@ -0,0 +1,13 @@ +# AttachedCustomField + +Schema of a custom field attached to a resource. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `custom_field_id` | *::String* | :heavy_check_mark: | ID of the custom field. | +| `custom_field` | [T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)](../../models/shared/customfield.md) | :heavy_check_mark: | N/A | +| `order` | *::Integer* | :heavy_check_mark: | Order of the custom field in the resource. | +| `required` | *T::Boolean* | :heavy_check_mark: | Whether the value is required for this custom field. | \ No newline at end of file diff --git a/docs/models/shared/attachedcustomfieldcreate.md b/docs/models/shared/attachedcustomfieldcreate.md new file mode 100644 index 0000000..afd1425 --- /dev/null +++ b/docs/models/shared/attachedcustomfieldcreate.md @@ -0,0 +1,11 @@ +# AttachedCustomFieldCreate + +Schema to attach a custom field to a resource. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `custom_field_id` | *::String* | :heavy_check_mark: | ID of the custom field to attach. | +| `required` | *T::Boolean* | :heavy_check_mark: | Whether the value is required for this custom field. | \ No newline at end of file diff --git a/docs/models/shared/authorizationcodetokenrequest.md b/docs/models/shared/authorizationcodetokenrequest.md new file mode 100644 index 0000000..bc496e3 --- /dev/null +++ b/docs/models/shared/authorizationcodetokenrequest.md @@ -0,0 +1,12 @@ +# AuthorizationCodeTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `grant_type` | *::String* | :heavy_check_mark: | N/A | +| `client_id` | *::String* | :heavy_check_mark: | N/A | +| `client_secret` | *::String* | :heavy_check_mark: | N/A | +| `code` | *::String* | :heavy_check_mark: | N/A | +| `redirect_uri` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/authorizeorganization.md b/docs/models/shared/authorizeorganization.md new file mode 100644 index 0000000..87a142d --- /dev/null +++ b/docs/models/shared/authorizeorganization.md @@ -0,0 +1,10 @@ +# AuthorizeOrganization + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `slug` | *::String* | :heavy_check_mark: | N/A | +| `avatar_url` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/authorizeresponseorganization.md b/docs/models/shared/authorizeresponseorganization.md new file mode 100644 index 0000000..df9eda7 --- /dev/null +++ b/docs/models/shared/authorizeresponseorganization.md @@ -0,0 +1,12 @@ +# AuthorizeResponseOrganization + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `client` | [Models::Shared::OAuth2ClientPublic](../../models/shared/oauth2clientpublic.md) | :heavy_check_mark: | N/A | +| `sub_type` | *::String* | :heavy_check_mark: | N/A | +| `sub` | [Models::Shared::AuthorizeOrganization](../../models/shared/authorizeorganization.md) | :heavy_check_mark: | N/A | +| `scopes` | T::Array<[Models::Shared::Scope](../../models/shared/scope.md)> | :heavy_check_mark: | N/A | +| `organizations` | T::Array<[Models::Shared::AuthorizeOrganization](../../models/shared/authorizeorganization.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/authorizeresponseuser.md b/docs/models/shared/authorizeresponseuser.md new file mode 100644 index 0000000..68f5607 --- /dev/null +++ b/docs/models/shared/authorizeresponseuser.md @@ -0,0 +1,11 @@ +# AuthorizeResponseUser + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `client` | [Models::Shared::OAuth2ClientPublic](../../models/shared/oauth2clientpublic.md) | :heavy_check_mark: | N/A | +| `sub_type` | *::String* | :heavy_check_mark: | N/A | +| `sub` | [Models::Shared::AuthorizeUser](../../models/shared/authorizeuser.md) | :heavy_check_mark: | N/A | +| `scopes` | T::Array<[Models::Shared::Scope](../../models/shared/scope.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/authorizeuser.md b/docs/models/shared/authorizeuser.md new file mode 100644 index 0000000..298b563 --- /dev/null +++ b/docs/models/shared/authorizeuser.md @@ -0,0 +1,10 @@ +# AuthorizeUser + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `email` | *::String* | :heavy_check_mark: | N/A | +| `avatar_url` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefit.md b/docs/models/shared/benefit.md new file mode 100644 index 0000000..925e505 --- /dev/null +++ b/docs/models/shared/benefit.md @@ -0,0 +1,2 @@ +# Benefit + diff --git a/docs/models/shared/benefitcreate.md b/docs/models/shared/benefitcreate.md new file mode 100644 index 0000000..1888659 --- /dev/null +++ b/docs/models/shared/benefitcreate.md @@ -0,0 +1,2 @@ +# BenefitCreate + diff --git a/docs/models/shared/benefitcustom.md b/docs/models/shared/benefitcustom.md new file mode 100644 index 0000000..76db802 --- /dev/null +++ b/docs/models/shared/benefitcustom.md @@ -0,0 +1,21 @@ +# BenefitCustom + +A benefit of type `custom`. + +Use it to grant any kind of benefit that doesn't fit in the other types. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitcustommetadata.md)] | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitCustomProperties](../../models/shared/benefitcustomproperties.md) | :heavy_check_mark: | Properties for a benefit of type `custom`. | \ No newline at end of file diff --git a/docs/models/shared/benefitcustomcreate.md b/docs/models/shared/benefitcustomcreate.md new file mode 100644 index 0000000..86c3653 --- /dev/null +++ b/docs/models/shared/benefitcustomcreate.md @@ -0,0 +1,14 @@ +# BenefitCustomCreate + +Schema to create a benefit of type `custom`. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitcustomcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. Will be displayed on products having this benefit. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the benefit. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::BenefitCustomCreateProperties](../../models/shared/benefitcustomcreateproperties.md) | :heavy_check_mark: | Properties for creating a benefit of type `custom`. | | \ No newline at end of file diff --git a/docs/models/shared/benefitcustomcreatemetadata.md b/docs/models/shared/benefitcustomcreatemetadata.md new file mode 100644 index 0000000..bb5362d --- /dev/null +++ b/docs/models/shared/benefitcustomcreatemetadata.md @@ -0,0 +1,2 @@ +# BenefitCustomCreateMetadata + diff --git a/docs/models/shared/benefitcustomcreateproperties.md b/docs/models/shared/benefitcustomcreateproperties.md new file mode 100644 index 0000000..6be2fad --- /dev/null +++ b/docs/models/shared/benefitcustomcreateproperties.md @@ -0,0 +1,10 @@ +# BenefitCustomCreateProperties + +Properties for creating a benefit of type `custom`. + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `note` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitcustommetadata.md b/docs/models/shared/benefitcustommetadata.md new file mode 100644 index 0000000..a357115 --- /dev/null +++ b/docs/models/shared/benefitcustommetadata.md @@ -0,0 +1,2 @@ +# BenefitCustomMetadata + diff --git a/docs/models/shared/benefitcustomproperties.md b/docs/models/shared/benefitcustomproperties.md new file mode 100644 index 0000000..7127806 --- /dev/null +++ b/docs/models/shared/benefitcustomproperties.md @@ -0,0 +1,10 @@ +# BenefitCustomProperties + +Properties for a benefit of type `custom`. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `note` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitcustomsubscriber.md b/docs/models/shared/benefitcustomsubscriber.md new file mode 100644 index 0000000..ce15b20 --- /dev/null +++ b/docs/models/shared/benefitcustomsubscriber.md @@ -0,0 +1,18 @@ +# BenefitCustomSubscriber + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitcustomsubscribermetadata.md)] | :heavy_check_mark: | N/A | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitCustomSubscriberProperties](../../models/shared/benefitcustomsubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `custom`. | \ No newline at end of file diff --git a/docs/models/shared/benefitcustomsubscribermetadata.md b/docs/models/shared/benefitcustomsubscribermetadata.md new file mode 100644 index 0000000..5372dcd --- /dev/null +++ b/docs/models/shared/benefitcustomsubscribermetadata.md @@ -0,0 +1,2 @@ +# BenefitCustomSubscriberMetadata + diff --git a/docs/models/shared/benefitcustomsubscriberproperties.md b/docs/models/shared/benefitcustomsubscriberproperties.md new file mode 100644 index 0000000..9d16d17 --- /dev/null +++ b/docs/models/shared/benefitcustomsubscriberproperties.md @@ -0,0 +1,10 @@ +# BenefitCustomSubscriberProperties + +Properties available to subscribers for a benefit of type `custom`. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `note` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitcustomupdate.md b/docs/models/shared/benefitcustomupdate.md new file mode 100644 index 0000000..f93c8ff --- /dev/null +++ b/docs/models/shared/benefitcustomupdate.md @@ -0,0 +1,11 @@ +# BenefitCustomUpdate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitcustomupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the benefit. Will be displayed on products having this benefit. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::BenefitCustomProperties)](../../models/shared/benefitcustomproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitcustomupdatemetadata.md b/docs/models/shared/benefitcustomupdatemetadata.md new file mode 100644 index 0000000..96a52d6 --- /dev/null +++ b/docs/models/shared/benefitcustomupdatemetadata.md @@ -0,0 +1,2 @@ +# BenefitCustomUpdateMetadata + diff --git a/docs/models/shared/benefitdiscord.md b/docs/models/shared/benefitdiscord.md new file mode 100644 index 0000000..98502d8 --- /dev/null +++ b/docs/models/shared/benefitdiscord.md @@ -0,0 +1,21 @@ +# BenefitDiscord + +A benefit of type `discord`. + +Use it to automatically invite your backers to a Discord server. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitdiscordmetadata.md)] | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitDiscordProperties](../../models/shared/benefitdiscordproperties.md) | :heavy_check_mark: | Properties for a benefit of type `discord`. | \ No newline at end of file diff --git a/docs/models/shared/benefitdiscordcreate.md b/docs/models/shared/benefitdiscordcreate.md new file mode 100644 index 0000000..3f2b1d7 --- /dev/null +++ b/docs/models/shared/benefitdiscordcreate.md @@ -0,0 +1,12 @@ +# BenefitDiscordCreate + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitdiscordcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. Will be displayed on products having this benefit. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the benefit. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::BenefitDiscordCreateProperties](../../models/shared/benefitdiscordcreateproperties.md) | :heavy_check_mark: | Properties to create a benefit of type `discord`. | | \ No newline at end of file diff --git a/docs/models/shared/benefitdiscordcreatemetadata.md b/docs/models/shared/benefitdiscordcreatemetadata.md new file mode 100644 index 0000000..9053ecb --- /dev/null +++ b/docs/models/shared/benefitdiscordcreatemetadata.md @@ -0,0 +1,2 @@ +# BenefitDiscordCreateMetadata + diff --git a/docs/models/shared/benefitdiscordcreateproperties.md b/docs/models/shared/benefitdiscordcreateproperties.md new file mode 100644 index 0000000..8e35747 --- /dev/null +++ b/docs/models/shared/benefitdiscordcreateproperties.md @@ -0,0 +1,11 @@ +# BenefitDiscordCreateProperties + +Properties to create a benefit of type `discord`. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `guild_token` | *::String* | :heavy_check_mark: | N/A | +| `role_id` | *::String* | :heavy_check_mark: | The ID of the Discord role to grant. | \ No newline at end of file diff --git a/docs/models/shared/benefitdiscordmetadata.md b/docs/models/shared/benefitdiscordmetadata.md new file mode 100644 index 0000000..871822d --- /dev/null +++ b/docs/models/shared/benefitdiscordmetadata.md @@ -0,0 +1,2 @@ +# BenefitDiscordMetadata + diff --git a/docs/models/shared/benefitdiscordproperties.md b/docs/models/shared/benefitdiscordproperties.md new file mode 100644 index 0000000..410ca7f --- /dev/null +++ b/docs/models/shared/benefitdiscordproperties.md @@ -0,0 +1,12 @@ +# BenefitDiscordProperties + +Properties for a benefit of type `discord`. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `guild_id` | *::String* | :heavy_check_mark: | The ID of the Discord server. | +| `role_id` | *::String* | :heavy_check_mark: | The ID of the Discord role to grant. | +| `guild_token` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitdiscordsubscriber.md b/docs/models/shared/benefitdiscordsubscriber.md new file mode 100644 index 0000000..c1d3822 --- /dev/null +++ b/docs/models/shared/benefitdiscordsubscriber.md @@ -0,0 +1,18 @@ +# BenefitDiscordSubscriber + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitdiscordsubscribermetadata.md)] | :heavy_check_mark: | N/A | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitDiscordSubscriberProperties](../../models/shared/benefitdiscordsubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `discord`. | \ No newline at end of file diff --git a/docs/models/shared/benefitdiscordsubscribermetadata.md b/docs/models/shared/benefitdiscordsubscribermetadata.md new file mode 100644 index 0000000..09cefbc --- /dev/null +++ b/docs/models/shared/benefitdiscordsubscribermetadata.md @@ -0,0 +1,2 @@ +# BenefitDiscordSubscriberMetadata + diff --git a/docs/models/shared/benefitdiscordsubscriberproperties.md b/docs/models/shared/benefitdiscordsubscriberproperties.md new file mode 100644 index 0000000..7efc0d8 --- /dev/null +++ b/docs/models/shared/benefitdiscordsubscriberproperties.md @@ -0,0 +1,10 @@ +# BenefitDiscordSubscriberProperties + +Properties available to subscribers for a benefit of type `discord`. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `guild_id` | *::String* | :heavy_check_mark: | The ID of the Discord server. | \ No newline at end of file diff --git a/docs/models/shared/benefitdiscordupdate.md b/docs/models/shared/benefitdiscordupdate.md new file mode 100644 index 0000000..c521cb2 --- /dev/null +++ b/docs/models/shared/benefitdiscordupdate.md @@ -0,0 +1,11 @@ +# BenefitDiscordUpdate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitdiscordupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the benefit. Will be displayed on products having this benefit. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::BenefitDiscordCreateProperties)](../../models/shared/benefitdiscordcreateproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitdiscordupdatemetadata.md b/docs/models/shared/benefitdiscordupdatemetadata.md new file mode 100644 index 0000000..77ecda8 --- /dev/null +++ b/docs/models/shared/benefitdiscordupdatemetadata.md @@ -0,0 +1,2 @@ +# BenefitDiscordUpdateMetadata + diff --git a/docs/models/shared/benefitdownloadables.md b/docs/models/shared/benefitdownloadables.md new file mode 100644 index 0000000..c799c0c --- /dev/null +++ b/docs/models/shared/benefitdownloadables.md @@ -0,0 +1,17 @@ +# BenefitDownloadables + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitdownloadablesmetadata.md)] | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitDownloadablesProperties](../../models/shared/benefitdownloadablesproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitdownloadablescreate.md b/docs/models/shared/benefitdownloadablescreate.md new file mode 100644 index 0000000..447d57d --- /dev/null +++ b/docs/models/shared/benefitdownloadablescreate.md @@ -0,0 +1,12 @@ +# BenefitDownloadablesCreate + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitdownloadablescreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. Will be displayed on products having this benefit. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the benefit. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::BenefitDownloadablesCreateProperties](../../models/shared/benefitdownloadablescreateproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/benefitdownloadablescreatemetadata.md b/docs/models/shared/benefitdownloadablescreatemetadata.md new file mode 100644 index 0000000..621de6a --- /dev/null +++ b/docs/models/shared/benefitdownloadablescreatemetadata.md @@ -0,0 +1,2 @@ +# BenefitDownloadablesCreateMetadata + diff --git a/docs/models/shared/benefitdownloadablescreateproperties.md b/docs/models/shared/benefitdownloadablescreateproperties.md new file mode 100644 index 0000000..1b8f8fc --- /dev/null +++ b/docs/models/shared/benefitdownloadablescreateproperties.md @@ -0,0 +1,9 @@ +# BenefitDownloadablesCreateProperties + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `archived` | T::Hash[Symbol, *T::Boolean*] | :heavy_minus_sign: | N/A | +| `files` | T::Array<*::String*> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitdownloadablesmetadata.md b/docs/models/shared/benefitdownloadablesmetadata.md new file mode 100644 index 0000000..45e269e --- /dev/null +++ b/docs/models/shared/benefitdownloadablesmetadata.md @@ -0,0 +1,2 @@ +# BenefitDownloadablesMetadata + diff --git a/docs/models/shared/benefitdownloadablesproperties.md b/docs/models/shared/benefitdownloadablesproperties.md new file mode 100644 index 0000000..8150298 --- /dev/null +++ b/docs/models/shared/benefitdownloadablesproperties.md @@ -0,0 +1,9 @@ +# BenefitDownloadablesProperties + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `archived` | T::Hash[Symbol, *T::Boolean*] | :heavy_check_mark: | N/A | +| `files` | T::Array<*::String*> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitdownloadablessubscriber.md b/docs/models/shared/benefitdownloadablessubscriber.md new file mode 100644 index 0000000..55c9081 --- /dev/null +++ b/docs/models/shared/benefitdownloadablessubscriber.md @@ -0,0 +1,18 @@ +# BenefitDownloadablesSubscriber + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitdownloadablessubscribermetadata.md)] | :heavy_check_mark: | N/A | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitDownloadablesSubscriberProperties](../../models/shared/benefitdownloadablessubscriberproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitdownloadablessubscribermetadata.md b/docs/models/shared/benefitdownloadablessubscribermetadata.md new file mode 100644 index 0000000..6af2568 --- /dev/null +++ b/docs/models/shared/benefitdownloadablessubscribermetadata.md @@ -0,0 +1,2 @@ +# BenefitDownloadablesSubscriberMetadata + diff --git a/docs/models/shared/benefitdownloadablessubscriberproperties.md b/docs/models/shared/benefitdownloadablessubscriberproperties.md new file mode 100644 index 0000000..dff081f --- /dev/null +++ b/docs/models/shared/benefitdownloadablessubscriberproperties.md @@ -0,0 +1,8 @@ +# BenefitDownloadablesSubscriberProperties + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `active_files` | T::Array<*::String*> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitdownloadablesupdate.md b/docs/models/shared/benefitdownloadablesupdate.md new file mode 100644 index 0000000..3f7acae --- /dev/null +++ b/docs/models/shared/benefitdownloadablesupdate.md @@ -0,0 +1,11 @@ +# BenefitDownloadablesUpdate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitdownloadablesupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the benefit. Will be displayed on products having this benefit. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::BenefitDownloadablesCreateProperties)](../../models/shared/benefitdownloadablescreateproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitdownloadablesupdatemetadata.md b/docs/models/shared/benefitdownloadablesupdatemetadata.md new file mode 100644 index 0000000..c3f7043 --- /dev/null +++ b/docs/models/shared/benefitdownloadablesupdatemetadata.md @@ -0,0 +1,2 @@ +# BenefitDownloadablesUpdateMetadata + diff --git a/docs/models/shared/benefitgithubrepository.md b/docs/models/shared/benefitgithubrepository.md new file mode 100644 index 0000000..59ea2df --- /dev/null +++ b/docs/models/shared/benefitgithubrepository.md @@ -0,0 +1,21 @@ +# BenefitGitHubRepository + +A benefit of type `github_repository`. + +Use it to automatically invite your backers to a private GitHub repository. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitgithubrepositorymetadata.md)] | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitGitHubRepositoryProperties](../../models/shared/benefitgithubrepositoryproperties.md) | :heavy_check_mark: | Properties for a benefit of type `github_repository`. | \ No newline at end of file diff --git a/docs/models/shared/benefitgithubrepositorycreate.md b/docs/models/shared/benefitgithubrepositorycreate.md new file mode 100644 index 0000000..56ed580 --- /dev/null +++ b/docs/models/shared/benefitgithubrepositorycreate.md @@ -0,0 +1,12 @@ +# BenefitGitHubRepositoryCreate + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitgithubrepositorycreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. Will be displayed on products having this benefit. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the benefit. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::BenefitGitHubRepositoryCreateProperties](../../models/shared/benefitgithubrepositorycreateproperties.md) | :heavy_check_mark: | Properties to create a benefit of type `github_repository`. | | \ No newline at end of file diff --git a/docs/models/shared/benefitgithubrepositorycreatemetadata.md b/docs/models/shared/benefitgithubrepositorycreatemetadata.md new file mode 100644 index 0000000..6dbf673 --- /dev/null +++ b/docs/models/shared/benefitgithubrepositorycreatemetadata.md @@ -0,0 +1,2 @@ +# BenefitGitHubRepositoryCreateMetadata + diff --git a/docs/models/shared/benefitgithubrepositorycreateproperties.md b/docs/models/shared/benefitgithubrepositorycreateproperties.md new file mode 100644 index 0000000..105bf64 --- /dev/null +++ b/docs/models/shared/benefitgithubrepositorycreateproperties.md @@ -0,0 +1,12 @@ +# BenefitGitHubRepositoryCreateProperties + +Properties to create a benefit of type `github_repository`. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `repository_owner` | *::String* | :heavy_check_mark: | The owner of the repository. | polarsource | +| `repository_name` | *::String* | :heavy_check_mark: | The name of the repository. | private_repo | +| `permission` | [Models::Shared::BenefitGitHubRepositoryCreatePropertiesPermission](../../models/shared/benefitgithubrepositorycreatepropertiespermission.md) | :heavy_check_mark: | The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role). | | \ No newline at end of file diff --git a/docs/models/shared/benefitgithubrepositorycreatepropertiespermission.md b/docs/models/shared/benefitgithubrepositorycreatepropertiespermission.md new file mode 100644 index 0000000..8756c02 --- /dev/null +++ b/docs/models/shared/benefitgithubrepositorycreatepropertiespermission.md @@ -0,0 +1,14 @@ +# BenefitGitHubRepositoryCreatePropertiesPermission + +The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role). + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PULL` | pull | +| `TRIAGE` | triage | +| `PUSH` | push | +| `MAINTAIN` | maintain | +| `ADMIN` | admin | \ No newline at end of file diff --git a/docs/models/shared/benefitgithubrepositorymetadata.md b/docs/models/shared/benefitgithubrepositorymetadata.md new file mode 100644 index 0000000..7217c76 --- /dev/null +++ b/docs/models/shared/benefitgithubrepositorymetadata.md @@ -0,0 +1,2 @@ +# BenefitGitHubRepositoryMetadata + diff --git a/docs/models/shared/benefitgithubrepositoryproperties.md b/docs/models/shared/benefitgithubrepositoryproperties.md new file mode 100644 index 0000000..749ddd5 --- /dev/null +++ b/docs/models/shared/benefitgithubrepositoryproperties.md @@ -0,0 +1,12 @@ +# BenefitGitHubRepositoryProperties + +Properties for a benefit of type `github_repository`. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `repository_owner` | *::String* | :heavy_check_mark: | The owner of the repository. | polarsource | +| `repository_name` | *::String* | :heavy_check_mark: | The name of the repository. | private_repo | +| `permission` | [Models::Shared::Permission](../../models/shared/permission.md) | :heavy_check_mark: | The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role). | | \ No newline at end of file diff --git a/docs/models/shared/benefitgithubrepositorysubscriber.md b/docs/models/shared/benefitgithubrepositorysubscriber.md new file mode 100644 index 0000000..ca3fe0b --- /dev/null +++ b/docs/models/shared/benefitgithubrepositorysubscriber.md @@ -0,0 +1,18 @@ +# BenefitGitHubRepositorySubscriber + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitgithubrepositorysubscribermetadata.md)] | :heavy_check_mark: | N/A | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitGitHubRepositorySubscriberProperties](../../models/shared/benefitgithubrepositorysubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `github_repository`. | \ No newline at end of file diff --git a/docs/models/shared/benefitgithubrepositorysubscribermetadata.md b/docs/models/shared/benefitgithubrepositorysubscribermetadata.md new file mode 100644 index 0000000..6f107be --- /dev/null +++ b/docs/models/shared/benefitgithubrepositorysubscribermetadata.md @@ -0,0 +1,2 @@ +# BenefitGitHubRepositorySubscriberMetadata + diff --git a/docs/models/shared/benefitgithubrepositorysubscriberproperties.md b/docs/models/shared/benefitgithubrepositorysubscriberproperties.md new file mode 100644 index 0000000..d8e529c --- /dev/null +++ b/docs/models/shared/benefitgithubrepositorysubscriberproperties.md @@ -0,0 +1,11 @@ +# BenefitGitHubRepositorySubscriberProperties + +Properties available to subscribers for a benefit of type `github_repository`. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `repository_owner` | *::String* | :heavy_check_mark: | The owner of the repository. | polarsource | +| `repository_name` | *::String* | :heavy_check_mark: | The name of the repository. | private_repo | \ No newline at end of file diff --git a/docs/models/shared/benefitgithubrepositoryupdate.md b/docs/models/shared/benefitgithubrepositoryupdate.md new file mode 100644 index 0000000..7948345 --- /dev/null +++ b/docs/models/shared/benefitgithubrepositoryupdate.md @@ -0,0 +1,11 @@ +# BenefitGitHubRepositoryUpdate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitgithubrepositoryupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the benefit. Will be displayed on products having this benefit. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::BenefitGitHubRepositoryCreateProperties)](../../models/shared/benefitgithubrepositorycreateproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitgithubrepositoryupdatemetadata.md b/docs/models/shared/benefitgithubrepositoryupdatemetadata.md new file mode 100644 index 0000000..bf67d2e --- /dev/null +++ b/docs/models/shared/benefitgithubrepositoryupdatemetadata.md @@ -0,0 +1,2 @@ +# BenefitGitHubRepositoryUpdateMetadata + diff --git a/docs/models/shared/benefitgrant.md b/docs/models/shared/benefitgrant.md new file mode 100644 index 0000000..15bb939 --- /dev/null +++ b/docs/models/shared/benefitgrant.md @@ -0,0 +1,20 @@ +# BenefitGrant + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the grant. | +| `granted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | +| `is_granted` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is granted. | +| `revoked_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | +| `is_revoked` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is revoked. | +| `subscription_id` | *::String* | :heavy_check_mark: | The ID of the subscription that granted this benefit. | +| `order_id` | *::String* | :heavy_check_mark: | The ID of the order that granted this benefit. | +| `customer_id` | *::String* | :heavy_check_mark: | The ID of the customer concerned by this grant. | +| `benefit_id` | *::String* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | +| `customer` | [Models::Shared::Customer](../../models/shared/customer.md) | :heavy_check_mark: | A customer in an organization. | +| `properties` | [T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties)](../../models/shared/properties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitgrantcustomproperties.md b/docs/models/shared/benefitgrantcustomproperties.md new file mode 100644 index 0000000..a008685 --- /dev/null +++ b/docs/models/shared/benefitgrantcustomproperties.md @@ -0,0 +1,7 @@ +# BenefitGrantCustomProperties + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/benefitgrantdiscordproperties.md b/docs/models/shared/benefitgrantdiscordproperties.md new file mode 100644 index 0000000..286d0fa --- /dev/null +++ b/docs/models/shared/benefitgrantdiscordproperties.md @@ -0,0 +1,10 @@ +# BenefitGrantDiscordProperties + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `account_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `guild_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `role_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitgrantdownloadablesproperties.md b/docs/models/shared/benefitgrantdownloadablesproperties.md new file mode 100644 index 0000000..0296932 --- /dev/null +++ b/docs/models/shared/benefitgrantdownloadablesproperties.md @@ -0,0 +1,8 @@ +# BenefitGrantDownloadablesProperties + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `files` | T::Array<*::String*> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitgrantgithubrepositoryproperties.md b/docs/models/shared/benefitgrantgithubrepositoryproperties.md new file mode 100644 index 0000000..c28127e --- /dev/null +++ b/docs/models/shared/benefitgrantgithubrepositoryproperties.md @@ -0,0 +1,11 @@ +# BenefitGrantGitHubRepositoryProperties + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `account_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `repository_owner` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `repository_name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `permission` | [T.nilable(Models::Shared::BenefitGrantGitHubRepositoryPropertiesPermission)](../../models/shared/benefitgrantgithubrepositorypropertiespermission.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitgrantgithubrepositorypropertiespermission.md b/docs/models/shared/benefitgrantgithubrepositorypropertiespermission.md new file mode 100644 index 0000000..641131d --- /dev/null +++ b/docs/models/shared/benefitgrantgithubrepositorypropertiespermission.md @@ -0,0 +1,12 @@ +# BenefitGrantGitHubRepositoryPropertiesPermission + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PULL` | pull | +| `TRIAGE` | triage | +| `PUSH` | push | +| `MAINTAIN` | maintain | +| `ADMIN` | admin | \ No newline at end of file diff --git a/docs/models/shared/benefitgrantlicensekeysproperties.md b/docs/models/shared/benefitgrantlicensekeysproperties.md new file mode 100644 index 0000000..04c2154 --- /dev/null +++ b/docs/models/shared/benefitgrantlicensekeysproperties.md @@ -0,0 +1,9 @@ +# BenefitGrantLicenseKeysProperties + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `license_key_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `display_key` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitgrantmetercreditproperties.md b/docs/models/shared/benefitgrantmetercreditproperties.md new file mode 100644 index 0000000..8ac55f0 --- /dev/null +++ b/docs/models/shared/benefitgrantmetercreditproperties.md @@ -0,0 +1,10 @@ +# BenefitGrantMeterCreditProperties + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `last_credited_meter_id` | *::String* | :heavy_check_mark: | N/A | +| `last_credited_units` | *::Integer* | :heavy_check_mark: | N/A | +| `last_credited_at` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitgrantwebhook.md b/docs/models/shared/benefitgrantwebhook.md new file mode 100644 index 0000000..0c6d076 --- /dev/null +++ b/docs/models/shared/benefitgrantwebhook.md @@ -0,0 +1,22 @@ +# BenefitGrantWebhook + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the grant. | +| `granted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The timestamp when the benefit was granted. If `None`, the benefit is not granted. | +| `is_granted` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is granted. | +| `revoked_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. | +| `is_revoked` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is revoked. | +| `subscription_id` | *::String* | :heavy_check_mark: | The ID of the subscription that granted this benefit. | +| `order_id` | *::String* | :heavy_check_mark: | The ID of the order that granted this benefit. | +| `customer_id` | *::String* | :heavy_check_mark: | The ID of the customer concerned by this grant. | +| `benefit_id` | *::String* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | +| `customer` | [Models::Shared::Customer](../../models/shared/customer.md) | :heavy_check_mark: | A customer in an organization. | +| `properties` | [T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties)](../../models/shared/benefitgrantwebhookproperties.md) | :heavy_check_mark: | N/A | +| `benefit` | [T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)](../../models/shared/benefit.md) | :heavy_check_mark: | N/A | +| `previous_properties` | [T.nilable(T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties))](../../models/shared/previousproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitgrantwebhookproperties.md b/docs/models/shared/benefitgrantwebhookproperties.md new file mode 100644 index 0000000..5b35dda --- /dev/null +++ b/docs/models/shared/benefitgrantwebhookproperties.md @@ -0,0 +1,2 @@ +# BenefitGrantWebhookProperties + diff --git a/docs/models/shared/benefitlicensekeyactivationcreateproperties.md b/docs/models/shared/benefitlicensekeyactivationcreateproperties.md new file mode 100644 index 0000000..8248bcc --- /dev/null +++ b/docs/models/shared/benefitlicensekeyactivationcreateproperties.md @@ -0,0 +1,9 @@ +# BenefitLicenseKeyActivationCreateProperties + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `limit` | *::Integer* | :heavy_check_mark: | N/A | +| `enable_customer_admin` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeyactivationproperties.md b/docs/models/shared/benefitlicensekeyactivationproperties.md new file mode 100644 index 0000000..4503027 --- /dev/null +++ b/docs/models/shared/benefitlicensekeyactivationproperties.md @@ -0,0 +1,9 @@ +# BenefitLicenseKeyActivationProperties + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `limit` | *::Integer* | :heavy_check_mark: | N/A | +| `enable_customer_admin` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeyexpirationproperties.md b/docs/models/shared/benefitlicensekeyexpirationproperties.md new file mode 100644 index 0000000..7847420 --- /dev/null +++ b/docs/models/shared/benefitlicensekeyexpirationproperties.md @@ -0,0 +1,9 @@ +# BenefitLicenseKeyExpirationProperties + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `ttl` | *::Integer* | :heavy_check_mark: | N/A | +| `timeframe` | [Models::Shared::Timeframe](../../models/shared/timeframe.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeys.md b/docs/models/shared/benefitlicensekeys.md new file mode 100644 index 0000000..431079c --- /dev/null +++ b/docs/models/shared/benefitlicensekeys.md @@ -0,0 +1,17 @@ +# BenefitLicenseKeys + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitlicensekeysmetadata.md)] | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitLicenseKeysProperties](../../models/shared/benefitlicensekeysproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeyscreate.md b/docs/models/shared/benefitlicensekeyscreate.md new file mode 100644 index 0000000..57a452e --- /dev/null +++ b/docs/models/shared/benefitlicensekeyscreate.md @@ -0,0 +1,12 @@ +# BenefitLicenseKeysCreate + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitlicensekeyscreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. Will be displayed on products having this benefit. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the benefit. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::BenefitLicenseKeysCreateProperties](../../models/shared/benefitlicensekeyscreateproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeyscreatemetadata.md b/docs/models/shared/benefitlicensekeyscreatemetadata.md new file mode 100644 index 0000000..d8bf6b6 --- /dev/null +++ b/docs/models/shared/benefitlicensekeyscreatemetadata.md @@ -0,0 +1,2 @@ +# BenefitLicenseKeysCreateMetadata + diff --git a/docs/models/shared/benefitlicensekeyscreateproperties.md b/docs/models/shared/benefitlicensekeyscreateproperties.md new file mode 100644 index 0000000..4264d5d --- /dev/null +++ b/docs/models/shared/benefitlicensekeyscreateproperties.md @@ -0,0 +1,11 @@ +# BenefitLicenseKeysCreateProperties + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `prefix` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `expires` | [T.nilable(Models::Shared::BenefitLicenseKeyExpirationProperties)](../../models/shared/benefitlicensekeyexpirationproperties.md) | :heavy_minus_sign: | N/A | +| `activations` | [T.nilable(Models::Shared::BenefitLicenseKeyActivationCreateProperties)](../../models/shared/benefitlicensekeyactivationcreateproperties.md) | :heavy_minus_sign: | N/A | +| `limit_usage` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeysmetadata.md b/docs/models/shared/benefitlicensekeysmetadata.md new file mode 100644 index 0000000..3aa634e --- /dev/null +++ b/docs/models/shared/benefitlicensekeysmetadata.md @@ -0,0 +1,2 @@ +# BenefitLicenseKeysMetadata + diff --git a/docs/models/shared/benefitlicensekeysproperties.md b/docs/models/shared/benefitlicensekeysproperties.md new file mode 100644 index 0000000..e2426ff --- /dev/null +++ b/docs/models/shared/benefitlicensekeysproperties.md @@ -0,0 +1,11 @@ +# BenefitLicenseKeysProperties + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `prefix` | *::String* | :heavy_check_mark: | N/A | +| `expires` | [Models::Shared::BenefitLicenseKeyExpirationProperties](../../models/shared/benefitlicensekeyexpirationproperties.md) | :heavy_check_mark: | N/A | +| `activations` | [Models::Shared::BenefitLicenseKeyActivationProperties](../../models/shared/benefitlicensekeyactivationproperties.md) | :heavy_check_mark: | N/A | +| `limit_usage` | *::Integer* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeyssubscriber.md b/docs/models/shared/benefitlicensekeyssubscriber.md new file mode 100644 index 0000000..b4b9585 --- /dev/null +++ b/docs/models/shared/benefitlicensekeyssubscriber.md @@ -0,0 +1,18 @@ +# BenefitLicenseKeysSubscriber + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitlicensekeyssubscribermetadata.md)] | :heavy_check_mark: | N/A | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitLicenseKeysSubscriberProperties](../../models/shared/benefitlicensekeyssubscriberproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeyssubscribermetadata.md b/docs/models/shared/benefitlicensekeyssubscribermetadata.md new file mode 100644 index 0000000..eded511 --- /dev/null +++ b/docs/models/shared/benefitlicensekeyssubscribermetadata.md @@ -0,0 +1,2 @@ +# BenefitLicenseKeysSubscriberMetadata + diff --git a/docs/models/shared/benefitlicensekeyssubscriberproperties.md b/docs/models/shared/benefitlicensekeyssubscriberproperties.md new file mode 100644 index 0000000..45381f1 --- /dev/null +++ b/docs/models/shared/benefitlicensekeyssubscriberproperties.md @@ -0,0 +1,11 @@ +# BenefitLicenseKeysSubscriberProperties + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `prefix` | *::String* | :heavy_check_mark: | N/A | +| `expires` | [Models::Shared::BenefitLicenseKeyExpirationProperties](../../models/shared/benefitlicensekeyexpirationproperties.md) | :heavy_check_mark: | N/A | +| `activations` | [Models::Shared::BenefitLicenseKeyActivationProperties](../../models/shared/benefitlicensekeyactivationproperties.md) | :heavy_check_mark: | N/A | +| `limit_usage` | *::Integer* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeysupdate.md b/docs/models/shared/benefitlicensekeysupdate.md new file mode 100644 index 0000000..a6f168d --- /dev/null +++ b/docs/models/shared/benefitlicensekeysupdate.md @@ -0,0 +1,11 @@ +# BenefitLicenseKeysUpdate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitlicensekeysupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the benefit. Will be displayed on products having this benefit. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::BenefitLicenseKeysCreateProperties)](../../models/shared/benefitlicensekeyscreateproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitlicensekeysupdatemetadata.md b/docs/models/shared/benefitlicensekeysupdatemetadata.md new file mode 100644 index 0000000..126fdf0 --- /dev/null +++ b/docs/models/shared/benefitlicensekeysupdatemetadata.md @@ -0,0 +1,2 @@ +# BenefitLicenseKeysUpdateMetadata + diff --git a/docs/models/shared/benefitmetercredit.md b/docs/models/shared/benefitmetercredit.md new file mode 100644 index 0000000..ce377d7 --- /dev/null +++ b/docs/models/shared/benefitmetercredit.md @@ -0,0 +1,21 @@ +# BenefitMeterCredit + +A benefit of type `meter_unit`. + +Use it to grant a number of units on a specific meter. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitmetercreditmetadata.md)] | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitMeterCreditProperties](../../models/shared/benefitmetercreditproperties.md) | :heavy_check_mark: | Properties for a benefit of type `meter_unit`. | \ No newline at end of file diff --git a/docs/models/shared/benefitmetercreditcreate.md b/docs/models/shared/benefitmetercreditcreate.md new file mode 100644 index 0000000..8187b3c --- /dev/null +++ b/docs/models/shared/benefitmetercreditcreate.md @@ -0,0 +1,14 @@ +# BenefitMeterCreditCreate + +Schema to create a benefit of type `meter_unit`. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitmetercreditcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. Will be displayed on products having this benefit. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the benefit. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::BenefitMeterCreditCreateProperties](../../models/shared/benefitmetercreditcreateproperties.md) | :heavy_check_mark: | Properties for creating a benefit of type `meter_unit`. | | \ No newline at end of file diff --git a/docs/models/shared/benefitmetercreditcreatemetadata.md b/docs/models/shared/benefitmetercreditcreatemetadata.md new file mode 100644 index 0000000..c698820 --- /dev/null +++ b/docs/models/shared/benefitmetercreditcreatemetadata.md @@ -0,0 +1,2 @@ +# BenefitMeterCreditCreateMetadata + diff --git a/docs/models/shared/benefitmetercreditcreateproperties.md b/docs/models/shared/benefitmetercreditcreateproperties.md new file mode 100644 index 0000000..a7c8c8c --- /dev/null +++ b/docs/models/shared/benefitmetercreditcreateproperties.md @@ -0,0 +1,11 @@ +# BenefitMeterCreditCreateProperties + +Properties for creating a benefit of type `meter_unit`. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `units` | *::Integer* | :heavy_check_mark: | N/A | +| `meter_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitmetercreditmetadata.md b/docs/models/shared/benefitmetercreditmetadata.md new file mode 100644 index 0000000..f3135bf --- /dev/null +++ b/docs/models/shared/benefitmetercreditmetadata.md @@ -0,0 +1,2 @@ +# BenefitMeterCreditMetadata + diff --git a/docs/models/shared/benefitmetercreditproperties.md b/docs/models/shared/benefitmetercreditproperties.md new file mode 100644 index 0000000..4463d2c --- /dev/null +++ b/docs/models/shared/benefitmetercreditproperties.md @@ -0,0 +1,11 @@ +# BenefitMeterCreditProperties + +Properties for a benefit of type `meter_unit`. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `units` | *::Integer* | :heavy_check_mark: | N/A | +| `meter_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitmetercreditsubscriber.md b/docs/models/shared/benefitmetercreditsubscriber.md new file mode 100644 index 0000000..ea30026 --- /dev/null +++ b/docs/models/shared/benefitmetercreditsubscriber.md @@ -0,0 +1,18 @@ +# BenefitMeterCreditSubscriber + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitmetercreditsubscribermetadata.md)] | :heavy_check_mark: | N/A | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitMeterCreditSubscriberProperties](../../models/shared/benefitmetercreditsubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `meter_unit`. | \ No newline at end of file diff --git a/docs/models/shared/benefitmetercreditsubscribermetadata.md b/docs/models/shared/benefitmetercreditsubscribermetadata.md new file mode 100644 index 0000000..0568a8d --- /dev/null +++ b/docs/models/shared/benefitmetercreditsubscribermetadata.md @@ -0,0 +1,2 @@ +# BenefitMeterCreditSubscriberMetadata + diff --git a/docs/models/shared/benefitmetercreditsubscriberproperties.md b/docs/models/shared/benefitmetercreditsubscriberproperties.md new file mode 100644 index 0000000..c62930a --- /dev/null +++ b/docs/models/shared/benefitmetercreditsubscriberproperties.md @@ -0,0 +1,11 @@ +# BenefitMeterCreditSubscriberProperties + +Properties available to subscribers for a benefit of type `meter_unit`. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `units` | *::Integer* | :heavy_check_mark: | N/A | +| `meter_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitmetercreditupdate.md b/docs/models/shared/benefitmetercreditupdate.md new file mode 100644 index 0000000..34791bc --- /dev/null +++ b/docs/models/shared/benefitmetercreditupdate.md @@ -0,0 +1,11 @@ +# BenefitMeterCreditUpdate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/benefitmetercreditupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the benefit. Will be displayed on products having this benefit. | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::BenefitMeterCreditCreateProperties)](../../models/shared/benefitmetercreditcreateproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/benefitmetercreditupdatemetadata.md b/docs/models/shared/benefitmetercreditupdatemetadata.md new file mode 100644 index 0000000..4338a30 --- /dev/null +++ b/docs/models/shared/benefitmetercreditupdatemetadata.md @@ -0,0 +1,2 @@ +# BenefitMeterCreditUpdateMetadata + diff --git a/docs/models/shared/benefitpublic.md b/docs/models/shared/benefitpublic.md new file mode 100644 index 0000000..c791c80 --- /dev/null +++ b/docs/models/shared/benefitpublic.md @@ -0,0 +1,15 @@ +# BenefitPublic + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the benefit. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `type` | [Models::Shared::BenefitType](../../models/shared/benefittype.md) | :heavy_check_mark: | N/A | +| `description` | *::String* | :heavy_check_mark: | The description of the benefit. | +| `selectable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | +| `deletable` | *T::Boolean* | :heavy_check_mark: | Whether the benefit is deletable. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the benefit. | \ No newline at end of file diff --git a/docs/models/shared/benefitsortproperty.md b/docs/models/shared/benefitsortproperty.md new file mode 100644 index 0000000..84de907 --- /dev/null +++ b/docs/models/shared/benefitsortproperty.md @@ -0,0 +1,11 @@ +# BenefitSortProperty + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `DESCRIPTION` | description | +| `MINUS_DESCRIPTION` | -description | \ No newline at end of file diff --git a/docs/models/shared/benefittype.md b/docs/models/shared/benefittype.md new file mode 100644 index 0000000..34a8b72 --- /dev/null +++ b/docs/models/shared/benefittype.md @@ -0,0 +1,13 @@ +# BenefitType + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `CUSTOM` | custom | +| `DISCORD` | discord | +| `GITHUB_REPOSITORY` | github_repository | +| `DOWNLOADABLES` | downloadables | +| `LICENSE_KEYS` | license_keys | +| `METER_CREDIT` | meter_credit | \ No newline at end of file diff --git a/docs/models/shared/checkout.md b/docs/models/shared/checkout.md new file mode 100644 index 0000000..ca2f7c5 --- /dev/null +++ b/docs/models/shared/checkout.md @@ -0,0 +1,53 @@ +# Checkout + +Checkout session data retrieved using an access token. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `custom_field_data` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean, ::DateTime)](../../models/shared/checkoutcustomfielddata.md)] | :heavy_minus_sign: | Key-value object storing custom field values. | +| `payment_processor` | [Models::Shared::PaymentProcessor](../../models/shared/paymentprocessor.md) | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::CheckoutStatus](../../models/shared/checkoutstatus.md) | :heavy_check_mark: | N/A | +| `client_secret` | *::String* | :heavy_check_mark: | Client secret used to update and complete the checkout session from the client. | +| `url` | *::String* | :heavy_check_mark: | URL where the customer can access the checkout session. | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Expiration date and time of the checkout session. | +| `success_url` | *::String* | :heavy_check_mark: | URL where the customer will be redirected after a successful payment. | +| `embed_origin` | *::String* | :heavy_check_mark: | When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page. | +| `amount` | *::Integer* | :heavy_check_mark: | Amount in cents, before discounts and taxes. | +| `discount_amount` | *::Integer* | :heavy_check_mark: | Discount amount in cents. | +| `net_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, after discounts but before taxes. | +| `tax_amount` | *::Integer* | :heavy_check_mark: | Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it. | +| `total_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, after discounts and taxes. | +| `currency` | *::String* | :heavy_check_mark: | Currency code of the checkout session. | +| `product_id` | *::String* | :heavy_check_mark: | ID of the product to checkout. | +| `product_price_id` | *::String* | :heavy_check_mark: | ID of the product price to checkout. | +| `discount_id` | *::String* | :heavy_check_mark: | ID of the discount applied to the checkout. | +| `allow_discount_codes` | *T::Boolean* | :heavy_check_mark: | Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. | +| `require_billing_address` | *T::Boolean* | :heavy_check_mark: | Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`. | +| `is_discount_applicable` | *T::Boolean* | :heavy_check_mark: | Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable. | +| `is_free_product_price` | *T::Boolean* | :heavy_check_mark: | Whether the product price is free, regardless of discounts. | +| `is_payment_required` | *T::Boolean* | :heavy_check_mark: | Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount. | +| `is_payment_setup_required` | *T::Boolean* | :heavy_check_mark: | Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles. | +| `is_payment_form_required` | *T::Boolean* | :heavy_check_mark: | Whether the checkout requires a payment form, whether because of a payment or payment method setup. | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_name` | *::String* | :heavy_check_mark: | Name of the customer. | +| `customer_email` | *::String* | :heavy_check_mark: | Email address of the customer. | +| `customer_ip_address` | *::String* | :heavy_check_mark: | N/A | +| `customer_billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | +| `customer_tax_id` | *::String* | :heavy_check_mark: | N/A | +| `payment_processor_metadata` | T::Hash[Symbol, *::String*] | :heavy_check_mark: | N/A | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/checkoutmetadata.md)] | :heavy_check_mark: | N/A | +| `customer_external_id` | *::String* | :heavy_check_mark: | ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set. | +| `products` | T::Array<[Models::Shared::CheckoutProduct](../../models/shared/checkoutproduct.md)> | :heavy_check_mark: | List of products available to select. | +| `product` | [Models::Shared::CheckoutProduct](../../models/shared/checkoutproduct.md) | :heavy_check_mark: | Product data for a checkout session. | +| `product_price` | [T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/checkoutproductprice.md) | :heavy_check_mark: | Price of the selected product. | +| `discount` | [T.any(Models::Shared::CheckoutDiscountFixedOnceForeverDuration, Models::Shared::CheckoutDiscountFixedRepeatDuration, Models::Shared::CheckoutDiscountPercentageOnceForeverDuration, Models::Shared::CheckoutDiscountPercentageRepeatDuration)](../../models/shared/checkoutdiscount.md) | :heavy_check_mark: | N/A | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | +| `attached_custom_fields` | T::Array<[Models::Shared::AttachedCustomField](../../models/shared/attachedcustomfield.md)> | :heavy_check_mark: | N/A | +| `customer_metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean)](../../models/shared/customermetadata.md)] | :heavy_check_mark: | N/A | +| `customer_billing_address_fields` | [Models::Shared::CheckoutCustomerBillingAddressFields](../../models/shared/checkoutcustomerbillingaddressfields.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/checkoutcreate.md b/docs/models/shared/checkoutcreate.md new file mode 100644 index 0000000..0131b36 --- /dev/null +++ b/docs/models/shared/checkoutcreate.md @@ -0,0 +1,31 @@ +# CheckoutCreate + +Create a new checkout session from a list of products. +Customers will be able to switch between those products. + +Metadata set on the checkout will be copied +to the resulting order and/or subscription. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/checkoutcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `custom_field_data` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean, ::DateTime)](../../models/shared/checkoutcreatecustomfielddata.md)] | :heavy_minus_sign: | Key-value object storing custom field values. | +| `discount_id` | *T.nilable(::String)* | :heavy_minus_sign: | ID of the discount to apply to the checkout. | +| `allow_discount_codes` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. | +| `require_billing_address` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`. | +| `amount` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `customer_id` | *T.nilable(::String)* | :heavy_minus_sign: | ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer. | +| `customer_external_id` | *T.nilable(::String)* | :heavy_minus_sign: | ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set. | +| `customer_name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `customer_email` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `customer_ip_address` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `customer_billing_address` | [T.nilable(Models::Shared::Address)](../../models/shared/address.md) | :heavy_minus_sign: | N/A | +| `customer_tax_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `customer_metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/checkoutcreatecustomermetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information that'll be copied to the created customer.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `subscription_id` | *T.nilable(::String)* | :heavy_minus_sign: | ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten. | +| `success_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. | +| `embed_origin` | *T.nilable(::String)* | :heavy_minus_sign: | If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page. | +| `products` | T::Array<*::String*> | :heavy_check_mark: | List of product IDs available to select at that checkout. The first one will be selected by default. | \ No newline at end of file diff --git a/docs/models/shared/checkoutcreatecustomermetadata.md b/docs/models/shared/checkoutcreatecustomermetadata.md new file mode 100644 index 0000000..5abdf2d --- /dev/null +++ b/docs/models/shared/checkoutcreatecustomermetadata.md @@ -0,0 +1,2 @@ +# CheckoutCreateCustomerMetadata + diff --git a/docs/models/shared/checkoutcreatecustomfielddata.md b/docs/models/shared/checkoutcreatecustomfielddata.md new file mode 100644 index 0000000..0a9e3c5 --- /dev/null +++ b/docs/models/shared/checkoutcreatecustomfielddata.md @@ -0,0 +1,2 @@ +# CheckoutCreateCustomFieldData + diff --git a/docs/models/shared/checkoutcreatemetadata.md b/docs/models/shared/checkoutcreatemetadata.md new file mode 100644 index 0000000..21a38e1 --- /dev/null +++ b/docs/models/shared/checkoutcreatemetadata.md @@ -0,0 +1,2 @@ +# CheckoutCreateMetadata + diff --git a/docs/models/shared/checkoutcustomerbillingaddressfields.md b/docs/models/shared/checkoutcustomerbillingaddressfields.md new file mode 100644 index 0000000..29b60fe --- /dev/null +++ b/docs/models/shared/checkoutcustomerbillingaddressfields.md @@ -0,0 +1,13 @@ +# CheckoutCustomerBillingAddressFields + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `country` | *T::Boolean* | :heavy_check_mark: | N/A | +| `state` | *T::Boolean* | :heavy_check_mark: | N/A | +| `city` | *T::Boolean* | :heavy_check_mark: | N/A | +| `postal_code` | *T::Boolean* | :heavy_check_mark: | N/A | +| `line1` | *T::Boolean* | :heavy_check_mark: | N/A | +| `line2` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/checkoutcustomfielddata.md b/docs/models/shared/checkoutcustomfielddata.md new file mode 100644 index 0000000..b37a92d --- /dev/null +++ b/docs/models/shared/checkoutcustomfielddata.md @@ -0,0 +1,2 @@ +# CheckoutCustomFieldData + diff --git a/docs/models/shared/checkoutdiscount.md b/docs/models/shared/checkoutdiscount.md new file mode 100644 index 0000000..4d3ca4c --- /dev/null +++ b/docs/models/shared/checkoutdiscount.md @@ -0,0 +1,2 @@ +# CheckoutDiscount + diff --git a/docs/models/shared/checkoutdiscountfixedonceforeverduration.md b/docs/models/shared/checkoutdiscountfixedonceforeverduration.md new file mode 100644 index 0000000..6adfedd --- /dev/null +++ b/docs/models/shared/checkoutdiscountfixedonceforeverduration.md @@ -0,0 +1,16 @@ +# CheckoutDiscountFixedOnceForeverDuration + +Schema for a fixed amount discount that is applied once or forever. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | +| `amount` | *::Integer* | :heavy_check_mark: | N/A | +| `currency` | *::String* | :heavy_check_mark: | N/A | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `code` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/checkoutdiscountfixedrepeatduration.md b/docs/models/shared/checkoutdiscountfixedrepeatduration.md new file mode 100644 index 0000000..44df741 --- /dev/null +++ b/docs/models/shared/checkoutdiscountfixedrepeatduration.md @@ -0,0 +1,18 @@ +# CheckoutDiscountFixedRepeatDuration + +Schema for a fixed amount discount that is applied on every invoice +for a certain number of months. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | +| `duration_in_months` | *::Integer* | :heavy_check_mark: | N/A | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | +| `amount` | *::Integer* | :heavy_check_mark: | N/A | +| `currency` | *::String* | :heavy_check_mark: | N/A | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `code` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/checkoutdiscountpercentageonceforeverduration.md b/docs/models/shared/checkoutdiscountpercentageonceforeverduration.md new file mode 100644 index 0000000..f1f9962 --- /dev/null +++ b/docs/models/shared/checkoutdiscountpercentageonceforeverduration.md @@ -0,0 +1,15 @@ +# CheckoutDiscountPercentageOnceForeverDuration + +Schema for a percentage discount that is applied once or forever. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | +| `basis_points` | *::Integer* | :heavy_check_mark: | N/A | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `code` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/checkoutdiscountpercentagerepeatduration.md b/docs/models/shared/checkoutdiscountpercentagerepeatduration.md new file mode 100644 index 0000000..b4968cf --- /dev/null +++ b/docs/models/shared/checkoutdiscountpercentagerepeatduration.md @@ -0,0 +1,17 @@ +# CheckoutDiscountPercentageRepeatDuration + +Schema for a percentage discount that is applied on every invoice +for a certain number of months. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | +| `duration_in_months` | *::Integer* | :heavy_check_mark: | N/A | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | +| `basis_points` | *::Integer* | :heavy_check_mark: | N/A | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `code` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/checkoutlink.md b/docs/models/shared/checkoutlink.md new file mode 100644 index 0000000..df3d7d0 --- /dev/null +++ b/docs/models/shared/checkoutlink.md @@ -0,0 +1,24 @@ +# CheckoutLink + +Checkout link data. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/checkoutlinkmetadata.md)] | :heavy_check_mark: | N/A | | +| `payment_processor` | [Models::Shared::PaymentProcessor](../../models/shared/paymentprocessor.md) | :heavy_check_mark: | N/A | | +| `client_secret` | *::String* | :heavy_check_mark: | Client secret used to access the checkout link. | | +| `success_url` | *::String* | :heavy_check_mark: | URL where the customer will be redirected after a successful payment. | | +| `label` | *::String* | :heavy_check_mark: | Optional label to distinguish links internally | | +| `allow_discount_codes` | *T::Boolean* | :heavy_check_mark: | Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. | | +| `require_billing_address` | *T::Boolean* | :heavy_check_mark: | Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. | | +| `discount_id` | *::String* | :heavy_check_mark: | ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. | | +| `organization_id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `products` | T::Array<[Models::Shared::CheckoutLinkProduct](../../models/shared/checkoutlinkproduct.md)> | :heavy_check_mark: | N/A | | +| `discount` | [T.any(Models::Shared::DiscountFixedOnceForeverDurationBase, Models::Shared::DiscountFixedRepeatDurationBase, Models::Shared::DiscountPercentageOnceForeverDurationBase, Models::Shared::DiscountPercentageRepeatDurationBase)](../../models/shared/checkoutlinkdiscount.md) | :heavy_check_mark: | N/A | | +| `url` | *::String* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/checkoutlinkcreateproduct.md b/docs/models/shared/checkoutlinkcreateproduct.md new file mode 100644 index 0000000..a48ce38 --- /dev/null +++ b/docs/models/shared/checkoutlinkcreateproduct.md @@ -0,0 +1,19 @@ +# CheckoutLinkCreateProduct + +Schema to create a new checkout link from a a single product. + +**Deprecated**: Use `CheckoutLinkCreateProducts` instead. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/checkoutlinkcreateproductmetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `payment_processor` | *::String* | :heavy_check_mark: | Payment processor to use. Currently only Stripe is supported. | +| `label` | *T.nilable(::String)* | :heavy_minus_sign: | Optional label to distinguish links internally | +| `allow_discount_codes` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. | +| `require_billing_address` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. | +| `discount_id` | *T.nilable(::String)* | :heavy_minus_sign: | ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. | +| `success_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. | +| `product_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/checkoutlinkcreateproductmetadata.md b/docs/models/shared/checkoutlinkcreateproductmetadata.md new file mode 100644 index 0000000..6d9c80c --- /dev/null +++ b/docs/models/shared/checkoutlinkcreateproductmetadata.md @@ -0,0 +1,2 @@ +# CheckoutLinkCreateProductMetadata + diff --git a/docs/models/shared/checkoutlinkcreateproductprice.md b/docs/models/shared/checkoutlinkcreateproductprice.md new file mode 100644 index 0000000..8f8d5e5 --- /dev/null +++ b/docs/models/shared/checkoutlinkcreateproductprice.md @@ -0,0 +1,19 @@ +# CheckoutLinkCreateProductPrice + +Schema to create a new checkout link from a a single product price. + +**Deprecated**: Use `CheckoutLinkCreateProducts` instead. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/checkoutlinkcreateproductpricemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `payment_processor` | *::String* | :heavy_check_mark: | Payment processor to use. Currently only Stripe is supported. | +| `label` | *T.nilable(::String)* | :heavy_minus_sign: | Optional label to distinguish links internally | +| `allow_discount_codes` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. | +| `require_billing_address` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. | +| `discount_id` | *T.nilable(::String)* | :heavy_minus_sign: | ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. | +| `success_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. | +| `product_price_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/checkoutlinkcreateproductpricemetadata.md b/docs/models/shared/checkoutlinkcreateproductpricemetadata.md new file mode 100644 index 0000000..a7b551b --- /dev/null +++ b/docs/models/shared/checkoutlinkcreateproductpricemetadata.md @@ -0,0 +1,2 @@ +# CheckoutLinkCreateProductPriceMetadata + diff --git a/docs/models/shared/checkoutlinkcreateproducts.md b/docs/models/shared/checkoutlinkcreateproducts.md new file mode 100644 index 0000000..da2bc02 --- /dev/null +++ b/docs/models/shared/checkoutlinkcreateproducts.md @@ -0,0 +1,17 @@ +# CheckoutLinkCreateProducts + +Schema to create a new checkout link. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/checkoutlinkcreateproductsmetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `payment_processor` | *::String* | :heavy_check_mark: | Payment processor to use. Currently only Stripe is supported. | +| `label` | *T.nilable(::String)* | :heavy_minus_sign: | Optional label to distinguish links internally | +| `allow_discount_codes` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. | +| `require_billing_address` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. | +| `discount_id` | *T.nilable(::String)* | :heavy_minus_sign: | ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. | +| `success_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. | +| `products` | T::Array<*::String*> | :heavy_check_mark: | List of products that will be available to select at checkout. | \ No newline at end of file diff --git a/docs/models/shared/checkoutlinkcreateproductsmetadata.md b/docs/models/shared/checkoutlinkcreateproductsmetadata.md new file mode 100644 index 0000000..aea56ea --- /dev/null +++ b/docs/models/shared/checkoutlinkcreateproductsmetadata.md @@ -0,0 +1,2 @@ +# CheckoutLinkCreateProductsMetadata + diff --git a/docs/models/shared/checkoutlinkdiscount.md b/docs/models/shared/checkoutlinkdiscount.md new file mode 100644 index 0000000..a118580 --- /dev/null +++ b/docs/models/shared/checkoutlinkdiscount.md @@ -0,0 +1,2 @@ +# CheckoutLinkDiscount + diff --git a/docs/models/shared/checkoutlinkmetadata.md b/docs/models/shared/checkoutlinkmetadata.md new file mode 100644 index 0000000..c500e09 --- /dev/null +++ b/docs/models/shared/checkoutlinkmetadata.md @@ -0,0 +1,2 @@ +# CheckoutLinkMetadata + diff --git a/docs/models/shared/checkoutlinkproduct.md b/docs/models/shared/checkoutlinkproduct.md new file mode 100644 index 0000000..fcfca01 --- /dev/null +++ b/docs/models/shared/checkoutlinkproduct.md @@ -0,0 +1,22 @@ +# CheckoutLinkProduct + +Product data for a checkout link. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/checkoutlinkproductmetadata.md)] | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the product. | +| `name` | *::String* | :heavy_check_mark: | The name of the product. | +| `description` | *::String* | :heavy_check_mark: | The description of the product. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the product. If `None`, the product is a one-time purchase. | +| `is_recurring` | *T::Boolean* | :heavy_check_mark: | Whether the product is a subscription. | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the product. | +| `prices` | T::Array<[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/checkoutlinkproductprices.md)> | :heavy_check_mark: | List of prices for this product. | +| `benefits` | T::Array<[Models::Shared::BenefitPublic](../../models/shared/benefitpublic.md)> | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | T::Array<[Models::Shared::ProductMediaFileRead](../../models/shared/productmediafileread.md)> | :heavy_check_mark: | List of medias associated to the product. | \ No newline at end of file diff --git a/docs/models/shared/checkoutlinkproductmetadata.md b/docs/models/shared/checkoutlinkproductmetadata.md new file mode 100644 index 0000000..f84f477 --- /dev/null +++ b/docs/models/shared/checkoutlinkproductmetadata.md @@ -0,0 +1,2 @@ +# CheckoutLinkProductMetadata + diff --git a/docs/models/shared/checkoutlinkproductprices.md b/docs/models/shared/checkoutlinkproductprices.md new file mode 100644 index 0000000..0293af1 --- /dev/null +++ b/docs/models/shared/checkoutlinkproductprices.md @@ -0,0 +1,2 @@ +# CheckoutLinkProductPrices + diff --git a/docs/models/shared/checkoutlinksortproperty.md b/docs/models/shared/checkoutlinksortproperty.md new file mode 100644 index 0000000..1c02aa8 --- /dev/null +++ b/docs/models/shared/checkoutlinksortproperty.md @@ -0,0 +1,15 @@ +# CheckoutLinkSortProperty + + +## Values + +| Name | Value | +| ---------------------------- | ---------------------------- | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `LABEL` | label | +| `MINUS_LABEL` | -label | +| `SUCCESS_URL` | success_url | +| `MINUS_SUCCESS_URL` | -success_url | +| `ALLOW_DISCOUNT_CODES` | allow_discount_codes | +| `MINUS_ALLOW_DISCOUNT_CODES` | -allow_discount_codes | \ No newline at end of file diff --git a/docs/models/shared/checkoutlinkupdate.md b/docs/models/shared/checkoutlinkupdate.md new file mode 100644 index 0000000..186c771 --- /dev/null +++ b/docs/models/shared/checkoutlinkupdate.md @@ -0,0 +1,16 @@ +# CheckoutLinkUpdate + +Schema to update an existing checkout link. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/checkoutlinkupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `products` | T::Array<*::String*> | :heavy_minus_sign: | List of products that will be available to select at checkout. | +| `label` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `allow_discount_codes` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. | +| `require_billing_address` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. | +| `discount_id` | *T.nilable(::String)* | :heavy_minus_sign: | ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. | +| `success_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. | \ No newline at end of file diff --git a/docs/models/shared/checkoutlinkupdatemetadata.md b/docs/models/shared/checkoutlinkupdatemetadata.md new file mode 100644 index 0000000..9a4c047 --- /dev/null +++ b/docs/models/shared/checkoutlinkupdatemetadata.md @@ -0,0 +1,2 @@ +# CheckoutLinkUpdateMetadata + diff --git a/docs/models/shared/checkoutmetadata.md b/docs/models/shared/checkoutmetadata.md new file mode 100644 index 0000000..bbdcb50 --- /dev/null +++ b/docs/models/shared/checkoutmetadata.md @@ -0,0 +1,2 @@ +# CheckoutMetadata + diff --git a/docs/models/shared/checkoutproduct.md b/docs/models/shared/checkoutproduct.md new file mode 100644 index 0000000..8f8008d --- /dev/null +++ b/docs/models/shared/checkoutproduct.md @@ -0,0 +1,21 @@ +# CheckoutProduct + +Product data for a checkout session. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the product. | +| `name` | *::String* | :heavy_check_mark: | The name of the product. | +| `description` | *::String* | :heavy_check_mark: | The description of the product. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the product. If `None`, the product is a one-time purchase. | +| `is_recurring` | *T::Boolean* | :heavy_check_mark: | Whether the product is a subscription. | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the product. | +| `prices` | T::Array<[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/checkoutproductprices.md)> | :heavy_check_mark: | List of prices for this product. | +| `benefits` | T::Array<[Models::Shared::BenefitPublic](../../models/shared/benefitpublic.md)> | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | T::Array<[Models::Shared::ProductMediaFileRead](../../models/shared/productmediafileread.md)> | :heavy_check_mark: | List of medias associated to the product. | \ No newline at end of file diff --git a/docs/models/shared/checkoutproductprice.md b/docs/models/shared/checkoutproductprice.md new file mode 100644 index 0000000..1e1ebff --- /dev/null +++ b/docs/models/shared/checkoutproductprice.md @@ -0,0 +1,4 @@ +# CheckoutProductPrice + +Price of the selected product. + diff --git a/docs/models/shared/checkoutproductprices.md b/docs/models/shared/checkoutproductprices.md new file mode 100644 index 0000000..a2cb864 --- /dev/null +++ b/docs/models/shared/checkoutproductprices.md @@ -0,0 +1,2 @@ +# CheckoutProductPrices + diff --git a/docs/models/shared/checkoutpublic.md b/docs/models/shared/checkoutpublic.md new file mode 100644 index 0000000..70aebb5 --- /dev/null +++ b/docs/models/shared/checkoutpublic.md @@ -0,0 +1,50 @@ +# CheckoutPublic + +Checkout session data retrieved using the client secret. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `custom_field_data` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean, ::DateTime)](../../models/shared/checkoutpubliccustomfielddata.md)] | :heavy_minus_sign: | Key-value object storing custom field values. | +| `payment_processor` | [Models::Shared::PaymentProcessor](../../models/shared/paymentprocessor.md) | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::CheckoutStatus](../../models/shared/checkoutstatus.md) | :heavy_check_mark: | N/A | +| `client_secret` | *::String* | :heavy_check_mark: | Client secret used to update and complete the checkout session from the client. | +| `url` | *::String* | :heavy_check_mark: | URL where the customer can access the checkout session. | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Expiration date and time of the checkout session. | +| `success_url` | *::String* | :heavy_check_mark: | URL where the customer will be redirected after a successful payment. | +| `embed_origin` | *::String* | :heavy_check_mark: | When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page. | +| `amount` | *::Integer* | :heavy_check_mark: | Amount in cents, before discounts and taxes. | +| `discount_amount` | *::Integer* | :heavy_check_mark: | Discount amount in cents. | +| `net_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, after discounts but before taxes. | +| `tax_amount` | *::Integer* | :heavy_check_mark: | Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it. | +| `total_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, after discounts and taxes. | +| `currency` | *::String* | :heavy_check_mark: | Currency code of the checkout session. | +| `product_id` | *::String* | :heavy_check_mark: | ID of the product to checkout. | +| `product_price_id` | *::String* | :heavy_check_mark: | ID of the product price to checkout. | +| `discount_id` | *::String* | :heavy_check_mark: | ID of the discount applied to the checkout. | +| `allow_discount_codes` | *T::Boolean* | :heavy_check_mark: | Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. | +| `require_billing_address` | *T::Boolean* | :heavy_check_mark: | Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`. | +| `is_discount_applicable` | *T::Boolean* | :heavy_check_mark: | Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable. | +| `is_free_product_price` | *T::Boolean* | :heavy_check_mark: | Whether the product price is free, regardless of discounts. | +| `is_payment_required` | *T::Boolean* | :heavy_check_mark: | Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount. | +| `is_payment_setup_required` | *T::Boolean* | :heavy_check_mark: | Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles. | +| `is_payment_form_required` | *T::Boolean* | :heavy_check_mark: | Whether the checkout requires a payment form, whether because of a payment or payment method setup. | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_name` | *::String* | :heavy_check_mark: | Name of the customer. | +| `customer_email` | *::String* | :heavy_check_mark: | Email address of the customer. | +| `customer_ip_address` | *::String* | :heavy_check_mark: | N/A | +| `customer_billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | +| `customer_tax_id` | *::String* | :heavy_check_mark: | N/A | +| `payment_processor_metadata` | T::Hash[Symbol, *::String*] | :heavy_check_mark: | N/A | +| `products` | T::Array<[Models::Shared::CheckoutProduct](../../models/shared/checkoutproduct.md)> | :heavy_check_mark: | List of products available to select. | +| `product` | [Models::Shared::CheckoutProduct](../../models/shared/checkoutproduct.md) | :heavy_check_mark: | Product data for a checkout session. | +| `product_price` | [T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/checkoutpublicproductprice.md) | :heavy_check_mark: | Price of the selected product. | +| `discount` | [T.any(Models::Shared::CheckoutDiscountFixedOnceForeverDuration, Models::Shared::CheckoutDiscountFixedRepeatDuration, Models::Shared::CheckoutDiscountPercentageOnceForeverDuration, Models::Shared::CheckoutDiscountPercentageRepeatDuration)](../../models/shared/checkoutpublicdiscount.md) | :heavy_check_mark: | N/A | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | +| `attached_custom_fields` | T::Array<[Models::Shared::AttachedCustomField](../../models/shared/attachedcustomfield.md)> | :heavy_check_mark: | N/A | +| `customer_billing_address_fields` | [Models::Shared::CheckoutCustomerBillingAddressFields](../../models/shared/checkoutcustomerbillingaddressfields.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/checkoutpubliccustomfielddata.md b/docs/models/shared/checkoutpubliccustomfielddata.md new file mode 100644 index 0000000..a59d3a9 --- /dev/null +++ b/docs/models/shared/checkoutpubliccustomfielddata.md @@ -0,0 +1,2 @@ +# CheckoutPublicCustomFieldData + diff --git a/docs/models/shared/checkoutpublicdiscount.md b/docs/models/shared/checkoutpublicdiscount.md new file mode 100644 index 0000000..b6e5f74 --- /dev/null +++ b/docs/models/shared/checkoutpublicdiscount.md @@ -0,0 +1,2 @@ +# CheckoutPublicDiscount + diff --git a/docs/models/shared/checkoutpublicproductprice.md b/docs/models/shared/checkoutpublicproductprice.md new file mode 100644 index 0000000..e662654 --- /dev/null +++ b/docs/models/shared/checkoutpublicproductprice.md @@ -0,0 +1,4 @@ +# CheckoutPublicProductPrice + +Price of the selected product. + diff --git a/docs/models/shared/checkoutsortproperty.md b/docs/models/shared/checkoutsortproperty.md new file mode 100644 index 0000000..0410bc1 --- /dev/null +++ b/docs/models/shared/checkoutsortproperty.md @@ -0,0 +1,11 @@ +# CheckoutSortProperty + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `EXPIRES_AT` | expires_at | +| `MINUS_EXPIRES_AT` | -expires_at | \ No newline at end of file diff --git a/docs/models/shared/checkoutstatus.md b/docs/models/shared/checkoutstatus.md new file mode 100644 index 0000000..f85033b --- /dev/null +++ b/docs/models/shared/checkoutstatus.md @@ -0,0 +1,12 @@ +# CheckoutStatus + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `OPEN` | open | +| `EXPIRED` | expired | +| `CONFIRMED` | confirmed | +| `SUCCEEDED` | succeeded | +| `FAILED` | failed | \ No newline at end of file diff --git a/docs/models/shared/clauses.md b/docs/models/shared/clauses.md new file mode 100644 index 0000000..fc81d6f --- /dev/null +++ b/docs/models/shared/clauses.md @@ -0,0 +1,2 @@ +# Clauses + diff --git a/docs/models/shared/conditions.md b/docs/models/shared/conditions.md new file mode 100644 index 0000000..6167d51 --- /dev/null +++ b/docs/models/shared/conditions.md @@ -0,0 +1,2 @@ +# Conditions + diff --git a/docs/models/shared/countaggregation.md b/docs/models/shared/countaggregation.md new file mode 100644 index 0000000..130a91e --- /dev/null +++ b/docs/models/shared/countaggregation.md @@ -0,0 +1,8 @@ +# CountAggregation + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `func` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customer.md b/docs/models/shared/customer.md new file mode 100644 index 0000000..1d04995 --- /dev/null +++ b/docs/models/shared/customer.md @@ -0,0 +1,22 @@ +# Customer + +A customer in an organization. + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the customer. | 992fae2a-2a17-4b7a-8d9e-e287cf90131b | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customermetadata1.md)] | :heavy_check_mark: | N/A | | +| `external_id` | *::String* | :heavy_check_mark: | The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. | usr_1337 | +| `email` | *::String* | :heavy_check_mark: | The email address of the customer. This must be unique within the organization. | customer@example.com | +| `email_verified` | *T::Boolean* | :heavy_check_mark: | Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. | true | +| `name` | *::String* | :heavy_check_mark: | The name of the customer. | John Doe | +| `billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | | +| `tax_id` | T::Array<[T.any(::String, Models::Shared::TaxIDFormat)](../../models/shared/customertaxid.md)> | :heavy_check_mark: | N/A | [
"911144442",
"us_ein"
] | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the customer. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `deleted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp for when the customer was soft deleted. | | +| `avatar_url` | *::String* | :heavy_check_mark: | N/A | https://www.gravatar.com/avatar/xxx?d=blank | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrant.md b/docs/models/shared/customerbenefitgrant.md new file mode 100644 index 0000000..b5d9c49 --- /dev/null +++ b/docs/models/shared/customerbenefitgrant.md @@ -0,0 +1,2 @@ +# CustomerBenefitGrant + diff --git a/docs/models/shared/customerbenefitgrantcustom.md b/docs/models/shared/customerbenefitgrantcustom.md new file mode 100644 index 0000000..d5808a1 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantcustom.md @@ -0,0 +1,21 @@ +# CustomerBenefitGrantCustom + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `granted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `revoked_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | N/A | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | +| `order_id` | *::String* | :heavy_check_mark: | N/A | +| `is_granted` | *T::Boolean* | :heavy_check_mark: | N/A | +| `is_revoked` | *T::Boolean* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::CustomerPortalCustomer](../../models/shared/customerportalcustomer.md) | :heavy_check_mark: | N/A | +| `benefit` | [Models::Shared::BenefitCustomSubscriber](../../models/shared/benefitcustomsubscriber.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitGrantCustomProperties](../../models/shared/benefitgrantcustomproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantcustomupdate.md b/docs/models/shared/customerbenefitgrantcustomupdate.md new file mode 100644 index 0000000..ffa686d --- /dev/null +++ b/docs/models/shared/customerbenefitgrantcustomupdate.md @@ -0,0 +1,8 @@ +# CustomerBenefitGrantCustomUpdate + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `benefit_type` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantdiscord.md b/docs/models/shared/customerbenefitgrantdiscord.md new file mode 100644 index 0000000..33b5c37 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantdiscord.md @@ -0,0 +1,21 @@ +# CustomerBenefitGrantDiscord + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `granted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `revoked_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | N/A | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | +| `order_id` | *::String* | :heavy_check_mark: | N/A | +| `is_granted` | *T::Boolean* | :heavy_check_mark: | N/A | +| `is_revoked` | *T::Boolean* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::CustomerPortalCustomer](../../models/shared/customerportalcustomer.md) | :heavy_check_mark: | N/A | +| `benefit` | [Models::Shared::BenefitDiscordSubscriber](../../models/shared/benefitdiscordsubscriber.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitGrantDiscordProperties](../../models/shared/benefitgrantdiscordproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantdiscordpropertiesupdate.md b/docs/models/shared/customerbenefitgrantdiscordpropertiesupdate.md new file mode 100644 index 0000000..ff1a3db --- /dev/null +++ b/docs/models/shared/customerbenefitgrantdiscordpropertiesupdate.md @@ -0,0 +1,8 @@ +# CustomerBenefitGrantDiscordPropertiesUpdate + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `account_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantdiscordupdate.md b/docs/models/shared/customerbenefitgrantdiscordupdate.md new file mode 100644 index 0000000..dcc9fb3 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantdiscordupdate.md @@ -0,0 +1,9 @@ +# CustomerBenefitGrantDiscordUpdate + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `benefit_type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::CustomerBenefitGrantDiscordPropertiesUpdate](../../models/shared/customerbenefitgrantdiscordpropertiesupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantdownloadables.md b/docs/models/shared/customerbenefitgrantdownloadables.md new file mode 100644 index 0000000..08bbccb --- /dev/null +++ b/docs/models/shared/customerbenefitgrantdownloadables.md @@ -0,0 +1,21 @@ +# CustomerBenefitGrantDownloadables + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `granted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `revoked_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | N/A | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | +| `order_id` | *::String* | :heavy_check_mark: | N/A | +| `is_granted` | *T::Boolean* | :heavy_check_mark: | N/A | +| `is_revoked` | *T::Boolean* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::CustomerPortalCustomer](../../models/shared/customerportalcustomer.md) | :heavy_check_mark: | N/A | +| `benefit` | [Models::Shared::BenefitDownloadablesSubscriber](../../models/shared/benefitdownloadablessubscriber.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitGrantDownloadablesProperties](../../models/shared/benefitgrantdownloadablesproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantdownloadablesupdate.md b/docs/models/shared/customerbenefitgrantdownloadablesupdate.md new file mode 100644 index 0000000..4dbda5a --- /dev/null +++ b/docs/models/shared/customerbenefitgrantdownloadablesupdate.md @@ -0,0 +1,8 @@ +# CustomerBenefitGrantDownloadablesUpdate + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `benefit_type` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantgithubrepository.md b/docs/models/shared/customerbenefitgrantgithubrepository.md new file mode 100644 index 0000000..cde3b41 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantgithubrepository.md @@ -0,0 +1,21 @@ +# CustomerBenefitGrantGitHubRepository + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `granted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `revoked_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | N/A | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | +| `order_id` | *::String* | :heavy_check_mark: | N/A | +| `is_granted` | *T::Boolean* | :heavy_check_mark: | N/A | +| `is_revoked` | *T::Boolean* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::CustomerPortalCustomer](../../models/shared/customerportalcustomer.md) | :heavy_check_mark: | N/A | +| `benefit` | [Models::Shared::BenefitGitHubRepositorySubscriber](../../models/shared/benefitgithubrepositorysubscriber.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitGrantGitHubRepositoryProperties](../../models/shared/benefitgrantgithubrepositoryproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.md b/docs/models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.md new file mode 100644 index 0000000..a1b6ec0 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.md @@ -0,0 +1,8 @@ +# CustomerBenefitGrantGitHubRepositoryPropertiesUpdate + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `account_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantgithubrepositoryupdate.md b/docs/models/shared/customerbenefitgrantgithubrepositoryupdate.md new file mode 100644 index 0000000..7cbb823 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantgithubrepositoryupdate.md @@ -0,0 +1,9 @@ +# CustomerBenefitGrantGitHubRepositoryUpdate + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `benefit_type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::CustomerBenefitGrantGitHubRepositoryPropertiesUpdate](../../models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantlicensekeys.md b/docs/models/shared/customerbenefitgrantlicensekeys.md new file mode 100644 index 0000000..bc1e8e0 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantlicensekeys.md @@ -0,0 +1,21 @@ +# CustomerBenefitGrantLicenseKeys + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `granted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `revoked_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | N/A | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | +| `order_id` | *::String* | :heavy_check_mark: | N/A | +| `is_granted` | *T::Boolean* | :heavy_check_mark: | N/A | +| `is_revoked` | *T::Boolean* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::CustomerPortalCustomer](../../models/shared/customerportalcustomer.md) | :heavy_check_mark: | N/A | +| `benefit` | [Models::Shared::BenefitLicenseKeysSubscriber](../../models/shared/benefitlicensekeyssubscriber.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitGrantLicenseKeysProperties](../../models/shared/benefitgrantlicensekeysproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantlicensekeysupdate.md b/docs/models/shared/customerbenefitgrantlicensekeysupdate.md new file mode 100644 index 0000000..281bb2c --- /dev/null +++ b/docs/models/shared/customerbenefitgrantlicensekeysupdate.md @@ -0,0 +1,8 @@ +# CustomerBenefitGrantLicenseKeysUpdate + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `benefit_type` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantmetercredit.md b/docs/models/shared/customerbenefitgrantmetercredit.md new file mode 100644 index 0000000..5afdc90 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantmetercredit.md @@ -0,0 +1,21 @@ +# CustomerBenefitGrantMeterCredit + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `granted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `revoked_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | N/A | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | +| `order_id` | *::String* | :heavy_check_mark: | N/A | +| `is_granted` | *T::Boolean* | :heavy_check_mark: | N/A | +| `is_revoked` | *T::Boolean* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::CustomerPortalCustomer](../../models/shared/customerportalcustomer.md) | :heavy_check_mark: | N/A | +| `benefit` | [Models::Shared::BenefitMeterCreditSubscriber](../../models/shared/benefitmetercreditsubscriber.md) | :heavy_check_mark: | N/A | +| `properties` | [Models::Shared::BenefitGrantMeterCreditProperties](../../models/shared/benefitgrantmetercreditproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantmetercreditupdate.md b/docs/models/shared/customerbenefitgrantmetercreditupdate.md new file mode 100644 index 0000000..97a6ace --- /dev/null +++ b/docs/models/shared/customerbenefitgrantmetercreditupdate.md @@ -0,0 +1,8 @@ +# CustomerBenefitGrantMeterCreditUpdate + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `benefit_type` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantsortproperty.md b/docs/models/shared/customerbenefitgrantsortproperty.md new file mode 100644 index 0000000..caa0b45 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantsortproperty.md @@ -0,0 +1,13 @@ +# CustomerBenefitGrantSortProperty + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `GRANTED_AT` | granted_at | +| `MINUS_GRANTED_AT` | -granted_at | +| `TYPE` | type | +| `MINUS_TYPE` | -type | +| `ORGANIZATION` | organization | +| `MINUS_ORGANIZATION` | -organization | \ No newline at end of file diff --git a/docs/models/shared/customerbenefitgrantupdate.md b/docs/models/shared/customerbenefitgrantupdate.md new file mode 100644 index 0000000..0e4b069 --- /dev/null +++ b/docs/models/shared/customerbenefitgrantupdate.md @@ -0,0 +1,2 @@ +# CustomerBenefitGrantUpdate + diff --git a/docs/models/shared/customercancellationreason.md b/docs/models/shared/customercancellationreason.md new file mode 100644 index 0000000..d7172d3 --- /dev/null +++ b/docs/models/shared/customercancellationreason.md @@ -0,0 +1,15 @@ +# CustomerCancellationReason + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `CUSTOMER_SERVICE` | customer_service | +| `LOW_QUALITY` | low_quality | +| `MISSING_FEATURES` | missing_features | +| `SWITCHED_SERVICE` | switched_service | +| `TOO_COMPLEX` | too_complex | +| `TOO_EXPENSIVE` | too_expensive | +| `UNUSED` | unused | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/shared/customercreate.md b/docs/models/shared/customercreate.md new file mode 100644 index 0000000..9b23b65 --- /dev/null +++ b/docs/models/shared/customercreate.md @@ -0,0 +1,14 @@ +# CustomerCreate + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customercreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `external_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. | usr_1337 | +| `email` | *::String* | :heavy_check_mark: | The email address of the customer. This must be unique within the organization. | customer@example.com | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the customer. | John Doe | +| `billing_address` | [T.nilable(Models::Shared::Address)](../../models/shared/address.md) | :heavy_minus_sign: | N/A | | +| `tax_id` | T::Array<[T.any(::String, Models::Shared::TaxIDFormat)](../../models/shared/customercreatetaxid.md)> | :heavy_minus_sign: | N/A | [
"911144442",
"us_ein"
] | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the customer. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/customercreatemetadata.md b/docs/models/shared/customercreatemetadata.md new file mode 100644 index 0000000..c5e686b --- /dev/null +++ b/docs/models/shared/customercreatemetadata.md @@ -0,0 +1,2 @@ +# CustomerCreateMetadata + diff --git a/docs/models/shared/customercreatetaxid.md b/docs/models/shared/customercreatetaxid.md new file mode 100644 index 0000000..0378ff4 --- /dev/null +++ b/docs/models/shared/customercreatetaxid.md @@ -0,0 +1,2 @@ +# CustomerCreateTaxId + diff --git a/docs/models/shared/customercustomermeter.md b/docs/models/shared/customercustomermeter.md new file mode 100644 index 0000000..7047ad1 --- /dev/null +++ b/docs/models/shared/customercustomermeter.md @@ -0,0 +1,16 @@ +# CustomerCustomerMeter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `customer_id` | *::String* | :heavy_check_mark: | The ID of the customer. | 992fae2a-2a17-4b7a-8d9e-e287cf90131b | +| `meter_id` | *::String* | :heavy_check_mark: | The ID of the meter. | d498a884-e2cd-4d3e-8002-f536468a8b22 | +| `consumed_units` | *::Float* | :heavy_check_mark: | The number of consumed units. | 25 | +| `credited_units` | *::Integer* | :heavy_check_mark: | The number of credited units. | 100 | +| `balance` | *::Float* | :heavy_check_mark: | The balance of the meter, i.e. the difference between credited and consumed units. Never goes negative. | 75 | +| `meter` | [Models::Shared::CustomerCustomerMeterMeter](../../models/shared/customercustomermetermeter.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customercustomermetermeter.md b/docs/models/shared/customercustomermetermeter.md new file mode 100644 index 0000000..88917da --- /dev/null +++ b/docs/models/shared/customercustomermetermeter.md @@ -0,0 +1,11 @@ +# CustomerCustomerMeterMeter + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `name` | *::String* | :heavy_check_mark: | The name of the meter. Will be shown on customer's invoices and usage. | \ No newline at end of file diff --git a/docs/models/shared/customercustomermetersortproperty.md b/docs/models/shared/customercustomermetersortproperty.md new file mode 100644 index 0000000..4b21e17 --- /dev/null +++ b/docs/models/shared/customercustomermetersortproperty.md @@ -0,0 +1,21 @@ +# CustomerCustomerMeterSortProperty + + +## Values + +| Name | Value | +| ---------------------- | ---------------------- | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `MODIFIED_AT` | modified_at | +| `MINUS_MODIFIED_AT` | -modified_at | +| `METER_ID` | meter_id | +| `MINUS_METER_ID` | -meter_id | +| `METER_NAME` | meter_name | +| `MINUS_METER_NAME` | -meter_name | +| `CONSUMED_UNITS` | consumed_units | +| `MINUS_CONSUMED_UNITS` | -consumed_units | +| `CREDITED_UNITS` | credited_units | +| `MINUS_CREDITED_UNITS` | -credited_units | +| `BALANCE` | balance | +| `MINUS_BALANCE` | -balance | \ No newline at end of file diff --git a/docs/models/shared/customermetadata.md b/docs/models/shared/customermetadata.md new file mode 100644 index 0000000..60e9cdf --- /dev/null +++ b/docs/models/shared/customermetadata.md @@ -0,0 +1,2 @@ +# CustomerMetadata + diff --git a/docs/models/shared/customermetadata1.md b/docs/models/shared/customermetadata1.md new file mode 100644 index 0000000..d4e8619 --- /dev/null +++ b/docs/models/shared/customermetadata1.md @@ -0,0 +1,2 @@ +# CustomerMetadata1 + diff --git a/docs/models/shared/customermeter.md b/docs/models/shared/customermeter.md new file mode 100644 index 0000000..3271407 --- /dev/null +++ b/docs/models/shared/customermeter.md @@ -0,0 +1,19 @@ +# CustomerMeter + +An active customer meter, with current consumed and credited units. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `customer_id` | *::String* | :heavy_check_mark: | The ID of the customer. | 992fae2a-2a17-4b7a-8d9e-e287cf90131b | +| `meter_id` | *::String* | :heavy_check_mark: | The ID of the meter. | d498a884-e2cd-4d3e-8002-f536468a8b22 | +| `consumed_units` | *::Float* | :heavy_check_mark: | The number of consumed units. | 25 | +| `credited_units` | *::Integer* | :heavy_check_mark: | The number of credited units. | 100 | +| `balance` | *::Float* | :heavy_check_mark: | The balance of the meter, i.e. the difference between credited and consumed units. Never goes negative. | 75 | +| `customer` | [Models::Shared::Customer](../../models/shared/customer.md) | :heavy_check_mark: | A customer in an organization. | | +| `meter` | [Models::Shared::Meter](../../models/shared/meter.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customermetersortproperty.md b/docs/models/shared/customermetersortproperty.md new file mode 100644 index 0000000..845c1ee --- /dev/null +++ b/docs/models/shared/customermetersortproperty.md @@ -0,0 +1,25 @@ +# CustomerMeterSortProperty + + +## Values + +| Name | Value | +| ---------------------- | ---------------------- | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `MODIFIED_AT` | modified_at | +| `MINUS_MODIFIED_AT` | -modified_at | +| `CUSTOMER_ID` | customer_id | +| `MINUS_CUSTOMER_ID` | -customer_id | +| `CUSTOMER_NAME` | customer_name | +| `MINUS_CUSTOMER_NAME` | -customer_name | +| `METER_ID` | meter_id | +| `MINUS_METER_ID` | -meter_id | +| `METER_NAME` | meter_name | +| `MINUS_METER_NAME` | -meter_name | +| `CONSUMED_UNITS` | consumed_units | +| `MINUS_CONSUMED_UNITS` | -consumed_units | +| `CREDITED_UNITS` | credited_units | +| `MINUS_CREDITED_UNITS` | -credited_units | +| `BALANCE` | balance | +| `MINUS_BALANCE` | -balance | \ No newline at end of file diff --git a/docs/models/shared/customerorder.md b/docs/models/shared/customerorder.md new file mode 100644 index 0000000..acfd4c5 --- /dev/null +++ b/docs/models/shared/customerorder.md @@ -0,0 +1,32 @@ +# CustomerOrder + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `status` | [Models::Shared::OrderStatus](../../models/shared/orderstatus.md) | :heavy_check_mark: | N/A | | +| `paid` | *T::Boolean* | :heavy_check_mark: | Whether the order has been paid for. | true | +| `subtotal_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, before discounts and taxes. | | +| `discount_amount` | *::Integer* | :heavy_check_mark: | Discount amount in cents. | | +| `net_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, after discounts but before taxes. | | +| ~~`amount`~~ | *::Integer* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Amount in cents, after discounts but before taxes. | | +| `tax_amount` | *::Integer* | :heavy_check_mark: | Sales tax amount in cents. | | +| `total_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, after discounts and taxes. | | +| `refunded_amount` | *::Integer* | :heavy_check_mark: | Amount refunded in cents. | | +| `refunded_tax_amount` | *::Integer* | :heavy_check_mark: | Sales tax refunded in cents. | | +| `currency` | *::String* | :heavy_check_mark: | N/A | | +| `billing_reason` | [Models::Shared::OrderBillingReason](../../models/shared/orderbillingreason.md) | :heavy_check_mark: | N/A | | +| `billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | | +| `product_id` | *::String* | :heavy_check_mark: | N/A | | +| `discount_id` | *::String* | :heavy_check_mark: | N/A | | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | | +| `checkout_id` | *::String* | :heavy_check_mark: | N/A | | +| ~~`user_id`~~ | *::String* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | +| `product` | [Models::Shared::CustomerOrderProduct](../../models/shared/customerorderproduct.md) | :heavy_check_mark: | N/A | | +| `subscription` | [Models::Shared::CustomerOrderSubscription](../../models/shared/customerordersubscription.md) | :heavy_check_mark: | N/A | | +| `items` | T::Array<[Models::Shared::OrderItemSchema](../../models/shared/orderitemschema.md)> | :heavy_check_mark: | Line items composing the order. | | \ No newline at end of file diff --git a/docs/models/shared/customerorderinvoice.md b/docs/models/shared/customerorderinvoice.md new file mode 100644 index 0000000..989cdf7 --- /dev/null +++ b/docs/models/shared/customerorderinvoice.md @@ -0,0 +1,10 @@ +# CustomerOrderInvoice + +Order's invoice data. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `url` | *::String* | :heavy_check_mark: | The URL to the invoice. | \ No newline at end of file diff --git a/docs/models/shared/customerorderproduct.md b/docs/models/shared/customerorderproduct.md new file mode 100644 index 0000000..1d02c3d --- /dev/null +++ b/docs/models/shared/customerorderproduct.md @@ -0,0 +1,20 @@ +# CustomerOrderProduct + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the product. | +| `name` | *::String* | :heavy_check_mark: | The name of the product. | +| `description` | *::String* | :heavy_check_mark: | The description of the product. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the product. If `None`, the product is a one-time purchase. | +| `is_recurring` | *T::Boolean* | :heavy_check_mark: | Whether the product is a subscription. | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the product. | +| `prices` | T::Array<[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/customerorderproductprices.md)> | :heavy_check_mark: | List of prices for this product. | +| `benefits` | T::Array<[Models::Shared::BenefitPublic](../../models/shared/benefitpublic.md)> | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | T::Array<[Models::Shared::ProductMediaFileRead](../../models/shared/productmediafileread.md)> | :heavy_check_mark: | List of medias associated to the product. | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerorderproductprices.md b/docs/models/shared/customerorderproductprices.md new file mode 100644 index 0000000..27fc02f --- /dev/null +++ b/docs/models/shared/customerorderproductprices.md @@ -0,0 +1,2 @@ +# CustomerOrderProductPrices + diff --git a/docs/models/shared/customerordersortproperty.md b/docs/models/shared/customerordersortproperty.md new file mode 100644 index 0000000..710a023 --- /dev/null +++ b/docs/models/shared/customerordersortproperty.md @@ -0,0 +1,17 @@ +# CustomerOrderSortProperty + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `AMOUNT` | amount | +| `MINUS_AMOUNT` | -amount | +| `NET_AMOUNT` | net_amount | +| `MINUS_NET_AMOUNT` | -net_amount | +| `PRODUCT` | product | +| `MINUS_PRODUCT` | -product | +| `SUBSCRIPTION` | subscription | +| `MINUS_SUBSCRIPTION` | -subscription | \ No newline at end of file diff --git a/docs/models/shared/customerordersubscription.md b/docs/models/shared/customerordersubscription.md new file mode 100644 index 0000000..44e79d6 --- /dev/null +++ b/docs/models/shared/customerordersubscription.md @@ -0,0 +1,27 @@ +# CustomerOrderSubscription + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `amount` | *::Integer* | :heavy_check_mark: | The amount of the subscription. | +| `currency` | *::String* | :heavy_check_mark: | The currency of the subscription. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::SubscriptionStatus](../../models/shared/subscriptionstatus.md) | :heavy_check_mark: | N/A | +| `current_period_start` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The start timestamp of the current billing period. | +| `current_period_end` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The end timestamp of the current billing period. | +| `cancel_at_period_end` | *T::Boolean* | :heavy_check_mark: | Whether the subscription will be canceled at the end of the current period. | +| `canceled_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. | +| `started_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription started. | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription will end. | +| `ended_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription ended. | +| `customer_id` | *::String* | :heavy_check_mark: | The ID of the subscribed customer. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the subscribed product. | +| `discount_id` | *::String* | :heavy_check_mark: | The ID of the applied discount, if any. | +| `checkout_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_cancellation_reason` | [Models::Shared::CustomerCancellationReason](../../models/shared/customercancellationreason.md) | :heavy_check_mark: | N/A | +| `customer_cancellation_comment` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerorganization.md b/docs/models/shared/customerorganization.md new file mode 100644 index 0000000..c40dba3 --- /dev/null +++ b/docs/models/shared/customerorganization.md @@ -0,0 +1,11 @@ +# CustomerOrganization + +Schema of an organization and related data for customer portal. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | +| `products` | T::Array<[Models::Shared::CustomerProduct](../../models/shared/customerproduct.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerpaymentmethodcreate.md b/docs/models/shared/customerpaymentmethodcreate.md new file mode 100644 index 0000000..197e9d7 --- /dev/null +++ b/docs/models/shared/customerpaymentmethodcreate.md @@ -0,0 +1,10 @@ +# CustomerPaymentMethodCreate + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `confirmation_token_id` | *::String* | :heavy_check_mark: | N/A | +| `set_default` | *T::Boolean* | :heavy_check_mark: | N/A | +| `return_url` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerportalcustomer.md b/docs/models/shared/customerportalcustomer.md new file mode 100644 index 0000000..2d8fa0c --- /dev/null +++ b/docs/models/shared/customerportalcustomer.md @@ -0,0 +1,16 @@ +# CustomerPortalCustomer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `email` | *::String* | :heavy_check_mark: | N/A | | +| `email_verified` | *T::Boolean* | :heavy_check_mark: | N/A | | +| `name` | *::String* | :heavy_check_mark: | N/A | | +| `billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | | +| `tax_id` | T::Array<[T.any(::String, Models::Shared::TaxIDFormat)](../../models/shared/customerportalcustomertaxid.md)> | :heavy_check_mark: | N/A | [
"911144442",
"us_ein"
] | +| `oauth_accounts` | T::Hash[Symbol, [Models::Shared::CustomerPortalOAuthAccount](../../models/shared/customerportaloauthaccount.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customerportalcustomertaxid.md b/docs/models/shared/customerportalcustomertaxid.md new file mode 100644 index 0000000..aeb33a9 --- /dev/null +++ b/docs/models/shared/customerportalcustomertaxid.md @@ -0,0 +1,2 @@ +# CustomerPortalCustomerTaxId + diff --git a/docs/models/shared/customerportalcustomerupdate.md b/docs/models/shared/customerportalcustomerupdate.md new file mode 100644 index 0000000..066c5ad --- /dev/null +++ b/docs/models/shared/customerportalcustomerupdate.md @@ -0,0 +1,11 @@ +# CustomerPortalCustomerUpdate + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `billing_address` | [T.nilable(Models::Shared::Address)](../../models/shared/address.md) | :heavy_minus_sign: | N/A | +| `tax_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerportaloauthaccount.md b/docs/models/shared/customerportaloauthaccount.md new file mode 100644 index 0000000..b79e45e --- /dev/null +++ b/docs/models/shared/customerportaloauthaccount.md @@ -0,0 +1,9 @@ +# CustomerPortalOAuthAccount + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `account_id` | *::String* | :heavy_check_mark: | N/A | +| `account_username` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customerproduct.md b/docs/models/shared/customerproduct.md new file mode 100644 index 0000000..b3d2f8c --- /dev/null +++ b/docs/models/shared/customerproduct.md @@ -0,0 +1,21 @@ +# CustomerProduct + +Schema of a product for customer portal. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the product. | +| `name` | *::String* | :heavy_check_mark: | The name of the product. | +| `description` | *::String* | :heavy_check_mark: | The description of the product. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the product. If `None`, the product is a one-time purchase. | +| `is_recurring` | *T::Boolean* | :heavy_check_mark: | Whether the product is a subscription. | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the product. | +| `prices` | T::Array<[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/customerproductprices.md)> | :heavy_check_mark: | List of available prices for this product. | +| `benefits` | T::Array<[Models::Shared::BenefitPublic](../../models/shared/benefitpublic.md)> | :heavy_check_mark: | The benefits granted by the product. | +| `medias` | T::Array<[Models::Shared::ProductMediaFileRead](../../models/shared/productmediafileread.md)> | :heavy_check_mark: | The medias associated to the product. | \ No newline at end of file diff --git a/docs/models/shared/customerproductprices.md b/docs/models/shared/customerproductprices.md new file mode 100644 index 0000000..24206e1 --- /dev/null +++ b/docs/models/shared/customerproductprices.md @@ -0,0 +1,2 @@ +# CustomerProductPrices + diff --git a/docs/models/shared/customersession.md b/docs/models/shared/customersession.md new file mode 100644 index 0000000..f5a19c1 --- /dev/null +++ b/docs/models/shared/customersession.md @@ -0,0 +1,17 @@ +# CustomerSession + +A customer session that can be used to authenticate as a customer. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `token` | *::String* | :heavy_check_mark: | N/A | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `customer_portal_url` | *::String* | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::Customer](../../models/shared/customer.md) | :heavy_check_mark: | A customer in an organization. | \ No newline at end of file diff --git a/docs/models/shared/customersessioncustomerexternalidcreate.md b/docs/models/shared/customersessioncustomerexternalidcreate.md new file mode 100644 index 0000000..3913901 --- /dev/null +++ b/docs/models/shared/customersessioncustomerexternalidcreate.md @@ -0,0 +1,10 @@ +# CustomerSessionCustomerExternalIDCreate + +Schema for creating a customer session using an external customer ID. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `customer_external_id` | *::String* | :heavy_check_mark: | External ID of the customer to create a session for. | \ No newline at end of file diff --git a/docs/models/shared/customersessioncustomeridcreate.md b/docs/models/shared/customersessioncustomeridcreate.md new file mode 100644 index 0000000..34c5175 --- /dev/null +++ b/docs/models/shared/customersessioncustomeridcreate.md @@ -0,0 +1,10 @@ +# CustomerSessionCustomerIDCreate + +Schema for creating a customer session using a customer ID. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `customer_id` | *::String* | :heavy_check_mark: | ID of the customer to create a session for. | \ No newline at end of file diff --git a/docs/models/shared/customersortproperty.md b/docs/models/shared/customersortproperty.md new file mode 100644 index 0000000..6e6fa41 --- /dev/null +++ b/docs/models/shared/customersortproperty.md @@ -0,0 +1,13 @@ +# CustomerSortProperty + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `EMAIL` | email | +| `MINUS_EMAIL` | -email | +| `NAME` | name | +| `MINUS_NAME` | -name | \ No newline at end of file diff --git a/docs/models/shared/customerstate.md b/docs/models/shared/customerstate.md new file mode 100644 index 0000000..3535f3c --- /dev/null +++ b/docs/models/shared/customerstate.md @@ -0,0 +1,29 @@ +# CustomerState + +A customer along with additional state information: + +* Active subscriptions +* Granted benefits +* Active meters + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the customer. | 992fae2a-2a17-4b7a-8d9e-e287cf90131b | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customerstatemetadata.md)] | :heavy_check_mark: | N/A | | +| `external_id` | *::String* | :heavy_check_mark: | The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. | usr_1337 | +| `email` | *::String* | :heavy_check_mark: | The email address of the customer. This must be unique within the organization. | customer@example.com | +| `email_verified` | *T::Boolean* | :heavy_check_mark: | Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. | true | +| `name` | *::String* | :heavy_check_mark: | The name of the customer. | John Doe | +| `billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | | +| `tax_id` | T::Array<[T.any(::String, Models::Shared::TaxIDFormat)](../../models/shared/customerstatetaxid.md)> | :heavy_check_mark: | N/A | [
"911144442",
"us_ein"
] | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the customer. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `deleted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp for when the customer was soft deleted. | | +| `active_subscriptions` | T::Array<[Models::Shared::CustomerStateSubscription](../../models/shared/customerstatesubscription.md)> | :heavy_check_mark: | The customer's active subscriptions. | | +| `granted_benefits` | T::Array<[Models::Shared::CustomerStateBenefitGrant](../../models/shared/customerstatebenefitgrant.md)> | :heavy_check_mark: | The customer's active benefit grants. | | +| `active_meters` | T::Array<[Models::Shared::CustomerStateMeter](../../models/shared/customerstatemeter.md)> | :heavy_check_mark: | The customer's active meters. | | +| `avatar_url` | *::String* | :heavy_check_mark: | N/A | https://www.gravatar.com/avatar/xxx?d=blank | \ No newline at end of file diff --git a/docs/models/shared/customerstatebenefitgrant.md b/docs/models/shared/customerstatebenefitgrant.md new file mode 100644 index 0000000..d0d5af2 --- /dev/null +++ b/docs/models/shared/customerstatebenefitgrant.md @@ -0,0 +1,16 @@ +# CustomerStateBenefitGrant + +An active benefit grant for a customer. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the grant. | d322132c-a9d0-4e0d-b8d3-d81ad021a3a9 | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `granted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the benefit was granted. | 2025-01-03T13:37:00Z | +| `benefit_id` | *::String* | :heavy_check_mark: | The ID of the benefit concerned by this grant. | 397a17aa-15cf-4cb4-9333-18040203cf98 | +| `benefit_type` | [Models::Shared::BenefitType](../../models/shared/benefittype.md) | :heavy_check_mark: | N/A | | +| `properties` | [T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties)](../../models/shared/customerstatebenefitgrantproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customerstatebenefitgrantproperties.md b/docs/models/shared/customerstatebenefitgrantproperties.md new file mode 100644 index 0000000..886d2ce --- /dev/null +++ b/docs/models/shared/customerstatebenefitgrantproperties.md @@ -0,0 +1,2 @@ +# CustomerStateBenefitGrantProperties + diff --git a/docs/models/shared/customerstatemetadata.md b/docs/models/shared/customerstatemetadata.md new file mode 100644 index 0000000..69c7e72 --- /dev/null +++ b/docs/models/shared/customerstatemetadata.md @@ -0,0 +1,2 @@ +# CustomerStateMetadata + diff --git a/docs/models/shared/customerstatemeter.md b/docs/models/shared/customerstatemeter.md new file mode 100644 index 0000000..60714f4 --- /dev/null +++ b/docs/models/shared/customerstatemeter.md @@ -0,0 +1,15 @@ +# CustomerStateMeter + +An active meter for a customer, with latest consumed and credited units. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `meter_id` | *::String* | :heavy_check_mark: | The ID of the meter. | d498a884-e2cd-4d3e-8002-f536468a8b22 | +| `consumed_units` | *::Float* | :heavy_check_mark: | The number of consumed units. | 25 | +| `credited_units` | *::Integer* | :heavy_check_mark: | The number of credited units. | 100 | +| `balance` | *::Float* | :heavy_check_mark: | The balance of the meter, i.e. the difference between credited and consumed units. Never goes negative. | 75 | \ No newline at end of file diff --git a/docs/models/shared/customerstatesubscription.md b/docs/models/shared/customerstatesubscription.md new file mode 100644 index 0000000..6ce9abb --- /dev/null +++ b/docs/models/shared/customerstatesubscription.md @@ -0,0 +1,27 @@ +# CustomerStateSubscription + +An active customer subscription. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the subscription. | e5149aae-e521-42b9-b24c-abb3d71eea2e | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `custom_field_data` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean, ::DateTime)](../../models/shared/customerstatesubscriptioncustomfielddata.md)] | :heavy_minus_sign: | Key-value object storing custom field values. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customerstatesubscriptionmetadata.md)] | :heavy_check_mark: | N/A | | +| `status` | *::String* | :heavy_check_mark: | N/A | active | +| `amount` | *::Integer* | :heavy_check_mark: | The amount of the subscription. | 1000 | +| `currency` | *::String* | :heavy_check_mark: | The currency of the subscription. | usd | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | | +| `current_period_start` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The start timestamp of the current billing period. | 2025-02-03T13:37:00Z | +| `current_period_end` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The end timestamp of the current billing period. | 2025-03-03T13:37:00Z | +| `cancel_at_period_end` | *T::Boolean* | :heavy_check_mark: | Whether the subscription will be canceled at the end of the current period. | false | +| `canceled_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. | | +| `started_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription started. | 2025-01-03T13:37:00Z | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription will end. | | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the subscribed product. | d8dd2de1-21b7-4a41-8bc3-ce909c0cfe23 | +| `discount_id` | *::String* | :heavy_check_mark: | The ID of the applied discount, if any. | | +| `meters` | T::Array<[Models::Shared::CustomerStateSubscriptionMeter](../../models/shared/customerstatesubscriptionmeter.md)> | :heavy_check_mark: | List of meters associated with the subscription. | | \ No newline at end of file diff --git a/docs/models/shared/customerstatesubscriptioncustomfielddata.md b/docs/models/shared/customerstatesubscriptioncustomfielddata.md new file mode 100644 index 0000000..2fa6f2a --- /dev/null +++ b/docs/models/shared/customerstatesubscriptioncustomfielddata.md @@ -0,0 +1,2 @@ +# CustomerStateSubscriptionCustomFieldData + diff --git a/docs/models/shared/customerstatesubscriptionmetadata.md b/docs/models/shared/customerstatesubscriptionmetadata.md new file mode 100644 index 0000000..be81079 --- /dev/null +++ b/docs/models/shared/customerstatesubscriptionmetadata.md @@ -0,0 +1,2 @@ +# CustomerStateSubscriptionMetadata + diff --git a/docs/models/shared/customerstatesubscriptionmeter.md b/docs/models/shared/customerstatesubscriptionmeter.md new file mode 100644 index 0000000..8c91328 --- /dev/null +++ b/docs/models/shared/customerstatesubscriptionmeter.md @@ -0,0 +1,16 @@ +# CustomerStateSubscriptionMeter + +Current consumption and spending for a subscription meter. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `consumed_units` | *::Float* | :heavy_check_mark: | The number of consumed units so far in this billing period. | 25 | +| `credited_units` | *::Integer* | :heavy_check_mark: | The number of credited units so far in this billing period. | 100 | +| `amount` | *::Integer* | :heavy_check_mark: | The amount due in cents so far in this billing period. | 0 | +| `meter_id` | *::String* | :heavy_check_mark: | The ID of the meter. | d498a884-e2cd-4d3e-8002-f536468a8b22 | \ No newline at end of file diff --git a/docs/models/shared/customerstatetaxid.md b/docs/models/shared/customerstatetaxid.md new file mode 100644 index 0000000..05e24e0 --- /dev/null +++ b/docs/models/shared/customerstatetaxid.md @@ -0,0 +1,2 @@ +# CustomerStateTaxId + diff --git a/docs/models/shared/customersubscription.md b/docs/models/shared/customersubscription.md new file mode 100644 index 0000000..40e790e --- /dev/null +++ b/docs/models/shared/customersubscription.md @@ -0,0 +1,30 @@ +# CustomerSubscription + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `amount` | *::Integer* | :heavy_check_mark: | The amount of the subscription. | +| `currency` | *::String* | :heavy_check_mark: | The currency of the subscription. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::SubscriptionStatus](../../models/shared/subscriptionstatus.md) | :heavy_check_mark: | N/A | +| `current_period_start` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The start timestamp of the current billing period. | +| `current_period_end` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The end timestamp of the current billing period. | +| `cancel_at_period_end` | *T::Boolean* | :heavy_check_mark: | Whether the subscription will be canceled at the end of the current period. | +| `canceled_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. | +| `started_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription started. | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription will end. | +| `ended_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription ended. | +| `customer_id` | *::String* | :heavy_check_mark: | The ID of the subscribed customer. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the subscribed product. | +| `discount_id` | *::String* | :heavy_check_mark: | The ID of the applied discount, if any. | +| `checkout_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_cancellation_reason` | [Models::Shared::CustomerCancellationReason](../../models/shared/customercancellationreason.md) | :heavy_check_mark: | N/A | +| `customer_cancellation_comment` | *::String* | :heavy_check_mark: | N/A | +| `product` | [Models::Shared::CustomerSubscriptionProduct](../../models/shared/customersubscriptionproduct.md) | :heavy_check_mark: | N/A | +| `prices` | T::Array<[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/customersubscriptionprices.md)> | :heavy_check_mark: | List of enabled prices for the subscription. | +| `meters` | T::Array<[Models::Shared::CustomerSubscriptionMeter](../../models/shared/customersubscriptionmeter.md)> | :heavy_check_mark: | List of meters associated with the subscription. | \ No newline at end of file diff --git a/docs/models/shared/customersubscriptioncancel.md b/docs/models/shared/customersubscriptioncancel.md new file mode 100644 index 0000000..5ec616d --- /dev/null +++ b/docs/models/shared/customersubscriptioncancel.md @@ -0,0 +1,10 @@ +# CustomerSubscriptionCancel + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `cancel_at_period_end` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Cancel an active subscription once the current period ends.

Or uncancel a subscription currently set to be revoked at period end. | +| `cancellation_reason` | [T.nilable(Models::Shared::CustomerCancellationReason)](../../models/shared/customercancellationreason.md) | :heavy_minus_sign: | Customers reason for cancellation.

* `too_expensive`: Too expensive for the customer.
* `missing_features`: Customer is missing certain features.
* `switched_service`: Customer switched to another service.
* `unused`: Customer is not using it enough.
* `customer_service`: Customer is not satisfied with the customer service.
* `low_quality`: Customer is unhappy with the quality.
* `too_complex`: Customer considers the service too complicated.
* `other`: Other reason(s). | +| `cancellation_comment` | *T.nilable(::String)* | :heavy_minus_sign: | Customer feedback and why they decided to cancel. | \ No newline at end of file diff --git a/docs/models/shared/customersubscriptionmeter.md b/docs/models/shared/customersubscriptionmeter.md new file mode 100644 index 0000000..afb52b6 --- /dev/null +++ b/docs/models/shared/customersubscriptionmeter.md @@ -0,0 +1,15 @@ +# CustomerSubscriptionMeter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `consumed_units` | *::Float* | :heavy_check_mark: | The number of consumed units so far in this billing period. | 25 | +| `credited_units` | *::Integer* | :heavy_check_mark: | The number of credited units so far in this billing period. | 100 | +| `amount` | *::Integer* | :heavy_check_mark: | The amount due in cents so far in this billing period. | 0 | +| `meter_id` | *::String* | :heavy_check_mark: | The ID of the meter. | d498a884-e2cd-4d3e-8002-f536468a8b22 | +| `meter` | [Models::Shared::CustomerSubscriptionMeterMeter](../../models/shared/customersubscriptionmetermeter.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customersubscriptionmetermeter.md b/docs/models/shared/customersubscriptionmetermeter.md new file mode 100644 index 0000000..4637494 --- /dev/null +++ b/docs/models/shared/customersubscriptionmetermeter.md @@ -0,0 +1,11 @@ +# CustomerSubscriptionMeterMeter + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `name` | *::String* | :heavy_check_mark: | The name of the meter. Will be shown on customer's invoices and usage. | \ No newline at end of file diff --git a/docs/models/shared/customersubscriptionprices.md b/docs/models/shared/customersubscriptionprices.md new file mode 100644 index 0000000..fd071b8 --- /dev/null +++ b/docs/models/shared/customersubscriptionprices.md @@ -0,0 +1,2 @@ +# CustomerSubscriptionPrices + diff --git a/docs/models/shared/customersubscriptionproduct.md b/docs/models/shared/customersubscriptionproduct.md new file mode 100644 index 0000000..7b42cbf --- /dev/null +++ b/docs/models/shared/customersubscriptionproduct.md @@ -0,0 +1,20 @@ +# CustomerSubscriptionProduct + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the product. | +| `name` | *::String* | :heavy_check_mark: | The name of the product. | +| `description` | *::String* | :heavy_check_mark: | The description of the product. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the product. If `None`, the product is a one-time purchase. | +| `is_recurring` | *T::Boolean* | :heavy_check_mark: | Whether the product is a subscription. | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the product. | +| `prices` | T::Array<[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/customersubscriptionproductprices.md)> | :heavy_check_mark: | List of prices for this product. | +| `benefits` | T::Array<[Models::Shared::BenefitPublic](../../models/shared/benefitpublic.md)> | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | T::Array<[Models::Shared::ProductMediaFileRead](../../models/shared/productmediafileread.md)> | :heavy_check_mark: | List of medias associated to the product. | +| `organization` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customersubscriptionproductprices.md b/docs/models/shared/customersubscriptionproductprices.md new file mode 100644 index 0000000..37356b5 --- /dev/null +++ b/docs/models/shared/customersubscriptionproductprices.md @@ -0,0 +1,2 @@ +# CustomerSubscriptionProductPrices + diff --git a/docs/models/shared/customersubscriptionsortproperty.md b/docs/models/shared/customersubscriptionsortproperty.md new file mode 100644 index 0000000..5053538 --- /dev/null +++ b/docs/models/shared/customersubscriptionsortproperty.md @@ -0,0 +1,17 @@ +# CustomerSubscriptionSortProperty + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `STARTED_AT` | started_at | +| `MINUS_STARTED_AT` | -started_at | +| `AMOUNT` | amount | +| `MINUS_AMOUNT` | -amount | +| `STATUS` | status | +| `MINUS_STATUS` | -status | +| `ORGANIZATION` | organization | +| `MINUS_ORGANIZATION` | -organization | +| `PRODUCT` | product | +| `MINUS_PRODUCT` | -product | \ No newline at end of file diff --git a/docs/models/shared/customersubscriptionupdate.md b/docs/models/shared/customersubscriptionupdate.md new file mode 100644 index 0000000..8a24e76 --- /dev/null +++ b/docs/models/shared/customersubscriptionupdate.md @@ -0,0 +1,2 @@ +# CustomerSubscriptionUpdate + diff --git a/docs/models/shared/customersubscriptionupdateproduct.md b/docs/models/shared/customersubscriptionupdateproduct.md new file mode 100644 index 0000000..9aa9973 --- /dev/null +++ b/docs/models/shared/customersubscriptionupdateproduct.md @@ -0,0 +1,8 @@ +# CustomerSubscriptionUpdateProduct + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `product_id` | *::String* | :heavy_check_mark: | Update subscription to another product. | \ No newline at end of file diff --git a/docs/models/shared/customertaxid.md b/docs/models/shared/customertaxid.md new file mode 100644 index 0000000..8a2df0a --- /dev/null +++ b/docs/models/shared/customertaxid.md @@ -0,0 +1,2 @@ +# CustomerTaxId + diff --git a/docs/models/shared/customerupdate.md b/docs/models/shared/customerupdate.md new file mode 100644 index 0000000..bd9ceb0 --- /dev/null +++ b/docs/models/shared/customerupdate.md @@ -0,0 +1,13 @@ +# CustomerUpdate + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customerupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | The email address of the customer. This must be unique within the organization. | customer@example.com | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the customer. | John Doe | +| `billing_address` | [T.nilable(Models::Shared::Address)](../../models/shared/address.md) | :heavy_minus_sign: | N/A | | +| `tax_id` | T::Array<[T.any(::String, Models::Shared::TaxIDFormat)](../../models/shared/customerupdatetaxid.md)> | :heavy_minus_sign: | N/A | [
"911144442",
"us_ein"
] | +| `external_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. | usr_1337 | \ No newline at end of file diff --git a/docs/models/shared/customerupdateexternalid.md b/docs/models/shared/customerupdateexternalid.md new file mode 100644 index 0000000..d91e17a --- /dev/null +++ b/docs/models/shared/customerupdateexternalid.md @@ -0,0 +1,12 @@ +# CustomerUpdateExternalID + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customerupdateexternalidmetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | The email address of the customer. This must be unique within the organization. | customer@example.com | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the customer. | John Doe | +| `billing_address` | [T.nilable(Models::Shared::Address)](../../models/shared/address.md) | :heavy_minus_sign: | N/A | | +| `tax_id` | T::Array<[T.any(::String, Models::Shared::TaxIDFormat)](../../models/shared/customerupdateexternalidtaxid.md)> | :heavy_minus_sign: | N/A | [
"911144442",
"us_ein"
] | \ No newline at end of file diff --git a/docs/models/shared/customerupdateexternalidmetadata.md b/docs/models/shared/customerupdateexternalidmetadata.md new file mode 100644 index 0000000..affa392 --- /dev/null +++ b/docs/models/shared/customerupdateexternalidmetadata.md @@ -0,0 +1,2 @@ +# CustomerUpdateExternalIDMetadata + diff --git a/docs/models/shared/customerupdateexternalidtaxid.md b/docs/models/shared/customerupdateexternalidtaxid.md new file mode 100644 index 0000000..785ccd2 --- /dev/null +++ b/docs/models/shared/customerupdateexternalidtaxid.md @@ -0,0 +1,2 @@ +# CustomerUpdateExternalIDTaxID + diff --git a/docs/models/shared/customerupdatemetadata.md b/docs/models/shared/customerupdatemetadata.md new file mode 100644 index 0000000..d6acdc8 --- /dev/null +++ b/docs/models/shared/customerupdatemetadata.md @@ -0,0 +1,2 @@ +# CustomerUpdateMetadata + diff --git a/docs/models/shared/customerupdatetaxid.md b/docs/models/shared/customerupdatetaxid.md new file mode 100644 index 0000000..b2eb91a --- /dev/null +++ b/docs/models/shared/customerupdatetaxid.md @@ -0,0 +1,2 @@ +# CustomerUpdateTaxId + diff --git a/docs/models/shared/customfield.md b/docs/models/shared/customfield.md new file mode 100644 index 0000000..77a61f8 --- /dev/null +++ b/docs/models/shared/customfield.md @@ -0,0 +1,2 @@ +# CustomField + diff --git a/docs/models/shared/customfieldcheckbox.md b/docs/models/shared/customfieldcheckbox.md new file mode 100644 index 0000000..0c619a2 --- /dev/null +++ b/docs/models/shared/customfieldcheckbox.md @@ -0,0 +1,18 @@ +# CustomFieldCheckbox + +Schema for a custom field of type checkbox. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldcheckboxmetadata.md)] | :heavy_check_mark: | N/A | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the custom field. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldCheckboxProperties](../../models/shared/customfieldcheckboxproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfieldcheckboxmetadata.md b/docs/models/shared/customfieldcheckboxmetadata.md new file mode 100644 index 0000000..fcc299b --- /dev/null +++ b/docs/models/shared/customfieldcheckboxmetadata.md @@ -0,0 +1,2 @@ +# CustomFieldCheckboxMetadata + diff --git a/docs/models/shared/customfieldcheckboxproperties.md b/docs/models/shared/customfieldcheckboxproperties.md new file mode 100644 index 0000000..a943f88 --- /dev/null +++ b/docs/models/shared/customfieldcheckboxproperties.md @@ -0,0 +1,10 @@ +# CustomFieldCheckboxProperties + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `form_label` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_help_text` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldcreate.md b/docs/models/shared/customfieldcreate.md new file mode 100644 index 0000000..27a846a --- /dev/null +++ b/docs/models/shared/customfieldcreate.md @@ -0,0 +1,2 @@ +# CustomFieldCreate + diff --git a/docs/models/shared/customfieldcreatecheckbox.md b/docs/models/shared/customfieldcreatecheckbox.md new file mode 100644 index 0000000..d5071b2 --- /dev/null +++ b/docs/models/shared/customfieldcreatecheckbox.md @@ -0,0 +1,15 @@ +# CustomFieldCreateCheckbox + +Schema to create a custom field of type checkbox. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldcreatecheckboxmetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldCheckboxProperties](../../models/shared/customfieldcheckboxproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfieldcreatecheckboxmetadata.md b/docs/models/shared/customfieldcreatecheckboxmetadata.md new file mode 100644 index 0000000..67bfd13 --- /dev/null +++ b/docs/models/shared/customfieldcreatecheckboxmetadata.md @@ -0,0 +1,2 @@ +# CustomFieldCreateCheckboxMetadata + diff --git a/docs/models/shared/customfieldcreatedate.md b/docs/models/shared/customfieldcreatedate.md new file mode 100644 index 0000000..23b248c --- /dev/null +++ b/docs/models/shared/customfieldcreatedate.md @@ -0,0 +1,15 @@ +# CustomFieldCreateDate + +Schema to create a custom field of type date. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldcreatedatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldDateProperties](../../models/shared/customfielddateproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfieldcreatedatemetadata.md b/docs/models/shared/customfieldcreatedatemetadata.md new file mode 100644 index 0000000..513d1a6 --- /dev/null +++ b/docs/models/shared/customfieldcreatedatemetadata.md @@ -0,0 +1,2 @@ +# CustomFieldCreateDateMetadata + diff --git a/docs/models/shared/customfieldcreatenumber.md b/docs/models/shared/customfieldcreatenumber.md new file mode 100644 index 0000000..5969901 --- /dev/null +++ b/docs/models/shared/customfieldcreatenumber.md @@ -0,0 +1,15 @@ +# CustomFieldCreateNumber + +Schema to create a custom field of type number. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldcreatenumbermetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldNumberProperties](../../models/shared/customfieldnumberproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfieldcreatenumbermetadata.md b/docs/models/shared/customfieldcreatenumbermetadata.md new file mode 100644 index 0000000..39cc9d6 --- /dev/null +++ b/docs/models/shared/customfieldcreatenumbermetadata.md @@ -0,0 +1,2 @@ +# CustomFieldCreateNumberMetadata + diff --git a/docs/models/shared/customfieldcreateselect.md b/docs/models/shared/customfieldcreateselect.md new file mode 100644 index 0000000..5eaded2 --- /dev/null +++ b/docs/models/shared/customfieldcreateselect.md @@ -0,0 +1,15 @@ +# CustomFieldCreateSelect + +Schema to create a custom field of type select. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldcreateselectmetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldSelectProperties](../../models/shared/customfieldselectproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfieldcreateselectmetadata.md b/docs/models/shared/customfieldcreateselectmetadata.md new file mode 100644 index 0000000..3250181 --- /dev/null +++ b/docs/models/shared/customfieldcreateselectmetadata.md @@ -0,0 +1,2 @@ +# CustomFieldCreateSelectMetadata + diff --git a/docs/models/shared/customfieldcreatetext.md b/docs/models/shared/customfieldcreatetext.md new file mode 100644 index 0000000..d900986 --- /dev/null +++ b/docs/models/shared/customfieldcreatetext.md @@ -0,0 +1,15 @@ +# CustomFieldCreateText + +Schema to create a custom field of type text. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldcreatetextmetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldTextProperties](../../models/shared/customfieldtextproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfieldcreatetextmetadata.md b/docs/models/shared/customfieldcreatetextmetadata.md new file mode 100644 index 0000000..81ea30e --- /dev/null +++ b/docs/models/shared/customfieldcreatetextmetadata.md @@ -0,0 +1,2 @@ +# CustomFieldCreateTextMetadata + diff --git a/docs/models/shared/customfielddata.md b/docs/models/shared/customfielddata.md new file mode 100644 index 0000000..3c1950f --- /dev/null +++ b/docs/models/shared/customfielddata.md @@ -0,0 +1,2 @@ +# CustomFieldData + diff --git a/docs/models/shared/customfielddate.md b/docs/models/shared/customfielddate.md new file mode 100644 index 0000000..0840d1a --- /dev/null +++ b/docs/models/shared/customfielddate.md @@ -0,0 +1,18 @@ +# CustomFieldDate + +Schema for a custom field of type date. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfielddatemetadata.md)] | :heavy_check_mark: | N/A | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the custom field. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldDateProperties](../../models/shared/customfielddateproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfielddatemetadata.md b/docs/models/shared/customfielddatemetadata.md new file mode 100644 index 0000000..b62b803 --- /dev/null +++ b/docs/models/shared/customfielddatemetadata.md @@ -0,0 +1,2 @@ +# CustomFieldDateMetadata + diff --git a/docs/models/shared/customfielddateproperties.md b/docs/models/shared/customfielddateproperties.md new file mode 100644 index 0000000..9c2b759 --- /dev/null +++ b/docs/models/shared/customfielddateproperties.md @@ -0,0 +1,12 @@ +# CustomFieldDateProperties + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `form_label` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_help_text` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `ge` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `le` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldnumber.md b/docs/models/shared/customfieldnumber.md new file mode 100644 index 0000000..f22440b --- /dev/null +++ b/docs/models/shared/customfieldnumber.md @@ -0,0 +1,18 @@ +# CustomFieldNumber + +Schema for a custom field of type number. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldnumbermetadata.md)] | :heavy_check_mark: | N/A | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the custom field. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldNumberProperties](../../models/shared/customfieldnumberproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfieldnumbermetadata.md b/docs/models/shared/customfieldnumbermetadata.md new file mode 100644 index 0000000..42ba7c4 --- /dev/null +++ b/docs/models/shared/customfieldnumbermetadata.md @@ -0,0 +1,2 @@ +# CustomFieldNumberMetadata + diff --git a/docs/models/shared/customfieldnumberproperties.md b/docs/models/shared/customfieldnumberproperties.md new file mode 100644 index 0000000..99a0749 --- /dev/null +++ b/docs/models/shared/customfieldnumberproperties.md @@ -0,0 +1,12 @@ +# CustomFieldNumberProperties + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `form_label` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_help_text` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `ge` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `le` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldselect.md b/docs/models/shared/customfieldselect.md new file mode 100644 index 0000000..8a49c67 --- /dev/null +++ b/docs/models/shared/customfieldselect.md @@ -0,0 +1,18 @@ +# CustomFieldSelect + +Schema for a custom field of type select. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldselectmetadata.md)] | :heavy_check_mark: | N/A | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the custom field. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldSelectProperties](../../models/shared/customfieldselectproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfieldselectmetadata.md b/docs/models/shared/customfieldselectmetadata.md new file mode 100644 index 0000000..2bee604 --- /dev/null +++ b/docs/models/shared/customfieldselectmetadata.md @@ -0,0 +1,2 @@ +# CustomFieldSelectMetadata + diff --git a/docs/models/shared/customfieldselectoption.md b/docs/models/shared/customfieldselectoption.md new file mode 100644 index 0000000..4fc4107 --- /dev/null +++ b/docs/models/shared/customfieldselectoption.md @@ -0,0 +1,9 @@ +# CustomFieldSelectOption + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `value` | *::String* | :heavy_check_mark: | N/A | +| `label` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldselectproperties.md b/docs/models/shared/customfieldselectproperties.md new file mode 100644 index 0000000..c5a6260 --- /dev/null +++ b/docs/models/shared/customfieldselectproperties.md @@ -0,0 +1,11 @@ +# CustomFieldSelectProperties + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `form_label` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_help_text` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `options` | T::Array<[Models::Shared::CustomFieldSelectOption](../../models/shared/customfieldselectoption.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldsortproperty.md b/docs/models/shared/customfieldsortproperty.md new file mode 100644 index 0000000..a9597c6 --- /dev/null +++ b/docs/models/shared/customfieldsortproperty.md @@ -0,0 +1,15 @@ +# CustomFieldSortProperty + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `SLUG` | slug | +| `MINUS_SLUG` | -slug | +| `NAME` | name | +| `MINUS_NAME` | -name | +| `TYPE` | type | +| `MINUS_TYPE` | -type | \ No newline at end of file diff --git a/docs/models/shared/customfieldtext.md b/docs/models/shared/customfieldtext.md new file mode 100644 index 0000000..1550dd6 --- /dev/null +++ b/docs/models/shared/customfieldtext.md @@ -0,0 +1,18 @@ +# CustomFieldText + +Schema for a custom field of type text. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldtextmetadata.md)] | :heavy_check_mark: | N/A | | +| `type` | *::String* | :heavy_check_mark: | N/A | | +| `slug` | *::String* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. | | +| `name` | *::String* | :heavy_check_mark: | Name of the custom field. | | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the custom field. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `properties` | [Models::Shared::CustomFieldTextProperties](../../models/shared/customfieldtextproperties.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/customfieldtextmetadata.md b/docs/models/shared/customfieldtextmetadata.md new file mode 100644 index 0000000..055e307 --- /dev/null +++ b/docs/models/shared/customfieldtextmetadata.md @@ -0,0 +1,2 @@ +# CustomFieldTextMetadata + diff --git a/docs/models/shared/customfieldtextproperties.md b/docs/models/shared/customfieldtextproperties.md new file mode 100644 index 0000000..692ee5a --- /dev/null +++ b/docs/models/shared/customfieldtextproperties.md @@ -0,0 +1,13 @@ +# CustomFieldTextProperties + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `form_label` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_help_text` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `form_placeholder` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `textarea` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | +| `min_length` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `max_length` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldtype.md b/docs/models/shared/customfieldtype.md new file mode 100644 index 0000000..20cf91e --- /dev/null +++ b/docs/models/shared/customfieldtype.md @@ -0,0 +1,12 @@ +# CustomFieldType + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `TEXT` | text | +| `NUMBER` | number | +| `DATE` | date | +| `CHECKBOX` | checkbox | +| `SELECT` | select | \ No newline at end of file diff --git a/docs/models/shared/customfieldupdate.md b/docs/models/shared/customfieldupdate.md new file mode 100644 index 0000000..26e2c85 --- /dev/null +++ b/docs/models/shared/customfieldupdate.md @@ -0,0 +1,2 @@ +# CustomFieldUpdate + diff --git a/docs/models/shared/customfieldupdatecheckbox.md b/docs/models/shared/customfieldupdatecheckbox.md new file mode 100644 index 0000000..bc18db7 --- /dev/null +++ b/docs/models/shared/customfieldupdatecheckbox.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateCheckbox + +Schema to update a custom field of type checkbox. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldupdatecheckboxmetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `slug` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::CustomFieldCheckboxProperties)](../../models/shared/customfieldcheckboxproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldupdatecheckboxmetadata.md b/docs/models/shared/customfieldupdatecheckboxmetadata.md new file mode 100644 index 0000000..89008f2 --- /dev/null +++ b/docs/models/shared/customfieldupdatecheckboxmetadata.md @@ -0,0 +1,2 @@ +# CustomFieldUpdateCheckboxMetadata + diff --git a/docs/models/shared/customfieldupdatedate.md b/docs/models/shared/customfieldupdatedate.md new file mode 100644 index 0000000..f0cd158 --- /dev/null +++ b/docs/models/shared/customfieldupdatedate.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateDate + +Schema to update a custom field of type date. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldupdatedatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `slug` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::CustomFieldDateProperties)](../../models/shared/customfielddateproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldupdatedatemetadata.md b/docs/models/shared/customfieldupdatedatemetadata.md new file mode 100644 index 0000000..568cb6c --- /dev/null +++ b/docs/models/shared/customfieldupdatedatemetadata.md @@ -0,0 +1,2 @@ +# CustomFieldUpdateDateMetadata + diff --git a/docs/models/shared/customfieldupdatenumber.md b/docs/models/shared/customfieldupdatenumber.md new file mode 100644 index 0000000..8a6d0c8 --- /dev/null +++ b/docs/models/shared/customfieldupdatenumber.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateNumber + +Schema to update a custom field of type number. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldupdatenumbermetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `slug` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::CustomFieldNumberProperties)](../../models/shared/customfieldnumberproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldupdatenumbermetadata.md b/docs/models/shared/customfieldupdatenumbermetadata.md new file mode 100644 index 0000000..5941625 --- /dev/null +++ b/docs/models/shared/customfieldupdatenumbermetadata.md @@ -0,0 +1,2 @@ +# CustomFieldUpdateNumberMetadata + diff --git a/docs/models/shared/customfieldupdateselect.md b/docs/models/shared/customfieldupdateselect.md new file mode 100644 index 0000000..6f73078 --- /dev/null +++ b/docs/models/shared/customfieldupdateselect.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateSelect + +Schema to update a custom field of type select. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldupdateselectmetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `slug` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::CustomFieldSelectProperties)](../../models/shared/customfieldselectproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldupdateselectmetadata.md b/docs/models/shared/customfieldupdateselectmetadata.md new file mode 100644 index 0000000..7412ff6 --- /dev/null +++ b/docs/models/shared/customfieldupdateselectmetadata.md @@ -0,0 +1,2 @@ +# CustomFieldUpdateSelectMetadata + diff --git a/docs/models/shared/customfieldupdatetext.md b/docs/models/shared/customfieldupdatetext.md new file mode 100644 index 0000000..4674fea --- /dev/null +++ b/docs/models/shared/customfieldupdatetext.md @@ -0,0 +1,14 @@ +# CustomFieldUpdateText + +Schema to update a custom field of type text. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/customfieldupdatetextmetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `slug` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `properties` | [T.nilable(Models::Shared::CustomFieldTextProperties)](../../models/shared/customfieldtextproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/customfieldupdatetextmetadata.md b/docs/models/shared/customfieldupdatetextmetadata.md new file mode 100644 index 0000000..ff8d061 --- /dev/null +++ b/docs/models/shared/customfieldupdatetextmetadata.md @@ -0,0 +1,2 @@ +# CustomFieldUpdateTextMetadata + diff --git a/docs/models/shared/discount.md b/docs/models/shared/discount.md new file mode 100644 index 0000000..8ff7f90 --- /dev/null +++ b/docs/models/shared/discount.md @@ -0,0 +1,2 @@ +# Discount + diff --git a/docs/models/shared/discountcreate.md b/docs/models/shared/discountcreate.md new file mode 100644 index 0000000..243945f --- /dev/null +++ b/docs/models/shared/discountcreate.md @@ -0,0 +1,2 @@ +# DiscountCreate + diff --git a/docs/models/shared/discountduration.md b/docs/models/shared/discountduration.md new file mode 100644 index 0000000..9f93ea1 --- /dev/null +++ b/docs/models/shared/discountduration.md @@ -0,0 +1,10 @@ +# DiscountDuration + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `ONCE` | once | +| `FOREVER` | forever | +| `REPEATING` | repeating | \ No newline at end of file diff --git a/docs/models/shared/discountfixedonceforeverduration.md b/docs/models/shared/discountfixedonceforeverduration.md new file mode 100644 index 0000000..c3dea4e --- /dev/null +++ b/docs/models/shared/discountfixedonceforeverduration.md @@ -0,0 +1,25 @@ +# DiscountFixedOnceForeverDuration + +Schema for a fixed amount discount that is applied once or forever. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `amount` | *::Integer* | :heavy_check_mark: | N/A | | +| `currency` | *::String* | :heavy_check_mark: | N/A | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountfixedonceforeverdurationmetadata.md)] | :heavy_check_mark: | N/A | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *::String* | :heavy_check_mark: | Code customers can use to apply the discount during checkout. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *::Integer* | :heavy_check_mark: | Maximum number of times the discount can be redeemed. | | +| `redemptions_count` | *::Integer* | :heavy_check_mark: | Number of times the discount has been redeemed. | | +| `organization_id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `products` | T::Array<[Models::Shared::DiscountProduct](../../models/shared/discountproduct.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/discountfixedonceforeverdurationbase.md b/docs/models/shared/discountfixedonceforeverdurationbase.md new file mode 100644 index 0000000..3dcec11 --- /dev/null +++ b/docs/models/shared/discountfixedonceforeverdurationbase.md @@ -0,0 +1,22 @@ +# DiscountFixedOnceForeverDurationBase + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `amount` | *::Integer* | :heavy_check_mark: | N/A | | +| `currency` | *::String* | :heavy_check_mark: | N/A | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountfixedonceforeverdurationbasemetadata.md)] | :heavy_check_mark: | N/A | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *::String* | :heavy_check_mark: | Code customers can use to apply the discount during checkout. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *::Integer* | :heavy_check_mark: | Maximum number of times the discount can be redeemed. | | +| `redemptions_count` | *::Integer* | :heavy_check_mark: | Number of times the discount has been redeemed. | | +| `organization_id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/discountfixedonceforeverdurationbasemetadata.md b/docs/models/shared/discountfixedonceforeverdurationbasemetadata.md new file mode 100644 index 0000000..6392c48 --- /dev/null +++ b/docs/models/shared/discountfixedonceforeverdurationbasemetadata.md @@ -0,0 +1,2 @@ +# DiscountFixedOnceForeverDurationBaseMetadata + diff --git a/docs/models/shared/discountfixedonceforeverdurationcreate.md b/docs/models/shared/discountfixedonceforeverdurationcreate.md new file mode 100644 index 0000000..e2a5938 --- /dev/null +++ b/docs/models/shared/discountfixedonceforeverdurationcreate.md @@ -0,0 +1,21 @@ +# DiscountFixedOnceForeverDurationCreate + +Schema to create a fixed amount discount that is applied once or forever. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `amount` | *::Integer* | :heavy_check_mark: | Fixed amount to discount from the invoice total. | | +| `currency` | *T.nilable(::String)* | :heavy_minus_sign: | The currency. Currently, only `usd` is supported. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountfixedonceforeverdurationcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *T.nilable(::String)* | :heavy_minus_sign: | Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Optional timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Optional timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *T.nilable(::Integer)* | :heavy_minus_sign: | Optional maximum number of times the discount can be redeemed. | | +| `products` | T::Array<*::String*> | :heavy_minus_sign: | N/A | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the discount. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/discountfixedonceforeverdurationcreatemetadata.md b/docs/models/shared/discountfixedonceforeverdurationcreatemetadata.md new file mode 100644 index 0000000..ef7866d --- /dev/null +++ b/docs/models/shared/discountfixedonceforeverdurationcreatemetadata.md @@ -0,0 +1,2 @@ +# DiscountFixedOnceForeverDurationCreateMetadata + diff --git a/docs/models/shared/discountfixedonceforeverdurationmetadata.md b/docs/models/shared/discountfixedonceforeverdurationmetadata.md new file mode 100644 index 0000000..7137926 --- /dev/null +++ b/docs/models/shared/discountfixedonceforeverdurationmetadata.md @@ -0,0 +1,2 @@ +# DiscountFixedOnceForeverDurationMetadata + diff --git a/docs/models/shared/discountfixedrepeatduration.md b/docs/models/shared/discountfixedrepeatduration.md new file mode 100644 index 0000000..e570c82 --- /dev/null +++ b/docs/models/shared/discountfixedrepeatduration.md @@ -0,0 +1,27 @@ +# DiscountFixedRepeatDuration + +Schema for a fixed amount discount that is applied on every invoice +for a certain number of months. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `duration_in_months` | *::Integer* | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `amount` | *::Integer* | :heavy_check_mark: | N/A | | +| `currency` | *::String* | :heavy_check_mark: | N/A | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountfixedrepeatdurationmetadata.md)] | :heavy_check_mark: | N/A | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *::String* | :heavy_check_mark: | Code customers can use to apply the discount during checkout. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *::Integer* | :heavy_check_mark: | Maximum number of times the discount can be redeemed. | | +| `redemptions_count` | *::Integer* | :heavy_check_mark: | Number of times the discount has been redeemed. | | +| `organization_id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `products` | T::Array<[Models::Shared::DiscountProduct](../../models/shared/discountproduct.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/discountfixedrepeatdurationbase.md b/docs/models/shared/discountfixedrepeatdurationbase.md new file mode 100644 index 0000000..8cf7200 --- /dev/null +++ b/docs/models/shared/discountfixedrepeatdurationbase.md @@ -0,0 +1,23 @@ +# DiscountFixedRepeatDurationBase + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `duration_in_months` | *::Integer* | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `amount` | *::Integer* | :heavy_check_mark: | N/A | | +| `currency` | *::String* | :heavy_check_mark: | N/A | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountfixedrepeatdurationbasemetadata.md)] | :heavy_check_mark: | N/A | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *::String* | :heavy_check_mark: | Code customers can use to apply the discount during checkout. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *::Integer* | :heavy_check_mark: | Maximum number of times the discount can be redeemed. | | +| `redemptions_count` | *::Integer* | :heavy_check_mark: | Number of times the discount has been redeemed. | | +| `organization_id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/discountfixedrepeatdurationbasemetadata.md b/docs/models/shared/discountfixedrepeatdurationbasemetadata.md new file mode 100644 index 0000000..2665c32 --- /dev/null +++ b/docs/models/shared/discountfixedrepeatdurationbasemetadata.md @@ -0,0 +1,2 @@ +# DiscountFixedRepeatDurationBaseMetadata + diff --git a/docs/models/shared/discountfixedrepeatdurationcreate.md b/docs/models/shared/discountfixedrepeatdurationcreate.md new file mode 100644 index 0000000..3c27581 --- /dev/null +++ b/docs/models/shared/discountfixedrepeatdurationcreate.md @@ -0,0 +1,23 @@ +# DiscountFixedRepeatDurationCreate + +Schema to create a fixed amount discount that is applied on every invoice +for a certain number of months. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `duration_in_months` | *::Integer* | :heavy_check_mark: | Number of months the discount should be applied.

For this to work on yearly pricing, you should multiply this by 12.
For example, to apply the discount for 2 years, set this to 24. | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `amount` | *::Integer* | :heavy_check_mark: | Fixed amount to discount from the invoice total. | | +| `currency` | *T.nilable(::String)* | :heavy_minus_sign: | The currency. Currently, only `usd` is supported. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountfixedrepeatdurationcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *T.nilable(::String)* | :heavy_minus_sign: | Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Optional timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Optional timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *T.nilable(::Integer)* | :heavy_minus_sign: | Optional maximum number of times the discount can be redeemed. | | +| `products` | T::Array<*::String*> | :heavy_minus_sign: | N/A | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the discount. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/discountfixedrepeatdurationcreatemetadata.md b/docs/models/shared/discountfixedrepeatdurationcreatemetadata.md new file mode 100644 index 0000000..287767e --- /dev/null +++ b/docs/models/shared/discountfixedrepeatdurationcreatemetadata.md @@ -0,0 +1,2 @@ +# DiscountFixedRepeatDurationCreateMetadata + diff --git a/docs/models/shared/discountfixedrepeatdurationmetadata.md b/docs/models/shared/discountfixedrepeatdurationmetadata.md new file mode 100644 index 0000000..dc90dc4 --- /dev/null +++ b/docs/models/shared/discountfixedrepeatdurationmetadata.md @@ -0,0 +1,2 @@ +# DiscountFixedRepeatDurationMetadata + diff --git a/docs/models/shared/discountpercentageonceforeverduration.md b/docs/models/shared/discountpercentageonceforeverduration.md new file mode 100644 index 0000000..de9d2d5 --- /dev/null +++ b/docs/models/shared/discountpercentageonceforeverduration.md @@ -0,0 +1,24 @@ +# DiscountPercentageOnceForeverDuration + +Schema for a percentage discount that is applied once or forever. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `basis_points` | *::Integer* | :heavy_check_mark: | N/A | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountpercentageonceforeverdurationmetadata.md)] | :heavy_check_mark: | N/A | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *::String* | :heavy_check_mark: | Code customers can use to apply the discount during checkout. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *::Integer* | :heavy_check_mark: | Maximum number of times the discount can be redeemed. | | +| `redemptions_count` | *::Integer* | :heavy_check_mark: | Number of times the discount has been redeemed. | | +| `organization_id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `products` | T::Array<[Models::Shared::DiscountProduct](../../models/shared/discountproduct.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/discountpercentageonceforeverdurationbase.md b/docs/models/shared/discountpercentageonceforeverdurationbase.md new file mode 100644 index 0000000..a1dbe44 --- /dev/null +++ b/docs/models/shared/discountpercentageonceforeverdurationbase.md @@ -0,0 +1,21 @@ +# DiscountPercentageOnceForeverDurationBase + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `basis_points` | *::Integer* | :heavy_check_mark: | N/A | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountpercentageonceforeverdurationbasemetadata.md)] | :heavy_check_mark: | N/A | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *::String* | :heavy_check_mark: | Code customers can use to apply the discount during checkout. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *::Integer* | :heavy_check_mark: | Maximum number of times the discount can be redeemed. | | +| `redemptions_count` | *::Integer* | :heavy_check_mark: | Number of times the discount has been redeemed. | | +| `organization_id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/discountpercentageonceforeverdurationbasemetadata.md b/docs/models/shared/discountpercentageonceforeverdurationbasemetadata.md new file mode 100644 index 0000000..1237140 --- /dev/null +++ b/docs/models/shared/discountpercentageonceforeverdurationbasemetadata.md @@ -0,0 +1,2 @@ +# DiscountPercentageOnceForeverDurationBaseMetadata + diff --git a/docs/models/shared/discountpercentageonceforeverdurationcreate.md b/docs/models/shared/discountpercentageonceforeverdurationcreate.md new file mode 100644 index 0000000..b19bbab --- /dev/null +++ b/docs/models/shared/discountpercentageonceforeverdurationcreate.md @@ -0,0 +1,20 @@ +# DiscountPercentageOnceForeverDurationCreate + +Schema to create a percentage discount that is applied once or forever. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `basis_points` | *::Integer* | :heavy_check_mark: | Discount percentage in basis points.

A basis point is 1/100th of a percent.
For example, to create a 25.5% discount, set this to 2550. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountpercentageonceforeverdurationcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *T.nilable(::String)* | :heavy_minus_sign: | Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Optional timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Optional timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *T.nilable(::Integer)* | :heavy_minus_sign: | Optional maximum number of times the discount can be redeemed. | | +| `products` | T::Array<*::String*> | :heavy_minus_sign: | N/A | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the discount. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/discountpercentageonceforeverdurationcreatemetadata.md b/docs/models/shared/discountpercentageonceforeverdurationcreatemetadata.md new file mode 100644 index 0000000..8fc48a8 --- /dev/null +++ b/docs/models/shared/discountpercentageonceforeverdurationcreatemetadata.md @@ -0,0 +1,2 @@ +# DiscountPercentageOnceForeverDurationCreateMetadata + diff --git a/docs/models/shared/discountpercentageonceforeverdurationmetadata.md b/docs/models/shared/discountpercentageonceforeverdurationmetadata.md new file mode 100644 index 0000000..01e0d23 --- /dev/null +++ b/docs/models/shared/discountpercentageonceforeverdurationmetadata.md @@ -0,0 +1,2 @@ +# DiscountPercentageOnceForeverDurationMetadata + diff --git a/docs/models/shared/discountpercentagerepeatduration.md b/docs/models/shared/discountpercentagerepeatduration.md new file mode 100644 index 0000000..280ddb1 --- /dev/null +++ b/docs/models/shared/discountpercentagerepeatduration.md @@ -0,0 +1,26 @@ +# DiscountPercentageRepeatDuration + +Schema for a percentage discount that is applied on every invoice +for a certain number of months. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `duration_in_months` | *::Integer* | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `basis_points` | *::Integer* | :heavy_check_mark: | N/A | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountpercentagerepeatdurationmetadata.md)] | :heavy_check_mark: | N/A | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *::String* | :heavy_check_mark: | Code customers can use to apply the discount during checkout. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *::Integer* | :heavy_check_mark: | Maximum number of times the discount can be redeemed. | | +| `redemptions_count` | *::Integer* | :heavy_check_mark: | Number of times the discount has been redeemed. | | +| `organization_id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `products` | T::Array<[Models::Shared::DiscountProduct](../../models/shared/discountproduct.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/discountpercentagerepeatdurationbase.md b/docs/models/shared/discountpercentagerepeatdurationbase.md new file mode 100644 index 0000000..8c9b96b --- /dev/null +++ b/docs/models/shared/discountpercentagerepeatdurationbase.md @@ -0,0 +1,22 @@ +# DiscountPercentageRepeatDurationBase + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `duration_in_months` | *::Integer* | :heavy_check_mark: | N/A | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `basis_points` | *::Integer* | :heavy_check_mark: | N/A | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountpercentagerepeatdurationbasemetadata.md)] | :heavy_check_mark: | N/A | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *::String* | :heavy_check_mark: | Code customers can use to apply the discount during checkout. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *::Integer* | :heavy_check_mark: | Maximum number of times the discount can be redeemed. | | +| `redemptions_count` | *::Integer* | :heavy_check_mark: | Number of times the discount has been redeemed. | | +| `organization_id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/discountpercentagerepeatdurationbasemetadata.md b/docs/models/shared/discountpercentagerepeatdurationbasemetadata.md new file mode 100644 index 0000000..8e78968 --- /dev/null +++ b/docs/models/shared/discountpercentagerepeatdurationbasemetadata.md @@ -0,0 +1,2 @@ +# DiscountPercentageRepeatDurationBaseMetadata + diff --git a/docs/models/shared/discountpercentagerepeatdurationcreate.md b/docs/models/shared/discountpercentagerepeatdurationcreate.md new file mode 100644 index 0000000..b923322 --- /dev/null +++ b/docs/models/shared/discountpercentagerepeatdurationcreate.md @@ -0,0 +1,22 @@ +# DiscountPercentageRepeatDurationCreate + +Schema to create a percentage discount that is applied on every invoice +for a certain number of months. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `duration` | [Models::Shared::DiscountDuration](../../models/shared/discountduration.md) | :heavy_check_mark: | N/A | | +| `duration_in_months` | *::Integer* | :heavy_check_mark: | Number of months the discount should be applied.

For this to work on yearly pricing, you should multiply this by 12.
For example, to apply the discount for 2 years, set this to 24. | | +| `type` | [Models::Shared::DiscountType](../../models/shared/discounttype.md) | :heavy_check_mark: | N/A | | +| `basis_points` | *::Integer* | :heavy_check_mark: | Discount percentage in basis points.

A basis point is 1/100th of a percent.
For example, to create a 25.5% discount, set this to 2550. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountpercentagerepeatdurationcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `name` | *::String* | :heavy_check_mark: | Name of the discount. Will be displayed to the customer when the discount is applied. | | +| `code` | *T.nilable(::String)* | :heavy_minus_sign: | Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API. | | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Optional timestamp after which the discount is redeemable. | | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | Optional timestamp after which the discount is no longer redeemable. | | +| `max_redemptions` | *T.nilable(::Integer)* | :heavy_minus_sign: | Optional maximum number of times the discount can be redeemed. | | +| `products` | T::Array<*::String*> | :heavy_minus_sign: | N/A | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the discount. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/discountpercentagerepeatdurationcreatemetadata.md b/docs/models/shared/discountpercentagerepeatdurationcreatemetadata.md new file mode 100644 index 0000000..5245904 --- /dev/null +++ b/docs/models/shared/discountpercentagerepeatdurationcreatemetadata.md @@ -0,0 +1,2 @@ +# DiscountPercentageRepeatDurationCreateMetadata + diff --git a/docs/models/shared/discountpercentagerepeatdurationmetadata.md b/docs/models/shared/discountpercentagerepeatdurationmetadata.md new file mode 100644 index 0000000..386884c --- /dev/null +++ b/docs/models/shared/discountpercentagerepeatdurationmetadata.md @@ -0,0 +1,2 @@ +# DiscountPercentageRepeatDurationMetadata + diff --git a/docs/models/shared/discountproduct.md b/docs/models/shared/discountproduct.md new file mode 100644 index 0000000..444b2ba --- /dev/null +++ b/docs/models/shared/discountproduct.md @@ -0,0 +1,19 @@ +# DiscountProduct + +A product that a discount can be applied to. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountproductmetadata.md)] | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the product. | +| `name` | *::String* | :heavy_check_mark: | The name of the product. | +| `description` | *::String* | :heavy_check_mark: | The description of the product. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the product. If `None`, the product is a one-time purchase. | +| `is_recurring` | *T::Boolean* | :heavy_check_mark: | Whether the product is a subscription. | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the product. | \ No newline at end of file diff --git a/docs/models/shared/discountproductmetadata.md b/docs/models/shared/discountproductmetadata.md new file mode 100644 index 0000000..59ec412 --- /dev/null +++ b/docs/models/shared/discountproductmetadata.md @@ -0,0 +1,2 @@ +# DiscountProductMetadata + diff --git a/docs/models/shared/discountsortproperty.md b/docs/models/shared/discountsortproperty.md new file mode 100644 index 0000000..d94a7c5 --- /dev/null +++ b/docs/models/shared/discountsortproperty.md @@ -0,0 +1,15 @@ +# DiscountSortProperty + + +## Values + +| Name | Value | +| ------------------------- | ------------------------- | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `NAME` | name | +| `MINUS_NAME` | -name | +| `CODE` | code | +| `MINUS_CODE` | -code | +| `REDEMPTIONS_COUNT` | redemptions_count | +| `MINUS_REDEMPTIONS_COUNT` | -redemptions_count | \ No newline at end of file diff --git a/docs/models/shared/discounttype.md b/docs/models/shared/discounttype.md new file mode 100644 index 0000000..fcc875a --- /dev/null +++ b/docs/models/shared/discounttype.md @@ -0,0 +1,9 @@ +# DiscountType + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `FIXED` | fixed | +| `PERCENTAGE` | percentage | \ No newline at end of file diff --git a/docs/models/shared/discountupdate.md b/docs/models/shared/discountupdate.md new file mode 100644 index 0000000..6d1e4bb --- /dev/null +++ b/docs/models/shared/discountupdate.md @@ -0,0 +1,22 @@ +# DiscountUpdate + +Schema to update a discount. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/discountupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `code` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `starts_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | +| `max_redemptions` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `duration` | [T.nilable(Models::Shared::DiscountDuration)](../../models/shared/discountduration.md) | :heavy_minus_sign: | N/A | +| `duration_in_months` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `type` | [T.nilable(Models::Shared::DiscountType)](../../models/shared/discounttype.md) | :heavy_minus_sign: | N/A | +| `amount` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `currency` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `basis_points` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `products` | T::Array<*::String*> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/discountupdatemetadata.md b/docs/models/shared/discountupdatemetadata.md new file mode 100644 index 0000000..a214e08 --- /dev/null +++ b/docs/models/shared/discountupdatemetadata.md @@ -0,0 +1,2 @@ +# DiscountUpdateMetadata + diff --git a/docs/models/shared/downloadablefilecreate.md b/docs/models/shared/downloadablefilecreate.md new file mode 100644 index 0000000..fe0f607 --- /dev/null +++ b/docs/models/shared/downloadablefilecreate.md @@ -0,0 +1,17 @@ +# DownloadableFileCreate + +Schema to create a file to be associated with the downloadables benefit. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `name` | *::String* | :heavy_check_mark: | N/A | | +| `mime_type` | *::String* | :heavy_check_mark: | N/A | | +| `size` | *::Integer* | :heavy_check_mark: | N/A | | +| `checksum_sha256_base64` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | +| `upload` | [Models::Shared::S3FileCreateMultipart](../../models/shared/s3filecreatemultipart.md) | :heavy_check_mark: | N/A | | +| `service` | *::String* | :heavy_check_mark: | N/A | | +| `version` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/downloadablefileread.md b/docs/models/shared/downloadablefileread.md new file mode 100644 index 0000000..a0c3870 --- /dev/null +++ b/docs/models/shared/downloadablefileread.md @@ -0,0 +1,25 @@ +# DownloadableFileRead + +File to be associated with the downloadables benefit. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `path` | *::String* | :heavy_check_mark: | N/A | +| `mime_type` | *::String* | :heavy_check_mark: | N/A | +| `size` | *::Integer* | :heavy_check_mark: | N/A | +| `storage_version` | *::String* | :heavy_check_mark: | N/A | +| `checksum_etag` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_base64` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_hex` | *::String* | :heavy_check_mark: | N/A | +| `last_modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `version` | *::String* | :heavy_check_mark: | N/A | +| `service` | *::String* | :heavy_check_mark: | N/A | +| `is_uploaded` | *T::Boolean* | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `size_readable` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/downloadableread.md b/docs/models/shared/downloadableread.md new file mode 100644 index 0000000..a4920b1 --- /dev/null +++ b/docs/models/shared/downloadableread.md @@ -0,0 +1,10 @@ +# DownloadableRead + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | N/A | +| `file` | [Models::Shared::FileDownload](../../models/shared/filedownload.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/event.md b/docs/models/shared/event.md new file mode 100644 index 0000000..9fb89e7 --- /dev/null +++ b/docs/models/shared/event.md @@ -0,0 +1,16 @@ +# Event + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/eventmetadata.md)] | :heavy_check_mark: | N/A | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `timestamp` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp of the event. | | +| `name` | *::String* | :heavy_check_mark: | The name of the event. | | +| `source` | [Models::Shared::EventSource](../../models/shared/eventsource.md) | :heavy_check_mark: | N/A | | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the event. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `customer_id` | *::String* | :heavy_check_mark: | ID of the customer in your Polar organization associated with the event. | | +| `customer` | [Models::Shared::Customer](../../models/shared/customer.md) | :heavy_check_mark: | The customer associated with the event. | | +| `external_customer_id` | *::String* | :heavy_check_mark: | ID of the customer in your system associated with the event. | | \ No newline at end of file diff --git a/docs/models/shared/eventcreatecustomer.md b/docs/models/shared/eventcreatecustomer.md new file mode 100644 index 0000000..2479467 --- /dev/null +++ b/docs/models/shared/eventcreatecustomer.md @@ -0,0 +1,12 @@ +# EventCreateCustomer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/eventcreatecustomermetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `timestamp` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The timestamp of the event. | | +| `name` | *::String* | :heavy_check_mark: | The name of the event. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the event. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `customer_id` | *::String* | :heavy_check_mark: | ID of the customer in your Polar organization associated with the event. | | \ No newline at end of file diff --git a/docs/models/shared/eventcreatecustomermetadata.md b/docs/models/shared/eventcreatecustomermetadata.md new file mode 100644 index 0000000..cc9223a --- /dev/null +++ b/docs/models/shared/eventcreatecustomermetadata.md @@ -0,0 +1,2 @@ +# EventCreateCustomerMetadata + diff --git a/docs/models/shared/eventcreateexternalcustomer.md b/docs/models/shared/eventcreateexternalcustomer.md new file mode 100644 index 0000000..1fdb084 --- /dev/null +++ b/docs/models/shared/eventcreateexternalcustomer.md @@ -0,0 +1,12 @@ +# EventCreateExternalCustomer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/eventcreateexternalcustomermetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `timestamp` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | The timestamp of the event. | | +| `name` | *::String* | :heavy_check_mark: | The name of the event. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the event. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `external_customer_id` | *::String* | :heavy_check_mark: | ID of the customer in your system associated with the event. | | \ No newline at end of file diff --git a/docs/models/shared/eventcreateexternalcustomermetadata.md b/docs/models/shared/eventcreateexternalcustomermetadata.md new file mode 100644 index 0000000..f260a62 --- /dev/null +++ b/docs/models/shared/eventcreateexternalcustomermetadata.md @@ -0,0 +1,2 @@ +# EventCreateExternalCustomerMetadata + diff --git a/docs/models/shared/eventmetadata.md b/docs/models/shared/eventmetadata.md new file mode 100644 index 0000000..7ff1bb1 --- /dev/null +++ b/docs/models/shared/eventmetadata.md @@ -0,0 +1,2 @@ +# EventMetadata + diff --git a/docs/models/shared/eventname.md b/docs/models/shared/eventname.md new file mode 100644 index 0000000..abe6468 --- /dev/null +++ b/docs/models/shared/eventname.md @@ -0,0 +1,12 @@ +# EventName + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `name` | *::String* | :heavy_check_mark: | The name of the event. | +| `source` | [Models::Shared::EventSource](../../models/shared/eventsource.md) | :heavy_check_mark: | N/A | +| `occurrences` | *::Integer* | :heavy_check_mark: | Number of times the event has occurred. | +| `first_seen` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The first time the event occurred. | +| `last_seen` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The last time the event occurred. | \ No newline at end of file diff --git a/docs/models/shared/eventnamessortproperty.md b/docs/models/shared/eventnamessortproperty.md new file mode 100644 index 0000000..9f2400b --- /dev/null +++ b/docs/models/shared/eventnamessortproperty.md @@ -0,0 +1,15 @@ +# EventNamesSortProperty + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `NAME` | name | +| `MINUS_NAME` | -name | +| `OCCURRENCES` | occurrences | +| `MINUS_OCCURRENCES` | -occurrences | +| `FIRST_SEEN` | first_seen | +| `MINUS_FIRST_SEEN` | -first_seen | +| `LAST_SEEN` | last_seen | +| `MINUS_LAST_SEEN` | -last_seen | \ No newline at end of file diff --git a/docs/models/shared/events.md b/docs/models/shared/events.md new file mode 100644 index 0000000..2d7cfb9 --- /dev/null +++ b/docs/models/shared/events.md @@ -0,0 +1,2 @@ +# Events + diff --git a/docs/models/shared/eventsingest.md b/docs/models/shared/eventsingest.md new file mode 100644 index 0000000..80f3352 --- /dev/null +++ b/docs/models/shared/eventsingest.md @@ -0,0 +1,8 @@ +# EventsIngest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `events` | T::Array<[T.any(Models::Shared::EventCreateCustomer, Models::Shared::EventCreateExternalCustomer)](../../models/shared/events.md)> | :heavy_check_mark: | List of events to ingest. | \ No newline at end of file diff --git a/docs/models/shared/eventsingestresponse.md b/docs/models/shared/eventsingestresponse.md new file mode 100644 index 0000000..b0ab10f --- /dev/null +++ b/docs/models/shared/eventsingestresponse.md @@ -0,0 +1,8 @@ +# EventsIngestResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `inserted` | *::Integer* | :heavy_check_mark: | Number of events inserted. | \ No newline at end of file diff --git a/docs/models/shared/eventsortproperty.md b/docs/models/shared/eventsortproperty.md new file mode 100644 index 0000000..472d1c4 --- /dev/null +++ b/docs/models/shared/eventsortproperty.md @@ -0,0 +1,9 @@ +# EventSortProperty + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `TIMESTAMP` | timestamp | +| `MINUS_TIMESTAMP` | -timestamp | \ No newline at end of file diff --git a/docs/models/shared/eventsource.md b/docs/models/shared/eventsource.md new file mode 100644 index 0000000..c2897bf --- /dev/null +++ b/docs/models/shared/eventsource.md @@ -0,0 +1,9 @@ +# EventSource + + +## Values + +| Name | Value | +| -------- | -------- | +| `SYSTEM` | system | +| `USER` | user | \ No newline at end of file diff --git a/docs/models/shared/existingproductprice.md b/docs/models/shared/existingproductprice.md new file mode 100644 index 0000000..46f51eb --- /dev/null +++ b/docs/models/shared/existingproductprice.md @@ -0,0 +1,12 @@ +# ExistingProductPrice + +A price that already exists for this product. + +Useful when updating a product if you want to keep an existing price. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/filecreate.md b/docs/models/shared/filecreate.md new file mode 100644 index 0000000..c9d03e0 --- /dev/null +++ b/docs/models/shared/filecreate.md @@ -0,0 +1,2 @@ +# FileCreate + diff --git a/docs/models/shared/filedownload.md b/docs/models/shared/filedownload.md new file mode 100644 index 0000000..7f19926 --- /dev/null +++ b/docs/models/shared/filedownload.md @@ -0,0 +1,23 @@ +# FileDownload + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `path` | *::String* | :heavy_check_mark: | N/A | +| `mime_type` | *::String* | :heavy_check_mark: | N/A | +| `size` | *::Integer* | :heavy_check_mark: | N/A | +| `storage_version` | *::String* | :heavy_check_mark: | N/A | +| `checksum_etag` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_base64` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_hex` | *::String* | :heavy_check_mark: | N/A | +| `last_modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `download` | [Models::Shared::S3DownloadURL](../../models/shared/s3downloadurl.md) | :heavy_check_mark: | N/A | +| `version` | *::String* | :heavy_check_mark: | N/A | +| `is_uploaded` | *T::Boolean* | :heavy_check_mark: | N/A | +| `service` | [Models::Shared::FileServiceTypes](../../models/shared/fileservicetypes.md) | :heavy_check_mark: | N/A | +| `size_readable` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/filepatch.md b/docs/models/shared/filepatch.md new file mode 100644 index 0000000..4087c47 --- /dev/null +++ b/docs/models/shared/filepatch.md @@ -0,0 +1,9 @@ +# FilePatch + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `version` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/fileread.md b/docs/models/shared/fileread.md new file mode 100644 index 0000000..1907d63 --- /dev/null +++ b/docs/models/shared/fileread.md @@ -0,0 +1,2 @@ +# FileRead + diff --git a/docs/models/shared/fileservicetypes.md b/docs/models/shared/fileservicetypes.md new file mode 100644 index 0000000..d2e77e6 --- /dev/null +++ b/docs/models/shared/fileservicetypes.md @@ -0,0 +1,10 @@ +# FileServiceTypes + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `DOWNLOADABLE` | downloadable | +| `PRODUCT_MEDIA` | product_media | +| `ORGANIZATION_AVATAR` | organization_avatar | \ No newline at end of file diff --git a/docs/models/shared/fileupload.md b/docs/models/shared/fileupload.md new file mode 100644 index 0000000..f592143 --- /dev/null +++ b/docs/models/shared/fileupload.md @@ -0,0 +1,23 @@ +# FileUpload + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `path` | *::String* | :heavy_check_mark: | N/A | +| `mime_type` | *::String* | :heavy_check_mark: | N/A | +| `size` | *::Integer* | :heavy_check_mark: | N/A | +| `storage_version` | *::String* | :heavy_check_mark: | N/A | +| `checksum_etag` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_base64` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_hex` | *::String* | :heavy_check_mark: | N/A | +| `last_modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `upload` | [Models::Shared::S3FileUploadMultipart](../../models/shared/s3fileuploadmultipart.md) | :heavy_check_mark: | N/A | +| `version` | *::String* | :heavy_check_mark: | N/A | +| `is_uploaded` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | +| `service` | [Models::Shared::FileServiceTypes](../../models/shared/fileservicetypes.md) | :heavy_check_mark: | N/A | +| `size_readable` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/fileuploadcompleted.md b/docs/models/shared/fileuploadcompleted.md new file mode 100644 index 0000000..79074dd --- /dev/null +++ b/docs/models/shared/fileuploadcompleted.md @@ -0,0 +1,10 @@ +# FileUploadCompleted + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `path` | *::String* | :heavy_check_mark: | N/A | +| `parts` | T::Array<[Models::Shared::S3FileUploadCompletedPart](../../models/shared/s3fileuploadcompletedpart.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/filter.md b/docs/models/shared/filter.md new file mode 100644 index 0000000..ed3bca0 --- /dev/null +++ b/docs/models/shared/filter.md @@ -0,0 +1,9 @@ +# Filter + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `conjunction` | [Models::Shared::FilterConjunction](../../models/shared/filterconjunction.md) | :heavy_check_mark: | N/A | +| `clauses` | T::Array<[T.any(Models::Shared::FilterClause, Models::Shared::Filter)](../../models/shared/clauses.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/filterclause.md b/docs/models/shared/filterclause.md new file mode 100644 index 0000000..efbf773 --- /dev/null +++ b/docs/models/shared/filterclause.md @@ -0,0 +1,10 @@ +# FilterClause + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `property` | *::String* | :heavy_check_mark: | N/A | +| `operator` | [Models::Shared::FilterOperator](../../models/shared/filteroperator.md) | :heavy_check_mark: | N/A | +| `value` | [T.any(::String, ::Integer, T::Boolean)](../../models/shared/value.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/filterconjunction.md b/docs/models/shared/filterconjunction.md new file mode 100644 index 0000000..6e5706d --- /dev/null +++ b/docs/models/shared/filterconjunction.md @@ -0,0 +1,9 @@ +# FilterConjunction + + +## Values + +| Name | Value | +| ----- | ----- | +| `AND` | and | +| `OR` | or | \ No newline at end of file diff --git a/docs/models/shared/filteroperator.md b/docs/models/shared/filteroperator.md new file mode 100644 index 0000000..078c632 --- /dev/null +++ b/docs/models/shared/filteroperator.md @@ -0,0 +1,15 @@ +# FilterOperator + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `EQ` | eq | +| `NE` | ne | +| `GT` | gt | +| `GTE` | gte | +| `LT` | lt | +| `LTE` | lte | +| `LIKE` | like | +| `NOT_LIKE` | not_like | \ No newline at end of file diff --git a/docs/models/shared/func.md b/docs/models/shared/func.md new file mode 100644 index 0000000..00055e1 --- /dev/null +++ b/docs/models/shared/func.md @@ -0,0 +1,11 @@ +# Func + + +## Values + +| Name | Value | +| ----- | ----- | +| `SUM` | sum | +| `MAX` | max | +| `MIN` | min | +| `AVG` | avg | \ No newline at end of file diff --git a/docs/models/shared/granttypes.md b/docs/models/shared/granttypes.md new file mode 100644 index 0000000..3e217d3 --- /dev/null +++ b/docs/models/shared/granttypes.md @@ -0,0 +1,9 @@ +# GrantTypes + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `AUTHORIZATION_CODE` | authorization_code | +| `REFRESH_TOKEN` | refresh_token | \ No newline at end of file diff --git a/docs/models/shared/introspecttokenrequest.md b/docs/models/shared/introspecttokenrequest.md new file mode 100644 index 0000000..58ee3a7 --- /dev/null +++ b/docs/models/shared/introspecttokenrequest.md @@ -0,0 +1,11 @@ +# IntrospectTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `token` | *::String* | :heavy_check_mark: | N/A | +| `token_type_hint` | [T.nilable(Models::Shared::IntrospectTokenRequestTokenTypeHint)](../../models/shared/introspecttokenrequesttokentypehint.md) | :heavy_minus_sign: | N/A | +| `client_id` | *::String* | :heavy_check_mark: | N/A | +| `client_secret` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/introspecttokenrequesttokentypehint.md b/docs/models/shared/introspecttokenrequesttokentypehint.md new file mode 100644 index 0000000..110a70a --- /dev/null +++ b/docs/models/shared/introspecttokenrequesttokentypehint.md @@ -0,0 +1,9 @@ +# IntrospectTokenRequestTokenTypeHint + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `ACCESS_TOKEN` | access_token | +| `REFRESH_TOKEN` | refresh_token | \ No newline at end of file diff --git a/docs/models/shared/introspecttokenresponse.md b/docs/models/shared/introspecttokenresponse.md new file mode 100644 index 0000000..78101ad --- /dev/null +++ b/docs/models/shared/introspecttokenresponse.md @@ -0,0 +1,17 @@ +# IntrospectTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `active` | *T::Boolean* | :heavy_check_mark: | N/A | +| `client_id` | *::String* | :heavy_check_mark: | N/A | +| `token_type` | [Models::Shared::TokenType](../../models/shared/tokentype.md) | :heavy_check_mark: | N/A | +| `scope` | *::String* | :heavy_check_mark: | N/A | +| `sub_type` | [Models::Shared::SubType](../../models/shared/subtype.md) | :heavy_check_mark: | N/A | +| `sub` | *::String* | :heavy_check_mark: | N/A | +| `aud` | *::String* | :heavy_check_mark: | N/A | +| `iss` | *::String* | :heavy_check_mark: | N/A | +| `exp` | *::Integer* | :heavy_check_mark: | N/A | +| `iat` | *::Integer* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/items.md b/docs/models/shared/items.md new file mode 100644 index 0000000..50c2edd --- /dev/null +++ b/docs/models/shared/items.md @@ -0,0 +1,2 @@ +# Items + diff --git a/docs/models/shared/legacyrecurringproductprice.md b/docs/models/shared/legacyrecurringproductprice.md new file mode 100644 index 0000000..df260e2 --- /dev/null +++ b/docs/models/shared/legacyrecurringproductprice.md @@ -0,0 +1,2 @@ +# LegacyRecurringProductPrice + diff --git a/docs/models/shared/legacyrecurringproductpricecustom.md b/docs/models/shared/legacyrecurringproductpricecustom.md new file mode 100644 index 0000000..6c1753c --- /dev/null +++ b/docs/models/shared/legacyrecurringproductpricecustom.md @@ -0,0 +1,24 @@ +# LegacyRecurringProductPriceCustom + +A pay-what-you-want recurring price for a product, i.e. a subscription. + +**Deprecated**: The recurring interval should be set on the product itself. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the price. | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the price is archived and no longer available. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the product owning the price. | +| `type` | *::String* | :heavy_check_mark: | The type of the price. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | +| `price_currency` | *::String* | :heavy_check_mark: | The currency. | +| `minimum_amount` | *::Integer* | :heavy_check_mark: | The minimum amount the customer can pay. | +| `maximum_amount` | *::Integer* | :heavy_check_mark: | The maximum amount the customer can pay. | +| `preset_amount` | *::Integer* | :heavy_check_mark: | The initial amount shown to the customer. | +| `legacy` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/legacyrecurringproductpricefixed.md b/docs/models/shared/legacyrecurringproductpricefixed.md new file mode 100644 index 0000000..1427ad0 --- /dev/null +++ b/docs/models/shared/legacyrecurringproductpricefixed.md @@ -0,0 +1,22 @@ +# LegacyRecurringProductPriceFixed + +A recurring price for a product, i.e. a subscription. + +**Deprecated**: The recurring interval should be set on the product itself. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the price. | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the price is archived and no longer available. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the product owning the price. | +| `type` | *::String* | :heavy_check_mark: | The type of the price. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | +| `price_currency` | *::String* | :heavy_check_mark: | The currency. | +| `price_amount` | *::Integer* | :heavy_check_mark: | The price in cents. | +| `legacy` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/legacyrecurringproductpricefree.md b/docs/models/shared/legacyrecurringproductpricefree.md new file mode 100644 index 0000000..626c057 --- /dev/null +++ b/docs/models/shared/legacyrecurringproductpricefree.md @@ -0,0 +1,20 @@ +# LegacyRecurringProductPriceFree + +A free recurring price for a product, i.e. a subscription. + +**Deprecated**: The recurring interval should be set on the product itself. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the price. | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the price is archived and no longer available. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the product owning the price. | +| `type` | *::String* | :heavy_check_mark: | The type of the price. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | +| `legacy` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/licensekeyactivate.md b/docs/models/shared/licensekeyactivate.md new file mode 100644 index 0000000..a660c83 --- /dev/null +++ b/docs/models/shared/licensekeyactivate.md @@ -0,0 +1,12 @@ +# LicenseKeyActivate + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `key` | *::String* | :heavy_check_mark: | N/A | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `label` | *::String* | :heavy_check_mark: | N/A | +| `conditions` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/licensekeyactivateconditions.md)] | :heavy_minus_sign: | Key-value object allowing you to set conditions that must match when validating the license key.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `meta` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/licensekeyactivatemeta.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information about the activation

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | \ No newline at end of file diff --git a/docs/models/shared/licensekeyactivateconditions.md b/docs/models/shared/licensekeyactivateconditions.md new file mode 100644 index 0000000..0be18f7 --- /dev/null +++ b/docs/models/shared/licensekeyactivateconditions.md @@ -0,0 +1,2 @@ +# LicenseKeyActivateConditions + diff --git a/docs/models/shared/licensekeyactivatemeta.md b/docs/models/shared/licensekeyactivatemeta.md new file mode 100644 index 0000000..cd3068c --- /dev/null +++ b/docs/models/shared/licensekeyactivatemeta.md @@ -0,0 +1,2 @@ +# LicenseKeyActivateMeta + diff --git a/docs/models/shared/licensekeyactivationbase.md b/docs/models/shared/licensekeyactivationbase.md new file mode 100644 index 0000000..bdfeb09 --- /dev/null +++ b/docs/models/shared/licensekeyactivationbase.md @@ -0,0 +1,13 @@ +# LicenseKeyActivationBase + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `license_key_id` | *::String* | :heavy_check_mark: | N/A | +| `label` | *::String* | :heavy_check_mark: | N/A | +| `meta` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/meta.md)] | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/licensekeyactivationread.md b/docs/models/shared/licensekeyactivationread.md new file mode 100644 index 0000000..c9cbb5b --- /dev/null +++ b/docs/models/shared/licensekeyactivationread.md @@ -0,0 +1,14 @@ +# LicenseKeyActivationRead + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `license_key_id` | *::String* | :heavy_check_mark: | N/A | +| `label` | *::String* | :heavy_check_mark: | N/A | +| `meta` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/licensekeyactivationreadmeta.md)] | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `license_key` | [Models::Shared::LicenseKeyRead](../../models/shared/licensekeyread.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/licensekeyactivationreadmeta.md b/docs/models/shared/licensekeyactivationreadmeta.md new file mode 100644 index 0000000..9b32cad --- /dev/null +++ b/docs/models/shared/licensekeyactivationreadmeta.md @@ -0,0 +1,2 @@ +# LicenseKeyActivationReadMeta + diff --git a/docs/models/shared/licensekeycustomer.md b/docs/models/shared/licensekeycustomer.md new file mode 100644 index 0000000..e03889f --- /dev/null +++ b/docs/models/shared/licensekeycustomer.md @@ -0,0 +1,20 @@ +# LicenseKeyCustomer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the customer. | 992fae2a-2a17-4b7a-8d9e-e287cf90131b | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/licensekeycustomermetadata.md)] | :heavy_check_mark: | N/A | | +| `external_id` | *::String* | :heavy_check_mark: | The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. | usr_1337 | +| `email` | *::String* | :heavy_check_mark: | The email address of the customer. This must be unique within the organization. | customer@example.com | +| `email_verified` | *T::Boolean* | :heavy_check_mark: | Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. | true | +| `name` | *::String* | :heavy_check_mark: | The name of the customer. | John Doe | +| `billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | | +| `tax_id` | T::Array<[T.any(::String, Models::Shared::TaxIDFormat)](../../models/shared/licensekeycustomertaxid.md)> | :heavy_check_mark: | N/A | [
"911144442",
"us_ein"
] | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the customer. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `deleted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp for when the customer was soft deleted. | | +| `avatar_url` | *::String* | :heavy_check_mark: | N/A | https://www.gravatar.com/avatar/xxx?d=blank | \ No newline at end of file diff --git a/docs/models/shared/licensekeycustomermetadata.md b/docs/models/shared/licensekeycustomermetadata.md new file mode 100644 index 0000000..94551e8 --- /dev/null +++ b/docs/models/shared/licensekeycustomermetadata.md @@ -0,0 +1,2 @@ +# LicenseKeyCustomerMetadata + diff --git a/docs/models/shared/licensekeycustomertaxid.md b/docs/models/shared/licensekeycustomertaxid.md new file mode 100644 index 0000000..8f9f85e --- /dev/null +++ b/docs/models/shared/licensekeycustomertaxid.md @@ -0,0 +1,2 @@ +# LicenseKeyCustomerTaxId + diff --git a/docs/models/shared/licensekeydeactivate.md b/docs/models/shared/licensekeydeactivate.md new file mode 100644 index 0000000..b7f6d48 --- /dev/null +++ b/docs/models/shared/licensekeydeactivate.md @@ -0,0 +1,10 @@ +# LicenseKeyDeactivate + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `key` | *::String* | :heavy_check_mark: | N/A | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `activation_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/licensekeyread.md b/docs/models/shared/licensekeyread.md new file mode 100644 index 0000000..57f8dd2 --- /dev/null +++ b/docs/models/shared/licensekeyread.md @@ -0,0 +1,23 @@ +# LicenseKeyRead + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::LicenseKeyCustomer](../../models/shared/licensekeycustomer.md) | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | The benefit ID. | +| `key` | *::String* | :heavy_check_mark: | N/A | +| `display_key` | *::String* | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::LicenseKeyStatus](../../models/shared/licensekeystatus.md) | :heavy_check_mark: | N/A | +| `limit_activations` | *::Integer* | :heavy_check_mark: | N/A | +| `usage` | *::Integer* | :heavy_check_mark: | N/A | +| `limit_usage` | *::Integer* | :heavy_check_mark: | N/A | +| `validations` | *::Integer* | :heavy_check_mark: | N/A | +| `last_validated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/licensekeystatus.md b/docs/models/shared/licensekeystatus.md new file mode 100644 index 0000000..31df87b --- /dev/null +++ b/docs/models/shared/licensekeystatus.md @@ -0,0 +1,10 @@ +# LicenseKeyStatus + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `GRANTED` | granted | +| `REVOKED` | revoked | +| `DISABLED` | disabled | \ No newline at end of file diff --git a/docs/models/shared/licensekeyupdate.md b/docs/models/shared/licensekeyupdate.md new file mode 100644 index 0000000..3f1492b --- /dev/null +++ b/docs/models/shared/licensekeyupdate.md @@ -0,0 +1,12 @@ +# LicenseKeyUpdate + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `status` | [T.nilable(Models::Shared::LicenseKeyStatus)](../../models/shared/licensekeystatus.md) | :heavy_minus_sign: | N/A | +| `usage` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `limit_activations` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `limit_usage` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/licensekeyvalidate.md b/docs/models/shared/licensekeyvalidate.md new file mode 100644 index 0000000..2180744 --- /dev/null +++ b/docs/models/shared/licensekeyvalidate.md @@ -0,0 +1,14 @@ +# LicenseKeyValidate + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `key` | *::String* | :heavy_check_mark: | N/A | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `activation_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `benefit_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `customer_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `increment_usage` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `conditions` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/conditions.md)] | :heavy_minus_sign: | Key-value object allowing you to set conditions that must match when validating the license key.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | \ No newline at end of file diff --git a/docs/models/shared/licensekeywithactivations.md b/docs/models/shared/licensekeywithactivations.md new file mode 100644 index 0000000..c141d11 --- /dev/null +++ b/docs/models/shared/licensekeywithactivations.md @@ -0,0 +1,24 @@ +# LicenseKeyWithActivations + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::LicenseKeyCustomer](../../models/shared/licensekeycustomer.md) | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | The benefit ID. | +| `key` | *::String* | :heavy_check_mark: | N/A | +| `display_key` | *::String* | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::LicenseKeyStatus](../../models/shared/licensekeystatus.md) | :heavy_check_mark: | N/A | +| `limit_activations` | *::Integer* | :heavy_check_mark: | N/A | +| `usage` | *::Integer* | :heavy_check_mark: | N/A | +| `limit_usage` | *::Integer* | :heavy_check_mark: | N/A | +| `validations` | *::Integer* | :heavy_check_mark: | N/A | +| `last_validated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `activations` | T::Array<[Models::Shared::LicenseKeyActivationBase](../../models/shared/licensekeyactivationbase.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcebenefit.md b/docs/models/shared/listresourcebenefit.md new file mode 100644 index 0000000..6832055 --- /dev/null +++ b/docs/models/shared/listresourcebenefit.md @@ -0,0 +1,9 @@ +# ListResourceBenefit + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `items` | T::Array<[T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)](../../models/shared/benefit.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcebenefitgrant.md b/docs/models/shared/listresourcebenefitgrant.md new file mode 100644 index 0000000..a9e245e --- /dev/null +++ b/docs/models/shared/listresourcebenefitgrant.md @@ -0,0 +1,9 @@ +# ListResourceBenefitGrant + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::BenefitGrant](../../models/shared/benefitgrant.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcecheckout.md b/docs/models/shared/listresourcecheckout.md new file mode 100644 index 0000000..42418c5 --- /dev/null +++ b/docs/models/shared/listresourcecheckout.md @@ -0,0 +1,9 @@ +# ListResourceCheckout + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Checkout](../../models/shared/checkout.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcecheckoutlink.md b/docs/models/shared/listresourcecheckoutlink.md new file mode 100644 index 0000000..58afa49 --- /dev/null +++ b/docs/models/shared/listresourcecheckoutlink.md @@ -0,0 +1,9 @@ +# ListResourceCheckoutLink + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::CheckoutLink](../../models/shared/checkoutlink.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcecustomer.md b/docs/models/shared/listresourcecustomer.md new file mode 100644 index 0000000..64da62e --- /dev/null +++ b/docs/models/shared/listresourcecustomer.md @@ -0,0 +1,9 @@ +# ListResourceCustomer + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Customer](../../models/shared/customer.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcecustomerbenefitgrant.md b/docs/models/shared/listresourcecustomerbenefitgrant.md new file mode 100644 index 0000000..1b748b9 --- /dev/null +++ b/docs/models/shared/listresourcecustomerbenefitgrant.md @@ -0,0 +1,9 @@ +# ListResourceCustomerBenefitGrant + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `items` | T::Array<[T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit)](../../models/shared/customerbenefitgrant.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcecustomercustomermeter.md b/docs/models/shared/listresourcecustomercustomermeter.md new file mode 100644 index 0000000..86ac4e5 --- /dev/null +++ b/docs/models/shared/listresourcecustomercustomermeter.md @@ -0,0 +1,9 @@ +# ListResourceCustomerCustomerMeter + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::CustomerCustomerMeter](../../models/shared/customercustomermeter.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcecustomermeter.md b/docs/models/shared/listresourcecustomermeter.md new file mode 100644 index 0000000..9d9af3c --- /dev/null +++ b/docs/models/shared/listresourcecustomermeter.md @@ -0,0 +1,9 @@ +# ListResourceCustomerMeter + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::CustomerMeter](../../models/shared/customermeter.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcecustomerorder.md b/docs/models/shared/listresourcecustomerorder.md new file mode 100644 index 0000000..88da162 --- /dev/null +++ b/docs/models/shared/listresourcecustomerorder.md @@ -0,0 +1,9 @@ +# ListResourceCustomerOrder + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::CustomerOrder](../../models/shared/customerorder.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcecustomersubscription.md b/docs/models/shared/listresourcecustomersubscription.md new file mode 100644 index 0000000..468d6b8 --- /dev/null +++ b/docs/models/shared/listresourcecustomersubscription.md @@ -0,0 +1,9 @@ +# ListResourceCustomerSubscription + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::CustomerSubscription](../../models/shared/customersubscription.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcecustomfield.md b/docs/models/shared/listresourcecustomfield.md new file mode 100644 index 0000000..76d986a --- /dev/null +++ b/docs/models/shared/listresourcecustomfield.md @@ -0,0 +1,9 @@ +# ListResourceCustomField + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `items` | T::Array<[T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)](../../models/shared/customfield.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcediscount.md b/docs/models/shared/listresourcediscount.md new file mode 100644 index 0000000..2f2ccc4 --- /dev/null +++ b/docs/models/shared/listresourcediscount.md @@ -0,0 +1,9 @@ +# ListResourceDiscount + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `items` | T::Array<[T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration)](../../models/shared/discount.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcedownloadableread.md b/docs/models/shared/listresourcedownloadableread.md new file mode 100644 index 0000000..3b6039f --- /dev/null +++ b/docs/models/shared/listresourcedownloadableread.md @@ -0,0 +1,9 @@ +# ListResourceDownloadableRead + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::DownloadableRead](../../models/shared/downloadableread.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourceevent.md b/docs/models/shared/listresourceevent.md new file mode 100644 index 0000000..aff17da --- /dev/null +++ b/docs/models/shared/listresourceevent.md @@ -0,0 +1,9 @@ +# ListResourceEvent + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Event](../../models/shared/event.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourceeventname.md b/docs/models/shared/listresourceeventname.md new file mode 100644 index 0000000..7bb10c3 --- /dev/null +++ b/docs/models/shared/listresourceeventname.md @@ -0,0 +1,9 @@ +# ListResourceEventName + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::EventName](../../models/shared/eventname.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcefileread.md b/docs/models/shared/listresourcefileread.md new file mode 100644 index 0000000..96089de --- /dev/null +++ b/docs/models/shared/listresourcefileread.md @@ -0,0 +1,9 @@ +# ListResourceFileRead + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `items` | T::Array<[T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead)](../../models/shared/fileread.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcelicensekeyread.md b/docs/models/shared/listresourcelicensekeyread.md new file mode 100644 index 0000000..c312288 --- /dev/null +++ b/docs/models/shared/listresourcelicensekeyread.md @@ -0,0 +1,9 @@ +# ListResourceLicenseKeyRead + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::LicenseKeyRead](../../models/shared/licensekeyread.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcemeter.md b/docs/models/shared/listresourcemeter.md new file mode 100644 index 0000000..485512a --- /dev/null +++ b/docs/models/shared/listresourcemeter.md @@ -0,0 +1,9 @@ +# ListResourceMeter + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Meter](../../models/shared/meter.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourceoauth2client.md b/docs/models/shared/listresourceoauth2client.md new file mode 100644 index 0000000..9559c03 --- /dev/null +++ b/docs/models/shared/listresourceoauth2client.md @@ -0,0 +1,9 @@ +# ListResourceOAuth2Client + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::OAuth2Client](../../models/shared/oauth2client.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourceorder.md b/docs/models/shared/listresourceorder.md new file mode 100644 index 0000000..ad0b790 --- /dev/null +++ b/docs/models/shared/listresourceorder.md @@ -0,0 +1,9 @@ +# ListResourceOrder + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Order](../../models/shared/order.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourceorganization.md b/docs/models/shared/listresourceorganization.md new file mode 100644 index 0000000..dcd89ba --- /dev/null +++ b/docs/models/shared/listresourceorganization.md @@ -0,0 +1,9 @@ +# ListResourceOrganization + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Organization](../../models/shared/organization.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourceproduct.md b/docs/models/shared/listresourceproduct.md new file mode 100644 index 0000000..a813a77 --- /dev/null +++ b/docs/models/shared/listresourceproduct.md @@ -0,0 +1,9 @@ +# ListResourceProduct + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Product](../../models/shared/product.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcerefund.md b/docs/models/shared/listresourcerefund.md new file mode 100644 index 0000000..cd58132 --- /dev/null +++ b/docs/models/shared/listresourcerefund.md @@ -0,0 +1,9 @@ +# ListResourceRefund + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Refund](../../models/shared/refund.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourcesubscription.md b/docs/models/shared/listresourcesubscription.md new file mode 100644 index 0000000..7cc9e28 --- /dev/null +++ b/docs/models/shared/listresourcesubscription.md @@ -0,0 +1,9 @@ +# ListResourceSubscription + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `items` | T::Array<[Models::Shared::Subscription](../../models/shared/subscription.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/listresourceunionpaymentmethodcardpaymentmethodgeneric.md b/docs/models/shared/listresourceunionpaymentmethodcardpaymentmethodgeneric.md new file mode 100644 index 0000000..d2f5b39 --- /dev/null +++ b/docs/models/shared/listresourceunionpaymentmethodcardpaymentmethodgeneric.md @@ -0,0 +1,9 @@ +# ListResourceUnionPaymentMethodCardPaymentMethodGeneric + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `items` | T::Array<[T.any(Models::Shared::PaymentMethodCard, Models::Shared::PaymentMethodGeneric)](../../models/shared/items.md)> | :heavy_check_mark: | N/A | +| `pagination` | [Models::Shared::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/loc.md b/docs/models/shared/loc.md new file mode 100644 index 0000000..7ceac31 --- /dev/null +++ b/docs/models/shared/loc.md @@ -0,0 +1,2 @@ +# Loc + diff --git a/docs/models/shared/meta.md b/docs/models/shared/meta.md new file mode 100644 index 0000000..4fa5a31 --- /dev/null +++ b/docs/models/shared/meta.md @@ -0,0 +1,2 @@ +# Meta + diff --git a/docs/models/shared/metadata.md b/docs/models/shared/metadata.md new file mode 100644 index 0000000..196c3fc --- /dev/null +++ b/docs/models/shared/metadata.md @@ -0,0 +1,2 @@ +# Metadata + diff --git a/docs/models/shared/metadataquery.md b/docs/models/shared/metadataquery.md new file mode 100644 index 0000000..d5058bd --- /dev/null +++ b/docs/models/shared/metadataquery.md @@ -0,0 +1,2 @@ +# MetadataQuery + diff --git a/docs/models/shared/meter.md b/docs/models/shared/meter.md new file mode 100644 index 0000000..28d17e1 --- /dev/null +++ b/docs/models/shared/meter.md @@ -0,0 +1,15 @@ +# Meter + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/metermetadata.md)] | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `name` | *::String* | :heavy_check_mark: | The name of the meter. Will be shown on customer's invoices and usage. | +| `filter` | [Models::Shared::Filter](../../models/shared/filter.md) | :heavy_check_mark: | N/A | +| `aggregation` | [T.any(Models::Shared::CountAggregation, Models::Shared::PropertyAggregation)](../../models/shared/meteraggregation.md) | :heavy_check_mark: | The aggregation to apply on the filtered events to calculate the meter. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the meter. | \ No newline at end of file diff --git a/docs/models/shared/meteraggregation.md b/docs/models/shared/meteraggregation.md new file mode 100644 index 0000000..166b605 --- /dev/null +++ b/docs/models/shared/meteraggregation.md @@ -0,0 +1,4 @@ +# MeterAggregation + +The aggregation to apply on the filtered events to calculate the meter. + diff --git a/docs/models/shared/metercreate.md b/docs/models/shared/metercreate.md new file mode 100644 index 0000000..66bf0a5 --- /dev/null +++ b/docs/models/shared/metercreate.md @@ -0,0 +1,12 @@ +# MeterCreate + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/metercreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `name` | *::String* | :heavy_check_mark: | The name of the meter. Will be shown on customer's invoices and usage. | | +| `filter` | [Models::Shared::Filter](../../models/shared/filter.md) | :heavy_check_mark: | N/A | | +| `aggregation` | [T.any(Models::Shared::CountAggregation, Models::Shared::PropertyAggregation)](../../models/shared/metercreateaggregation.md) | :heavy_check_mark: | The aggregation to apply on the filtered events to calculate the meter. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the meter. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/metercreateaggregation.md b/docs/models/shared/metercreateaggregation.md new file mode 100644 index 0000000..ebe0462 --- /dev/null +++ b/docs/models/shared/metercreateaggregation.md @@ -0,0 +1,4 @@ +# MeterCreateAggregation + +The aggregation to apply on the filtered events to calculate the meter. + diff --git a/docs/models/shared/metercreatemetadata.md b/docs/models/shared/metercreatemetadata.md new file mode 100644 index 0000000..ebf2150 --- /dev/null +++ b/docs/models/shared/metercreatemetadata.md @@ -0,0 +1,2 @@ +# MeterCreateMetadata + diff --git a/docs/models/shared/metermetadata.md b/docs/models/shared/metermetadata.md new file mode 100644 index 0000000..d5cb23c --- /dev/null +++ b/docs/models/shared/metermetadata.md @@ -0,0 +1,2 @@ +# MeterMetadata + diff --git a/docs/models/shared/meterquantities.md b/docs/models/shared/meterquantities.md new file mode 100644 index 0000000..41d93ba --- /dev/null +++ b/docs/models/shared/meterquantities.md @@ -0,0 +1,9 @@ +# MeterQuantities + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `quantities` | T::Array<[Models::Shared::MeterQuantity](../../models/shared/meterquantity.md)> | :heavy_check_mark: | N/A | | +| `total` | *::Float* | :heavy_check_mark: | The total quantity for the period. | 100 | \ No newline at end of file diff --git a/docs/models/shared/meterquantity.md b/docs/models/shared/meterquantity.md new file mode 100644 index 0000000..fcc45d9 --- /dev/null +++ b/docs/models/shared/meterquantity.md @@ -0,0 +1,9 @@ +# MeterQuantity + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `timestamp` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp for the current period. | | +| `quantity` | *::Float* | :heavy_check_mark: | The quantity for the current period. | 10 | \ No newline at end of file diff --git a/docs/models/shared/metersortproperty.md b/docs/models/shared/metersortproperty.md new file mode 100644 index 0000000..e80bfa8 --- /dev/null +++ b/docs/models/shared/metersortproperty.md @@ -0,0 +1,11 @@ +# MeterSortProperty + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `NAME` | name | +| `MINUS_NAME` | -name | \ No newline at end of file diff --git a/docs/models/shared/meterupdate.md b/docs/models/shared/meterupdate.md new file mode 100644 index 0000000..2b5f3f7 --- /dev/null +++ b/docs/models/shared/meterupdate.md @@ -0,0 +1,11 @@ +# MeterUpdate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/meterupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the meter. Will be shown on customer's invoices and usage. | +| `filter` | [T.nilable(Models::Shared::Filter)](../../models/shared/filter.md) | :heavy_minus_sign: | The filter to apply on events that'll be used to calculate the meter. | +| `aggregation` | [T.nilable(T.any(Models::Shared::CountAggregation, Models::Shared::PropertyAggregation))](../../models/shared/aggregation.md) | :heavy_minus_sign: | The aggregation to apply on the filtered events to calculate the meter. | \ No newline at end of file diff --git a/docs/models/shared/meterupdatemetadata.md b/docs/models/shared/meterupdatemetadata.md new file mode 100644 index 0000000..8a230c4 --- /dev/null +++ b/docs/models/shared/meterupdatemetadata.md @@ -0,0 +1,2 @@ +# MeterUpdateMetadata + diff --git a/docs/models/shared/metric.md b/docs/models/shared/metric.md new file mode 100644 index 0000000..055ee39 --- /dev/null +++ b/docs/models/shared/metric.md @@ -0,0 +1,12 @@ +# Metric + +Information about a metric. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `slug` | *::String* | :heavy_check_mark: | Unique identifier for the metric. | +| `display_name` | *::String* | :heavy_check_mark: | Human-readable name for the metric. | +| `type` | [Models::Shared::MetricType](../../models/shared/metrictype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/metricperiod.md b/docs/models/shared/metricperiod.md new file mode 100644 index 0000000..6e31630 --- /dev/null +++ b/docs/models/shared/metricperiod.md @@ -0,0 +1,20 @@ +# MetricPeriod + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `timestamp` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp of this period data. | +| `orders` | *::Integer* | :heavy_check_mark: | N/A | +| `revenue` | *::Integer* | :heavy_check_mark: | N/A | +| `cumulative_revenue` | *::Integer* | :heavy_check_mark: | N/A | +| `average_order_value` | *::Integer* | :heavy_check_mark: | N/A | +| `one_time_products` | *::Integer* | :heavy_check_mark: | N/A | +| `one_time_products_revenue` | *::Integer* | :heavy_check_mark: | N/A | +| `new_subscriptions` | *::Integer* | :heavy_check_mark: | N/A | +| `new_subscriptions_revenue` | *::Integer* | :heavy_check_mark: | N/A | +| `renewed_subscriptions` | *::Integer* | :heavy_check_mark: | N/A | +| `renewed_subscriptions_revenue` | *::Integer* | :heavy_check_mark: | N/A | +| `active_subscriptions` | *::Integer* | :heavy_check_mark: | N/A | +| `monthly_recurring_revenue` | *::Integer* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/metrics.md b/docs/models/shared/metrics.md new file mode 100644 index 0000000..3ff4cae --- /dev/null +++ b/docs/models/shared/metrics.md @@ -0,0 +1,19 @@ +# Metrics + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `orders` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `revenue` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `cumulative_revenue` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `average_order_value` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `one_time_products` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `one_time_products_revenue` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `new_subscriptions` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `new_subscriptions_revenue` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `renewed_subscriptions` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `renewed_subscriptions_revenue` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `active_subscriptions` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | +| `monthly_recurring_revenue` | [Models::Shared::Metric](../../models/shared/metric.md) | :heavy_check_mark: | Information about a metric. | \ No newline at end of file diff --git a/docs/models/shared/metricsintervallimit.md b/docs/models/shared/metricsintervallimit.md new file mode 100644 index 0000000..a69360e --- /dev/null +++ b/docs/models/shared/metricsintervallimit.md @@ -0,0 +1,10 @@ +# MetricsIntervalLimit + +Date interval limit to get metrics for a given interval. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `max_days` | *::Integer* | :heavy_check_mark: | Maximum number of days for this interval. | \ No newline at end of file diff --git a/docs/models/shared/metricsintervalslimits.md b/docs/models/shared/metricsintervalslimits.md new file mode 100644 index 0000000..7baa9d4 --- /dev/null +++ b/docs/models/shared/metricsintervalslimits.md @@ -0,0 +1,14 @@ +# MetricsIntervalsLimits + +Date interval limits to get metrics for each interval. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `hour` | [Models::Shared::MetricsIntervalLimit](../../models/shared/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | +| `day` | [Models::Shared::MetricsIntervalLimit](../../models/shared/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | +| `week` | [Models::Shared::MetricsIntervalLimit](../../models/shared/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | +| `month` | [Models::Shared::MetricsIntervalLimit](../../models/shared/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | +| `year` | [Models::Shared::MetricsIntervalLimit](../../models/shared/metricsintervallimit.md) | :heavy_check_mark: | Date interval limit to get metrics for a given interval. | \ No newline at end of file diff --git a/docs/models/shared/metricslimits.md b/docs/models/shared/metricslimits.md new file mode 100644 index 0000000..25c5f49 --- /dev/null +++ b/docs/models/shared/metricslimits.md @@ -0,0 +1,11 @@ +# MetricsLimits + +Date limits to get metrics. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `min_date` | [DateTime](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime.html) | :heavy_check_mark: | Minimum date to get metrics. | +| `intervals` | [Models::Shared::MetricsIntervalsLimits](../../models/shared/metricsintervalslimits.md) | :heavy_check_mark: | Date interval limits to get metrics for each interval. | \ No newline at end of file diff --git a/docs/models/shared/metricsresponse.md b/docs/models/shared/metricsresponse.md new file mode 100644 index 0000000..eb59cd6 --- /dev/null +++ b/docs/models/shared/metricsresponse.md @@ -0,0 +1,11 @@ +# MetricsResponse + +Metrics response schema. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `periods` | T::Array<[Models::Shared::MetricPeriod](../../models/shared/metricperiod.md)> | :heavy_check_mark: | List of data for each timestamp. | +| `metrics` | [Models::Shared::Metrics](../../models/shared/metrics.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/metrictype.md b/docs/models/shared/metrictype.md new file mode 100644 index 0000000..9ed11bb --- /dev/null +++ b/docs/models/shared/metrictype.md @@ -0,0 +1,9 @@ +# MetricType + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `SCALAR` | scalar | +| `CURRENCY` | currency | \ No newline at end of file diff --git a/docs/models/shared/oauth2client.md b/docs/models/shared/oauth2client.md new file mode 100644 index 0000000..17998f1 --- /dev/null +++ b/docs/models/shared/oauth2client.md @@ -0,0 +1,23 @@ +# OAuth2Client + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `redirect_uris` | T::Array<*::String*> | :heavy_check_mark: | N/A | +| `token_endpoint_auth_method` | [T.nilable(Models::Shared::TokenEndpointAuthMethod)](../../models/shared/tokenendpointauthmethod.md) | :heavy_minus_sign: | N/A | +| `grant_types` | T::Array<[Models::Shared::GrantTypes](../../models/shared/granttypes.md)> | :heavy_minus_sign: | N/A | +| `response_types` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `scope` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `client_name` | *::String* | :heavy_check_mark: | N/A | +| `client_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `logo_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `tos_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `policy_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `client_id` | *::String* | :heavy_check_mark: | N/A | +| `client_secret` | *::String* | :heavy_check_mark: | N/A | +| `client_id_issued_at` | *::Integer* | :heavy_check_mark: | N/A | +| `client_secret_expires_at` | *::Integer* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/oauth2clientconfiguration.md b/docs/models/shared/oauth2clientconfiguration.md new file mode 100644 index 0000000..d089cc0 --- /dev/null +++ b/docs/models/shared/oauth2clientconfiguration.md @@ -0,0 +1,17 @@ +# OAuth2ClientConfiguration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `redirect_uris` | T::Array<*::String*> | :heavy_check_mark: | N/A | +| `token_endpoint_auth_method` | [T.nilable(Models::Shared::OAuth2ClientConfigurationTokenEndpointAuthMethod)](../../models/shared/oauth2clientconfigurationtokenendpointauthmethod.md) | :heavy_minus_sign: | N/A | +| `grant_types` | T::Array<[Models::Shared::OAuth2ClientConfigurationGrantTypes](../../models/shared/oauth2clientconfigurationgranttypes.md)> | :heavy_minus_sign: | N/A | +| `response_types` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `scope` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `client_name` | *::String* | :heavy_check_mark: | N/A | +| `client_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `logo_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `tos_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `policy_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/oauth2clientconfigurationgranttypes.md b/docs/models/shared/oauth2clientconfigurationgranttypes.md new file mode 100644 index 0000000..7190db3 --- /dev/null +++ b/docs/models/shared/oauth2clientconfigurationgranttypes.md @@ -0,0 +1,9 @@ +# OAuth2ClientConfigurationGrantTypes + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `AUTHORIZATION_CODE` | authorization_code | +| `REFRESH_TOKEN` | refresh_token | \ No newline at end of file diff --git a/docs/models/shared/oauth2clientconfigurationtokenendpointauthmethod.md b/docs/models/shared/oauth2clientconfigurationtokenendpointauthmethod.md new file mode 100644 index 0000000..7706ecb --- /dev/null +++ b/docs/models/shared/oauth2clientconfigurationtokenendpointauthmethod.md @@ -0,0 +1,10 @@ +# OAuth2ClientConfigurationTokenEndpointAuthMethod + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `CLIENT_SECRET_BASIC` | client_secret_basic | +| `CLIENT_SECRET_POST` | client_secret_post | +| `NONE` | none | \ No newline at end of file diff --git a/docs/models/shared/oauth2clientconfigurationupdate.md b/docs/models/shared/oauth2clientconfigurationupdate.md new file mode 100644 index 0000000..37059b0 --- /dev/null +++ b/docs/models/shared/oauth2clientconfigurationupdate.md @@ -0,0 +1,18 @@ +# OAuth2ClientConfigurationUpdate + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `redirect_uris` | T::Array<*::String*> | :heavy_check_mark: | N/A | +| `token_endpoint_auth_method` | [T.nilable(Models::Shared::OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod)](../../models/shared/oauth2clientconfigurationupdatetokenendpointauthmethod.md) | :heavy_minus_sign: | N/A | +| `grant_types` | T::Array<[Models::Shared::OAuth2ClientConfigurationUpdateGrantTypes](../../models/shared/oauth2clientconfigurationupdategranttypes.md)> | :heavy_minus_sign: | N/A | +| `response_types` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `scope` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `client_name` | *::String* | :heavy_check_mark: | N/A | +| `client_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `logo_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `tos_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `policy_uri` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `client_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/oauth2clientconfigurationupdategranttypes.md b/docs/models/shared/oauth2clientconfigurationupdategranttypes.md new file mode 100644 index 0000000..8c8ba6d --- /dev/null +++ b/docs/models/shared/oauth2clientconfigurationupdategranttypes.md @@ -0,0 +1,9 @@ +# OAuth2ClientConfigurationUpdateGrantTypes + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `AUTHORIZATION_CODE` | authorization_code | +| `REFRESH_TOKEN` | refresh_token | \ No newline at end of file diff --git a/docs/models/shared/oauth2clientconfigurationupdatetokenendpointauthmethod.md b/docs/models/shared/oauth2clientconfigurationupdatetokenendpointauthmethod.md new file mode 100644 index 0000000..ea26ad1 --- /dev/null +++ b/docs/models/shared/oauth2clientconfigurationupdatetokenendpointauthmethod.md @@ -0,0 +1,10 @@ +# OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `CLIENT_SECRET_BASIC` | client_secret_basic | +| `CLIENT_SECRET_POST` | client_secret_post | +| `NONE` | none | \ No newline at end of file diff --git a/docs/models/shared/oauth2clientpublic.md b/docs/models/shared/oauth2clientpublic.md new file mode 100644 index 0000000..088f440 --- /dev/null +++ b/docs/models/shared/oauth2clientpublic.md @@ -0,0 +1,15 @@ +# OAuth2ClientPublic + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `client_id` | *::String* | :heavy_check_mark: | N/A | +| `client_name` | *::String* | :heavy_check_mark: | N/A | +| `client_uri` | *::String* | :heavy_check_mark: | N/A | +| `logo_uri` | *::String* | :heavy_check_mark: | N/A | +| `tos_uri` | *::String* | :heavy_check_mark: | N/A | +| `policy_uri` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/order.md b/docs/models/shared/order.md new file mode 100644 index 0000000..3875538 --- /dev/null +++ b/docs/models/shared/order.md @@ -0,0 +1,36 @@ +# Order + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `status` | [Models::Shared::OrderStatus](../../models/shared/orderstatus.md) | :heavy_check_mark: | N/A | | +| `paid` | *T::Boolean* | :heavy_check_mark: | Whether the order has been paid for. | true | +| `subtotal_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, before discounts and taxes. | | +| `discount_amount` | *::Integer* | :heavy_check_mark: | Discount amount in cents. | | +| `net_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, after discounts but before taxes. | | +| ~~`amount`~~ | *::Integer* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Amount in cents, after discounts but before taxes. | | +| `tax_amount` | *::Integer* | :heavy_check_mark: | Sales tax amount in cents. | | +| `total_amount` | *::Integer* | :heavy_check_mark: | Amount in cents, after discounts and taxes. | | +| `refunded_amount` | *::Integer* | :heavy_check_mark: | Amount refunded in cents. | | +| `refunded_tax_amount` | *::Integer* | :heavy_check_mark: | Sales tax refunded in cents. | | +| `currency` | *::String* | :heavy_check_mark: | N/A | | +| `billing_reason` | [Models::Shared::OrderBillingReason](../../models/shared/orderbillingreason.md) | :heavy_check_mark: | N/A | | +| `billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | | +| `product_id` | *::String* | :heavy_check_mark: | N/A | | +| `discount_id` | *::String* | :heavy_check_mark: | N/A | | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | | +| `checkout_id` | *::String* | :heavy_check_mark: | N/A | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/ordermetadata.md)] | :heavy_check_mark: | N/A | | +| `custom_field_data` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean, ::DateTime)](../../models/shared/ordercustomfielddata.md)] | :heavy_minus_sign: | Key-value object storing custom field values. | | +| `customer` | [Models::Shared::OrderCustomer](../../models/shared/ordercustomer.md) | :heavy_check_mark: | N/A | | +| ~~`user_id`~~ | *::String* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | +| `product` | [Models::Shared::OrderProduct](../../models/shared/orderproduct.md) | :heavy_check_mark: | N/A | | +| `discount` | [T.any(Models::Shared::DiscountFixedOnceForeverDurationBase, Models::Shared::DiscountFixedRepeatDurationBase, Models::Shared::DiscountPercentageOnceForeverDurationBase, Models::Shared::DiscountPercentageRepeatDurationBase)](../../models/shared/orderdiscount.md) | :heavy_check_mark: | N/A | | +| `subscription` | [Models::Shared::OrderSubscription](../../models/shared/ordersubscription.md) | :heavy_check_mark: | N/A | | +| `items` | T::Array<[Models::Shared::OrderItemSchema](../../models/shared/orderitemschema.md)> | :heavy_check_mark: | Line items composing the order. | | \ No newline at end of file diff --git a/docs/models/shared/orderbillingreason.md b/docs/models/shared/orderbillingreason.md new file mode 100644 index 0000000..c499076 --- /dev/null +++ b/docs/models/shared/orderbillingreason.md @@ -0,0 +1,11 @@ +# OrderBillingReason + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `PURCHASE` | purchase | +| `SUBSCRIPTION_CREATE` | subscription_create | +| `SUBSCRIPTION_CYCLE` | subscription_cycle | +| `SUBSCRIPTION_UPDATE` | subscription_update | \ No newline at end of file diff --git a/docs/models/shared/ordercustomer.md b/docs/models/shared/ordercustomer.md new file mode 100644 index 0000000..8c83324 --- /dev/null +++ b/docs/models/shared/ordercustomer.md @@ -0,0 +1,20 @@ +# OrderCustomer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the customer. | 992fae2a-2a17-4b7a-8d9e-e287cf90131b | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/ordercustomermetadata.md)] | :heavy_check_mark: | N/A | | +| `external_id` | *::String* | :heavy_check_mark: | The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. | usr_1337 | +| `email` | *::String* | :heavy_check_mark: | The email address of the customer. This must be unique within the organization. | customer@example.com | +| `email_verified` | *T::Boolean* | :heavy_check_mark: | Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. | true | +| `name` | *::String* | :heavy_check_mark: | The name of the customer. | John Doe | +| `billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | | +| `tax_id` | T::Array<[T.any(::String, Models::Shared::TaxIDFormat)](../../models/shared/ordercustomertaxid.md)> | :heavy_check_mark: | N/A | [
"911144442",
"us_ein"
] | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the customer. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `deleted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp for when the customer was soft deleted. | | +| `avatar_url` | *::String* | :heavy_check_mark: | N/A | https://www.gravatar.com/avatar/xxx?d=blank | \ No newline at end of file diff --git a/docs/models/shared/ordercustomermetadata.md b/docs/models/shared/ordercustomermetadata.md new file mode 100644 index 0000000..b5a82b0 --- /dev/null +++ b/docs/models/shared/ordercustomermetadata.md @@ -0,0 +1,2 @@ +# OrderCustomerMetadata + diff --git a/docs/models/shared/ordercustomertaxid.md b/docs/models/shared/ordercustomertaxid.md new file mode 100644 index 0000000..ed72487 --- /dev/null +++ b/docs/models/shared/ordercustomertaxid.md @@ -0,0 +1,2 @@ +# OrderCustomerTaxId + diff --git a/docs/models/shared/ordercustomfielddata.md b/docs/models/shared/ordercustomfielddata.md new file mode 100644 index 0000000..42c18f0 --- /dev/null +++ b/docs/models/shared/ordercustomfielddata.md @@ -0,0 +1,2 @@ +# OrderCustomFieldData + diff --git a/docs/models/shared/orderdiscount.md b/docs/models/shared/orderdiscount.md new file mode 100644 index 0000000..cf54c43 --- /dev/null +++ b/docs/models/shared/orderdiscount.md @@ -0,0 +1,2 @@ +# OrderDiscount + diff --git a/docs/models/shared/orderinvoice.md b/docs/models/shared/orderinvoice.md new file mode 100644 index 0000000..b8bfd3e --- /dev/null +++ b/docs/models/shared/orderinvoice.md @@ -0,0 +1,10 @@ +# OrderInvoice + +Order's invoice data. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `url` | *::String* | :heavy_check_mark: | The URL to the invoice. | \ No newline at end of file diff --git a/docs/models/shared/orderitemschema.md b/docs/models/shared/orderitemschema.md new file mode 100644 index 0000000..39fbe53 --- /dev/null +++ b/docs/models/shared/orderitemschema.md @@ -0,0 +1,17 @@ +# OrderItemSchema + +An order line item. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `label` | *::String* | :heavy_check_mark: | Description of the line item charge. | +| `amount` | *::Integer* | :heavy_check_mark: | Amount in cents, before discounts and taxes. | +| `tax_amount` | *::Integer* | :heavy_check_mark: | Sales tax amount in cents. | +| `proration` | *T::Boolean* | :heavy_check_mark: | Whether this charge is due to a proration. | +| `product_price_id` | *::String* | :heavy_check_mark: | Associated price ID, if any. | \ No newline at end of file diff --git a/docs/models/shared/ordermetadata.md b/docs/models/shared/ordermetadata.md new file mode 100644 index 0000000..e92e9c1 --- /dev/null +++ b/docs/models/shared/ordermetadata.md @@ -0,0 +1,2 @@ +# OrderMetadata + diff --git a/docs/models/shared/orderproduct.md b/docs/models/shared/orderproduct.md new file mode 100644 index 0000000..7ff2097 --- /dev/null +++ b/docs/models/shared/orderproduct.md @@ -0,0 +1,17 @@ +# OrderProduct + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/orderproductmetadata.md)] | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the product. | +| `name` | *::String* | :heavy_check_mark: | The name of the product. | +| `description` | *::String* | :heavy_check_mark: | The description of the product. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the product. If `None`, the product is a one-time purchase. | +| `is_recurring` | *T::Boolean* | :heavy_check_mark: | Whether the product is a subscription. | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the product. | \ No newline at end of file diff --git a/docs/models/shared/orderproductmetadata.md b/docs/models/shared/orderproductmetadata.md new file mode 100644 index 0000000..9fa30f9 --- /dev/null +++ b/docs/models/shared/orderproductmetadata.md @@ -0,0 +1,2 @@ +# OrderProductMetadata + diff --git a/docs/models/shared/ordersortproperty.md b/docs/models/shared/ordersortproperty.md new file mode 100644 index 0000000..4f9d8ce --- /dev/null +++ b/docs/models/shared/ordersortproperty.md @@ -0,0 +1,21 @@ +# OrderSortProperty + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `AMOUNT` | amount | +| `MINUS_AMOUNT` | -amount | +| `NET_AMOUNT` | net_amount | +| `MINUS_NET_AMOUNT` | -net_amount | +| `CUSTOMER` | customer | +| `MINUS_CUSTOMER` | -customer | +| `PRODUCT` | product | +| `MINUS_PRODUCT` | -product | +| `DISCOUNT` | discount | +| `MINUS_DISCOUNT` | -discount | +| `SUBSCRIPTION` | subscription | +| `MINUS_SUBSCRIPTION` | -subscription | \ No newline at end of file diff --git a/docs/models/shared/orderstatus.md b/docs/models/shared/orderstatus.md new file mode 100644 index 0000000..3992d4b --- /dev/null +++ b/docs/models/shared/orderstatus.md @@ -0,0 +1,11 @@ +# OrderStatus + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `PENDING` | pending | +| `PAID` | paid | +| `REFUNDED` | refunded | +| `PARTIALLY_REFUNDED` | partially_refunded | \ No newline at end of file diff --git a/docs/models/shared/ordersubscription.md b/docs/models/shared/ordersubscription.md new file mode 100644 index 0000000..ac61132 --- /dev/null +++ b/docs/models/shared/ordersubscription.md @@ -0,0 +1,28 @@ +# OrderSubscription + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/ordersubscriptionmetadata.md)] | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `amount` | *::Integer* | :heavy_check_mark: | The amount of the subscription. | +| `currency` | *::String* | :heavy_check_mark: | The currency of the subscription. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::SubscriptionStatus](../../models/shared/subscriptionstatus.md) | :heavy_check_mark: | N/A | +| `current_period_start` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The start timestamp of the current billing period. | +| `current_period_end` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The end timestamp of the current billing period. | +| `cancel_at_period_end` | *T::Boolean* | :heavy_check_mark: | Whether the subscription will be canceled at the end of the current period. | +| `canceled_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. | +| `started_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription started. | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription will end. | +| `ended_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription ended. | +| `customer_id` | *::String* | :heavy_check_mark: | The ID of the subscribed customer. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the subscribed product. | +| `discount_id` | *::String* | :heavy_check_mark: | The ID of the applied discount, if any. | +| `checkout_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_cancellation_reason` | [Models::Shared::CustomerCancellationReason](../../models/shared/customercancellationreason.md) | :heavy_check_mark: | N/A | +| `customer_cancellation_comment` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/ordersubscriptionmetadata.md b/docs/models/shared/ordersubscriptionmetadata.md new file mode 100644 index 0000000..2be55c9 --- /dev/null +++ b/docs/models/shared/ordersubscriptionmetadata.md @@ -0,0 +1,2 @@ +# OrderSubscriptionMetadata + diff --git a/docs/models/shared/organization.md b/docs/models/shared/organization.md new file mode 100644 index 0000000..9a8dc2f --- /dev/null +++ b/docs/models/shared/organization.md @@ -0,0 +1,19 @@ +# Organization + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The organization ID. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `name` | *::String* | :heavy_check_mark: | Organization name shown in checkout, customer portal, emails etc. | | +| `slug` | *::String* | :heavy_check_mark: | Unique organization slug in checkout, customer portal and credit card statements. | | +| `avatar_url` | *::String* | :heavy_check_mark: | Avatar URL shown in checkout, customer portal, emails etc. | | +| `email` | *::String* | :heavy_check_mark: | Public support email. | | +| `website` | *::String* | :heavy_check_mark: | Official website of the organization. | | +| `socials` | T::Array<[Models::Shared::OrganizationSocialLink](../../models/shared/organizationsociallink.md)> | :heavy_check_mark: | Links to social profiles. | | +| `details_submitted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | When the business details were submitted. | | +| `feature_settings` | [Models::Shared::OrganizationFeatureSettings](../../models/shared/organizationfeaturesettings.md) | :heavy_check_mark: | Organization feature settings | | +| `subscription_settings` | [Models::Shared::OrganizationSubscriptionSettings](../../models/shared/organizationsubscriptionsettings.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/organizationavatarfilecreate.md b/docs/models/shared/organizationavatarfilecreate.md new file mode 100644 index 0000000..ded183e --- /dev/null +++ b/docs/models/shared/organizationavatarfilecreate.md @@ -0,0 +1,17 @@ +# OrganizationAvatarFileCreate + +Schema to create a file to be used as an organization avatar. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `name` | *::String* | :heavy_check_mark: | N/A | | +| `mime_type` | *::String* | :heavy_check_mark: | MIME type of the file. Only images are supported for this type of file. | | +| `size` | *::Integer* | :heavy_check_mark: | Size of the file. A maximum of 1 MB is allowed for this type of file. | | +| `checksum_sha256_base64` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | +| `upload` | [Models::Shared::S3FileCreateMultipart](../../models/shared/s3filecreatemultipart.md) | :heavy_check_mark: | N/A | | +| `service` | *::String* | :heavy_check_mark: | N/A | | +| `version` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/organizationavatarfileread.md b/docs/models/shared/organizationavatarfileread.md new file mode 100644 index 0000000..11de8f4 --- /dev/null +++ b/docs/models/shared/organizationavatarfileread.md @@ -0,0 +1,26 @@ +# OrganizationAvatarFileRead + +File to be used as an organization avatar. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `path` | *::String* | :heavy_check_mark: | N/A | +| `mime_type` | *::String* | :heavy_check_mark: | N/A | +| `size` | *::Integer* | :heavy_check_mark: | N/A | +| `storage_version` | *::String* | :heavy_check_mark: | N/A | +| `checksum_etag` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_base64` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_hex` | *::String* | :heavy_check_mark: | N/A | +| `last_modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `version` | *::String* | :heavy_check_mark: | N/A | +| `service` | *::String* | :heavy_check_mark: | N/A | +| `is_uploaded` | *T::Boolean* | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `size_readable` | *::String* | :heavy_check_mark: | N/A | +| `public_url` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/organizationcreate.md b/docs/models/shared/organizationcreate.md new file mode 100644 index 0000000..559da34 --- /dev/null +++ b/docs/models/shared/organizationcreate.md @@ -0,0 +1,16 @@ +# OrganizationCreate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `slug` | *::String* | :heavy_check_mark: | N/A | +| `avatar_url` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Public support email. | +| `website` | *T.nilable(::String)* | :heavy_minus_sign: | Official website of the organization. | +| `socials` | T::Array<[Models::Shared::OrganizationSocialLink](../../models/shared/organizationsociallink.md)> | :heavy_minus_sign: | Link to social profiles. | +| `details` | [T.nilable(Models::Shared::OrganizationDetails)](../../models/shared/organizationdetails.md) | :heavy_minus_sign: | Additional, private, business details Polar needs about active organizations for compliance (KYC). | +| `feature_settings` | [T.nilable(Models::Shared::OrganizationFeatureSettings)](../../models/shared/organizationfeaturesettings.md) | :heavy_minus_sign: | N/A | +| `subscription_settings` | [T.nilable(Models::Shared::OrganizationSubscriptionSettings)](../../models/shared/organizationsubscriptionsettings.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/organizationdetails.md b/docs/models/shared/organizationdetails.md new file mode 100644 index 0000000..a853551 --- /dev/null +++ b/docs/models/shared/organizationdetails.md @@ -0,0 +1,15 @@ +# OrganizationDetails + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `about` | *::String* | :heavy_check_mark: | Brief information about you and your business. | +| `product_description` | *::String* | :heavy_check_mark: | Description of digital products being sold. | +| `intended_use` | *::String* | :heavy_check_mark: | How the organization will integrate and use Polar. | +| `customer_acquisition` | T::Array<*::String*> | :heavy_check_mark: | Main customer acquisition channels. | +| `future_annual_revenue` | *::Integer* | :heavy_check_mark: | Estimated revenue in the next 12 months | +| `switching` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Switching from another platform? | +| `switching_from` | [T.nilable(Models::Shared::SwitchingFrom)](../../models/shared/switchingfrom.md) | :heavy_minus_sign: | Which platform the organization is migrating from. | +| `previous_annual_revenue` | *T.nilable(::Integer)* | :heavy_minus_sign: | Revenue from last year if applicable. | \ No newline at end of file diff --git a/docs/models/shared/organizationfeaturesettings.md b/docs/models/shared/organizationfeaturesettings.md new file mode 100644 index 0000000..703853f --- /dev/null +++ b/docs/models/shared/organizationfeaturesettings.md @@ -0,0 +1,9 @@ +# OrganizationFeatureSettings + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `issue_funding_enabled` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | If this organization has issue funding enabled | +| `usage_based_billing_enabled` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | If this organization has usage-based billing enabled | \ No newline at end of file diff --git a/docs/models/shared/organizationsociallink.md b/docs/models/shared/organizationsociallink.md new file mode 100644 index 0000000..1165cff --- /dev/null +++ b/docs/models/shared/organizationsociallink.md @@ -0,0 +1,9 @@ +# OrganizationSocialLink + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `platform` | [Models::Shared::OrganizationSocialPlatforms](../../models/shared/organizationsocialplatforms.md) | :heavy_check_mark: | N/A | +| `url` | *::String* | :heavy_check_mark: | The URL to the organization profile | \ No newline at end of file diff --git a/docs/models/shared/organizationsocialplatforms.md b/docs/models/shared/organizationsocialplatforms.md new file mode 100644 index 0000000..3156a21 --- /dev/null +++ b/docs/models/shared/organizationsocialplatforms.md @@ -0,0 +1,15 @@ +# OrganizationSocialPlatforms + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `X` | x | +| `GITHUB` | github | +| `FACEBOOK` | facebook | +| `INSTAGRAM` | instagram | +| `YOUTUBE` | youtube | +| `TIKTOK` | tiktok | +| `LINKEDIN` | linkedin | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/shared/organizationsortproperty.md b/docs/models/shared/organizationsortproperty.md new file mode 100644 index 0000000..44a0c13 --- /dev/null +++ b/docs/models/shared/organizationsortproperty.md @@ -0,0 +1,13 @@ +# OrganizationSortProperty + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `SLUG` | slug | +| `MINUS_SLUG` | -slug | +| `NAME` | name | +| `MINUS_NAME` | -name | \ No newline at end of file diff --git a/docs/models/shared/organizationsubscriptionsettings.md b/docs/models/shared/organizationsubscriptionsettings.md new file mode 100644 index 0000000..72e1155 --- /dev/null +++ b/docs/models/shared/organizationsubscriptionsettings.md @@ -0,0 +1,10 @@ +# OrganizationSubscriptionSettings + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `allow_multiple_subscriptions` | *T::Boolean* | :heavy_check_mark: | N/A | +| `allow_customer_updates` | *T::Boolean* | :heavy_check_mark: | N/A | +| `proration_behavior` | [Models::Shared::SubscriptionProrationBehavior](../../models/shared/subscriptionprorationbehavior.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/organizationupdate.md b/docs/models/shared/organizationupdate.md new file mode 100644 index 0000000..2b0e2a5 --- /dev/null +++ b/docs/models/shared/organizationupdate.md @@ -0,0 +1,15 @@ +# OrganizationUpdate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `avatar_url` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Public support email. | +| `website` | *T.nilable(::String)* | :heavy_minus_sign: | Official website of the organization. | +| `socials` | T::Array<[Models::Shared::OrganizationSocialLink](../../models/shared/organizationsociallink.md)> | :heavy_minus_sign: | Links to social profiles. | +| `details` | [T.nilable(Models::Shared::OrganizationDetails)](../../models/shared/organizationdetails.md) | :heavy_minus_sign: | Additional, private, business details Polar needs about active organizations for compliance (KYC). | +| `feature_settings` | [T.nilable(Models::Shared::OrganizationFeatureSettings)](../../models/shared/organizationfeaturesettings.md) | :heavy_minus_sign: | N/A | +| `subscription_settings` | [T.nilable(Models::Shared::OrganizationSubscriptionSettings)](../../models/shared/organizationsubscriptionsettings.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/pagination.md b/docs/models/shared/pagination.md new file mode 100644 index 0000000..1e1a24c --- /dev/null +++ b/docs/models/shared/pagination.md @@ -0,0 +1,9 @@ +# Pagination + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `total_count` | *::Integer* | :heavy_check_mark: | N/A | +| `max_page` | *::Integer* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentmethodcard.md b/docs/models/shared/paymentmethodcard.md new file mode 100644 index 0000000..42e9e3a --- /dev/null +++ b/docs/models/shared/paymentmethodcard.md @@ -0,0 +1,12 @@ +# PaymentMethodCard + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `default` | *T::Boolean* | :heavy_check_mark: | N/A | +| `card` | [Models::Shared::PaymentMethodCardData](../../models/shared/paymentmethodcarddata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentmethodcarddata.md b/docs/models/shared/paymentmethodcarddata.md new file mode 100644 index 0000000..a77f643 --- /dev/null +++ b/docs/models/shared/paymentmethodcarddata.md @@ -0,0 +1,12 @@ +# PaymentMethodCardData + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `brand` | *::String* | :heavy_check_mark: | N/A | +| `last4` | *::String* | :heavy_check_mark: | N/A | +| `exp_month` | *::Integer* | :heavy_check_mark: | N/A | +| `exp_year` | *::Integer* | :heavy_check_mark: | N/A | +| `wallet` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentmethodgeneric.md b/docs/models/shared/paymentmethodgeneric.md new file mode 100644 index 0000000..5404e5b --- /dev/null +++ b/docs/models/shared/paymentmethodgeneric.md @@ -0,0 +1,11 @@ +# PaymentMethodGeneric + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `default` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/paymentprocessor.md b/docs/models/shared/paymentprocessor.md new file mode 100644 index 0000000..99f9d60 --- /dev/null +++ b/docs/models/shared/paymentprocessor.md @@ -0,0 +1,8 @@ +# PaymentProcessor + + +## Values + +| Name | Value | +| -------- | -------- | +| `STRIPE` | stripe | \ No newline at end of file diff --git a/docs/models/shared/permission.md b/docs/models/shared/permission.md new file mode 100644 index 0000000..120c51a --- /dev/null +++ b/docs/models/shared/permission.md @@ -0,0 +1,14 @@ +# Permission + +The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role). + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PULL` | pull | +| `TRIAGE` | triage | +| `PUSH` | push | +| `MAINTAIN` | maintain | +| `ADMIN` | admin | \ No newline at end of file diff --git a/docs/models/shared/previousproperties.md b/docs/models/shared/previousproperties.md new file mode 100644 index 0000000..c529782 --- /dev/null +++ b/docs/models/shared/previousproperties.md @@ -0,0 +1,2 @@ +# PreviousProperties + diff --git a/docs/models/shared/prices.md b/docs/models/shared/prices.md new file mode 100644 index 0000000..5f708a4 --- /dev/null +++ b/docs/models/shared/prices.md @@ -0,0 +1,2 @@ +# Prices + diff --git a/docs/models/shared/product.md b/docs/models/shared/product.md new file mode 100644 index 0000000..0d50e66 --- /dev/null +++ b/docs/models/shared/product.md @@ -0,0 +1,23 @@ +# Product + +A product. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the product. | +| `name` | *::String* | :heavy_check_mark: | The name of the product. | +| `description` | *::String* | :heavy_check_mark: | The description of the product. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the product. If `None`, the product is a one-time purchase. | +| `is_recurring` | *T::Boolean* | :heavy_check_mark: | Whether the product is a subscription. | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the product. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/productmetadata.md)] | :heavy_check_mark: | N/A | +| `prices` | T::Array<[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/prices.md)> | :heavy_check_mark: | List of prices for this product. | +| `benefits` | T::Array<[T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)](../../models/shared/benefit.md)> | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | T::Array<[Models::Shared::ProductMediaFileRead](../../models/shared/productmediafileread.md)> | :heavy_check_mark: | List of medias associated to the product. | +| `attached_custom_fields` | T::Array<[Models::Shared::AttachedCustomField](../../models/shared/attachedcustomfield.md)> | :heavy_check_mark: | List of custom fields attached to the product. | \ No newline at end of file diff --git a/docs/models/shared/productbenefitsupdate.md b/docs/models/shared/productbenefitsupdate.md new file mode 100644 index 0000000..1420537 --- /dev/null +++ b/docs/models/shared/productbenefitsupdate.md @@ -0,0 +1,10 @@ +# ProductBenefitsUpdate + +Schema to update the benefits granted by a product. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `benefits` | T::Array<*::String*> | :heavy_check_mark: | List of benefit IDs. Each one must be on the same organization as the product. | \ No newline at end of file diff --git a/docs/models/shared/productbillingtype.md b/docs/models/shared/productbillingtype.md new file mode 100644 index 0000000..a5eba21 --- /dev/null +++ b/docs/models/shared/productbillingtype.md @@ -0,0 +1,9 @@ +# ProductBillingType + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `ONE_TIME` | one_time | +| `RECURRING` | recurring | \ No newline at end of file diff --git a/docs/models/shared/productcreate.md b/docs/models/shared/productcreate.md new file mode 100644 index 0000000..a814eff --- /dev/null +++ b/docs/models/shared/productcreate.md @@ -0,0 +1,17 @@ +# ProductCreate + +Schema to create a product. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/productcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | | +| `name` | *::String* | :heavy_check_mark: | The name of the product. | | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the product. | | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | The recurring interval of the product. If `None`, the product is a one-time purchase. | | +| `prices` | T::Array<[T.any(Models::Shared::ProductPriceFixedCreate, Models::Shared::ProductPriceCustomCreate, Models::Shared::ProductPriceFreeCreate, Models::Shared::ProductPriceMeteredUnitCreate)](../../models/shared/productcreateprices.md)> | :heavy_check_mark: | List of available prices for this product. It should contain at most one static price (fixed, custom or free), and any number of metered prices. Metered prices are not supported on one-time purchase products. | | +| `medias` | T::Array<*::String*> | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | | +| `attached_custom_fields` | T::Array<[Models::Shared::AttachedCustomFieldCreate](../../models/shared/attachedcustomfieldcreate.md)> | :heavy_minus_sign: | List of custom fields to attach. | | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | The ID of the organization owning the product. **Required unless you use an organization token.** | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | \ No newline at end of file diff --git a/docs/models/shared/productcreatemetadata.md b/docs/models/shared/productcreatemetadata.md new file mode 100644 index 0000000..fa7e140 --- /dev/null +++ b/docs/models/shared/productcreatemetadata.md @@ -0,0 +1,2 @@ +# ProductCreateMetadata + diff --git a/docs/models/shared/productcreateprices.md b/docs/models/shared/productcreateprices.md new file mode 100644 index 0000000..2e797de --- /dev/null +++ b/docs/models/shared/productcreateprices.md @@ -0,0 +1,2 @@ +# ProductCreatePrices + diff --git a/docs/models/shared/productmediafilecreate.md b/docs/models/shared/productmediafilecreate.md new file mode 100644 index 0000000..658f968 --- /dev/null +++ b/docs/models/shared/productmediafilecreate.md @@ -0,0 +1,17 @@ +# ProductMediaFileCreate + +Schema to create a file to be used as a product media file. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `name` | *::String* | :heavy_check_mark: | N/A | | +| `mime_type` | *::String* | :heavy_check_mark: | MIME type of the file. Only images are supported for this type of file. | | +| `size` | *::Integer* | :heavy_check_mark: | Size of the file. A maximum of 10 MB is allowed for this type of file. | | +| `checksum_sha256_base64` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | +| `upload` | [Models::Shared::S3FileCreateMultipart](../../models/shared/s3filecreatemultipart.md) | :heavy_check_mark: | N/A | | +| `service` | *::String* | :heavy_check_mark: | N/A | | +| `version` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/productmediafileread.md b/docs/models/shared/productmediafileread.md new file mode 100644 index 0000000..bbd849c --- /dev/null +++ b/docs/models/shared/productmediafileread.md @@ -0,0 +1,26 @@ +# ProductMediaFileRead + +File to be used as a product media file. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `name` | *::String* | :heavy_check_mark: | N/A | +| `path` | *::String* | :heavy_check_mark: | N/A | +| `mime_type` | *::String* | :heavy_check_mark: | N/A | +| `size` | *::Integer* | :heavy_check_mark: | N/A | +| `storage_version` | *::String* | :heavy_check_mark: | N/A | +| `checksum_etag` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_base64` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_hex` | *::String* | :heavy_check_mark: | N/A | +| `last_modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `version` | *::String* | :heavy_check_mark: | N/A | +| `service` | *::String* | :heavy_check_mark: | N/A | +| `is_uploaded` | *T::Boolean* | :heavy_check_mark: | N/A | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `size_readable` | *::String* | :heavy_check_mark: | N/A | +| `public_url` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/productmetadata.md b/docs/models/shared/productmetadata.md new file mode 100644 index 0000000..4e942c1 --- /dev/null +++ b/docs/models/shared/productmetadata.md @@ -0,0 +1,2 @@ +# ProductMetadata + diff --git a/docs/models/shared/productprice.md b/docs/models/shared/productprice.md new file mode 100644 index 0000000..5fb9ab1 --- /dev/null +++ b/docs/models/shared/productprice.md @@ -0,0 +1,2 @@ +# ProductPrice + diff --git a/docs/models/shared/productpricecustom.md b/docs/models/shared/productpricecustom.md new file mode 100644 index 0000000..2edc39b --- /dev/null +++ b/docs/models/shared/productpricecustom.md @@ -0,0 +1,21 @@ +# ProductPriceCustom + +A pay-what-you-want price for a product. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the price. | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the price is archived and no longer available. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the product owning the price. | +| `type` | [Models::Shared::ProductPriceType](../../models/shared/productpricetype.md) | :heavy_check_mark: | N/A | +| ~~`recurring_interval`~~ | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `price_currency` | *::String* | :heavy_check_mark: | The currency. | +| `minimum_amount` | *::Integer* | :heavy_check_mark: | The minimum amount the customer can pay. | +| `maximum_amount` | *::Integer* | :heavy_check_mark: | The maximum amount the customer can pay. | +| `preset_amount` | *::Integer* | :heavy_check_mark: | The initial amount shown to the customer. | \ No newline at end of file diff --git a/docs/models/shared/productpricecustomcreate.md b/docs/models/shared/productpricecustomcreate.md new file mode 100644 index 0000000..6bfeff2 --- /dev/null +++ b/docs/models/shared/productpricecustomcreate.md @@ -0,0 +1,14 @@ +# ProductPriceCustomCreate + +Schema to create a pay-what-you-want price. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `price_currency` | *T.nilable(::String)* | :heavy_minus_sign: | The currency. Currently, only `usd` is supported. | +| `minimum_amount` | *T.nilable(::Integer)* | :heavy_minus_sign: | The minimum amount the customer can pay. | +| `maximum_amount` | *T.nilable(::Integer)* | :heavy_minus_sign: | The maximum amount the customer can pay. | +| `preset_amount` | *T.nilable(::Integer)* | :heavy_minus_sign: | The initial amount shown to the customer. | \ No newline at end of file diff --git a/docs/models/shared/productpricefixed.md b/docs/models/shared/productpricefixed.md new file mode 100644 index 0000000..b95eb14 --- /dev/null +++ b/docs/models/shared/productpricefixed.md @@ -0,0 +1,19 @@ +# ProductPriceFixed + +A fixed price for a product. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the price. | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the price is archived and no longer available. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the product owning the price. | +| `type` | [Models::Shared::ProductPriceType](../../models/shared/productpricetype.md) | :heavy_check_mark: | N/A | +| ~~`recurring_interval`~~ | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `price_currency` | *::String* | :heavy_check_mark: | The currency. | +| `price_amount` | *::Integer* | :heavy_check_mark: | The price in cents. | \ No newline at end of file diff --git a/docs/models/shared/productpricefixedcreate.md b/docs/models/shared/productpricefixedcreate.md new file mode 100644 index 0000000..e6639b8 --- /dev/null +++ b/docs/models/shared/productpricefixedcreate.md @@ -0,0 +1,12 @@ +# ProductPriceFixedCreate + +Schema to create a fixed price. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `price_amount` | *::Integer* | :heavy_check_mark: | The price in cents. | +| `price_currency` | *T.nilable(::String)* | :heavy_minus_sign: | The currency. Currently, only `usd` is supported. | \ No newline at end of file diff --git a/docs/models/shared/productpricefree.md b/docs/models/shared/productpricefree.md new file mode 100644 index 0000000..ad367b7 --- /dev/null +++ b/docs/models/shared/productpricefree.md @@ -0,0 +1,17 @@ +# ProductPriceFree + +A free price for a product. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the price. | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the price is archived and no longer available. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the product owning the price. | +| `type` | [Models::Shared::ProductPriceType](../../models/shared/productpricetype.md) | :heavy_check_mark: | N/A | +| ~~`recurring_interval`~~ | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/shared/productpricefreecreate.md b/docs/models/shared/productpricefreecreate.md new file mode 100644 index 0000000..1a74e1f --- /dev/null +++ b/docs/models/shared/productpricefreecreate.md @@ -0,0 +1,10 @@ +# ProductPriceFreeCreate + +Schema to create a free price. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/productpricemeter.md b/docs/models/shared/productpricemeter.md new file mode 100644 index 0000000..040842c --- /dev/null +++ b/docs/models/shared/productpricemeter.md @@ -0,0 +1,11 @@ +# ProductPriceMeter + +A meter associated to a metered price. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `name` | *::String* | :heavy_check_mark: | The name of the meter. | \ No newline at end of file diff --git a/docs/models/shared/productpricemeteredunit.md b/docs/models/shared/productpricemeteredunit.md new file mode 100644 index 0000000..c23f13d --- /dev/null +++ b/docs/models/shared/productpricemeteredunit.md @@ -0,0 +1,22 @@ +# ProductPriceMeteredUnit + +A metered, usage-based, price for a product, with a fixed unit price. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the price. | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `is_archived` | *T::Boolean* | :heavy_check_mark: | Whether the price is archived and no longer available. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the product owning the price. | +| `type` | [Models::Shared::ProductPriceType](../../models/shared/productpricetype.md) | :heavy_check_mark: | N/A | +| ~~`recurring_interval`~~ | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `price_currency` | *::String* | :heavy_check_mark: | The currency. | +| `unit_amount` | *::String* | :heavy_check_mark: | The price per unit in cents. | +| `cap_amount` | *::Integer* | :heavy_check_mark: | The maximum amount in cents that can be charged, regardless of the number of units consumed. | +| `meter_id` | *::String* | :heavy_check_mark: | The ID of the meter associated to the price. | +| `meter` | [Models::Shared::ProductPriceMeter](../../models/shared/productpricemeter.md) | :heavy_check_mark: | A meter associated to a metered price. | \ No newline at end of file diff --git a/docs/models/shared/productpricemeteredunitcreate.md b/docs/models/shared/productpricemeteredunitcreate.md new file mode 100644 index 0000000..9506a58 --- /dev/null +++ b/docs/models/shared/productpricemeteredunitcreate.md @@ -0,0 +1,14 @@ +# ProductPriceMeteredUnitCreate + +Schema to create a metered price with a fixed unit price. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `amount_type` | *::String* | :heavy_check_mark: | N/A | +| `meter_id` | *::String* | :heavy_check_mark: | The ID of the meter associated to the price. | +| `price_currency` | *T.nilable(::String)* | :heavy_minus_sign: | The currency. Currently, only `usd` is supported. | +| `unit_amount` | [T.any(::Float, ::String)](../../models/shared/unitamount.md) | :heavy_check_mark: | The price per unit in cents. Supports up to 12 decimal places. | +| `cap_amount` | *T.nilable(::Integer)* | :heavy_minus_sign: | Optional maximum amount in cents that can be charged, regardless of the number of units consumed. | \ No newline at end of file diff --git a/docs/models/shared/productpricetype.md b/docs/models/shared/productpricetype.md new file mode 100644 index 0000000..9217d62 --- /dev/null +++ b/docs/models/shared/productpricetype.md @@ -0,0 +1,9 @@ +# ProductPriceType + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `ONE_TIME` | one_time | +| `RECURRING` | recurring | \ No newline at end of file diff --git a/docs/models/shared/productsortproperty.md b/docs/models/shared/productsortproperty.md new file mode 100644 index 0000000..eb1dc10 --- /dev/null +++ b/docs/models/shared/productsortproperty.md @@ -0,0 +1,15 @@ +# ProductSortProperty + + +## Values + +| Name | Value | +| ------------------------- | ------------------------- | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `NAME` | name | +| `MINUS_NAME` | -name | +| `PRICE_AMOUNT_TYPE` | price_amount_type | +| `MINUS_PRICE_AMOUNT_TYPE` | -price_amount_type | +| `PRICE_AMOUNT` | price_amount | +| `MINUS_PRICE_AMOUNT` | -price_amount | \ No newline at end of file diff --git a/docs/models/shared/productupdate.md b/docs/models/shared/productupdate.md new file mode 100644 index 0000000..3935d04 --- /dev/null +++ b/docs/models/shared/productupdate.md @@ -0,0 +1,17 @@ +# ProductUpdate + +Schema to update a product. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/productupdatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the product. | +| `recurring_interval` | [T.nilable(Models::Shared::SubscriptionRecurringInterval)](../../models/shared/subscriptionrecurringinterval.md) | :heavy_minus_sign: | The recurring interval of the product. If `None`, the product is a one-time purchase. **Can only be set on legacy recurring products. Once set, it can't be changed.** | +| `is_archived` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally. | +| `prices` | T::Array<[T.any(Models::Shared::ExistingProductPrice, Models::Shared::ProductPriceFixedCreate, Models::Shared::ProductPriceCustomCreate, Models::Shared::ProductPriceFreeCreate, Models::Shared::ProductPriceMeteredUnitCreate)](../../models/shared/productupdateprices.md)> | :heavy_minus_sign: | List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object. | +| `medias` | T::Array<*::String*> | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | +| `attached_custom_fields` | T::Array<[Models::Shared::AttachedCustomFieldCreate](../../models/shared/attachedcustomfieldcreate.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/productupdatemetadata.md b/docs/models/shared/productupdatemetadata.md new file mode 100644 index 0000000..c3efaaa --- /dev/null +++ b/docs/models/shared/productupdatemetadata.md @@ -0,0 +1,2 @@ +# ProductUpdateMetadata + diff --git a/docs/models/shared/productupdateprices.md b/docs/models/shared/productupdateprices.md new file mode 100644 index 0000000..9171375 --- /dev/null +++ b/docs/models/shared/productupdateprices.md @@ -0,0 +1,2 @@ +# ProductUpdatePrices + diff --git a/docs/models/shared/properties.md b/docs/models/shared/properties.md new file mode 100644 index 0000000..21d3c42 --- /dev/null +++ b/docs/models/shared/properties.md @@ -0,0 +1,2 @@ +# Properties + diff --git a/docs/models/shared/propertyaggregation.md b/docs/models/shared/propertyaggregation.md new file mode 100644 index 0000000..1bc88ce --- /dev/null +++ b/docs/models/shared/propertyaggregation.md @@ -0,0 +1,9 @@ +# PropertyAggregation + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `func` | [Models::Shared::Func](../../models/shared/func.md) | :heavy_check_mark: | N/A | +| `property` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/refreshtokenrequest.md b/docs/models/shared/refreshtokenrequest.md new file mode 100644 index 0000000..2c2fe1b --- /dev/null +++ b/docs/models/shared/refreshtokenrequest.md @@ -0,0 +1,11 @@ +# RefreshTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `grant_type` | *::String* | :heavy_check_mark: | N/A | +| `client_id` | *::String* | :heavy_check_mark: | N/A | +| `client_secret` | *::String* | :heavy_check_mark: | N/A | +| `refresh_token` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/refund.md b/docs/models/shared/refund.md new file mode 100644 index 0000000..9c34b24 --- /dev/null +++ b/docs/models/shared/refund.md @@ -0,0 +1,21 @@ +# Refund + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/refundmetadata.md)] | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::RefundStatus](../../models/shared/refundstatus.md) | :heavy_check_mark: | N/A | +| `reason` | [Models::Shared::RefundReason](../../models/shared/refundreason.md) | :heavy_check_mark: | N/A | +| `amount` | *::Integer* | :heavy_check_mark: | N/A | +| `tax_amount` | *::Integer* | :heavy_check_mark: | N/A | +| `currency` | *::String* | :heavy_check_mark: | N/A | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `order_id` | *::String* | :heavy_check_mark: | N/A | +| `subscription_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `revoke_benefits` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/refundcreate.md b/docs/models/shared/refundcreate.md new file mode 100644 index 0000000..60a9b6e --- /dev/null +++ b/docs/models/shared/refundcreate.md @@ -0,0 +1,13 @@ +# RefundCreate + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/refundcreatemetadata.md)] | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be either:

* A string with a maximum length of **500 characters**
* An integer
* A floating-point number
* A boolean

You can store up to **50 key-value pairs**. | +| `order_id` | *::String* | :heavy_check_mark: | N/A | +| `reason` | [Models::Shared::RefundReason](../../models/shared/refundreason.md) | :heavy_check_mark: | N/A | +| `amount` | *::Integer* | :heavy_check_mark: | Amount to refund in cents. Minimum is 1. | +| `comment` | *T.nilable(::String)* | :heavy_minus_sign: | An internal comment about the refund. | +| `revoke_benefits` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Should this refund trigger the associated customer benefits to be revoked?

**Note:**
Only allowed in case the `order` is a one-time purchase.
Subscriptions automatically revoke customer benefits once the
subscription itself is revoked, i.e fully canceled. | \ No newline at end of file diff --git a/docs/models/shared/refundcreatemetadata.md b/docs/models/shared/refundcreatemetadata.md new file mode 100644 index 0000000..652e28f --- /dev/null +++ b/docs/models/shared/refundcreatemetadata.md @@ -0,0 +1,2 @@ +# RefundCreateMetadata + diff --git a/docs/models/shared/refundmetadata.md b/docs/models/shared/refundmetadata.md new file mode 100644 index 0000000..8ded558 --- /dev/null +++ b/docs/models/shared/refundmetadata.md @@ -0,0 +1,2 @@ +# RefundMetadata + diff --git a/docs/models/shared/refundreason.md b/docs/models/shared/refundreason.md new file mode 100644 index 0000000..fb1cb66 --- /dev/null +++ b/docs/models/shared/refundreason.md @@ -0,0 +1,13 @@ +# RefundReason + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `DUPLICATE` | duplicate | +| `FRAUDULENT` | fraudulent | +| `CUSTOMER_REQUEST` | customer_request | +| `SERVICE_DISRUPTION` | service_disruption | +| `SATISFACTION_GUARANTEE` | satisfaction_guarantee | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/shared/refundsortproperty.md b/docs/models/shared/refundsortproperty.md new file mode 100644 index 0000000..739bd05 --- /dev/null +++ b/docs/models/shared/refundsortproperty.md @@ -0,0 +1,11 @@ +# RefundSortProperty + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `CREATED_AT` | created_at | +| `MINUS_CREATED_AT` | -created_at | +| `AMOUNT` | amount | +| `MINUS_AMOUNT` | -amount | \ No newline at end of file diff --git a/docs/models/shared/refundstatus.md b/docs/models/shared/refundstatus.md new file mode 100644 index 0000000..60af3f4 --- /dev/null +++ b/docs/models/shared/refundstatus.md @@ -0,0 +1,11 @@ +# RefundStatus + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `PENDING` | pending | +| `SUCCEEDED` | succeeded | +| `FAILED` | failed | +| `CANCELED` | canceled | \ No newline at end of file diff --git a/docs/models/shared/revoketokenrequest.md b/docs/models/shared/revoketokenrequest.md new file mode 100644 index 0000000..b341345 --- /dev/null +++ b/docs/models/shared/revoketokenrequest.md @@ -0,0 +1,11 @@ +# RevokeTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `token` | *::String* | :heavy_check_mark: | N/A | +| `token_type_hint` | [T.nilable(Models::Shared::TokenTypeHint)](../../models/shared/tokentypehint.md) | :heavy_minus_sign: | N/A | +| `client_id` | *::String* | :heavy_check_mark: | N/A | +| `client_secret` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/revoketokenresponse.md b/docs/models/shared/revoketokenresponse.md new file mode 100644 index 0000000..e36e3ad --- /dev/null +++ b/docs/models/shared/revoketokenresponse.md @@ -0,0 +1,7 @@ +# RevokeTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/shared/s3downloadurl.md b/docs/models/shared/s3downloadurl.md new file mode 100644 index 0000000..23ec76a --- /dev/null +++ b/docs/models/shared/s3downloadurl.md @@ -0,0 +1,10 @@ +# S3DownloadURL + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `url` | *::String* | :heavy_check_mark: | N/A | +| `headers` | T::Hash[Symbol, *::String*] | :heavy_minus_sign: | N/A | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/s3filecreatemultipart.md b/docs/models/shared/s3filecreatemultipart.md new file mode 100644 index 0000000..ba44209 --- /dev/null +++ b/docs/models/shared/s3filecreatemultipart.md @@ -0,0 +1,8 @@ +# S3FileCreateMultipart + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `parts` | T::Array<[Models::Shared::S3FileCreatePart](../../models/shared/s3filecreatepart.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/s3filecreatepart.md b/docs/models/shared/s3filecreatepart.md new file mode 100644 index 0000000..cc0cc3c --- /dev/null +++ b/docs/models/shared/s3filecreatepart.md @@ -0,0 +1,11 @@ +# S3FileCreatePart + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `number` | *::Integer* | :heavy_check_mark: | N/A | +| `chunk_start` | *::Integer* | :heavy_check_mark: | N/A | +| `chunk_end` | *::Integer* | :heavy_check_mark: | N/A | +| `checksum_sha256_base64` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/s3fileuploadcompletedpart.md b/docs/models/shared/s3fileuploadcompletedpart.md new file mode 100644 index 0000000..7194bf6 --- /dev/null +++ b/docs/models/shared/s3fileuploadcompletedpart.md @@ -0,0 +1,10 @@ +# S3FileUploadCompletedPart + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `number` | *::Integer* | :heavy_check_mark: | N/A | +| `checksum_etag` | *::String* | :heavy_check_mark: | N/A | +| `checksum_sha256_base64` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/s3fileuploadmultipart.md b/docs/models/shared/s3fileuploadmultipart.md new file mode 100644 index 0000000..4ddacc7 --- /dev/null +++ b/docs/models/shared/s3fileuploadmultipart.md @@ -0,0 +1,10 @@ +# S3FileUploadMultipart + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `path` | *::String* | :heavy_check_mark: | N/A | +| `parts` | T::Array<[Models::Shared::S3FileUploadPart](../../models/shared/s3fileuploadpart.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/s3fileuploadpart.md b/docs/models/shared/s3fileuploadpart.md new file mode 100644 index 0000000..6567324 --- /dev/null +++ b/docs/models/shared/s3fileuploadpart.md @@ -0,0 +1,14 @@ +# S3FileUploadPart + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `number` | *::Integer* | :heavy_check_mark: | N/A | +| `chunk_start` | *::Integer* | :heavy_check_mark: | N/A | +| `chunk_end` | *::Integer* | :heavy_check_mark: | N/A | +| `checksum_sha256_base64` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `url` | *::String* | :heavy_check_mark: | N/A | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `headers` | T::Hash[Symbol, *::String*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/scope.md b/docs/models/shared/scope.md new file mode 100644 index 0000000..8d83d09 --- /dev/null +++ b/docs/models/shared/scope.md @@ -0,0 +1,56 @@ +# Scope + + +## Values + +| Name | Value | +| ------------------------------- | ------------------------------- | +| `OPENID` | openid | +| `PROFILE` | profile | +| `EMAIL` | email | +| `USER_READ` | user:read | +| `ADMIN` | admin | +| `WEB_DEFAULT` | web_default | +| `ORGANIZATIONS_READ` | organizations:read | +| `ORGANIZATIONS_WRITE` | organizations:write | +| `CUSTOM_FIELDS_READ` | custom_fields:read | +| `CUSTOM_FIELDS_WRITE` | custom_fields:write | +| `DISCOUNTS_READ` | discounts:read | +| `DISCOUNTS_WRITE` | discounts:write | +| `CHECKOUT_LINKS_READ` | checkout_links:read | +| `CHECKOUT_LINKS_WRITE` | checkout_links:write | +| `CHECKOUTS_READ` | checkouts:read | +| `CHECKOUTS_WRITE` | checkouts:write | +| `PRODUCTS_READ` | products:read | +| `PRODUCTS_WRITE` | products:write | +| `BENEFITS_READ` | benefits:read | +| `BENEFITS_WRITE` | benefits:write | +| `EVENTS_READ` | events:read | +| `EVENTS_WRITE` | events:write | +| `METERS_READ` | meters:read | +| `METERS_WRITE` | meters:write | +| `FILES_READ` | files:read | +| `FILES_WRITE` | files:write | +| `SUBSCRIPTIONS_READ` | subscriptions:read | +| `SUBSCRIPTIONS_WRITE` | subscriptions:write | +| `CUSTOMERS_READ` | customers:read | +| `CUSTOMERS_WRITE` | customers:write | +| `CUSTOMER_METERS_READ` | customer_meters:read | +| `CUSTOMER_SESSIONS_WRITE` | customer_sessions:write | +| `ORDERS_READ` | orders:read | +| `REFUNDS_READ` | refunds:read | +| `REFUNDS_WRITE` | refunds:write | +| `METRICS_READ` | metrics:read | +| `WEBHOOKS_READ` | webhooks:read | +| `WEBHOOKS_WRITE` | webhooks:write | +| `EXTERNAL_ORGANIZATIONS_READ` | external_organizations:read | +| `LICENSE_KEYS_READ` | license_keys:read | +| `LICENSE_KEYS_WRITE` | license_keys:write | +| `REPOSITORIES_READ` | repositories:read | +| `REPOSITORIES_WRITE` | repositories:write | +| `ISSUES_READ` | issues:read | +| `ISSUES_WRITE` | issues:write | +| `CUSTOMER_PORTAL_READ` | customer_portal:read | +| `CUSTOMER_PORTAL_WRITE` | customer_portal:write | +| `NOTIFICATION_RECIPIENTS_READ` | notification_recipients:read | +| `NOTIFICATION_RECIPIENTS_WRITE` | notification_recipients:write | \ No newline at end of file diff --git a/docs/models/shared/security.md b/docs/models/shared/security.md new file mode 100644 index 0000000..771ac42 --- /dev/null +++ b/docs/models/shared/security.md @@ -0,0 +1,8 @@ +# Security + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `access_token` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/subscription.md b/docs/models/shared/subscription.md new file mode 100644 index 0000000..7efc634 --- /dev/null +++ b/docs/models/shared/subscription.md @@ -0,0 +1,34 @@ +# Subscription + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `amount` | *::Integer* | :heavy_check_mark: | The amount of the subscription. | +| `currency` | *::String* | :heavy_check_mark: | The currency of the subscription. | +| `recurring_interval` | [Models::Shared::SubscriptionRecurringInterval](../../models/shared/subscriptionrecurringinterval.md) | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::SubscriptionStatus](../../models/shared/subscriptionstatus.md) | :heavy_check_mark: | N/A | +| `current_period_start` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The start timestamp of the current billing period. | +| `current_period_end` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The end timestamp of the current billing period. | +| `cancel_at_period_end` | *T::Boolean* | :heavy_check_mark: | Whether the subscription will be canceled at the end of the current period. | +| `canceled_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. | +| `started_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription started. | +| `ends_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription will end. | +| `ended_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | The timestamp when the subscription ended. | +| `customer_id` | *::String* | :heavy_check_mark: | The ID of the subscribed customer. | +| `product_id` | *::String* | :heavy_check_mark: | The ID of the subscribed product. | +| `discount_id` | *::String* | :heavy_check_mark: | The ID of the applied discount, if any. | +| `checkout_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_cancellation_reason` | [Models::Shared::CustomerCancellationReason](../../models/shared/customercancellationreason.md) | :heavy_check_mark: | N/A | +| `customer_cancellation_comment` | *::String* | :heavy_check_mark: | N/A | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/metadata.md)] | :heavy_check_mark: | N/A | +| `custom_field_data` | T::Hash[Symbol, [T.any(::String, ::Integer, T::Boolean, ::DateTime)](../../models/shared/customfielddata.md)] | :heavy_minus_sign: | Key-value object storing custom field values. | +| `customer` | [Models::Shared::SubscriptionCustomer](../../models/shared/subscriptioncustomer.md) | :heavy_check_mark: | N/A | +| `product` | [Models::Shared::Product](../../models/shared/product.md) | :heavy_check_mark: | A product. | +| `discount` | [T.any(Models::Shared::DiscountFixedOnceForeverDurationBase, Models::Shared::DiscountFixedRepeatDurationBase, Models::Shared::DiscountPercentageOnceForeverDurationBase, Models::Shared::DiscountPercentageRepeatDurationBase)](../../models/shared/subscriptiondiscount.md) | :heavy_check_mark: | N/A | +| `prices` | T::Array<[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))](../../models/shared/subscriptionprices.md)> | :heavy_check_mark: | List of enabled prices for the subscription. | +| `meters` | T::Array<[Models::Shared::SubscriptionMeter](../../models/shared/subscriptionmeter.md)> | :heavy_check_mark: | List of meters associated with the subscription. | \ No newline at end of file diff --git a/docs/models/shared/subscriptioncancel.md b/docs/models/shared/subscriptioncancel.md new file mode 100644 index 0000000..123f9a3 --- /dev/null +++ b/docs/models/shared/subscriptioncancel.md @@ -0,0 +1,10 @@ +# SubscriptionCancel + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `customer_cancellation_reason` | [T.nilable(Models::Shared::CustomerCancellationReason)](../../models/shared/customercancellationreason.md) | :heavy_minus_sign: | Customer reason for cancellation.

Helpful to monitor reasons behind churn for future improvements.

Only set this in case your own service is requesting the reason from the
customer. Or you know based on direct conversations, i.e support, with
the customer.

* `too_expensive`: Too expensive for the customer.
* `missing_features`: Customer is missing certain features.
* `switched_service`: Customer switched to another service.
* `unused`: Customer is not using it enough.
* `customer_service`: Customer is not satisfied with the customer service.
* `low_quality`: Customer is unhappy with the quality.
* `too_complex`: Customer considers the service too complicated.
* `other`: Other reason(s). | +| `customer_cancellation_comment` | *T.nilable(::String)* | :heavy_minus_sign: | Customer feedback and why they decided to cancel.

**IMPORTANT:**
Do not use this to store internal notes! It's intended to be input
from the customer and is therefore also available in their Polar
purchases library.

Only set this in case your own service is requesting the reason from the
customer. Or you copy a message directly from a customer
conversation, i.e support. | +| `cancel_at_period_end` | *T::Boolean* | :heavy_check_mark: | Cancel an active subscription once the current period ends.

Or uncancel a subscription currently set to be revoked at period end. | \ No newline at end of file diff --git a/docs/models/shared/subscriptioncustomer.md b/docs/models/shared/subscriptioncustomer.md new file mode 100644 index 0000000..c13a279 --- /dev/null +++ b/docs/models/shared/subscriptioncustomer.md @@ -0,0 +1,20 @@ +# SubscriptionCustomer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the customer. | 992fae2a-2a17-4b7a-8d9e-e287cf90131b | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `metadata` | T::Hash[Symbol, [T.any(::String, ::Integer, ::Float, T::Boolean)](../../models/shared/subscriptioncustomermetadata.md)] | :heavy_check_mark: | N/A | | +| `external_id` | *::String* | :heavy_check_mark: | The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. | usr_1337 | +| `email` | *::String* | :heavy_check_mark: | The email address of the customer. This must be unique within the organization. | customer@example.com | +| `email_verified` | *T::Boolean* | :heavy_check_mark: | Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. | true | +| `name` | *::String* | :heavy_check_mark: | The name of the customer. | John Doe | +| `billing_address` | [Models::Shared::Address](../../models/shared/address.md) | :heavy_check_mark: | N/A | | +| `tax_id` | T::Array<[T.any(::String, Models::Shared::TaxIDFormat)](../../models/shared/taxid.md)> | :heavy_check_mark: | N/A | [
"911144442",
"us_ein"
] | +| `organization_id` | *::String* | :heavy_check_mark: | The ID of the organization owning the customer. | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `deleted_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp for when the customer was soft deleted. | | +| `avatar_url` | *::String* | :heavy_check_mark: | N/A | https://www.gravatar.com/avatar/xxx?d=blank | \ No newline at end of file diff --git a/docs/models/shared/subscriptioncustomermetadata.md b/docs/models/shared/subscriptioncustomermetadata.md new file mode 100644 index 0000000..d2d44c9 --- /dev/null +++ b/docs/models/shared/subscriptioncustomermetadata.md @@ -0,0 +1,2 @@ +# SubscriptionCustomerMetadata + diff --git a/docs/models/shared/subscriptiondiscount.md b/docs/models/shared/subscriptiondiscount.md new file mode 100644 index 0000000..6a0088d --- /dev/null +++ b/docs/models/shared/subscriptiondiscount.md @@ -0,0 +1,2 @@ +# SubscriptionDiscount + diff --git a/docs/models/shared/subscriptionmeter.md b/docs/models/shared/subscriptionmeter.md new file mode 100644 index 0000000..1505500 --- /dev/null +++ b/docs/models/shared/subscriptionmeter.md @@ -0,0 +1,17 @@ +# SubscriptionMeter + +Current consumption and spending for a subscription meter. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | | +| `consumed_units` | *::Float* | :heavy_check_mark: | The number of consumed units so far in this billing period. | 25 | +| `credited_units` | *::Integer* | :heavy_check_mark: | The number of credited units so far in this billing period. | 100 | +| `amount` | *::Integer* | :heavy_check_mark: | The amount due in cents so far in this billing period. | 0 | +| `meter_id` | *::String* | :heavy_check_mark: | The ID of the meter. | d498a884-e2cd-4d3e-8002-f536468a8b22 | +| `meter` | [Models::Shared::Meter](../../models/shared/meter.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/subscriptionprices.md b/docs/models/shared/subscriptionprices.md new file mode 100644 index 0000000..caf01f0 --- /dev/null +++ b/docs/models/shared/subscriptionprices.md @@ -0,0 +1,2 @@ +# SubscriptionPrices + diff --git a/docs/models/shared/subscriptionprorationbehavior.md b/docs/models/shared/subscriptionprorationbehavior.md new file mode 100644 index 0000000..ed16bb9 --- /dev/null +++ b/docs/models/shared/subscriptionprorationbehavior.md @@ -0,0 +1,9 @@ +# SubscriptionProrationBehavior + + +## Values + +| Name | Value | +| --------- | --------- | +| `INVOICE` | invoice | +| `PRORATE` | prorate | \ No newline at end of file diff --git a/docs/models/shared/subscriptionrecurringinterval.md b/docs/models/shared/subscriptionrecurringinterval.md new file mode 100644 index 0000000..3da7cf2 --- /dev/null +++ b/docs/models/shared/subscriptionrecurringinterval.md @@ -0,0 +1,9 @@ +# SubscriptionRecurringInterval + + +## Values + +| Name | Value | +| ------- | ------- | +| `MONTH` | month | +| `YEAR` | year | \ No newline at end of file diff --git a/docs/models/shared/subscriptionrevoke.md b/docs/models/shared/subscriptionrevoke.md new file mode 100644 index 0000000..294417d --- /dev/null +++ b/docs/models/shared/subscriptionrevoke.md @@ -0,0 +1,10 @@ +# SubscriptionRevoke + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `customer_cancellation_reason` | [T.nilable(Models::Shared::CustomerCancellationReason)](../../models/shared/customercancellationreason.md) | :heavy_minus_sign: | Customer reason for cancellation.

Helpful to monitor reasons behind churn for future improvements.

Only set this in case your own service is requesting the reason from the
customer. Or you know based on direct conversations, i.e support, with
the customer.

* `too_expensive`: Too expensive for the customer.
* `missing_features`: Customer is missing certain features.
* `switched_service`: Customer switched to another service.
* `unused`: Customer is not using it enough.
* `customer_service`: Customer is not satisfied with the customer service.
* `low_quality`: Customer is unhappy with the quality.
* `too_complex`: Customer considers the service too complicated.
* `other`: Other reason(s). | +| `customer_cancellation_comment` | *T.nilable(::String)* | :heavy_minus_sign: | Customer feedback and why they decided to cancel.

**IMPORTANT:**
Do not use this to store internal notes! It's intended to be input
from the customer and is therefore also available in their Polar
purchases library.

Only set this in case your own service is requesting the reason from the
customer. Or you copy a message directly from a customer
conversation, i.e support. | +| `revoke` | *T::Boolean* | :heavy_check_mark: | Cancel and revoke an active subscription immediately | \ No newline at end of file diff --git a/docs/models/shared/subscriptionsortproperty.md b/docs/models/shared/subscriptionsortproperty.md new file mode 100644 index 0000000..94cec9b --- /dev/null +++ b/docs/models/shared/subscriptionsortproperty.md @@ -0,0 +1,21 @@ +# SubscriptionSortProperty + + +## Values + +| Name | Value | +| -------------------------- | -------------------------- | +| `CUSTOMER` | customer | +| `MINUS_CUSTOMER` | -customer | +| `STATUS` | status | +| `MINUS_STATUS` | -status | +| `STARTED_AT` | started_at | +| `MINUS_STARTED_AT` | -started_at | +| `CURRENT_PERIOD_END` | current_period_end | +| `MINUS_CURRENT_PERIOD_END` | -current_period_end | +| `AMOUNT` | amount | +| `MINUS_AMOUNT` | -amount | +| `PRODUCT` | product | +| `MINUS_PRODUCT` | -product | +| `DISCOUNT` | discount | +| `MINUS_DISCOUNT` | -discount | \ No newline at end of file diff --git a/docs/models/shared/subscriptionstatus.md b/docs/models/shared/subscriptionstatus.md new file mode 100644 index 0000000..1665a3a --- /dev/null +++ b/docs/models/shared/subscriptionstatus.md @@ -0,0 +1,14 @@ +# SubscriptionStatus + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `INCOMPLETE` | incomplete | +| `INCOMPLETE_EXPIRED` | incomplete_expired | +| `TRIALING` | trialing | +| `ACTIVE` | active | +| `PAST_DUE` | past_due | +| `CANCELED` | canceled | +| `UNPAID` | unpaid | \ No newline at end of file diff --git a/docs/models/shared/subscriptionupdate.md b/docs/models/shared/subscriptionupdate.md new file mode 100644 index 0000000..294f9ad --- /dev/null +++ b/docs/models/shared/subscriptionupdate.md @@ -0,0 +1,2 @@ +# SubscriptionUpdate + diff --git a/docs/models/shared/subscriptionupdateproduct.md b/docs/models/shared/subscriptionupdateproduct.md new file mode 100644 index 0000000..bdf6887 --- /dev/null +++ b/docs/models/shared/subscriptionupdateproduct.md @@ -0,0 +1,9 @@ +# SubscriptionUpdateProduct + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `product_id` | *::String* | :heavy_check_mark: | Update subscription to another product. | +| `proration_behavior` | [T.nilable(Models::Shared::SubscriptionProrationBehavior)](../../models/shared/subscriptionprorationbehavior.md) | :heavy_minus_sign: | Determine how to handle the proration billing. If not provided, will use the default organization setting. | \ No newline at end of file diff --git a/docs/models/shared/subtype.md b/docs/models/shared/subtype.md new file mode 100644 index 0000000..96c94c6 --- /dev/null +++ b/docs/models/shared/subtype.md @@ -0,0 +1,9 @@ +# SubType + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `USER` | user | +| `ORGANIZATION` | organization | \ No newline at end of file diff --git a/docs/models/shared/switchingfrom.md b/docs/models/shared/switchingfrom.md new file mode 100644 index 0000000..ecc441c --- /dev/null +++ b/docs/models/shared/switchingfrom.md @@ -0,0 +1,12 @@ +# SwitchingFrom + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `PADDLE` | paddle | +| `LEMON_SQUEEZY` | lemon_squeezy | +| `GUMROAD` | gumroad | +| `STRIPE` | stripe | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/shared/taxid.md b/docs/models/shared/taxid.md new file mode 100644 index 0000000..e12b1e8 --- /dev/null +++ b/docs/models/shared/taxid.md @@ -0,0 +1,2 @@ +# TaxId + diff --git a/docs/models/shared/taxidformat.md b/docs/models/shared/taxidformat.md new file mode 100644 index 0000000..9c89179 --- /dev/null +++ b/docs/models/shared/taxidformat.md @@ -0,0 +1,85 @@ +# TaxIDFormat + +List of supported tax ID formats. + +Ref: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `AD_NRT` | ad_nrt | +| `AE_TRN` | ae_trn | +| `AR_CUIT` | ar_cuit | +| `AU_ABN` | au_abn | +| `AU_ARN` | au_arn | +| `BG_UIC` | bg_uic | +| `BH_VAT` | bh_vat | +| `BO_TIN` | bo_tin | +| `BR_CNPJ` | br_cnpj | +| `BR_CPF` | br_cpf | +| `CA_BN` | ca_bn | +| `CA_GST_HST` | ca_gst_hst | +| `CA_PST_BC` | ca_pst_bc | +| `CA_PST_MB` | ca_pst_mb | +| `CA_PST_SK` | ca_pst_sk | +| `CA_QST` | ca_qst | +| `CH_UID` | ch_uid | +| `CH_VAT` | ch_vat | +| `CL_TIN` | cl_tin | +| `CN_TIN` | cn_tin | +| `CO_NIT` | co_nit | +| `CR_TIN` | cr_tin | +| `DE_STN` | de_stn | +| `DO_RCN` | do_rcn | +| `EC_RUC` | ec_ruc | +| `EG_TIN` | eg_tin | +| `ES_CIF` | es_cif | +| `EU_OSS_VAT` | eu_oss_vat | +| `EU_VAT` | eu_vat | +| `GB_VAT` | gb_vat | +| `GE_VAT` | ge_vat | +| `HK_BR` | hk_br | +| `HR_OIB` | hr_oib | +| `HU_TIN` | hu_tin | +| `ID_NPWP` | id_npwp | +| `IL_VAT` | il_vat | +| `IN_GST` | in_gst | +| `IS_VAT` | is_vat | +| `JP_CN` | jp_cn | +| `JP_RN` | jp_rn | +| `JP_TRN` | jp_trn | +| `KE_PIN` | ke_pin | +| `KR_BRN` | kr_brn | +| `KZ_BIN` | kz_bin | +| `LI_UID` | li_uid | +| `MX_RFC` | mx_rfc | +| `MY_FRP` | my_frp | +| `MY_ITN` | my_itn | +| `MY_SST` | my_sst | +| `NG_TIN` | ng_tin | +| `NO_VAT` | no_vat | +| `NO_VOEC` | no_voec | +| `NZ_GST` | nz_gst | +| `OM_VAT` | om_vat | +| `PE_RUC` | pe_ruc | +| `PH_TIN` | ph_tin | +| `RO_TIN` | ro_tin | +| `RS_PIB` | rs_pib | +| `RU_INN` | ru_inn | +| `RU_KPP` | ru_kpp | +| `SA_VAT` | sa_vat | +| `SG_GST` | sg_gst | +| `SG_UEN` | sg_uen | +| `SI_TIN` | si_tin | +| `SV_NIT` | sv_nit | +| `TH_VAT` | th_vat | +| `TR_TIN` | tr_tin | +| `TW_VAT` | tw_vat | +| `UA_VAT` | ua_vat | +| `US_EIN` | us_ein | +| `UY_RUC` | uy_ruc | +| `VE_RIF` | ve_rif | +| `VN_TIN` | vn_tin | +| `ZA_VAT` | za_vat | \ No newline at end of file diff --git a/docs/models/shared/timeframe.md b/docs/models/shared/timeframe.md new file mode 100644 index 0000000..5d05b15 --- /dev/null +++ b/docs/models/shared/timeframe.md @@ -0,0 +1,10 @@ +# Timeframe + + +## Values + +| Name | Value | +| ------- | ------- | +| `YEAR` | year | +| `MONTH` | month | +| `DAY` | day | \ No newline at end of file diff --git a/docs/models/shared/timeinterval.md b/docs/models/shared/timeinterval.md new file mode 100644 index 0000000..7c66092 --- /dev/null +++ b/docs/models/shared/timeinterval.md @@ -0,0 +1,12 @@ +# TimeInterval + + +## Values + +| Name | Value | +| ------- | ------- | +| `YEAR` | year | +| `MONTH` | month | +| `WEEK` | week | +| `DAY` | day | +| `HOUR` | hour | \ No newline at end of file diff --git a/docs/models/shared/tokenendpointauthmethod.md b/docs/models/shared/tokenendpointauthmethod.md new file mode 100644 index 0000000..34a8034 --- /dev/null +++ b/docs/models/shared/tokenendpointauthmethod.md @@ -0,0 +1,10 @@ +# TokenEndpointAuthMethod + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `CLIENT_SECRET_BASIC` | client_secret_basic | +| `CLIENT_SECRET_POST` | client_secret_post | +| `NONE` | none | \ No newline at end of file diff --git a/docs/models/shared/tokenresponse.md b/docs/models/shared/tokenresponse.md new file mode 100644 index 0000000..c6f9c0e --- /dev/null +++ b/docs/models/shared/tokenresponse.md @@ -0,0 +1,13 @@ +# TokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `access_token` | *::String* | :heavy_check_mark: | N/A | +| `token_type` | *::String* | :heavy_check_mark: | N/A | +| `expires_in` | *::Integer* | :heavy_check_mark: | N/A | +| `refresh_token` | *::String* | :heavy_check_mark: | N/A | +| `scope` | *::String* | :heavy_check_mark: | N/A | +| `id_token` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/tokentype.md b/docs/models/shared/tokentype.md new file mode 100644 index 0000000..77e16de --- /dev/null +++ b/docs/models/shared/tokentype.md @@ -0,0 +1,9 @@ +# TokenType + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `ACCESS_TOKEN` | access_token | +| `REFRESH_TOKEN` | refresh_token | \ No newline at end of file diff --git a/docs/models/shared/tokentypehint.md b/docs/models/shared/tokentypehint.md new file mode 100644 index 0000000..f1bf9c5 --- /dev/null +++ b/docs/models/shared/tokentypehint.md @@ -0,0 +1,9 @@ +# TokenTypeHint + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `ACCESS_TOKEN` | access_token | +| `REFRESH_TOKEN` | refresh_token | \ No newline at end of file diff --git a/docs/models/shared/unitamount.md b/docs/models/shared/unitamount.md new file mode 100644 index 0000000..9c58019 --- /dev/null +++ b/docs/models/shared/unitamount.md @@ -0,0 +1,4 @@ +# UnitAmount + +The price per unit in cents. Supports up to 12 decimal places. + diff --git a/docs/models/shared/userinfoorganization.md b/docs/models/shared/userinfoorganization.md new file mode 100644 index 0000000..4d42613 --- /dev/null +++ b/docs/models/shared/userinfoorganization.md @@ -0,0 +1,9 @@ +# UserInfoOrganization + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `sub` | *::String* | :heavy_check_mark: | N/A | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/userinfouser.md b/docs/models/shared/userinfouser.md new file mode 100644 index 0000000..ef91feb --- /dev/null +++ b/docs/models/shared/userinfouser.md @@ -0,0 +1,11 @@ +# UserInfoUser + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `sub` | *::String* | :heavy_check_mark: | N/A | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `email_verified` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/validatedlicensekey.md b/docs/models/shared/validatedlicensekey.md new file mode 100644 index 0000000..6b49fdd --- /dev/null +++ b/docs/models/shared/validatedlicensekey.md @@ -0,0 +1,24 @@ +# ValidatedLicenseKey + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `id` | *::String* | :heavy_check_mark: | The ID of the object. | +| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Creation timestamp of the object. | +| `modified_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Last modification timestamp of the object. | +| `organization_id` | *::String* | :heavy_check_mark: | N/A | +| `customer_id` | *::String* | :heavy_check_mark: | N/A | +| `customer` | [Models::Shared::LicenseKeyCustomer](../../models/shared/licensekeycustomer.md) | :heavy_check_mark: | N/A | +| `benefit_id` | *::String* | :heavy_check_mark: | The benefit ID. | +| `key` | *::String* | :heavy_check_mark: | N/A | +| `display_key` | *::String* | :heavy_check_mark: | N/A | +| `status` | [Models::Shared::LicenseKeyStatus](../../models/shared/licensekeystatus.md) | :heavy_check_mark: | N/A | +| `limit_activations` | *::Integer* | :heavy_check_mark: | N/A | +| `usage` | *::Integer* | :heavy_check_mark: | N/A | +| `limit_usage` | *::Integer* | :heavy_check_mark: | N/A | +| `validations` | *::Integer* | :heavy_check_mark: | N/A | +| `last_validated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `expires_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | N/A | +| `activation` | [T.nilable(Models::Shared::LicenseKeyActivationBase)](../../models/shared/licensekeyactivationbase.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/validationerror.md b/docs/models/shared/validationerror.md new file mode 100644 index 0000000..aa24097 --- /dev/null +++ b/docs/models/shared/validationerror.md @@ -0,0 +1,10 @@ +# ValidationError + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `loc` | T::Array<[T.any(::String, ::Integer)](../../models/shared/loc.md)> | :heavy_check_mark: | N/A | +| `msg` | *::String* | :heavy_check_mark: | N/A | +| `type` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/value.md b/docs/models/shared/value.md new file mode 100644 index 0000000..e9f5c1a --- /dev/null +++ b/docs/models/shared/value.md @@ -0,0 +1,2 @@ +# Value + diff --git a/docs/models/shared/webhookbenefitcreatedpayload.md b/docs/models/shared/webhookbenefitcreatedpayload.md new file mode 100644 index 0000000..22e76f0 --- /dev/null +++ b/docs/models/shared/webhookbenefitcreatedpayload.md @@ -0,0 +1,13 @@ +# WebhookBenefitCreatedPayload + +Sent when a new benefit is created. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | benefit.created | +| `data` | [T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)](../../models/shared/benefit.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookbenefitgrantcreatedpayload.md b/docs/models/shared/webhookbenefitgrantcreatedpayload.md new file mode 100644 index 0000000..8c10e3c --- /dev/null +++ b/docs/models/shared/webhookbenefitgrantcreatedpayload.md @@ -0,0 +1,13 @@ +# WebhookBenefitGrantCreatedPayload + +Sent when a new benefit grant is created. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | benefit_grant.created | +| `data` | [Models::Shared::BenefitGrantWebhook](../../models/shared/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookbenefitgrantcycledpayload.md b/docs/models/shared/webhookbenefitgrantcycledpayload.md new file mode 100644 index 0000000..8879a1d --- /dev/null +++ b/docs/models/shared/webhookbenefitgrantcycledpayload.md @@ -0,0 +1,14 @@ +# WebhookBenefitGrantCycledPayload + +Sent when a benefit grant is cycled, +meaning the related subscription has been renewed for another period. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | benefit_grant.cycled | +| `data` | [Models::Shared::BenefitGrantWebhook](../../models/shared/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookbenefitgrantrevokedpayload.md b/docs/models/shared/webhookbenefitgrantrevokedpayload.md new file mode 100644 index 0000000..b4f4452 --- /dev/null +++ b/docs/models/shared/webhookbenefitgrantrevokedpayload.md @@ -0,0 +1,13 @@ +# WebhookBenefitGrantRevokedPayload + +Sent when a benefit grant is revoked. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | benefit_grant.revoked | +| `data` | [Models::Shared::BenefitGrantWebhook](../../models/shared/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookbenefitgrantupdatedpayload.md b/docs/models/shared/webhookbenefitgrantupdatedpayload.md new file mode 100644 index 0000000..a4e4454 --- /dev/null +++ b/docs/models/shared/webhookbenefitgrantupdatedpayload.md @@ -0,0 +1,13 @@ +# WebhookBenefitGrantUpdatedPayload + +Sent when a benefit grant is updated. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | benefit_grant.updated | +| `data` | [Models::Shared::BenefitGrantWebhook](../../models/shared/benefitgrantwebhook.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookbenefitupdatedpayload.md b/docs/models/shared/webhookbenefitupdatedpayload.md new file mode 100644 index 0000000..28891b9 --- /dev/null +++ b/docs/models/shared/webhookbenefitupdatedpayload.md @@ -0,0 +1,13 @@ +# WebhookBenefitUpdatedPayload + +Sent when a benefit is updated. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | benefit.updated | +| `data` | [T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)](../../models/shared/benefit.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookcheckoutcreatedpayload.md b/docs/models/shared/webhookcheckoutcreatedpayload.md new file mode 100644 index 0000000..f3b77c3 --- /dev/null +++ b/docs/models/shared/webhookcheckoutcreatedpayload.md @@ -0,0 +1,13 @@ +# WebhookCheckoutCreatedPayload + +Sent when a new checkout is created. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | checkout.created | +| `data` | [Models::Shared::Checkout](../../models/shared/checkout.md) | :heavy_check_mark: | Checkout session data retrieved using an access token. | | \ No newline at end of file diff --git a/docs/models/shared/webhookcheckoutupdatedpayload.md b/docs/models/shared/webhookcheckoutupdatedpayload.md new file mode 100644 index 0000000..5a354d1 --- /dev/null +++ b/docs/models/shared/webhookcheckoutupdatedpayload.md @@ -0,0 +1,13 @@ +# WebhookCheckoutUpdatedPayload + +Sent when a checkout is updated. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | checkout.updated | +| `data` | [Models::Shared::Checkout](../../models/shared/checkout.md) | :heavy_check_mark: | Checkout session data retrieved using an access token. | | \ No newline at end of file diff --git a/docs/models/shared/webhookcustomercreatedpayload.md b/docs/models/shared/webhookcustomercreatedpayload.md new file mode 100644 index 0000000..b279f84 --- /dev/null +++ b/docs/models/shared/webhookcustomercreatedpayload.md @@ -0,0 +1,18 @@ +# WebhookCustomerCreatedPayload + +Sent when a new customer is created. + +A customer can be created: + +* After a successful checkout. +* Programmatically via the API. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | customer.created | +| `data` | [Models::Shared::Customer](../../models/shared/customer.md) | :heavy_check_mark: | A customer in an organization. | | \ No newline at end of file diff --git a/docs/models/shared/webhookcustomerdeletedpayload.md b/docs/models/shared/webhookcustomerdeletedpayload.md new file mode 100644 index 0000000..eb1fd90 --- /dev/null +++ b/docs/models/shared/webhookcustomerdeletedpayload.md @@ -0,0 +1,13 @@ +# WebhookCustomerDeletedPayload + +Sent when a customer is deleted. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | customer.deleted | +| `data` | [Models::Shared::Customer](../../models/shared/customer.md) | :heavy_check_mark: | A customer in an organization. | | \ No newline at end of file diff --git a/docs/models/shared/webhookcustomerstatechangedpayload.md b/docs/models/shared/webhookcustomerstatechangedpayload.md new file mode 100644 index 0000000..70e0cd1 --- /dev/null +++ b/docs/models/shared/webhookcustomerstatechangedpayload.md @@ -0,0 +1,19 @@ +# WebhookCustomerStateChangedPayload + +Sent when a customer state has changed. + +It's triggered when: + +* Customer is created, updated or deleted. +* A subscription is created or updated. +* A benefit is granted or revoked. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | customer.state_changed | +| `data` | [Models::Shared::CustomerState](../../models/shared/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/shared/webhookcustomerupdatedpayload.md b/docs/models/shared/webhookcustomerupdatedpayload.md new file mode 100644 index 0000000..62acf41 --- /dev/null +++ b/docs/models/shared/webhookcustomerupdatedpayload.md @@ -0,0 +1,17 @@ +# WebhookCustomerUpdatedPayload + +Sent when a customer is updated. + +This event is fired when the customer details are updated. + +If you want to be notified when a customer subscription or benefit state changes, you should listen to the `customer_state_changed` event. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | customer.updated | +| `data` | [Models::Shared::Customer](../../models/shared/customer.md) | :heavy_check_mark: | A customer in an organization. | | \ No newline at end of file diff --git a/docs/models/shared/webhookordercreatedpayload.md b/docs/models/shared/webhookordercreatedpayload.md new file mode 100644 index 0000000..7193082 --- /dev/null +++ b/docs/models/shared/webhookordercreatedpayload.md @@ -0,0 +1,22 @@ +# WebhookOrderCreatedPayload + +Sent when a new order is created. + +A new order is created when: + +* A customer purchases a one-time product. In this case, `billing_reason` is set to `purchase`. +* A customer starts a subscription. In this case, `billing_reason` is set to `subscription_create`. +* A subscription is renewed. In this case, `billing_reason` is set to `subscription_cycle`. +* A subscription is upgraded or downgraded with an immediate proration invoice. In this case, `billing_reason` is set to `subscription_update`. + +The order might not be paid yet, so the `status` field might be `pending`. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | order.created | +| `data` | [Models::Shared::Order](../../models/shared/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookorderpaidpayload.md b/docs/models/shared/webhookorderpaidpayload.md new file mode 100644 index 0000000..782e7f8 --- /dev/null +++ b/docs/models/shared/webhookorderpaidpayload.md @@ -0,0 +1,15 @@ +# WebhookOrderPaidPayload + +Sent when an order is paid. + +When you receive this event, the order is fully processed and payment has been received. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | order.paid | +| `data` | [Models::Shared::Order](../../models/shared/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookorderrefundedpayload.md b/docs/models/shared/webhookorderrefundedpayload.md new file mode 100644 index 0000000..a5593be --- /dev/null +++ b/docs/models/shared/webhookorderrefundedpayload.md @@ -0,0 +1,13 @@ +# WebhookOrderRefundedPayload + +Sent when an order is fully or partially refunded. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | order.refunded | +| `data` | [Models::Shared::Order](../../models/shared/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookorderupdatedpayload.md b/docs/models/shared/webhookorderupdatedpayload.md new file mode 100644 index 0000000..a041385 --- /dev/null +++ b/docs/models/shared/webhookorderupdatedpayload.md @@ -0,0 +1,18 @@ +# WebhookOrderUpdatedPayload + +Sent when an order is updated. + +An order is updated when: + +* Its status changes, e.g. from `pending` to `paid`. +* It's refunded, partially or fully. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | order.updated | +| `data` | [Models::Shared::Order](../../models/shared/order.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookorganizationupdatedpayload.md b/docs/models/shared/webhookorganizationupdatedpayload.md new file mode 100644 index 0000000..a35d79f --- /dev/null +++ b/docs/models/shared/webhookorganizationupdatedpayload.md @@ -0,0 +1,13 @@ +# WebhookOrganizationUpdatedPayload + +Sent when a organization is updated. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | organization.updated | +| `data` | [Models::Shared::Organization](../../models/shared/organization.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookproductcreatedpayload.md b/docs/models/shared/webhookproductcreatedpayload.md new file mode 100644 index 0000000..3cb6696 --- /dev/null +++ b/docs/models/shared/webhookproductcreatedpayload.md @@ -0,0 +1,13 @@ +# WebhookProductCreatedPayload + +Sent when a new product is created. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | product.created | +| `data` | [Models::Shared::Product](../../models/shared/product.md) | :heavy_check_mark: | A product. | | \ No newline at end of file diff --git a/docs/models/shared/webhookproductupdatedpayload.md b/docs/models/shared/webhookproductupdatedpayload.md new file mode 100644 index 0000000..e833916 --- /dev/null +++ b/docs/models/shared/webhookproductupdatedpayload.md @@ -0,0 +1,13 @@ +# WebhookProductUpdatedPayload + +Sent when a product is updated. + +**Discord & Slack support:** Basic + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | product.updated | +| `data` | [Models::Shared::Product](../../models/shared/product.md) | :heavy_check_mark: | A product. | | \ No newline at end of file diff --git a/docs/models/shared/webhookrefundcreatedpayload.md b/docs/models/shared/webhookrefundcreatedpayload.md new file mode 100644 index 0000000..36bf49a --- /dev/null +++ b/docs/models/shared/webhookrefundcreatedpayload.md @@ -0,0 +1,13 @@ +# WebhookRefundCreatedPayload + +Sent when a refund is created regardless of status. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | refund.created | +| `data` | [Models::Shared::Refund](../../models/shared/refund.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhookrefundupdatedpayload.md b/docs/models/shared/webhookrefundupdatedpayload.md new file mode 100644 index 0000000..cddd371 --- /dev/null +++ b/docs/models/shared/webhookrefundupdatedpayload.md @@ -0,0 +1,13 @@ +# WebhookRefundUpdatedPayload + +Sent when a refund is updated. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | refund.updated | +| `data` | [Models::Shared::Refund](../../models/shared/refund.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhooksubscriptionactivepayload.md b/docs/models/shared/webhooksubscriptionactivepayload.md new file mode 100644 index 0000000..9399362 --- /dev/null +++ b/docs/models/shared/webhooksubscriptionactivepayload.md @@ -0,0 +1,14 @@ +# WebhookSubscriptionActivePayload + +Sent when a subscription becomes active, +whether because it's a new paid subscription or because payment was recovered. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | subscription.active | +| `data` | [Models::Shared::Subscription](../../models/shared/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhooksubscriptioncanceledpayload.md b/docs/models/shared/webhooksubscriptioncanceledpayload.md new file mode 100644 index 0000000..aeb84f1 --- /dev/null +++ b/docs/models/shared/webhooksubscriptioncanceledpayload.md @@ -0,0 +1,14 @@ +# WebhookSubscriptionCanceledPayload + +Sent when a subscription is canceled. +Customers might still have access until the end of the current period. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | subscription.canceled | +| `data` | [Models::Shared::Subscription](../../models/shared/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhooksubscriptioncreatedpayload.md b/docs/models/shared/webhooksubscriptioncreatedpayload.md new file mode 100644 index 0000000..93760a6 --- /dev/null +++ b/docs/models/shared/webhooksubscriptioncreatedpayload.md @@ -0,0 +1,15 @@ +# WebhookSubscriptionCreatedPayload + +Sent when a new subscription is created. + +When this event occurs, the subscription `status` might not be `active` yet, as we can still have to wait for the first payment to be processed. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | subscription.created | +| `data` | [Models::Shared::Subscription](../../models/shared/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhooksubscriptionrevokedpayload.md b/docs/models/shared/webhooksubscriptionrevokedpayload.md new file mode 100644 index 0000000..2e272be --- /dev/null +++ b/docs/models/shared/webhooksubscriptionrevokedpayload.md @@ -0,0 +1,14 @@ +# WebhookSubscriptionRevokedPayload + +Sent when a subscription is revoked, the user looses access immediately. +Happens when the subscription is canceled, or payment is past due. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | subscription.revoked | +| `data` | [Models::Shared::Subscription](../../models/shared/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhooksubscriptionuncanceledpayload.md b/docs/models/shared/webhooksubscriptionuncanceledpayload.md new file mode 100644 index 0000000..3947262 --- /dev/null +++ b/docs/models/shared/webhooksubscriptionuncanceledpayload.md @@ -0,0 +1,13 @@ +# WebhookSubscriptionUncanceledPayload + +Sent when a subscription is uncanceled. + +**Discord & Slack support:** Full + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | subscription.uncanceled | +| `data` | [Models::Shared::Subscription](../../models/shared/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/shared/webhooksubscriptionupdatedpayload.md b/docs/models/shared/webhooksubscriptionupdatedpayload.md new file mode 100644 index 0000000..204116d --- /dev/null +++ b/docs/models/shared/webhooksubscriptionupdatedpayload.md @@ -0,0 +1,17 @@ +# WebhookSubscriptionUpdatedPayload + +Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals. + +If you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`. + +To listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field. + +**Discord & Slack support:** On cancellation and revocation. Renewals are skipped. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | subscription.updated | +| `data` | [Models::Shared::Subscription](../../models/shared/subscription.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/webhooks/endpointbenefitcreatedpostresponse.md b/docs/models/webhooks/endpointbenefitcreatedpostresponse.md new file mode 100644 index 0000000..b8a8359 --- /dev/null +++ b/docs/models/webhooks/endpointbenefitcreatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointbenefitCreatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointbenefitgrantcreatedpostresponse.md b/docs/models/webhooks/endpointbenefitgrantcreatedpostresponse.md new file mode 100644 index 0000000..16bd0c5 --- /dev/null +++ b/docs/models/webhooks/endpointbenefitgrantcreatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointbenefitGrantCreatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointbenefitgrantcycledpostresponse.md b/docs/models/webhooks/endpointbenefitgrantcycledpostresponse.md new file mode 100644 index 0000000..95d9439 --- /dev/null +++ b/docs/models/webhooks/endpointbenefitgrantcycledpostresponse.md @@ -0,0 +1,11 @@ +# EndpointbenefitGrantCycledPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointbenefitgrantrevokedpostresponse.md b/docs/models/webhooks/endpointbenefitgrantrevokedpostresponse.md new file mode 100644 index 0000000..bbfbf09 --- /dev/null +++ b/docs/models/webhooks/endpointbenefitgrantrevokedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointbenefitGrantRevokedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointbenefitgrantupdatedpostresponse.md b/docs/models/webhooks/endpointbenefitgrantupdatedpostresponse.md new file mode 100644 index 0000000..ac667a2 --- /dev/null +++ b/docs/models/webhooks/endpointbenefitgrantupdatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointbenefitGrantUpdatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointbenefitupdatedpostresponse.md b/docs/models/webhooks/endpointbenefitupdatedpostresponse.md new file mode 100644 index 0000000..b3b73ff --- /dev/null +++ b/docs/models/webhooks/endpointbenefitupdatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointbenefitUpdatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointcheckoutcreatedpostresponse.md b/docs/models/webhooks/endpointcheckoutcreatedpostresponse.md new file mode 100644 index 0000000..54c606e --- /dev/null +++ b/docs/models/webhooks/endpointcheckoutcreatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointcheckoutCreatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointcheckoutupdatedpostresponse.md b/docs/models/webhooks/endpointcheckoutupdatedpostresponse.md new file mode 100644 index 0000000..7afcb3f --- /dev/null +++ b/docs/models/webhooks/endpointcheckoutupdatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointcheckoutUpdatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointcustomercreatedpostresponse.md b/docs/models/webhooks/endpointcustomercreatedpostresponse.md new file mode 100644 index 0000000..3488cd9 --- /dev/null +++ b/docs/models/webhooks/endpointcustomercreatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointcustomerCreatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointcustomerdeletedpostresponse.md b/docs/models/webhooks/endpointcustomerdeletedpostresponse.md new file mode 100644 index 0000000..6eebf0a --- /dev/null +++ b/docs/models/webhooks/endpointcustomerdeletedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointcustomerDeletedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointcustomerstatechangedpostresponse.md b/docs/models/webhooks/endpointcustomerstatechangedpostresponse.md new file mode 100644 index 0000000..8c33f95 --- /dev/null +++ b/docs/models/webhooks/endpointcustomerstatechangedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointcustomerStateChangedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointcustomerupdatedpostresponse.md b/docs/models/webhooks/endpointcustomerupdatedpostresponse.md new file mode 100644 index 0000000..a20e9b0 --- /dev/null +++ b/docs/models/webhooks/endpointcustomerupdatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointcustomerUpdatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointordercreatedpostresponse.md b/docs/models/webhooks/endpointordercreatedpostresponse.md new file mode 100644 index 0000000..ac679f7 --- /dev/null +++ b/docs/models/webhooks/endpointordercreatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointorderCreatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointorderpaidpostresponse.md b/docs/models/webhooks/endpointorderpaidpostresponse.md new file mode 100644 index 0000000..08c9b7c --- /dev/null +++ b/docs/models/webhooks/endpointorderpaidpostresponse.md @@ -0,0 +1,11 @@ +# EndpointorderPaidPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointorderrefundedpostresponse.md b/docs/models/webhooks/endpointorderrefundedpostresponse.md new file mode 100644 index 0000000..f07e619 --- /dev/null +++ b/docs/models/webhooks/endpointorderrefundedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointorderRefundedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointorderupdatedpostresponse.md b/docs/models/webhooks/endpointorderupdatedpostresponse.md new file mode 100644 index 0000000..118292b --- /dev/null +++ b/docs/models/webhooks/endpointorderupdatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointorderUpdatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointorganizationupdatedpostresponse.md b/docs/models/webhooks/endpointorganizationupdatedpostresponse.md new file mode 100644 index 0000000..5400d6b --- /dev/null +++ b/docs/models/webhooks/endpointorganizationupdatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointorganizationUpdatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointproductcreatedpostresponse.md b/docs/models/webhooks/endpointproductcreatedpostresponse.md new file mode 100644 index 0000000..3db5258 --- /dev/null +++ b/docs/models/webhooks/endpointproductcreatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointproductCreatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointproductupdatedpostresponse.md b/docs/models/webhooks/endpointproductupdatedpostresponse.md new file mode 100644 index 0000000..571fc59 --- /dev/null +++ b/docs/models/webhooks/endpointproductupdatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointproductUpdatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointrefundcreatedpostresponse.md b/docs/models/webhooks/endpointrefundcreatedpostresponse.md new file mode 100644 index 0000000..1fc9ade --- /dev/null +++ b/docs/models/webhooks/endpointrefundcreatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointrefundCreatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointrefundupdatedpostresponse.md b/docs/models/webhooks/endpointrefundupdatedpostresponse.md new file mode 100644 index 0000000..5b180e0 --- /dev/null +++ b/docs/models/webhooks/endpointrefundupdatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointrefundUpdatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointsubscriptionactivepostresponse.md b/docs/models/webhooks/endpointsubscriptionactivepostresponse.md new file mode 100644 index 0000000..3e41aec --- /dev/null +++ b/docs/models/webhooks/endpointsubscriptionactivepostresponse.md @@ -0,0 +1,11 @@ +# EndpointsubscriptionActivePostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointsubscriptioncanceledpostresponse.md b/docs/models/webhooks/endpointsubscriptioncanceledpostresponse.md new file mode 100644 index 0000000..196d2b7 --- /dev/null +++ b/docs/models/webhooks/endpointsubscriptioncanceledpostresponse.md @@ -0,0 +1,11 @@ +# EndpointsubscriptionCanceledPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointsubscriptioncreatedpostresponse.md b/docs/models/webhooks/endpointsubscriptioncreatedpostresponse.md new file mode 100644 index 0000000..7fb08d3 --- /dev/null +++ b/docs/models/webhooks/endpointsubscriptioncreatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointsubscriptionCreatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointsubscriptionrevokedpostresponse.md b/docs/models/webhooks/endpointsubscriptionrevokedpostresponse.md new file mode 100644 index 0000000..415f8d0 --- /dev/null +++ b/docs/models/webhooks/endpointsubscriptionrevokedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointsubscriptionRevokedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointsubscriptionuncanceledpostresponse.md b/docs/models/webhooks/endpointsubscriptionuncanceledpostresponse.md new file mode 100644 index 0000000..40a069c --- /dev/null +++ b/docs/models/webhooks/endpointsubscriptionuncanceledpostresponse.md @@ -0,0 +1,11 @@ +# EndpointsubscriptionUncanceledPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/models/webhooks/endpointsubscriptionupdatedpostresponse.md b/docs/models/webhooks/endpointsubscriptionupdatedpostresponse.md new file mode 100644 index 0000000..15084a3 --- /dev/null +++ b/docs/models/webhooks/endpointsubscriptionupdatedpostresponse.md @@ -0,0 +1,11 @@ +# EndpointsubscriptionUpdatedPostResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `any` | *T.nilable(::Object)* | :heavy_minus_sign: | Successful Response | \ No newline at end of file diff --git a/docs/sdks/benefits/README.md b/docs/sdks/benefits/README.md new file mode 100644 index 0000000..e39f0d8 --- /dev/null +++ b/docs/sdks/benefits/README.md @@ -0,0 +1,288 @@ +# Benefits +(*benefits*) + +## Overview + +### Available Operations + +* [list](#list) - List Benefits +* [create](#create) - Create Benefit +* [get](#get) - Get Benefit +* [update](#update) - Update Benefit +* [delete](#delete) - Delete Benefit +* [grants](#grants) - List Benefit Grants + +## list + +List benefits. + +**Scopes**: `benefits:read` `benefits:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::BenefitsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.benefits.list(req) + +if ! res.list_resource_benefit.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::BenefitsListRequest](../../models/operations/benefitslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::BenefitsListResponse)](../../models/operations/benefitslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a benefit. + +**Scopes**: `benefits:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::BenefitDownloadablesCreate.new( + type: "", + description: "delightfully fumigate convection though zowie up bulky electronics", + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + properties: Models::Shared::BenefitDownloadablesCreateProperties.new( + files: [ + "", + ], + ), +) + +res = s.benefits.create(req) + +if ! res.benefit.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [T.any(Models::Shared::BenefitCustomCreate, Models::Shared::BenefitDiscordCreate, Models::Shared::BenefitGitHubRepositoryCreate, Models::Shared::BenefitDownloadablesCreate, Models::Shared::BenefitLicenseKeysCreate, Models::Shared::BenefitMeterCreditCreate)](../../models/shared/benefitcreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::BenefitsCreateResponse)](../../models/operations/benefitscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a benefit by ID. + +**Scopes**: `benefits:read` `benefits:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.benefits.get(id="") + +if ! res.benefit.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::BenefitsGetResponse)](../../models/operations/benefitsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a benefit. + +**Scopes**: `benefits:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.benefits.update(id="", request_body=Models::Shared::BenefitMeterCreditUpdate.new( + type: "", +)) + +if ! res.benefit.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `request_body` | [T.any(Models::Shared::BenefitCustomUpdate, Models::Shared::BenefitDiscordUpdate, Models::Shared::BenefitGitHubRepositoryUpdate, Models::Shared::BenefitDownloadablesUpdate, Models::Shared::BenefitLicenseKeysUpdate, Models::Shared::BenefitMeterCreditUpdate)](../../models/operations/benefitsupdatebenefitupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::BenefitsUpdateResponse)](../../models/operations/benefitsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete a benefit. + +> [!WARNING] +> Every grants associated with the benefit will be revoked. +> Users will lose access to the benefit. + +**Scopes**: `benefits:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.benefits.delete(id="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::BenefitsDeleteResponse)](../../models/operations/benefitsdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::NotPermitted | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## grants + +List the individual grants for a benefit. + +It's especially useful to check if a user has been granted a benefit. + +**Scopes**: `benefits:read` `benefits:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::BenefitsGrantsRequest.new( + id: "", +) + +res = s.benefits.grants(req) + +if ! res.list_resource_benefit_grant.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::BenefitsGrantsRequest](../../models/operations/benefitsgrantsrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::BenefitsGrantsResponse)](../../models/operations/benefitsgrantsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/checkoutlinks/README.md b/docs/sdks/checkoutlinks/README.md new file mode 100644 index 0000000..8393adb --- /dev/null +++ b/docs/sdks/checkoutlinks/README.md @@ -0,0 +1,227 @@ +# CheckoutLinks +(*checkout_links*) + +## Overview + +### Available Operations + +* [list](#list) - List Checkout Links +* [create](#create) - Create Checkout Link +* [get](#get) - Get Checkout Link +* [update](#update) - Update Checkout Link +* [delete](#delete) - Delete Checkout Link + +## list + +List checkout links. + +**Scopes**: `checkout_links:read` `checkout_links:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::CheckoutLinksListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.checkout_links.list(req) + +if ! res.list_resource_checkout_link.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CheckoutLinksListRequest](../../models/operations/checkoutlinkslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CheckoutLinksListResponse)](../../models/operations/checkoutlinkslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a checkout link. + +**Scopes**: `checkout_links:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::CheckoutLinkCreateProduct.new( + payment_processor: "", + product_id: "", +) + +res = s.checkout_links.create(req) + +if ! res.checkout_link.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [T.any(Models::Shared::CheckoutLinkCreateProductPrice, Models::Shared::CheckoutLinkCreateProduct, Models::Shared::CheckoutLinkCreateProducts)](../../models/operations/checkoutlinkscreatecheckoutlinkcreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CheckoutLinksCreateResponse)](../../models/operations/checkoutlinkscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a checkout link by ID. + +**Scopes**: `checkout_links:read` `checkout_links:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.checkout_links.get(id="") + +if ! res.checkout_link.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `id` | *::String* | :heavy_check_mark: | The checkout link ID. | + +### Response + +**[T.nilable(Models::Operations::CheckoutLinksGetResponse)](../../models/operations/checkoutlinksgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a checkout link. + +**Scopes**: `checkout_links:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.checkout_links.update(id="", checkout_link_update=Models::Shared::CheckoutLinkUpdate.new()) + +if ! res.checkout_link.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The checkout link ID. | +| `checkout_link_update` | [Models::Shared::CheckoutLinkUpdate](../../models/shared/checkoutlinkupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CheckoutLinksUpdateResponse)](../../models/operations/checkoutlinksupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete a checkout link. + +**Scopes**: `checkout_links:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.checkout_links.delete(id="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `id` | *::String* | :heavy_check_mark: | The checkout link ID. | + +### Response + +**[T.nilable(Models::Operations::CheckoutLinksDeleteResponse)](../../models/operations/checkoutlinksdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/checkouts/README.md b/docs/sdks/checkouts/README.md new file mode 100644 index 0000000..0910dd3 --- /dev/null +++ b/docs/sdks/checkouts/README.md @@ -0,0 +1,185 @@ +# Checkouts +(*checkouts*) + +## Overview + +### Available Operations + +* [list](#list) - List Checkout Sessions +* [create](#create) - Create Checkout Session +* [get](#get) - Get Checkout Session +* [client_get](#client_get) - Get Checkout Session from Client + +## list + +List checkout sessions. + +**Scopes**: `checkouts:read` `checkouts:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::CheckoutsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.checkouts.list(req) + +if ! res.list_resource_checkout.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CheckoutsListRequest](../../models/operations/checkoutslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CheckoutsListResponse)](../../models/operations/checkoutslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a checkout session. + +**Scopes**: `checkouts:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::CheckoutCreate.new( + customer_billing_address: Models::Shared::Address.new( + country: "SE", + ), + products: [ + "", + ], +) + +res = s.checkouts.create(req) + +if ! res.checkout.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [Models::Shared::CheckoutCreate](../../models/shared/checkoutcreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CheckoutsCreateResponse)](../../models/operations/checkoutscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a checkout session by ID. + +**Scopes**: `checkouts:read` `checkouts:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.checkouts.get(id="") + +if ! res.checkout.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `id` | *::String* | :heavy_check_mark: | The checkout session ID. | + +### Response + +**[T.nilable(Models::Operations::CheckoutsGetResponse)](../../models/operations/checkoutsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## client_get + +Get a checkout session by client secret. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.checkouts.client_get(client_secret="") + +if ! res.checkout_public.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `client_secret` | *::String* | :heavy_check_mark: | The checkout session client secret. | + +### Response + +**[T.nilable(Models::Operations::CheckoutsClientGetResponse)](../../models/operations/checkoutsclientgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::ExpiredCheckoutError | 410 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customermeters/README.md b/docs/sdks/customermeters/README.md new file mode 100644 index 0000000..15edb7b --- /dev/null +++ b/docs/sdks/customermeters/README.md @@ -0,0 +1,96 @@ +# CustomerMeters +(*customer_meters*) + +## Overview + +### Available Operations + +* [list](#list) - List Customer Meters +* [get](#get) - Get Customer Meter + +## list + +List customer meters. + +**Scopes**: `customer_meters:read` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::CustomerMetersListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.customer_meters.list(req) + +if ! res.list_resource_customer_meter.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CustomerMetersListRequest](../../models/operations/customermeterslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerMetersListResponse)](../../models/operations/customermeterslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a customer meter by ID. + +**Scopes**: `customer_meters:read` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customer_meters.get(id="") + +if ! res.customer_meter.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `id` | *::String* | :heavy_check_mark: | The customer meter ID. | + +### Response + +**[T.nilable(Models::Operations::CustomerMetersGetResponse)](../../models/operations/customermetersgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customerportalbenefitgrants/README.md b/docs/sdks/customerportalbenefitgrants/README.md new file mode 100644 index 0000000..86ba2ab --- /dev/null +++ b/docs/sdks/customerportalbenefitgrants/README.md @@ -0,0 +1,151 @@ +# CustomerPortalBenefitGrants +(*customer_portal_benefit_grants*) + +## Overview + +### Available Operations + +* [list](#list) - List Benefit Grants +* [get](#get) - Get Benefit Grant +* [update](#update) - Update Benefit Grant + +## list + +List benefits grants of the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Operations::CustomerPortalBenefitGrantsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.customer_portal_benefit_grants.list(security: Models::Operations::CustomerPortalBenefitGrantsListSecurity.new( + customer_session: "", + ), req, Models::Operations::CustomerPortalBenefitGrantsListSecurity.new( + customer_session: "", + )) + +if ! res.list_resource_customer_benefit_grant.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CustomerPortalBenefitGrantsListRequest](../../models/operations/customerportalbenefitgrantslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `security` | [Models::Operations::CustomerPortalBenefitGrantsListSecurity](../../models/operations/customerportalbenefitgrantslistsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalBenefitGrantsListResponse)](../../models/operations/customerportalbenefitgrantslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a benefit grant by ID for the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_benefit_grants.get(security: Models::Operations::CustomerPortalBenefitGrantsGetSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalBenefitGrantsGetSecurity.new( + customer_session: "", + ), id="") + +if ! res.customer_benefit_grant.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalBenefitGrantsGetSecurity](../../models/operations/customerportalbenefitgrantsgetsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | The benefit grant ID. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalBenefitGrantsGetResponse)](../../models/operations/customerportalbenefitgrantsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a benefit grant for the authenticated customer. + +**Scopes**: `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_benefit_grants.update(security: Models::Operations::CustomerPortalBenefitGrantsUpdateSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalBenefitGrantsUpdateSecurity.new( + customer_session: "", + ), id="", customer_benefit_grant_update=Models::Shared::CustomerBenefitGrantMeterCreditUpdate.new( + benefit_type: "", +)) + +if ! res.customer_benefit_grant.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalBenefitGrantsUpdateSecurity](../../models/operations/customerportalbenefitgrantsupdatesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | The benefit grant ID. | +| `customer_benefit_grant_update` | [T.any(Models::Shared::CustomerBenefitGrantDiscordUpdate, Models::Shared::CustomerBenefitGrantGitHubRepositoryUpdate, Models::Shared::CustomerBenefitGrantDownloadablesUpdate, Models::Shared::CustomerBenefitGrantLicenseKeysUpdate, Models::Shared::CustomerBenefitGrantCustomUpdate, Models::Shared::CustomerBenefitGrantMeterCreditUpdate)](../../models/shared/customerbenefitgrantupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalBenefitGrantsUpdateResponse)](../../models/operations/customerportalbenefitgrantsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::NotPermitted | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customerportalcustomermeters/README.md b/docs/sdks/customerportalcustomermeters/README.md new file mode 100644 index 0000000..4fe7717 --- /dev/null +++ b/docs/sdks/customerportalcustomermeters/README.md @@ -0,0 +1,98 @@ +# CustomerPortalCustomerMeters +(*customer_portal_customer_meters*) + +## Overview + +### Available Operations + +* [list](#list) - List Meters +* [get](#get) - Get Customer Meter + +## list + +List meters of the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Operations::CustomerPortalCustomerMetersListRequest.new() + +res = s.customer_portal_customer_meters.list(security: Models::Operations::CustomerPortalCustomerMetersListSecurity.new( + customer_session: "", + ), req, Models::Operations::CustomerPortalCustomerMetersListSecurity.new( + customer_session: "", + )) + +if ! res.list_resource_customer_customer_meter.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CustomerPortalCustomerMetersListRequest](../../models/operations/customerportalcustomermeterslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `security` | [Models::Operations::CustomerPortalCustomerMetersListSecurity](../../models/operations/customerportalcustomermeterslistsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalCustomerMetersListResponse)](../../models/operations/customerportalcustomermeterslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a meter by ID for the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_customer_meters.get(security: Models::Operations::CustomerPortalCustomerMetersGetSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalCustomerMetersGetSecurity.new( + customer_session: "", + ), id="") + +if ! res.customer_customer_meter.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalCustomerMetersGetSecurity](../../models/operations/customerportalcustomermetersgetsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | The customer meter ID. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalCustomerMetersGetResponse)](../../models/operations/customerportalcustomermetersgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customerportalcustomers/README.md b/docs/sdks/customerportalcustomers/README.md new file mode 100644 index 0000000..8f950f1 --- /dev/null +++ b/docs/sdks/customerportalcustomers/README.md @@ -0,0 +1,239 @@ +# CustomerPortalCustomers +(*customer_portal_customers*) + +## Overview + +### Available Operations + +* [get](#get) - Get Customer +* [update](#update) - Update Customer +* [get_payment_methods](#get_payment_methods) - Get Customer Payment Methods +* [add_payment_method](#add_payment_method) - Add Customer Payment Method +* [delete_payment_method](#delete_payment_method) - Delete Customer Payment Method + +## get + +Get authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_customers.get(security: Models::Operations::CustomerPortalCustomersGetSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalCustomersGetSecurity.new( + customer_session: "", + )) + +if ! res.customer_portal_customer.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalCustomersGetSecurity](../../models/operations/customerportalcustomersgetsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalCustomersGetResponse)](../../models/operations/customerportalcustomersgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update authenticated customer. + +**Scopes**: `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Shared::CustomerPortalCustomerUpdate.new( + billing_address: Models::Shared::Address.new( + country: "FR", + ), +) + +res = s.customer_portal_customers.update(security: Models::Operations::CustomerPortalCustomersUpdateSecurity.new( + customer_session: "", + ), req, Models::Operations::CustomerPortalCustomersUpdateSecurity.new( + customer_session: "", + )) + +if ! res.customer_portal_customer.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::CustomerPortalCustomerUpdate](../../models/shared/customerportalcustomerupdate.md) | :heavy_check_mark: | The request object to use for the request. | +| `security` | [Models::Operations::CustomerPortalCustomersUpdateSecurity](../../models/operations/customerportalcustomersupdatesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalCustomersUpdateResponse)](../../models/operations/customerportalcustomersupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get_payment_methods + +Get saved payment methods of the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_customers.get_payment_methods(security: Models::Operations::CustomerPortalCustomersGetPaymentMethodsSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalCustomersGetPaymentMethodsSecurity.new( + customer_session: "", + ), page=842_307, limit=819_707) + +if ! res.list_resource_union_payment_method_card_payment_method_generic.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalCustomersGetPaymentMethodsSecurity](../../models/operations/customerportalcustomersgetpaymentmethodssecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalCustomersGetPaymentMethodsResponse)](../../models/operations/customerportalcustomersgetpaymentmethodsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## add_payment_method + +Add a payment method to the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Shared::CustomerPaymentMethodCreate.new( + confirmation_token_id: "", + set_default: false, + return_url: "https://probable-resource.biz", +) + +res = s.customer_portal_customers.add_payment_method(security: Models::Operations::CustomerPortalCustomersAddPaymentMethodSecurity.new( + customer_session: "", + ), req, Models::Operations::CustomerPortalCustomersAddPaymentMethodSecurity.new( + customer_session: "", + )) + +if ! res.response_customer_portal_customers_add_payment_method.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::CustomerPaymentMethodCreate](../../models/shared/customerpaymentmethodcreate.md) | :heavy_check_mark: | The request object to use for the request. | +| `security` | [Models::Operations::CustomerPortalCustomersAddPaymentMethodSecurity](../../models/operations/customerportalcustomersaddpaymentmethodsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalCustomersAddPaymentMethodResponse)](../../models/operations/customerportalcustomersaddpaymentmethodresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## delete_payment_method + +Delete a payment method from the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_customers.delete_payment_method(security: Models::Operations::CustomerPortalCustomersDeletePaymentMethodSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalCustomersDeletePaymentMethodSecurity.new( + customer_session: "", + ), id="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalCustomersDeletePaymentMethodSecurity](../../models/operations/customerportalcustomersdeletepaymentmethodsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalCustomersDeletePaymentMethodResponse)](../../models/operations/customerportalcustomersdeletepaymentmethodresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customerportaldownloadables/README.md b/docs/sdks/customerportaldownloadables/README.md new file mode 100644 index 0000000..b13588e --- /dev/null +++ b/docs/sdks/customerportaldownloadables/README.md @@ -0,0 +1,93 @@ +# CustomerPortalDownloadables +(*customer_portal_downloadables*) + +## Overview + +### Available Operations + +* [list](#list) - List Downloadables +* [get](#get) - Get Downloadable + +## list + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_downloadables.list(security: Models::Operations::CustomerPortalDownloadablesListSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalDownloadablesListSecurity.new( + customer_session: "", + ), organization_id=[ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", +], benefit_id=[ + "", +], page=678_317, limit=177_706) + +if ! res.list_resource_downloadable_read.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `security` | [Models::Operations::CustomerPortalDownloadablesListSecurity](../../models/operations/customerportaldownloadableslistsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportaldownloadableslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `benefit_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportaldownloadableslistqueryparambenefitidfilter.md) | :heavy_minus_sign: | Filter by benefit ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalDownloadablesListResponse)](../../models/operations/customerportaldownloadableslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get Downloadable + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_downloadables.get(token="") + +if ! res.any.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `token` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalDownloadablesCustomerPortalDownloadablesGetResponse)](../../models/operations/customerportaldownloadablescustomerportaldownloadablesgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customerportallicensekeys/README.md b/docs/sdks/customerportallicensekeys/README.md new file mode 100644 index 0000000..e4c1514 --- /dev/null +++ b/docs/sdks/customerportallicensekeys/README.md @@ -0,0 +1,233 @@ +# CustomerPortalLicenseKeys +(*customer_portal_license_keys*) + +## Overview + +### Available Operations + +* [list](#list) - List License Keys +* [get](#get) - Get License Key +* [validate](#validate) - Validate License Key +* [activate](#activate) - Activate License Key +* [deactivate](#deactivate) - Deactivate License Key + +## list + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_license_keys.list(security: Models::Operations::CustomerPortalLicenseKeysListSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalLicenseKeysListSecurity.new( + customer_session: "", + ), organization_id=[ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", +], benefit_id="", page=547_272, limit=678_317) + +if ! res.list_resource_license_key_read.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalLicenseKeysListSecurity](../../models/operations/customerportallicensekeyslistsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/customerportallicensekeyslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `benefit_id` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by a specific benefit | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalLicenseKeysListResponse)](../../models/operations/customerportallicensekeyslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::Unauthorized | 401 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a license key. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_license_keys.get(security: Models::Operations::CustomerPortalLicenseKeysGetSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalLicenseKeysGetSecurity.new( + customer_session: "", + ), id="") + +if ! res.license_key_with_activations.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalLicenseKeysGetSecurity](../../models/operations/customerportallicensekeysgetsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalLicenseKeysGetResponse)](../../models/operations/customerportallicensekeysgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## validate + +Validate a license key. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Shared::LicenseKeyValidate.new( + key: "", + organization_id: "", +) + +res = s.customer_portal_license_keys.validate(req) + +if ! res.validated_license_key.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [Models::Shared::LicenseKeyValidate](../../models/shared/licensekeyvalidate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalLicenseKeysValidateResponse)](../../models/operations/customerportallicensekeysvalidateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## activate + +Activate a license key instance. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Shared::LicenseKeyActivate.new( + key: "", + organization_id: "", + label: "", +) + +res = s.customer_portal_license_keys.activate(req) + +if ! res.license_key_activation_read.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [Models::Shared::LicenseKeyActivate](../../models/shared/licensekeyactivate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalLicenseKeysActivateResponse)](../../models/operations/customerportallicensekeysactivateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::NotPermitted | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## deactivate + +Deactivate a license key instance. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Shared::LicenseKeyDeactivate.new( + key: "", + organization_id: "", + activation_id: "", +) + +res = s.customer_portal_license_keys.deactivate(req) + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [Models::Shared::LicenseKeyDeactivate](../../models/shared/licensekeydeactivate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalLicenseKeysDeactivateResponse)](../../models/operations/customerportallicensekeysdeactivateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customerportalorders/README.md b/docs/sdks/customerportalorders/README.md new file mode 100644 index 0000000..e56a29a --- /dev/null +++ b/docs/sdks/customerportalorders/README.md @@ -0,0 +1,147 @@ +# CustomerPortalOrders +(*customer_portal_orders*) + +## Overview + +### Available Operations + +* [list](#list) - List Orders +* [get](#get) - Get Order +* [invoice](#invoice) - Get Order Invoice + +## list + +List orders of the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Operations::CustomerPortalOrdersListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.customer_portal_orders.list(security: Models::Operations::CustomerPortalOrdersListSecurity.new( + customer_session: "", + ), req, Models::Operations::CustomerPortalOrdersListSecurity.new( + customer_session: "", + )) + +if ! res.list_resource_customer_order.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CustomerPortalOrdersListRequest](../../models/operations/customerportalorderslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `security` | [Models::Operations::CustomerPortalOrdersListSecurity](../../models/operations/customerportalorderslistsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalOrdersListResponse)](../../models/operations/customerportalorderslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get an order by ID for the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_orders.get(security: Models::Operations::CustomerPortalOrdersGetSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalOrdersGetSecurity.new( + customer_session: "", + ), id="") + +if ! res.customer_order.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalOrdersGetSecurity](../../models/operations/customerportalordersgetsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | The order ID. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalOrdersGetResponse)](../../models/operations/customerportalordersgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## invoice + +Get an order's invoice data. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_orders.invoice(security: Models::Operations::CustomerPortalOrdersInvoiceSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalOrdersInvoiceSecurity.new( + customer_session: "", + ), id="") + +if ! res.customer_order_invoice.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalOrdersInvoiceSecurity](../../models/operations/customerportalordersinvoicesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | The order ID. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalOrdersInvoiceResponse)](../../models/operations/customerportalordersinvoiceresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customerportalorganizations/README.md b/docs/sdks/customerportalorganizations/README.md new file mode 100644 index 0000000..ae033c9 --- /dev/null +++ b/docs/sdks/customerportalorganizations/README.md @@ -0,0 +1,47 @@ +# CustomerPortalOrganizations +(*customer_portal_organizations*) + +## Overview + +### Available Operations + +* [get](#get) - Get Organization + +## get + +Get a customer portal's organization by slug. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customer_portal_organizations.get(slug="") + +if ! res.customer_organization.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `slug` | *::String* | :heavy_check_mark: | The organization slug. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalOrganizationsGetResponse)](../../models/operations/customerportalorganizationsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customerportalsubscriptions/README.md b/docs/sdks/customerportalsubscriptions/README.md new file mode 100644 index 0000000..2ffb6f5 --- /dev/null +++ b/docs/sdks/customerportalsubscriptions/README.md @@ -0,0 +1,195 @@ +# CustomerPortalSubscriptions +(*customer_portal_subscriptions*) + +## Overview + +### Available Operations + +* [list](#list) - List Subscriptions +* [get](#get) - Get Subscription +* [update](#update) - Update Subscription +* [cancel](#cancel) - Cancel Subscription + +## list + +List subscriptions of the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Operations::CustomerPortalSubscriptionsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.customer_portal_subscriptions.list(security: Models::Operations::CustomerPortalSubscriptionsListSecurity.new( + customer_session: "", + ), req, Models::Operations::CustomerPortalSubscriptionsListSecurity.new( + customer_session: "", + )) + +if ! res.list_resource_customer_subscription.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CustomerPortalSubscriptionsListRequest](../../models/operations/customerportalsubscriptionslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `security` | [Models::Operations::CustomerPortalSubscriptionsListSecurity](../../models/operations/customerportalsubscriptionslistsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalSubscriptionsListResponse)](../../models/operations/customerportalsubscriptionslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a subscription for the authenticated customer. + +**Scopes**: `customer_portal:read` `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_subscriptions.get(security: Models::Operations::CustomerPortalSubscriptionsGetSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalSubscriptionsGetSecurity.new( + customer_session: "", + ), id="") + +if ! res.customer_subscription.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalSubscriptionsGetSecurity](../../models/operations/customerportalsubscriptionsgetsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalSubscriptionsGetResponse)](../../models/operations/customerportalsubscriptionsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a subscription of the authenticated customer. + +**Scopes**: `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_subscriptions.update(security: Models::Operations::CustomerPortalSubscriptionsUpdateSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalSubscriptionsUpdateSecurity.new( + customer_session: "", + ), id="", customer_subscription_update=Models::Shared::CustomerSubscriptionCancel.new()) + +if ! res.customer_subscription.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalSubscriptionsUpdateSecurity](../../models/operations/customerportalsubscriptionsupdatesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | +| `customer_subscription_update` | [T.any(Models::Shared::CustomerSubscriptionUpdateProduct, Models::Shared::CustomerSubscriptionCancel)](../../models/shared/customersubscriptionupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalSubscriptionsUpdateResponse)](../../models/operations/customerportalsubscriptionsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| Models::Errors::AlreadyCanceledSubscription | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## cancel + +Cancel a subscription of the authenticated customer. + +**Scopes**: `customer_portal:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +res = s.customer_portal_subscriptions.cancel(security: Models::Operations::CustomerPortalSubscriptionsCancelSecurity.new( + customer_session: "", + ), Models::Operations::CustomerPortalSubscriptionsCancelSecurity.new( + customer_session: "", + ), id="") + +if ! res.customer_subscription.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [Models::Operations::CustomerPortalSubscriptionsCancelSecurity](../../models/operations/customerportalsubscriptionscancelsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | + +### Response + +**[T.nilable(Models::Operations::CustomerPortalSubscriptionsCancelResponse)](../../models/operations/customerportalsubscriptionscancelresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| Models::Errors::AlreadyCanceledSubscription | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customers/README.md b/docs/sdks/customers/README.md new file mode 100644 index 0000000..ae5e645 --- /dev/null +++ b/docs/sdks/customers/README.md @@ -0,0 +1,494 @@ +# Customers +(*customers*) + +## Overview + +### Available Operations + +* [list](#list) - List Customers +* [create](#create) - Create Customer +* [get](#get) - Get Customer +* [update](#update) - Update Customer +* [delete](#delete) - Delete Customer +* [get_external](#get_external) - Get Customer by External ID +* [update_external](#update_external) - Update Customer by External ID +* [delete_external](#delete_external) - Delete Customer by External ID +* [get_state](#get_state) - Get Customer State +* [get_state_external](#get_state_external) - Get Customer State by External ID + +## list + +List customers. + +**Scopes**: `customers:read` `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::CustomersListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.customers.list(req) + +if ! res.list_resource_customer.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CustomersListRequest](../../models/operations/customerslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomersListResponse)](../../models/operations/customerslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a customer. + +**Scopes**: `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::CustomerCreate.new( + external_id: "usr_1337", + email: "customer@example.com", + name: "John Doe", + billing_address: Models::Shared::Address.new( + country: "SE", + ), + tax_id: [ + "FR61954506077", + "eu_vat", + ], + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", +) + +res = s.customers.create(req) + +if ! res.customer.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [Models::Shared::CustomerCreate](../../models/shared/customercreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomersCreateResponse)](../../models/operations/customerscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a customer by ID. + +**Scopes**: `customers:read` `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customers.get(id="") + +if ! res.customer.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The customer ID. | + +### Response + +**[T.nilable(Models::Operations::CustomersGetResponse)](../../models/operations/customersgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a customer. + +**Scopes**: `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customers.update(id="", customer_update=Models::Shared::CustomerUpdate.new( + email: "customer@example.com", + name: "John Doe", + billing_address: Models::Shared::Address.new( + country: "FR", + ), + tax_id: [ + "FR61954506077", + "eu_vat", + ], + external_id: "usr_1337", +)) + +if ! res.customer.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The customer ID. | +| `customer_update` | [Models::Shared::CustomerUpdate](../../models/shared/customerupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CustomersUpdateResponse)](../../models/operations/customersupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete a customer. + +This action cannot be undone and will immediately: +- Cancel any active subscriptions for the customer +- Revoke all their benefits +- Clear any `external_id` + +Use it only in the context of deleting a user within your +own service. Otherwise, use more granular API endpoints to cancel +a specific subscription or revoke certain benefits. + +Note: The customers information will nonetheless be retained for historic +orders and subscriptions. + +**Scopes**: `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customers.delete(id="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The customer ID. | + +### Response + +**[T.nilable(Models::Operations::CustomersDeleteResponse)](../../models/operations/customersdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get_external + +Get a customer by external ID. + +**Scopes**: `customers:read` `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customers.get_external(external_id="") + +if ! res.customer.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `external_id` | *::String* | :heavy_check_mark: | The customer external ID. | + +### Response + +**[T.nilable(Models::Operations::CustomersGetExternalResponse)](../../models/operations/customersgetexternalresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update_external + +Update a customer by external ID. + +**Scopes**: `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customers.update_external(external_id="", customer_update_external_id=Models::Shared::CustomerUpdateExternalID.new( + email: "customer@example.com", + name: "John Doe", + billing_address: Models::Shared::Address.new( + country: "US", + ), + tax_id: [ + "FR61954506077", + "eu_vat", + ], +)) + +if ! res.customer.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `external_id` | *::String* | :heavy_check_mark: | The customer external ID. | +| `customer_update_external_id` | [Models::Shared::CustomerUpdateExternalID](../../models/shared/customerupdateexternalid.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CustomersUpdateExternalResponse)](../../models/operations/customersupdateexternalresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## delete_external + +Delete a customer by external ID. + +Immediately cancels any active subscriptions and revokes any active benefits. + +**Scopes**: `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customers.delete_external(external_id="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `external_id` | *::String* | :heavy_check_mark: | The customer external ID. | + +### Response + +**[T.nilable(Models::Operations::CustomersDeleteExternalResponse)](../../models/operations/customersdeleteexternalresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get_state + +Get a customer state by ID. + +The customer state includes information about +the customer's active subscriptions and benefits. + +It's the ideal endpoint to use when you need to get a full overview +of a customer's status. + +**Scopes**: `customers:read` `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customers.get_state(id="") + +if ! res.customer_state.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The customer ID. | + +### Response + +**[T.nilable(Models::Operations::CustomersGetStateResponse)](../../models/operations/customersgetstateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get_state_external + +Get a customer state by external ID. + +The customer state includes information about +the customer's active subscriptions and benefits. + +It's the ideal endpoint to use when you need to get a full overview +of a customer's status. + +**Scopes**: `customers:read` `customers:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.customers.get_state_external(external_id="") + +if ! res.customer_state.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `external_id` | *::String* | :heavy_check_mark: | The customer external ID. | + +### Response + +**[T.nilable(Models::Operations::CustomersGetStateExternalResponse)](../../models/operations/customersgetstateexternalresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customersessions/README.md b/docs/sdks/customersessions/README.md new file mode 100644 index 0000000..9ce2ec2 --- /dev/null +++ b/docs/sdks/customersessions/README.md @@ -0,0 +1,52 @@ +# CustomerSessions +(*customer_sessions*) + +## Overview + +### Available Operations + +* [create](#create) - Create Customer Session + +## create + +Create a customer session. + +**Scopes**: `customer_sessions:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::CustomerSessionCustomerIDCreate.new( + customer_id: "", +) + +res = s.customer_sessions.create(req) + +if ! res.customer_session.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [T.any(Models::Shared::CustomerSessionCustomerIDCreate, Models::Shared::CustomerSessionCustomerExternalIDCreate)](../../models/operations/customersessionscreatecustomersessioncreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomerSessionsCreateResponse)](../../models/operations/customersessionscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customfields/README.md b/docs/sdks/customfields/README.md new file mode 100644 index 0000000..cb99357 --- /dev/null +++ b/docs/sdks/customfields/README.md @@ -0,0 +1,232 @@ +# CustomFields +(*custom_fields*) + +## Overview + +### Available Operations + +* [list](#list) - List Custom Fields +* [create](#create) - Create Custom Field +* [get](#get) - Get Custom Field +* [update](#update) - Update Custom Field +* [delete](#delete) - Delete Custom Field + +## list + +List custom fields. + +**Scopes**: `custom_fields:read` `custom_fields:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::CustomFieldsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.custom_fields.list(req) + +if ! res.list_resource_custom_field.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::CustomFieldsListRequest](../../models/operations/customfieldslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomFieldsListResponse)](../../models/operations/customfieldslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a custom field. + +**Scopes**: `custom_fields:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::CustomFieldCreateNumber.new( + type: "", + slug: "", + name: "", + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + properties: Models::Shared::CustomFieldNumberProperties.new(), +) + +res = s.custom_fields.create(req) + +if ! res.custom_field.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [T.any(Models::Shared::CustomFieldCreateText, Models::Shared::CustomFieldCreateNumber, Models::Shared::CustomFieldCreateDate, Models::Shared::CustomFieldCreateCheckbox, Models::Shared::CustomFieldCreateSelect)](../../models/shared/customfieldcreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::CustomFieldsCreateResponse)](../../models/operations/customfieldscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a custom field by ID. + +**Scopes**: `custom_fields:read` `custom_fields:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.custom_fields.get(id="") + +if ! res.custom_field.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The custom field ID. | + +### Response + +**[T.nilable(Models::Operations::CustomFieldsGetResponse)](../../models/operations/customfieldsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a custom field. + +**Scopes**: `custom_fields:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.custom_fields.update(id="", custom_field_update=Models::Shared::CustomFieldUpdateText.new( + type: "", +)) + +if ! res.custom_field.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *::String* | :heavy_check_mark: | The custom field ID. | +| `custom_field_update` | [T.any(Models::Shared::CustomFieldUpdateText, Models::Shared::CustomFieldUpdateNumber, Models::Shared::CustomFieldUpdateDate, Models::Shared::CustomFieldUpdateCheckbox, Models::Shared::CustomFieldUpdateSelect)](../../models/shared/customfieldupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CustomFieldsUpdateResponse)](../../models/operations/customfieldsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete a custom field. + +**Scopes**: `custom_fields:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.custom_fields.delete(id="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The custom field ID. | + +### Response + +**[T.nilable(Models::Operations::CustomFieldsDeleteResponse)](../../models/operations/customfieldsdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/discounts/README.md b/docs/sdks/discounts/README.md new file mode 100644 index 0000000..add6f1d --- /dev/null +++ b/docs/sdks/discounts/README.md @@ -0,0 +1,231 @@ +# Discounts +(*discounts*) + +## Overview + +### Available Operations + +* [list](#list) - List Discounts +* [create](#create) - Create Discount +* [get](#get) - Get Discount +* [update](#update) - Update Discount +* [delete](#delete) - Delete Discount + +## list + +List discounts. + +**Scopes**: `discounts:read` `discounts:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::DiscountsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.discounts.list(req) + +if ! res.list_resource_discount.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::DiscountsListRequest](../../models/operations/discountslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::DiscountsListResponse)](../../models/operations/discountslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a discount. + +**Scopes**: `discounts:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::DiscountFixedRepeatDurationCreate.new( + duration: Models::Shared::DiscountDuration::FOREVER, + duration_in_months: 417_458, + type: Models::Shared::DiscountType::FIXED, + amount: 69_025, + name: "", + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", +) + +res = s.discounts.create(req) + +if ! res.discount.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [T.any(Models::Shared::DiscountFixedOnceForeverDurationCreate, Models::Shared::DiscountFixedRepeatDurationCreate, Models::Shared::DiscountPercentageOnceForeverDurationCreate, Models::Shared::DiscountPercentageRepeatDurationCreate)](../../models/shared/discountcreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::DiscountsCreateResponse)](../../models/operations/discountscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a discount by ID. + +**Scopes**: `discounts:read` `discounts:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.discounts.get(id="") + +if ! res.discount.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The discount ID. | + +### Response + +**[T.nilable(Models::Operations::DiscountsGetResponse)](../../models/operations/discountsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a discount. + +**Scopes**: `discounts:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.discounts.update(id="", discount_update=Models::Shared::DiscountUpdate.new()) + +if ! res.discount.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The discount ID. | +| `discount_update` | [Models::Shared::DiscountUpdate](../../models/shared/discountupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::DiscountsUpdateResponse)](../../models/operations/discountsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete a discount. + +**Scopes**: `discounts:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.discounts.delete(id="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The discount ID. | + +### Response + +**[T.nilable(Models::Operations::DiscountsDeleteResponse)](../../models/operations/discountsdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md new file mode 100644 index 0000000..3fec7f2 --- /dev/null +++ b/docs/sdks/events/README.md @@ -0,0 +1,192 @@ +# Events +(*events*) + +## Overview + +### Available Operations + +* [list](#list) - List Events +* [list_names](#list_names) - List Event Names +* [get](#get) - Get Event +* [ingest](#ingest) - Ingest Events + +## list + +List events. + +**Scopes**: `events:read` `events:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::EventsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.events.list(req) + +if ! res.list_resource_event.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::EventsListRequest](../../models/operations/eventslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::EventsListResponse)](../../models/operations/eventslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## list_names + +List event names. + +**Scopes**: `events:read` `events:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::EventsListNamesRequest.new( + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", +) + +res = s.events.list_names(req) + +if ! res.list_resource_event_name.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::EventsListNamesRequest](../../models/operations/eventslistnamesrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::EventsListNamesResponse)](../../models/operations/eventslistnamesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get an event by ID. + +**Scopes**: `events:read` `events:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.events.get(id="") + +if ! res.event.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The event ID. | + +### Response + +**[T.nilable(Models::Operations::EventsGetResponse)](../../models/operations/eventsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## ingest + +Ingest batch of events. + +**Scopes**: `events:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::EventsIngest.new( + events: [ + Models::Shared::EventCreateExternalCustomer.new( + name: "", + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + external_customer_id: "", + ), + ], +) + +res = s.events.ingest(req) + +if ! res.events_ingest_response.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [Models::Shared::EventsIngest](../../models/shared/eventsingest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::EventsIngestResponse)](../../models/operations/eventsingestresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md new file mode 100644 index 0000000..852f104 --- /dev/null +++ b/docs/sdks/files/README.md @@ -0,0 +1,252 @@ +# Files +(*files*) + +## Overview + +### Available Operations + +* [list](#list) - List Files +* [create](#create) - Create File +* [uploaded](#uploaded) - Complete File Upload +* [update](#update) - Update File +* [delete](#delete) - Delete File + +## list + +List files. + +**Scopes**: `files:read` `files:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.files.list(organization_id="1dbfc517-0bbf-4301-9ba8-555ca42b9737", ids=[ + "", +], page=768_578, limit=547_272) + +if ! res.list_resource_file_read.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `organization_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `ids` | T::Array<*::String*> | :heavy_minus_sign: | List of file IDs to get. | | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | | + +### Response + +**[T.nilable(Models::Operations::FilesListResponse)](../../models/operations/fileslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a file. + +**Scopes**: `files:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::OrganizationAvatarFileCreate.new( + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + name: "", + mime_type: "", + size: 638_424, + upload: Models::Shared::S3FileCreateMultipart.new( + parts: [ + Models::Shared::S3FileCreatePart.new( + number: 417_458, + chunk_start: 134_365, + chunk_end: 69_025, + ), + ], + ), + service: "", +) + +res = s.files.create(req) + +if ! res.file_upload.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [T.any(Models::Shared::DownloadableFileCreate, Models::Shared::ProductMediaFileCreate, Models::Shared::OrganizationAvatarFileCreate)](../../models/shared/filecreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::FilesCreateResponse)](../../models/operations/filescreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## uploaded + +Complete a file upload. + +**Scopes**: `files:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.files.uploaded(id="", file_upload_completed=Models::Shared::FileUploadCompleted.new( + id: "", + path: "/sys", + parts: [ + Models::Shared::S3FileUploadCompletedPart.new( + number: 848_922, + checksum_etag: "", + checksum_sha256_base64: "", + ), + ], +)) + +if ! res.response_files_uploaded.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The file ID. | +| `file_upload_completed` | [Models::Shared::FileUploadCompleted](../../models/shared/fileuploadcompleted.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::FilesUploadedResponse)](../../models/operations/filesuploadedresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::NotPermitted | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a file. + +**Scopes**: `files:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.files.update(id="", file_patch=Models::Shared::FilePatch.new()) + +if ! res.response_files_update.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The file ID. | +| `file_patch` | [Models::Shared::FilePatch](../../models/shared/filepatch.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::FilesUpdateResponse)](../../models/operations/filesupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::NotPermitted | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete a file. + +**Scopes**: `files:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.files.delete(id="") + +if res.status_code == 200 + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::FilesDeleteResponse)](../../models/operations/filesdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::NotPermitted | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/licensekeys/README.md b/docs/sdks/licensekeys/README.md new file mode 100644 index 0000000..9c1091c --- /dev/null +++ b/docs/sdks/licensekeys/README.md @@ -0,0 +1,188 @@ +# LicenseKeys +(*license_keys*) + +## Overview + +### Available Operations + +* [list](#list) - List License Keys +* [get](#get) - Get License Key +* [update](#update) - Update License Key +* [get_activation](#get_activation) - Get Activation + +## list + +Get license keys connected to the given organization & filters. + +**Scopes**: `license_keys:read` `license_keys:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.license_keys.list(organization_id=[ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", +], benefit_id=[ + "", +], page=678_317, limit=177_706) + +if ! res.list_resource_license_key_read.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/licensekeyslistqueryparamorganizationidfilter.md) | :heavy_minus_sign: | Filter by organization ID. | +| `benefit_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/queryparambenefitidfilter.md) | :heavy_minus_sign: | Filter by benefit ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | + +### Response + +**[T.nilable(Models::Operations::LicenseKeysListResponse)](../../models/operations/licensekeyslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::Unauthorized | 401 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a license key. + +**Scopes**: `license_keys:read` `license_keys:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.license_keys.get(id="") + +if ! res.license_key_with_activations.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::LicenseKeysGetResponse)](../../models/operations/licensekeysgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::Unauthorized | 401 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a license key. + +**Scopes**: `license_keys:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.license_keys.update(id="", license_key_update=Models::Shared::LicenseKeyUpdate.new()) + +if ! res.license_key_read.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `license_key_update` | [Models::Shared::LicenseKeyUpdate](../../models/shared/licensekeyupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::LicenseKeysUpdateResponse)](../../models/operations/licensekeysupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::Unauthorized | 401 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get_activation + +Get a license key activation. + +**Scopes**: `license_keys:read` `license_keys:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.license_keys.get_activation(id="", activation_id="") + +if ! res.license_key_activation_read.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `activation_id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::LicenseKeysGetActivationResponse)](../../models/operations/licensekeysgetactivationresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::Unauthorized | 401 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/meters/README.md b/docs/sdks/meters/README.md new file mode 100644 index 0000000..ad991bb --- /dev/null +++ b/docs/sdks/meters/README.md @@ -0,0 +1,242 @@ +# Meters +(*meters*) + +## Overview + +### Available Operations + +* [list](#list) - List Meters +* [create](#create) - Create Meter +* [get](#get) - Get Meter +* [update](#update) - Update Meter +* [quantities](#quantities) - Get Meter Quantities + +## list + +List meters. + +**Scopes**: `meters:read` `meters:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::MetersListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.meters.list(req) + +if ! res.list_resource_meter.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::MetersListRequest](../../models/operations/meterslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::MetersListResponse)](../../models/operations/meterslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a meter. + +**Scopes**: `meters:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::MeterCreate.new( + name: "", + filter: Models::Shared::Filter.new( + conjunction: Models::Shared::FilterConjunction::AND, + clauses: [], + ), + aggregation: Models::Shared::PropertyAggregation.new( + func: Models::Shared::Func::MAX, + property: "", + ), + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", +) + +res = s.meters.create(req) + +if ! res.meter.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `request` | [Models::Shared::MeterCreate](../../models/shared/metercreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::MetersCreateResponse)](../../models/operations/meterscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a meter by ID. + +**Scopes**: `meters:read` `meters:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.meters.get(id="") + +if ! res.meter.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The meter ID. | + +### Response + +**[T.nilable(Models::Operations::MetersGetResponse)](../../models/operations/metersgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a meter. + +**Scopes**: `meters:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.meters.update(id="", meter_update=Models::Shared::MeterUpdate.new()) + +if ! res.meter.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The meter ID. | +| `meter_update` | [Models::Shared::MeterUpdate](../../models/shared/meterupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::MetersUpdateResponse)](../../models/operations/metersupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## quantities + +Get quantities of a meter over a time period. + +**Scopes**: `meters:read` `meters:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::MetersQuantitiesRequest.new( + id: "", + start_timestamp: DateTime.iso8601('2023-09-17T00:45:34.608Z'), + end_timestamp: DateTime.iso8601('2023-07-21T18:11:39.069Z'), + interval: Models::Shared::TimeInterval::HOUR, +) + +res = s.meters.quantities(req) + +if ! res.meter_quantities.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::MetersQuantitiesRequest](../../models/operations/metersquantitiesrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::MetersQuantitiesResponse)](../../models/operations/metersquantitiesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/metrics/README.md b/docs/sdks/metrics/README.md new file mode 100644 index 0000000..5193b3a --- /dev/null +++ b/docs/sdks/metrics/README.md @@ -0,0 +1,93 @@ +# Metrics +(*metrics*) + +## Overview + +### Available Operations + +* [get](#get) - Get Metrics +* [limits](#limits) - Get Metrics Limits + +## get + +Get metrics about your orders and subscriptions. + +Currency values are output in cents. + +**Scopes**: `metrics:read` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::MetricsGetRequest.new( + start_date: Date.parse("2025-02-06"), + end_date: Date.parse("2024-09-04"), + interval: Models::Shared::TimeInterval::WEEK, + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.metrics.get(req) + +if ! res.metrics_response.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::MetricsGetRequest](../../models/operations/metricsgetrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::MetricsGetResponse)](../../models/operations/metricsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## limits + +Get the interval limits for the metrics endpoint. + +**Scopes**: `metrics:read` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.metrics.limits() + +if ! res.metrics_limits.nil? + # handle response +end + +``` + +### Response + +**[T.nilable(Models::Operations::MetricsLimitsResponse)](../../models/operations/metricslimitsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/oauth2/README.md b/docs/sdks/oauth2/README.md new file mode 100644 index 0000000..025bd31 --- /dev/null +++ b/docs/sdks/oauth2/README.md @@ -0,0 +1,199 @@ +# Oauth2 +(*oauth2*) + +## Overview + +### Available Operations + +* [authorize](#authorize) - Authorize +* [token](#token) - Request Token +* [revoke](#revoke) - Revoke Token +* [introspect](#introspect) - Introspect Token +* [userinfo](#userinfo) - Get User Info + +## authorize + +Authorize + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.oauth2.authorize() + +if ! res.response_oauth2_authorize.nil? + # handle response +end + +``` + +### Response + +**[T.nilable(Models::Operations::Oauth2AuthorizeResponse)](../../models/operations/oauth2authorizeresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## token + +Request an access token using a valid grant. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Shared::AuthorizationCodeTokenRequest.new( + grant_type: "", + client_id: "", + client_secret: "", + code: "", + redirect_uri: "https://old-fort.name", +) + +res = s.oauth2.token(req) + +if ! res.token_response.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [T.any(Models::Shared::AuthorizationCodeTokenRequest, Models::Shared::RefreshTokenRequest)](../../models/operations/oauth2requesttokenrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::Oauth2RequestTokenResponse)](../../models/operations/oauth2requesttokenresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## revoke + +Revoke an access token or a refresh token. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Shared::RevokeTokenRequest.new( + token: "", + client_id: "", + client_secret: "", +) + +res = s.oauth2.revoke(req) + +if ! res.revoke_token_response.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [Models::Shared::RevokeTokenRequest](../../models/shared/revoketokenrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::Oauth2RevokeTokenResponse)](../../models/operations/oauth2revoketokenresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## introspect + +Get information about an access token. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new + +req = Models::Shared::IntrospectTokenRequest.new( + token: "", + client_id: "", + client_secret: "", +) + +res = s.oauth2.introspect(req) + +if ! res.introspect_token_response.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::IntrospectTokenRequest](../../models/shared/introspecttokenrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::Oauth2IntrospectTokenResponse)](../../models/operations/oauth2introspecttokenresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## userinfo + +Get information about the authenticated user. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.oauth2.userinfo() + +if ! res.response_oauth2_userinfo.nil? + # handle response +end + +``` + +### Response + +**[T.nilable(Models::Operations::Oauth2UserinfoResponse)](../../models/operations/oauth2userinforesponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/oauth2clients/README.md b/docs/sdks/oauth2clients/README.md new file mode 100644 index 0000000..fcde0fd --- /dev/null +++ b/docs/sdks/oauth2clients/README.md @@ -0,0 +1,217 @@ +# Oauth2Clients +(*oauth2_clients*) + +## Overview + +### Available Operations + +* [list](#list) - List Clients +* [create](#create) - Create Client +* [get](#get) - Get Client +* [update](#update) - Update Client +* [delete](#delete) - Delete Client + +## list + +List OAuth2 clients. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.oauth2_clients.list(page=768_578, limit=547_272) + +if ! res.list_resource_o_auth2_client.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | + +### Response + +**[T.nilable(Models::Operations::Oauth2ClientsListResponse)](../../models/operations/oauth2clientslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create an OAuth2 client. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::OAuth2ClientConfiguration.new( + redirect_uris: [ + "https://probable-heating.com/", + ], + client_name: "", +) + +res = s.oauth2_clients.create(req) + +if ! res.any.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `request` | [Models::Shared::OAuth2ClientConfiguration](../../models/shared/oauth2clientconfiguration.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::Oauth2ClientsOauth2CreateClientResponse)](../../models/operations/oauth2clientsoauth2createclientresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get an OAuth2 client by Client ID. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.oauth2_clients.get(client_id="") + +if ! res.any.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `client_id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::Oauth2ClientsOauth2GetClientResponse)](../../models/operations/oauth2clientsoauth2getclientresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update an OAuth2 client. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.oauth2_clients.update(client_id="", o_auth2_client_configuration_update=Models::Shared::OAuth2ClientConfigurationUpdate.new( + redirect_uris: [ + "https://passionate-flu.org", + ], + client_name: "", + client_id: "", +)) + +if ! res.any.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `client_id` | *::String* | :heavy_check_mark: | N/A | +| `o_auth2_client_configuration_update` | [Models::Shared::OAuth2ClientConfigurationUpdate](../../models/shared/oauth2clientconfigurationupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::Oauth2ClientsOauth2UpdateClientResponse)](../../models/operations/oauth2clientsoauth2updateclientresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete an OAuth2 client. + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.oauth2_clients.delete(client_id="") + +if ! res.any.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `client_id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::Oauth2ClientsOauth2DeleteClientResponse)](../../models/operations/oauth2clientsoauth2deleteclientresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/orders/README.md b/docs/sdks/orders/README.md new file mode 100644 index 0000000..ac9da95 --- /dev/null +++ b/docs/sdks/orders/README.md @@ -0,0 +1,138 @@ +# Orders +(*orders*) + +## Overview + +### Available Operations + +* [list](#list) - List Orders +* [get](#get) - Get Order +* [invoice](#invoice) - Get Order Invoice + +## list + +List orders. + +**Scopes**: `orders:read` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::OrdersListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.orders.list(req) + +if ! res.list_resource_order.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::OrdersListRequest](../../models/operations/orderslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::OrdersListResponse)](../../models/operations/orderslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get an order by ID. + +**Scopes**: `orders:read` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.orders.get(id="") + +if ! res.order.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The order ID. | + +### Response + +**[T.nilable(Models::Operations::OrdersGetResponse)](../../models/operations/ordersgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## invoice + +Get an order's invoice data. + +**Scopes**: `orders:read` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.orders.invoice(id="") + +if ! res.order_invoice.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | The order ID. | + +### Response + +**[T.nilable(Models::Operations::OrdersInvoiceResponse)](../../models/operations/ordersinvoiceresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md new file mode 100644 index 0000000..81e41c5 --- /dev/null +++ b/docs/sdks/organizations/README.md @@ -0,0 +1,185 @@ +# Organizations +(*organizations*) + +## Overview + +### Available Operations + +* [list](#list) - List Organizations +* [create](#create) - Create Organization +* [get](#get) - Get Organization +* [update](#update) - Update Organization + +## list + +List organizations. + +**Scopes**: `organizations:read` `organizations:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.organizations.list(slug="", page=768_578, limit=547_272, sorting=[ + Models::Shared::OrganizationSortProperty::NAME, +]) + +if ! res.list_resource_organization.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `slug` | *T.nilable(::String)* | :heavy_minus_sign: | Filter by slug. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | T::Array<[Models::Shared::OrganizationSortProperty](../../models/shared/organizationsortproperty.md)> | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | + +### Response + +**[T.nilable(Models::Operations::OrganizationsListResponse)](../../models/operations/organizationslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create an organization. + +**Scopes**: `organizations:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::OrganizationCreate.new( + name: "", + slug: "", +) + +res = s.organizations.create(req) + +if ! res.organization.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [Models::Shared::OrganizationCreate](../../models/shared/organizationcreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::OrganizationsCreateResponse)](../../models/operations/organizationscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get an organization by ID. + +**Scopes**: `organizations:read` `organizations:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.organizations.get(id="1dbfc517-0bbf-4301-9ba8-555ca42b9737") + +if ! res.organization.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | + +### Response + +**[T.nilable(Models::Operations::OrganizationsGetResponse)](../../models/operations/organizationsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update an organization. + +**Scopes**: `organizations:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.organizations.update(id="1dbfc517-0bbf-4301-9ba8-555ca42b9737", organization_update=Models::Shared::OrganizationUpdate.new()) + +if ! res.organization.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | 1dbfc517-0bbf-4301-9ba8-555ca42b9737 | +| `organization_update` | [Models::Shared::OrganizationUpdate](../../models/shared/organizationupdate.md) | :heavy_check_mark: | N/A | | + +### Response + +**[T.nilable(Models::Operations::OrganizationsUpdateResponse)](../../models/operations/organizationsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::NotPermitted | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/polar/README.md b/docs/sdks/polar/README.md new file mode 100644 index 0000000..8c5008c --- /dev/null +++ b/docs/sdks/polar/README.md @@ -0,0 +1,7 @@ +# Polar SDK + +## Overview + +Read the docs at https://docs.polar.sh/api-reference + +### Available Operations diff --git a/docs/sdks/products/README.md b/docs/sdks/products/README.md new file mode 100644 index 0000000..55897c1 --- /dev/null +++ b/docs/sdks/products/README.md @@ -0,0 +1,240 @@ +# Products +(*products*) + +## Overview + +### Available Operations + +* [list](#list) - List Products +* [create](#create) - Create Product +* [get](#get) - Get Product +* [update](#update) - Update Product +* [update_benefits](#update_benefits) - Update Product Benefits + +## list + +List products. + +**Scopes**: `products:read` `products:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::ProductsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.products.list(req) + +if ! res.list_resource_product.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::ProductsListRequest](../../models/operations/productslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::ProductsListResponse)](../../models/operations/productslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a product. + +**Scopes**: `products:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::ProductCreate.new( + name: "", + recurring_interval: Models::Shared::SubscriptionRecurringInterval::MONTH, + prices: [ + Models::Shared::ProductPriceFreeCreate.new( + amount_type: "", + ), + ], + organization_id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737", +) + +res = s.products.create(req) + +if ! res.product.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `request` | [Models::Shared::ProductCreate](../../models/shared/productcreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::ProductsCreateResponse)](../../models/operations/productscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a product by ID. + +**Scopes**: `products:read` `products:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.products.get(id="") + +if ! res.product.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *::String* | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::ProductsGetResponse)](../../models/operations/productsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a product. + +**Scopes**: `products:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.products.update(id="", product_update=Models::Shared::ProductUpdate.new()) + +if ! res.product.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `product_update` | [Models::Shared::ProductUpdate](../../models/shared/productupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::ProductsUpdateResponse)](../../models/operations/productsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::NotPermitted | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update_benefits + +Update benefits granted by a product. + +**Scopes**: `products:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.products.update_benefits(id="", product_benefits_update=Models::Shared::ProductBenefitsUpdate.new( + benefits: [ + "", + ], +)) + +if ! res.product.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | N/A | +| `product_benefits_update` | [Models::Shared::ProductBenefitsUpdate](../../models/shared/productbenefitsupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::ProductsUpdateBenefitsResponse)](../../models/operations/productsupdatebenefitsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::NotPermitted | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/refunds/README.md b/docs/sdks/refunds/README.md new file mode 100644 index 0000000..7c130a8 --- /dev/null +++ b/docs/sdks/refunds/README.md @@ -0,0 +1,103 @@ +# Refunds +(*refunds*) + +## Overview + +### Available Operations + +* [list](#list) - List Refunds +* [create](#create) - Create Refund + +## list + +List products. + +**Scopes**: `refunds:read` `refunds:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::RefundsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.refunds.list(req) + +if ! res.list_resource_refund.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::RefundsListRequest](../../models/operations/refundslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::RefundsListResponse)](../../models/operations/refundslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## create + +Create a refund. + +**Scopes**: `refunds:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Shared::RefundCreate.new( + order_id: "", + reason: Models::Shared::RefundReason::CUSTOMER_REQUEST, + amount: 638_424, +) + +res = s.refunds.create(req) + +if ! res.refund.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [Models::Shared::RefundCreate](../../models/shared/refundcreate.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::RefundsCreateResponse)](../../models/operations/refundscreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::RefundAmountTooHigh | 400 | application/json | +| Models::Errors::RefundedAlready | 403 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/subscriptions/README.md b/docs/sdks/subscriptions/README.md new file mode 100644 index 0000000..1fc59fe --- /dev/null +++ b/docs/sdks/subscriptions/README.md @@ -0,0 +1,228 @@ +# Subscriptions +(*subscriptions*) + +## Overview + +### Available Operations + +* [list](#list) - List Subscriptions +* [export](#export) - Export Subscriptions +* [get](#get) - Get Subscription +* [update](#update) - Update Subscription +* [revoke](#revoke) - Revoke Subscription + +## list + +List subscriptions. + +**Scopes**: `subscriptions:read` `subscriptions:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +req = Models::Operations::SubscriptionsListRequest.new( + organization_id: [ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", + ], +) + +res = s.subscriptions.list(req) + +if ! res.list_resource_subscription.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `request` | [Models::Operations::SubscriptionsListRequest](../../models/operations/subscriptionslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(Models::Operations::SubscriptionsListResponse)](../../models/operations/subscriptionslistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## export + +Export subscriptions as a CSV file. + +**Scopes**: `subscriptions:read` `subscriptions:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.subscriptions.export(organization_id=[ + "1dbfc517-0bbf-4301-9ba8-555ca42b9737", +]) + +if ! res.any.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `organization_id` | [T.nilable(T.any(::String, T::Array[::String]))](../../models/operations/organizationid.md) | :heavy_minus_sign: | Filter by organization ID. | + +### Response + +**[T.nilable(Models::Operations::SubscriptionsExportResponse)](../../models/operations/subscriptionsexportresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## get + +Get a subscription by ID. + +**Scopes**: `subscriptions:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.subscriptions.get(id="") + +if ! res.subscription.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | + +### Response + +**[T.nilable(Models::Operations::SubscriptionsGetResponse)](../../models/operations/subscriptionsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## update + +Update a subscription. + +**Scopes**: `subscriptions:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.subscriptions.update(id="", subscription_update=Models::Shared::SubscriptionRevoke.new( + revoke: false, +)) + +if ! res.subscription.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | +| `subscription_update` | [T.any(Models::Shared::SubscriptionUpdateProduct, Models::Shared::SubscriptionCancel, Models::Shared::SubscriptionRevoke)](../../models/shared/subscriptionupdate.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::SubscriptionsUpdateResponse)](../../models/operations/subscriptionsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| Models::Errors::AlreadyCanceledSubscription | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## revoke + +Revoke a subscription, i.e cancel immediately. + +**Scopes**: `subscriptions:write` + +### Example Usage + +```ruby +require 'polar_sdk' + +s = ::OpenApiSDK::Polar.new( + access_token: "", + ) + +res = s.subscriptions.revoke(id="") + +if ! res.subscription.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *::String* | :heavy_check_mark: | The subscription ID. | + +### Response + +**[T.nilable(Models::Operations::SubscriptionsRevokeResponse)](../../models/operations/subscriptionsrevokeresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| Models::Errors::AlreadyCanceledSubscription | 403 | application/json | +| Models::Errors::ResourceNotFound | 404 | application/json | +| Models::Errors::HTTPValidationError | 422 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/lib/crystalline.rb b/lib/crystalline.rb new file mode 100644 index 0000000..d3e9290 --- /dev/null +++ b/lib/crystalline.rb @@ -0,0 +1,12 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module Crystalline + autoload :MetadataFields, 'crystalline/metadata_fields' +end + + +require_relative 'crystalline/utils' +require_relative 'crystalline/t' diff --git a/lib/crystalline/metadata_fields.rb b/lib/crystalline/metadata_fields.rb new file mode 100644 index 0000000..2e85a72 --- /dev/null +++ b/lib/crystalline/metadata_fields.rb @@ -0,0 +1,196 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module Crystalline + extend T::Sig + module MetadataFields + extend T::Sig + + class Field + attr_accessor :name, :type, :metadata + + def initialize(name, type, metadata) + @name = name + @type = type + @metadata = metadata + end + end + + module ClassMethods + extend T::Sig + + def fields + @__fields__ = [] if @__fields__.nil? + + @__fields__ + end + + def field(field_name, type, metadata = {}) + attr_accessor field_name + + fields << Field.new(field_name, type, metadata) + end + + def field_augmented? + true + end + + def unmarshal_single(field_type, value, decoder = nil) + if field_type.instance_of?(Class) && field_type.include?(::Crystalline::MetadataFields) + unmarshalled = field_type.from_dict(value) + return unmarshalled + elsif field_type.to_s == 'Object' + # rubocop:disable Lint/SuppressedException + begin + value = JSON.parse(value) + rescue TypeError, JSON::ParserError + end + # rubocop:enable Lint/SuppressedException + return value + end + if decoder.nil? + value + else + decoder.call(value) + end + end + + sig { params(json_obj: T.any(String, T::Hash[Symbol, String])).returns(Object) } + def from_json(json_obj) + begin + d = JSON.parse(json_obj) + rescue TypeError, JSON::ParserError + d = json_obj + end + from_dict(d) + end + + sig { params(d: T::Hash[Symbol, String]).returns(Object) } + def from_dict(d) + to_build = new + + fields.each do |field| + field_type = field.type + if T.nilable? field_type + field_type = T.nilable_of(field_type) + end + + key = "#{field.name}=" + lookup = field.metadata.fetch(:format_json, {}).fetch(:letter_case, nil).call + value = d[lookup] + + # If field is not nilable, and the value is not in the dict, raise a KeyError + raise KeyError, "key #{lookup} not found in hash" if value.nil? && !T.nilable?(field.type) + # If field is nilable, and the value is not in the dict, just move to the next field + next if value.nil? + + if T.arr? field_type + inner_type = T.arr_of(field_type) + unmarshalled_array = value.map { |f| unmarshal_single(inner_type, f) } + to_build.send(key, unmarshalled_array) + elsif T.hash? field_type + val_type = T.hash_of(field_type) + + # rubocop:disable Style/HashTransformValues + unmarshalled_hash = value.map { |k, v| [k, unmarshal_single(val_type, v)] }.to_h + # rubocop:enable Style/HashTransformValues + to_build.send(key, unmarshalled_hash) + elsif T.union? field_type + discriminator = field.metadata.fetch(:discriminator, nil) + if !discriminator.nil? + type_to_deserialize = value.fetch(discriminator) + type_to_deserialize = T.get_union_types(field_type).find { |t| t.name.split('::').last == type_to_deserialize } + unmarshalled_val = Crystalline.unmarshal_json(value, type_to_deserialize) + to_build.send(key, unmarshalled_val) + else + union_types = T.get_union_types(field_type) + union_types = union_types.sort_by { |klass| Crystalline.non_nilable_attr_count(klass) } + + union_types.each do |union_type| + begin + unmarshalled_val = Crystalline.unmarshal_json(value, union_type) + to_build.send(key, unmarshalled_val) + rescue TypeError + next + rescue NoMethodError + next + rescue KeyError + next + end + break + end + end + elsif field_type.instance_of?(Class) && field_type.include?(::Crystalline::MetadataFields) + unmarshalled = Crystalline.unmarshal_json(value, field_type) + to_build.send(key, unmarshalled) + else + decoder = field.metadata.fetch(:format_json, {}).fetch(:decoder, nil) + final_value = unmarshal_single(field_type, value, decoder) + to_build.send(key, final_value) + end + end + + to_build + end + end + + def initialize + instance = allocate + fields.each { |mod| instance.singleton_class.include(mod) } + instance.send(:initialize) + end + + def self.included(base) + base.extend(ClassMethods) + end + + def fields + self.class.fields + end + + def field(field_name) + fields.each do |f| + return f if f.name == field_name + end + end + + def marshal_single(field) + if field.class.include? ::Crystalline::MetadataFields + field.to_dict + else + ::Crystalline.val_to_string(field, primitives: false) + end + end + + def to_dict + result = {} + fields.sort_by(&:name).each do |field| + f = send(field.name) + next if f.nil? + + format_json_meta = field.metadata[:format_json] + if !format_json_meta.nil? && format_json_meta.include?(:letter_case) + key = format_json_meta[:letter_case].call(field.name) + else + key = field.name + end + if f.is_a? Array + result[key] = f.map { |o| marshal_single(o) } + elsif f.is_a? Hash + result[key] = f.map { |k, v| [k, marshal_single(v)] } + else + result[key] = marshal_single(f) + end + end + result + end + + def to_json(*args) + JSON.generate(to_dict, *args) + end + end + + +end diff --git a/lib/crystalline/t.rb b/lib/crystalline/t.rb new file mode 100644 index 0000000..92c7329 --- /dev/null +++ b/lib/crystalline/t.rb @@ -0,0 +1,78 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module T + def self.arr?(t) + if t.respond_to? :underlying_class + return t.underlying_class == ::Array + end + false + end + + def self.arr_of(t) + get_raw_type(t.type) + end + + def self.hash?(t) + if t.respond_to? :underlying_class + return t.underlying_class == ::Hash + end + false + end + + def self.hash_of(t) + get_raw_type(t.values) + end + + def self.nilable?(t) + # in sorbet all `T.any` types provide unwrap_nilable for some reason + # So, in order to make this check more robust, we check if the type responds to the `types` method, and if so, whether + # one of those types is NilClass. For non-nilable unions, `types` will return a valid list that does not include NilClass + return false unless t.respond_to?(:unwrap_nilable) + return true unless t.respond_to?(:types) + t.types.map { |tt| simplify_type(tt) }.include?(NilClass) + end + + def self.nilable_of(t) + + if nilable t + return simplify_type t.unwrap_nilable + end + nil + end + + def self.simplifiable?(t) + return t.is_a? T::Types::Simple + end + + def self.simplify_type(t) + if t.is_a? T::Types::Simple + return t.raw_type + end + t + end + + + def self.union?(t) + return false unless t.respond_to? :types + return false if t.types.any? { |tt| get_raw_type(tt) == TrueClass } + return false if t.types.length == 2 && t.types.any? { |tt| get_raw_type(tt) == NilClass } + t.types.length > 1 + end + + def self.get_union_types(t) + t.types.map { |tt| get_raw_type(tt) } + end + + + def self.get_raw_type(t) + if t.respond_to? :raw_type + return t.raw_type + elsif t.respond_to? :raw_a + return T::Boolean if t.raw_a in [TrueClass, FalseClass] + end + t + end +end diff --git a/lib/crystalline/utils.rb b/lib/crystalline/utils.rb new file mode 100644 index 0000000..4b5e2a7 --- /dev/null +++ b/lib/crystalline/utils.rb @@ -0,0 +1,77 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'sorbet-runtime' + +module Crystalline + extend T::Sig + + sig { params(complex: Object).returns(Object) } + def self.to_dict(complex) + if complex.is_a? Array + complex.map { |v| Crystalline.to_dict(v) } + elsif complex.is_a? Hash + complex.transform_values { |v| Crystalline.to_dict(v) } + elsif complex.respond_to?(:class) && complex.class.include?(::Crystalline::MetadataFields) + complex.to_dict + else + val_to_string complex, primitives: false + end + end + + def self.to_json(complex) + JSON.dump(to_dict(complex)) + end + + sig { params(data: Object, type: Object).returns(Object) } + def self.unmarshal_json(data, type) + if T.simplifiable? type + type = T.simplify_type type + end + if type.instance_of?(Class) && type.include?(::Crystalline::MetadataFields) + type.from_dict(data) + elsif T.arr? type + data.map { |v| Crystalline.unmarshal_json(v, T.arr_of(type)) } + elsif T.hash? type + data.transform_values { |v| Crystalline.unmarshal_json(v, T.hash_of(type)) } + else + data + end + end + + sig { params(val: Object, primitives: T::Boolean).returns(Object) } + def self.val_to_string(val, primitives: true) + if val.is_a? T::Enum + val.serialize + elsif val.is_a? DateTime + val.strftime('%Y-%m-%dT%H:%M:%S.%NZ') + elsif primitives + val.to_s + else + val + end + end + + sig { params(klass: T.any(Class, T::Types::TypedArray, T::Types::TypedHash)).returns(Integer) } + def self.non_nilable_attr_count(klass) + # somewhat sane sort ordering for Union deserialization. + # All Crystalline objects return the number of non-nilable fields + # All non-string primitives return 2 + # All arrays and hashes return 1 + # Strings return 0 (since any data can deserialize to a string, it should be our last attempt) + if klass.respond_to? :fields + return -1 * klass.fields.count do |field| + !T.nilable? field.type + end + else + if klass == String + return 0 + elsif klass.is_a?(T::Types::TypedArray) || klass.is_a?(T::Types::TypedHash) + return 1 + end + return 2 + end + end +end diff --git a/lib/open_api_sdk/benefits.rb b/lib/open_api_sdk/benefits.rb new file mode 100644 index 0000000..146b090 --- /dev/null +++ b/lib/open_api_sdk/benefits.rb @@ -0,0 +1,838 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Benefits + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::BenefitsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::BenefitsListResponse) } + def list(request:, timeout_ms: nil) + # list - List Benefits + # List benefits. + # + # **Scopes**: `benefits:read` `benefits:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/benefits/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::BenefitsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'benefits:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceBenefit) + response = Models::Operations::BenefitsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_benefit: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: T.any(Models::Shared::BenefitCustomCreate, Models::Shared::BenefitDiscordCreate, Models::Shared::BenefitGitHubRepositoryCreate, Models::Shared::BenefitDownloadablesCreate, Models::Shared::BenefitLicenseKeysCreate, Models::Shared::BenefitMeterCreditCreate), timeout_ms: T.nilable(Integer)).returns(Models::Operations::BenefitsCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Benefit + # Create a benefit. + # + # **Scopes**: `benefits:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/benefits/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'benefits:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)) + response = Models::Operations::BenefitsCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + benefit: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::BenefitsGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Benefit + # Get a benefit by ID. + # + # **Scopes**: `benefits:read` `benefits:write` + request = Models::Operations::BenefitsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::BenefitsGetRequest, + base_url, + '/v1/benefits/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'benefits:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)) + response = Models::Operations::BenefitsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + benefit: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request_body: T.any(Models::Shared::BenefitCustomUpdate, Models::Shared::BenefitDiscordUpdate, Models::Shared::BenefitGitHubRepositoryUpdate, Models::Shared::BenefitDownloadablesUpdate, Models::Shared::BenefitLicenseKeysUpdate, Models::Shared::BenefitMeterCreditUpdate), id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::BenefitsUpdateResponse) } + def update(request_body:, id:, timeout_ms: nil) + # update - Update Benefit + # Update a benefit. + # + # **Scopes**: `benefits:write` + request = Models::Operations::BenefitsUpdateRequest.new( + + id: id, + request_body: request_body + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::BenefitsUpdateRequest, + base_url, + '/v1/benefits/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'benefits:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)) + response = Models::Operations::BenefitsUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + benefit: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::BenefitsDeleteResponse) } + def delete(id:, timeout_ms: nil) + # delete - Delete Benefit + # Delete a benefit. + # + # > [!WARNING] + # > Every grants associated with the benefit will be revoked. + # > Users will lose access to the benefit. + # + # **Scopes**: `benefits:write` + request = Models::Operations::BenefitsDeleteRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::BenefitsDeleteRequest, + base_url, + '/v1/benefits/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'benefits:delete', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['204']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::BenefitsDeleteResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotPermitted) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Operations::BenefitsGrantsRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::BenefitsGrantsResponse) } + def grants(request:, timeout_ms: nil) + # grants - List Benefit Grants + # List the individual grants for a benefit. + # + # It's especially useful to check if a user has been granted a benefit. + # + # **Scopes**: `benefits:read` `benefits:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::BenefitsGrantsRequest, + base_url, + '/v1/benefits/{id}/grants', + request + ) + headers = {} + query_params = Utils.get_query_params(Models::Operations::BenefitsGrantsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'benefits:grants', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceBenefitGrant) + response = Models::Operations::BenefitsGrantsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_benefit_grant: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/checkout_links.rb b/lib/open_api_sdk/checkout_links.rb new file mode 100644 index 0000000..74cecd3 --- /dev/null +++ b/lib/open_api_sdk/checkout_links.rb @@ -0,0 +1,684 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CheckoutLinks + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::CheckoutLinksListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckoutLinksListResponse) } + def list(request:, timeout_ms: nil) + # list - List Checkout Links + # List checkout links. + # + # **Scopes**: `checkout_links:read` `checkout_links:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/checkout-links/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CheckoutLinksListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkout-links:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceCheckoutLink) + response = Models::Operations::CheckoutLinksListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_checkout_link: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: T.any(Models::Shared::CheckoutLinkCreateProductPrice, Models::Shared::CheckoutLinkCreateProduct, Models::Shared::CheckoutLinkCreateProducts), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckoutLinksCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Checkout Link + # Create a checkout link. + # + # **Scopes**: `checkout_links:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/checkout-links/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkout-links:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CheckoutLink) + response = Models::Operations::CheckoutLinksCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + checkout_link: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckoutLinksGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Checkout Link + # Get a checkout link by ID. + # + # **Scopes**: `checkout_links:read` `checkout_links:write` + request = Models::Operations::CheckoutLinksGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CheckoutLinksGetRequest, + base_url, + '/v1/checkout-links/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkout-links:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CheckoutLink) + response = Models::Operations::CheckoutLinksGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + checkout_link: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(checkout_link_update: Models::Shared::CheckoutLinkUpdate, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckoutLinksUpdateResponse) } + def update(checkout_link_update:, id:, timeout_ms: nil) + # update - Update Checkout Link + # Update a checkout link. + # + # **Scopes**: `checkout_links:write` + request = Models::Operations::CheckoutLinksUpdateRequest.new( + + id: id, + checkout_link_update: checkout_link_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CheckoutLinksUpdateRequest, + base_url, + '/v1/checkout-links/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :checkout_link_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkout-links:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CheckoutLink) + response = Models::Operations::CheckoutLinksUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + checkout_link: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckoutLinksDeleteResponse) } + def delete(id:, timeout_ms: nil) + # delete - Delete Checkout Link + # Delete a checkout link. + # + # **Scopes**: `checkout_links:write` + request = Models::Operations::CheckoutLinksDeleteRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CheckoutLinksDeleteRequest, + base_url, + '/v1/checkout-links/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkout-links:delete', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['204']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CheckoutLinksDeleteResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/checkouts.rb b/lib/open_api_sdk/checkouts.rb new file mode 100644 index 0000000..9aec4bf --- /dev/null +++ b/lib/open_api_sdk/checkouts.rb @@ -0,0 +1,550 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Checkouts + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::CheckoutsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckoutsListResponse) } + def list(request:, timeout_ms: nil) + # list - List Checkout Sessions + # List checkout sessions. + # + # **Scopes**: `checkouts:read` `checkouts:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/checkouts/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CheckoutsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkouts:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceCheckout) + response = Models::Operations::CheckoutsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_checkout: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::CheckoutCreate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckoutsCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Checkout Session + # Create a checkout session. + # + # **Scopes**: `checkouts:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/checkouts/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkouts:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Checkout) + response = Models::Operations::CheckoutsCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + checkout: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckoutsGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Checkout Session + # Get a checkout session by ID. + # + # **Scopes**: `checkouts:read` `checkouts:write` + request = Models::Operations::CheckoutsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CheckoutsGetRequest, + base_url, + '/v1/checkouts/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkouts:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Checkout) + response = Models::Operations::CheckoutsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + checkout: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(client_secret: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CheckoutsClientGetResponse) } + def client_get(client_secret:, timeout_ms: nil) + # client_get - Get Checkout Session from Client + # Get a checkout session by client secret. + request = Models::Operations::CheckoutsClientGetRequest.new( + + client_secret: client_secret + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CheckoutsClientGetRequest, + base_url, + '/v1/checkouts/client/{client_secret}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'checkouts:client_get', + security_source: nil + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CheckoutPublic) + response = Models::Operations::CheckoutsClientGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + checkout_public: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['410']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ExpiredCheckoutError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/custom_fields.rb b/lib/open_api_sdk/custom_fields.rb new file mode 100644 index 0000000..a3fe512 --- /dev/null +++ b/lib/open_api_sdk/custom_fields.rb @@ -0,0 +1,684 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomFields + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::CustomFieldsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomFieldsListResponse) } + def list(request:, timeout_ms: nil) + # list - List Custom Fields + # List custom fields. + # + # **Scopes**: `custom_fields:read` `custom_fields:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/custom-fields/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomFieldsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'custom-fields:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceCustomField) + response = Models::Operations::CustomFieldsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_custom_field: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: T.any(Models::Shared::CustomFieldCreateText, Models::Shared::CustomFieldCreateNumber, Models::Shared::CustomFieldCreateDate, Models::Shared::CustomFieldCreateCheckbox, Models::Shared::CustomFieldCreateSelect), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomFieldsCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Custom Field + # Create a custom field. + # + # **Scopes**: `custom_fields:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/custom-fields/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'custom-fields:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)) + response = Models::Operations::CustomFieldsCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + custom_field: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomFieldsGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Custom Field + # Get a custom field by ID. + # + # **Scopes**: `custom_fields:read` `custom_fields:write` + request = Models::Operations::CustomFieldsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomFieldsGetRequest, + base_url, + '/v1/custom-fields/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'custom-fields:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)) + response = Models::Operations::CustomFieldsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + custom_field: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(custom_field_update: T.any(Models::Shared::CustomFieldUpdateText, Models::Shared::CustomFieldUpdateNumber, Models::Shared::CustomFieldUpdateDate, Models::Shared::CustomFieldUpdateCheckbox, Models::Shared::CustomFieldUpdateSelect), id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomFieldsUpdateResponse) } + def update(custom_field_update:, id:, timeout_ms: nil) + # update - Update Custom Field + # Update a custom field. + # + # **Scopes**: `custom_fields:write` + request = Models::Operations::CustomFieldsUpdateRequest.new( + + id: id, + custom_field_update: custom_field_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomFieldsUpdateRequest, + base_url, + '/v1/custom-fields/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :custom_field_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'custom-fields:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)) + response = Models::Operations::CustomFieldsUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + custom_field: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomFieldsDeleteResponse) } + def delete(id:, timeout_ms: nil) + # delete - Delete Custom Field + # Delete a custom field. + # + # **Scopes**: `custom_fields:write` + request = Models::Operations::CustomFieldsDeleteRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomFieldsDeleteRequest, + base_url, + '/v1/custom-fields/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'custom-fields:delete', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['204']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CustomFieldsDeleteResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_meters.rb b/lib/open_api_sdk/customer_meters.rb new file mode 100644 index 0000000..e9ba4ea --- /dev/null +++ b/lib/open_api_sdk/customer_meters.rb @@ -0,0 +1,278 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerMeters + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::CustomerMetersListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerMetersListResponse) } + def list(request:, timeout_ms: nil) + # list - List Customer Meters + # List customer meters. + # + # **Scopes**: `customer_meters:read` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-meters/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomerMetersListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customer_meters:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceCustomerMeter) + response = Models::Operations::CustomerMetersListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_customer_meter: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerMetersGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Customer Meter + # Get a customer meter by ID. + # + # **Scopes**: `customer_meters:read` + request = Models::Operations::CustomerMetersGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerMetersGetRequest, + base_url, + '/v1/customer-meters/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customer_meters:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerMeter) + response = Models::Operations::CustomerMetersGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_meter: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_portal_benefit_grants.rb b/lib/open_api_sdk/customer_portal_benefit_grants.rb new file mode 100644 index 0000000..2098baf --- /dev/null +++ b/lib/open_api_sdk/customer_portal_benefit_grants.rb @@ -0,0 +1,435 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerPortalBenefitGrants + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(security: Models::Operations::CustomerPortalBenefitGrantsListSecurity, request: Models::Operations::CustomerPortalBenefitGrantsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalBenefitGrantsListResponse) } + def list(security:, request:, timeout_ms: nil) + # list - List Benefit Grants + # List benefits grants of the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/benefit-grants/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomerPortalBenefitGrantsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:benefit-grants:list', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceCustomerBenefitGrant) + response = Models::Operations::CustomerPortalBenefitGrantsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_customer_benefit_grant: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalBenefitGrantsGetSecurity, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalBenefitGrantsGetResponse) } + def get(security:, id:, timeout_ms: nil) + # get - Get Benefit Grant + # Get a benefit grant by ID for the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalBenefitGrantsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalBenefitGrantsGetRequest, + base_url, + '/v1/customer-portal/benefit-grants/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:benefit-grants:get', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit)) + response = Models::Operations::CustomerPortalBenefitGrantsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_benefit_grant: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalBenefitGrantsUpdateSecurity, customer_benefit_grant_update: T.any(Models::Shared::CustomerBenefitGrantDiscordUpdate, Models::Shared::CustomerBenefitGrantGitHubRepositoryUpdate, Models::Shared::CustomerBenefitGrantDownloadablesUpdate, Models::Shared::CustomerBenefitGrantLicenseKeysUpdate, Models::Shared::CustomerBenefitGrantCustomUpdate, Models::Shared::CustomerBenefitGrantMeterCreditUpdate), id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalBenefitGrantsUpdateResponse) } + def update(security:, customer_benefit_grant_update:, id:, timeout_ms: nil) + # update - Update Benefit Grant + # Update a benefit grant for the authenticated customer. + # + # **Scopes**: `customer_portal:write` + request = Models::Operations::CustomerPortalBenefitGrantsUpdateRequest.new( + + id: id, + customer_benefit_grant_update: customer_benefit_grant_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalBenefitGrantsUpdateRequest, + base_url, + '/v1/customer-portal/benefit-grants/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :customer_benefit_grant_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:benefit-grants:update', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit)) + response = Models::Operations::CustomerPortalBenefitGrantsUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_benefit_grant: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotPermitted) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_portal_customer_meters.rb b/lib/open_api_sdk/customer_portal_customer_meters.rb new file mode 100644 index 0000000..57eecb7 --- /dev/null +++ b/lib/open_api_sdk/customer_portal_customer_meters.rb @@ -0,0 +1,274 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerPortalCustomerMeters + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(security: Models::Operations::CustomerPortalCustomerMetersListSecurity, request: Models::Operations::CustomerPortalCustomerMetersListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalCustomerMetersListResponse) } + def list(security:, request:, timeout_ms: nil) + # list - List Meters + # List meters of the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/meters/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomerPortalCustomerMetersListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:customer_meters:list', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceCustomerCustomerMeter) + response = Models::Operations::CustomerPortalCustomerMetersListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_customer_customer_meter: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalCustomerMetersGetSecurity, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalCustomerMetersGetResponse) } + def get(security:, id:, timeout_ms: nil) + # get - Get Customer Meter + # Get a meter by ID for the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalCustomerMetersGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalCustomerMetersGetRequest, + base_url, + '/v1/customer-portal/meters/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:customer_meters:get', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerCustomerMeter) + response = Models::Operations::CustomerPortalCustomerMetersGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_customer_meter: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_portal_customers.rb b/lib/open_api_sdk/customer_portal_customers.rb new file mode 100644 index 0000000..93309db --- /dev/null +++ b/lib/open_api_sdk/customer_portal_customers.rb @@ -0,0 +1,621 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerPortalCustomers + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(security: Models::Operations::CustomerPortalCustomersGetSecurity, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalCustomersGetResponse) } + def get(security:, timeout_ms: nil) + # get - Get Customer + # Get authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/customers/me" + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:customers:get', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerPortalCustomer) + response = Models::Operations::CustomerPortalCustomersGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_portal_customer: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalCustomersUpdateSecurity, request: Models::Shared::CustomerPortalCustomerUpdate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalCustomersUpdateResponse) } + def update(security:, request:, timeout_ms: nil) + # update - Update Customer + # Update authenticated customer. + # + # **Scopes**: `customer_portal:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/customers/me" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:customers:update', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerPortalCustomer) + response = Models::Operations::CustomerPortalCustomersUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_portal_customer: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalCustomersGetPaymentMethodsSecurity, page: T.nilable(::Integer), limit: T.nilable(::Integer), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalCustomersGetPaymentMethodsResponse) } + def get_payment_methods(security:, page: nil, limit: nil, timeout_ms: nil) + # get_payment_methods - Get Customer Payment Methods + # Get saved payment methods of the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalCustomersGetPaymentMethodsRequest.new( + + page: page, + limit: limit + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/customers/me/payment-methods" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomerPortalCustomersGetPaymentMethodsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:customers:get_payment_methods', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceUnionPaymentMethodCardPaymentMethodGeneric) + response = Models::Operations::CustomerPortalCustomersGetPaymentMethodsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_union_payment_method_card_payment_method_generic: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalCustomersAddPaymentMethodSecurity, request: Models::Shared::CustomerPaymentMethodCreate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalCustomersAddPaymentMethodResponse) } + def add_payment_method(security:, request:, timeout_ms: nil) + # add_payment_method - Add Customer Payment Method + # Add a payment method to the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/customers/me/payment-methods" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:customers:add_payment_method', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::PaymentMethodCard, Models::Shared::PaymentMethodGeneric)) + response = Models::Operations::CustomerPortalCustomersAddPaymentMethodResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + response_customer_portal_customers_add_payment_method: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalCustomersDeletePaymentMethodSecurity, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalCustomersDeletePaymentMethodResponse) } + def delete_payment_method(security:, id:, timeout_ms: nil) + # delete_payment_method - Delete Customer Payment Method + # Delete a payment method from the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalCustomersDeletePaymentMethodRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalCustomersDeletePaymentMethodRequest, + base_url, + '/v1/customer-portal/customers/me/payment-methods/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:customers:delete_payment_method', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['204']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CustomerPortalCustomersDeletePaymentMethodResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_portal_downloadables.rb b/lib/open_api_sdk/customer_portal_downloadables.rb new file mode 100644 index 0000000..1a55041 --- /dev/null +++ b/lib/open_api_sdk/customer_portal_downloadables.rb @@ -0,0 +1,274 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerPortalDownloadables + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(security: Models::Operations::CustomerPortalDownloadablesListSecurity, organization_id: T.nilable(T.any(::String, T::Array[::String])), benefit_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), limit: T.nilable(::Integer), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalDownloadablesListResponse) } + def list(security:, organization_id: nil, benefit_id: nil, page: nil, limit: nil, timeout_ms: nil) + # list - List Downloadables + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalDownloadablesListRequest.new( + + organization_id: organization_id, + benefit_id: benefit_id, + page: page, + limit: limit + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/downloadables/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomerPortalDownloadablesListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:downloadables:list', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceDownloadableRead) + response = Models::Operations::CustomerPortalDownloadablesListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_downloadable_read: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(token: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalDownloadablesCustomerPortalDownloadablesGetResponse) } + def get(token:, timeout_ms: nil) + # get - Get Downloadable + request = Models::Operations::CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest.new( + + token: token + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest, + base_url, + '/v1/customer-portal/downloadables/{token}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customer_portal:downloadables:customer_portal.downloadables.get', + security_source: nil + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), ::Object) + response = Models::Operations::CustomerPortalDownloadablesCustomerPortalDownloadablesGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + any: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['302']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CustomerPortalDownloadablesCustomerPortalDownloadablesGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['400', '404', '410', '4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_portal_license_keys.rb b/lib/open_api_sdk/customer_portal_license_keys.rb new file mode 100644 index 0000000..fc2ded6 --- /dev/null +++ b/lib/open_api_sdk/customer_portal_license_keys.rb @@ -0,0 +1,715 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerPortalLicenseKeys + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(security: Models::Operations::CustomerPortalLicenseKeysListSecurity, organization_id: T.nilable(T.any(::String, T::Array[::String])), benefit_id: T.nilable(::String), page: T.nilable(::Integer), limit: T.nilable(::Integer), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalLicenseKeysListResponse) } + def list(security:, organization_id: nil, benefit_id: nil, page: nil, limit: nil, timeout_ms: nil) + # list - List License Keys + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalLicenseKeysListRequest.new( + + organization_id: organization_id, + benefit_id: benefit_id, + page: page, + limit: limit + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/license-keys/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomerPortalLicenseKeysListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:license_keys:list', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceLicenseKeyRead) + response = Models::Operations::CustomerPortalLicenseKeysListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_license_key_read: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['401']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Unauthorized) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalLicenseKeysGetSecurity, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalLicenseKeysGetResponse) } + def get(security:, id:, timeout_ms: nil) + # get - Get License Key + # Get a license key. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalLicenseKeysGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalLicenseKeysGetRequest, + base_url, + '/v1/customer-portal/license-keys/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:license_keys:get', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::LicenseKeyWithActivations) + response = Models::Operations::CustomerPortalLicenseKeysGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + license_key_with_activations: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::LicenseKeyValidate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalLicenseKeysValidateResponse) } + def validate(request:, timeout_ms: nil) + # validate - Validate License Key + # Validate a license key. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/license-keys/validate" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customer_portal:license_keys:validate', + security_source: nil + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ValidatedLicenseKey) + response = Models::Operations::CustomerPortalLicenseKeysValidateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + validated_license_key: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::LicenseKeyActivate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalLicenseKeysActivateResponse) } + def activate(request:, timeout_ms: nil) + # activate - Activate License Key + # Activate a license key instance. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/license-keys/activate" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customer_portal:license_keys:activate', + security_source: nil + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::LicenseKeyActivationRead) + response = Models::Operations::CustomerPortalLicenseKeysActivateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + license_key_activation_read: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotPermitted) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::LicenseKeyDeactivate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalLicenseKeysDeactivateResponse) } + def deactivate(request:, timeout_ms: nil) + # deactivate - Deactivate License Key + # Deactivate a license key instance. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/license-keys/deactivate" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customer_portal:license_keys:deactivate', + security_source: nil + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['204']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CustomerPortalLicenseKeysDeactivateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_portal_orders.rb b/lib/open_api_sdk/customer_portal_orders.rb new file mode 100644 index 0000000..b191543 --- /dev/null +++ b/lib/open_api_sdk/customer_portal_orders.rb @@ -0,0 +1,409 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerPortalOrders + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(security: Models::Operations::CustomerPortalOrdersListSecurity, request: Models::Operations::CustomerPortalOrdersListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalOrdersListResponse) } + def list(security:, request:, timeout_ms: nil) + # list - List Orders + # List orders of the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/orders/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomerPortalOrdersListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:orders:list', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceCustomerOrder) + response = Models::Operations::CustomerPortalOrdersListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_customer_order: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalOrdersGetSecurity, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalOrdersGetResponse) } + def get(security:, id:, timeout_ms: nil) + # get - Get Order + # Get an order by ID for the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalOrdersGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalOrdersGetRequest, + base_url, + '/v1/customer-portal/orders/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:orders:get', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerOrder) + response = Models::Operations::CustomerPortalOrdersGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_order: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalOrdersInvoiceSecurity, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalOrdersInvoiceResponse) } + def invoice(security:, id:, timeout_ms: nil) + # invoice - Get Order Invoice + # Get an order's invoice data. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalOrdersInvoiceRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalOrdersInvoiceRequest, + base_url, + '/v1/customer-portal/orders/{id}/invoice', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:orders:invoice', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerOrderInvoice) + response = Models::Operations::CustomerPortalOrdersInvoiceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_order_invoice: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_portal_organizations.rb b/lib/open_api_sdk/customer_portal_organizations.rb new file mode 100644 index 0000000..5195cb7 --- /dev/null +++ b/lib/open_api_sdk/customer_portal_organizations.rb @@ -0,0 +1,159 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerPortalOrganizations + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(slug: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalOrganizationsGetResponse) } + def get(slug:, timeout_ms: nil) + # get - Get Organization + # Get a customer portal's organization by slug. + request = Models::Operations::CustomerPortalOrganizationsGetRequest.new( + + slug: slug + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalOrganizationsGetRequest, + base_url, + '/v1/customer-portal/organizations/{slug}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customer_portal:organizations:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerOrganization) + response = Models::Operations::CustomerPortalOrganizationsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_organization: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_portal_subscriptions.rb b/lib/open_api_sdk/customer_portal_subscriptions.rb new file mode 100644 index 0000000..d205c97 --- /dev/null +++ b/lib/open_api_sdk/customer_portal_subscriptions.rb @@ -0,0 +1,583 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerPortalSubscriptions + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(security: Models::Operations::CustomerPortalSubscriptionsListSecurity, request: Models::Operations::CustomerPortalSubscriptionsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalSubscriptionsListResponse) } + def list(security:, request:, timeout_ms: nil) + # list - List Subscriptions + # List subscriptions of the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-portal/subscriptions/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomerPortalSubscriptionsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:subscriptions:list', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceCustomerSubscription) + response = Models::Operations::CustomerPortalSubscriptionsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_customer_subscription: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalSubscriptionsGetSecurity, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalSubscriptionsGetResponse) } + def get(security:, id:, timeout_ms: nil) + # get - Get Subscription + # Get a subscription for the authenticated customer. + # + # **Scopes**: `customer_portal:read` `customer_portal:write` + request = Models::Operations::CustomerPortalSubscriptionsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalSubscriptionsGetRequest, + base_url, + '/v1/customer-portal/subscriptions/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:subscriptions:get', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerSubscription) + response = Models::Operations::CustomerPortalSubscriptionsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_subscription: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalSubscriptionsUpdateSecurity, customer_subscription_update: T.any(Models::Shared::CustomerSubscriptionUpdateProduct, Models::Shared::CustomerSubscriptionCancel), id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalSubscriptionsUpdateResponse) } + def update(security:, customer_subscription_update:, id:, timeout_ms: nil) + # update - Update Subscription + # Update a subscription of the authenticated customer. + # + # **Scopes**: `customer_portal:write` + request = Models::Operations::CustomerPortalSubscriptionsUpdateRequest.new( + + id: id, + customer_subscription_update: customer_subscription_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalSubscriptionsUpdateRequest, + base_url, + '/v1/customer-portal/subscriptions/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :customer_subscription_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:subscriptions:update', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerSubscription) + response = Models::Operations::CustomerPortalSubscriptionsUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_subscription: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::AlreadyCanceledSubscription) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(security: Models::Operations::CustomerPortalSubscriptionsCancelSecurity, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerPortalSubscriptionsCancelResponse) } + def cancel(security:, id:, timeout_ms: nil) + # cancel - Cancel Subscription + # Cancel a subscription of the authenticated customer. + # + # **Scopes**: `customer_portal:write` + request = Models::Operations::CustomerPortalSubscriptionsCancelRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomerPortalSubscriptionsCancelRequest, + base_url, + '/v1/customer-portal/subscriptions/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: nil, + operation_id: 'customer_portal:subscriptions:cancel', + security_source: -> { security } + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerSubscription) + response = Models::Operations::CustomerPortalSubscriptionsCancelResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_subscription: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::AlreadyCanceledSubscription) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customer_sessions.rb b/lib/open_api_sdk/customer_sessions.rb new file mode 100644 index 0000000..34eed33 --- /dev/null +++ b/lib/open_api_sdk/customer_sessions.rb @@ -0,0 +1,151 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class CustomerSessions + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: T.any(Models::Shared::CustomerSessionCustomerIDCreate, Models::Shared::CustomerSessionCustomerExternalIDCreate), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomerSessionsCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Customer Session + # Create a customer session. + # + # **Scopes**: `customer_sessions:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customer-sessions/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customer-sessions:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerSession) + response = Models::Operations::CustomerSessionsCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_session: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/customers.rb b/lib/open_api_sdk/customers.rb new file mode 100644 index 0000000..ae32bfc --- /dev/null +++ b/lib/open_api_sdk/customers.rb @@ -0,0 +1,1400 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Customers + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::CustomersListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersListResponse) } + def list(request:, timeout_ms: nil) + # list - List Customers + # List customers. + # + # **Scopes**: `customers:read` `customers:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customers/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::CustomersListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceCustomer) + response = Models::Operations::CustomersListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_customer: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::CustomerCreate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Customer + # Create a customer. + # + # **Scopes**: `customers:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/customers/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Customer) + response = Models::Operations::CustomersCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Customer + # Get a customer by ID. + # + # **Scopes**: `customers:read` `customers:write` + request = Models::Operations::CustomersGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomersGetRequest, + base_url, + '/v1/customers/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Customer) + response = Models::Operations::CustomersGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(customer_update: Models::Shared::CustomerUpdate, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersUpdateResponse) } + def update(customer_update:, id:, timeout_ms: nil) + # update - Update Customer + # Update a customer. + # + # **Scopes**: `customers:write` + request = Models::Operations::CustomersUpdateRequest.new( + + id: id, + customer_update: customer_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomersUpdateRequest, + base_url, + '/v1/customers/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :customer_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Customer) + response = Models::Operations::CustomersUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersDeleteResponse) } + def delete(id:, timeout_ms: nil) + # delete - Delete Customer + # Delete a customer. + # + # This action cannot be undone and will immediately: + # - Cancel any active subscriptions for the customer + # - Revoke all their benefits + # - Clear any `external_id` + # + # Use it only in the context of deleting a user within your + # own service. Otherwise, use more granular API endpoints to cancel + # a specific subscription or revoke certain benefits. + # + # Note: The customers information will nonetheless be retained for historic + # orders and subscriptions. + # + # **Scopes**: `customers:write` + request = Models::Operations::CustomersDeleteRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomersDeleteRequest, + base_url, + '/v1/customers/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:delete', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['204']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CustomersDeleteResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(external_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersGetExternalResponse) } + def get_external(external_id:, timeout_ms: nil) + # get_external - Get Customer by External ID + # Get a customer by external ID. + # + # **Scopes**: `customers:read` `customers:write` + request = Models::Operations::CustomersGetExternalRequest.new( + + external_id: external_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomersGetExternalRequest, + base_url, + '/v1/customers/external/{external_id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:get_external', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Customer) + response = Models::Operations::CustomersGetExternalResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(customer_update_external_id: Models::Shared::CustomerUpdateExternalID, external_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersUpdateExternalResponse) } + def update_external(customer_update_external_id:, external_id:, timeout_ms: nil) + # update_external - Update Customer by External ID + # Update a customer by external ID. + # + # **Scopes**: `customers:write` + request = Models::Operations::CustomersUpdateExternalRequest.new( + + external_id: external_id, + customer_update_external_id: customer_update_external_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomersUpdateExternalRequest, + base_url, + '/v1/customers/external/{external_id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :customer_update_external_id, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:update_external', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Customer) + response = Models::Operations::CustomersUpdateExternalResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(external_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersDeleteExternalResponse) } + def delete_external(external_id:, timeout_ms: nil) + # delete_external - Delete Customer by External ID + # Delete a customer by external ID. + # + # Immediately cancels any active subscriptions and revokes any active benefits. + # + # **Scopes**: `customers:write` + request = Models::Operations::CustomersDeleteExternalRequest.new( + + external_id: external_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomersDeleteExternalRequest, + base_url, + '/v1/customers/external/{external_id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:delete_external', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['204']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::CustomersDeleteExternalResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersGetStateResponse) } + def get_state(id:, timeout_ms: nil) + # get_state - Get Customer State + # Get a customer state by ID. + # + # The customer state includes information about + # the customer's active subscriptions and benefits. + # + # It's the ideal endpoint to use when you need to get a full overview + # of a customer's status. + # + # **Scopes**: `customers:read` `customers:write` + request = Models::Operations::CustomersGetStateRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomersGetStateRequest, + base_url, + '/v1/customers/{id}/state', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:get_state', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerState) + response = Models::Operations::CustomersGetStateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_state: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(external_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CustomersGetStateExternalResponse) } + def get_state_external(external_id:, timeout_ms: nil) + # get_state_external - Get Customer State by External ID + # Get a customer state by external ID. + # + # The customer state includes information about + # the customer's active subscriptions and benefits. + # + # It's the ideal endpoint to use when you need to get a full overview + # of a customer's status. + # + # **Scopes**: `customers:read` `customers:write` + request = Models::Operations::CustomersGetStateExternalRequest.new( + + external_id: external_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CustomersGetStateExternalRequest, + base_url, + '/v1/customers/external/{external_id}/state', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'customers:get_state_external', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomerState) + response = Models::Operations::CustomersGetStateExternalResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + customer_state: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/discounts.rb b/lib/open_api_sdk/discounts.rb new file mode 100644 index 0000000..0de7171 --- /dev/null +++ b/lib/open_api_sdk/discounts.rb @@ -0,0 +1,684 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Discounts + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::DiscountsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::DiscountsListResponse) } + def list(request:, timeout_ms: nil) + # list - List Discounts + # List discounts. + # + # **Scopes**: `discounts:read` `discounts:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/discounts/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::DiscountsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'discounts:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceDiscount) + response = Models::Operations::DiscountsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_discount: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: T.any(Models::Shared::DiscountFixedOnceForeverDurationCreate, Models::Shared::DiscountFixedRepeatDurationCreate, Models::Shared::DiscountPercentageOnceForeverDurationCreate, Models::Shared::DiscountPercentageRepeatDurationCreate), timeout_ms: T.nilable(Integer)).returns(Models::Operations::DiscountsCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Discount + # Create a discount. + # + # **Scopes**: `discounts:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/discounts/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'discounts:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration)) + response = Models::Operations::DiscountsCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + discount: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::DiscountsGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Discount + # Get a discount by ID. + # + # **Scopes**: `discounts:read` `discounts:write` + request = Models::Operations::DiscountsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::DiscountsGetRequest, + base_url, + '/v1/discounts/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'discounts:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration)) + response = Models::Operations::DiscountsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + discount: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(discount_update: Models::Shared::DiscountUpdate, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::DiscountsUpdateResponse) } + def update(discount_update:, id:, timeout_ms: nil) + # update - Update Discount + # Update a discount. + # + # **Scopes**: `discounts:write` + request = Models::Operations::DiscountsUpdateRequest.new( + + id: id, + discount_update: discount_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::DiscountsUpdateRequest, + base_url, + '/v1/discounts/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :discount_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'discounts:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration)) + response = Models::Operations::DiscountsUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + discount: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::DiscountsDeleteResponse) } + def delete(id:, timeout_ms: nil) + # delete - Delete Discount + # Delete a discount. + # + # **Scopes**: `discounts:write` + request = Models::Operations::DiscountsDeleteRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::DiscountsDeleteRequest, + base_url, + '/v1/discounts/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'discounts:delete', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['204']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::DiscountsDeleteResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/events.rb b/lib/open_api_sdk/events.rb new file mode 100644 index 0000000..13bbc22 --- /dev/null +++ b/lib/open_api_sdk/events.rb @@ -0,0 +1,522 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Events + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::EventsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::EventsListResponse) } + def list(request:, timeout_ms: nil) + # list - List Events + # List events. + # + # **Scopes**: `events:read` `events:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/events/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::EventsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'events:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceEvent) + response = Models::Operations::EventsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_event: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Operations::EventsListNamesRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::EventsListNamesResponse) } + def list_names(request:, timeout_ms: nil) + # list_names - List Event Names + # List event names. + # + # **Scopes**: `events:read` `events:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/events/names" + headers = {} + query_params = Utils.get_query_params(Models::Operations::EventsListNamesRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'events:list_names', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceEventName) + response = Models::Operations::EventsListNamesResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_event_name: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::EventsGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Event + # Get an event by ID. + # + # **Scopes**: `events:read` `events:write` + request = Models::Operations::EventsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::EventsGetRequest, + base_url, + '/v1/events/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'events:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Event) + response = Models::Operations::EventsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + event: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::EventsIngest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::EventsIngestResponse) } + def ingest(request:, timeout_ms: nil) + # ingest - Ingest Events + # Ingest batch of events. + # + # **Scopes**: `events:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/events/ingest" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'events:ingest', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EventsIngestResponse) + response = Models::Operations::EventsIngestResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + events_ingest_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/files.rb b/lib/open_api_sdk/files.rb new file mode 100644 index 0000000..ed68e71 --- /dev/null +++ b/lib/open_api_sdk/files.rb @@ -0,0 +1,743 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Files + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(organization_id: T.nilable(::String), ids: T.nilable(T::Array[::String]), page: T.nilable(::Integer), limit: T.nilable(::Integer), timeout_ms: T.nilable(Integer)).returns(Models::Operations::FilesListResponse) } + def list(organization_id: nil, ids: nil, page: nil, limit: nil, timeout_ms: nil) + # list - List Files + # List files. + # + # **Scopes**: `files:read` `files:write` + request = Models::Operations::FilesListRequest.new( + + organization_id: organization_id, + ids: ids, + page: page, + limit: limit + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/files/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::FilesListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'files:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceFileRead) + response = Models::Operations::FilesListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_file_read: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: T.any(Models::Shared::DownloadableFileCreate, Models::Shared::ProductMediaFileCreate, Models::Shared::OrganizationAvatarFileCreate), timeout_ms: T.nilable(Integer)).returns(Models::Operations::FilesCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create File + # Create a file. + # + # **Scopes**: `files:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/files/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'files:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::FileUpload) + response = Models::Operations::FilesCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + file_upload: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(file_upload_completed: Models::Shared::FileUploadCompleted, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::FilesUploadedResponse) } + def uploaded(file_upload_completed:, id:, timeout_ms: nil) + # uploaded - Complete File Upload + # Complete a file upload. + # + # **Scopes**: `files:write` + request = Models::Operations::FilesUploadedRequest.new( + + id: id, + file_upload_completed: file_upload_completed + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::FilesUploadedRequest, + base_url, + '/v1/files/{id}/uploaded', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :file_upload_completed, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'files:uploaded', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead)) + response = Models::Operations::FilesUploadedResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + response_files_uploaded: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotPermitted) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(file_patch: Models::Shared::FilePatch, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::FilesUpdateResponse) } + def update(file_patch:, id:, timeout_ms: nil) + # update - Update File + # Update a file. + # + # **Scopes**: `files:write` + request = Models::Operations::FilesUpdateRequest.new( + + id: id, + file_patch: file_patch + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::FilesUpdateRequest, + base_url, + '/v1/files/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :file_patch, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'files:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead)) + response = Models::Operations::FilesUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + response_files_update: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotPermitted) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::FilesDeleteResponse) } + def delete(id:, timeout_ms: nil) + # delete - Delete File + # Delete a file. + # + # **Scopes**: `files:write` + request = Models::Operations::FilesDeleteRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::FilesDeleteRequest, + base_url, + '/v1/files/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'files:delete', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['204']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::FilesDeleteResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotPermitted) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/license_keys.rb b/lib/open_api_sdk/license_keys.rb new file mode 100644 index 0000000..c9bdd7f --- /dev/null +++ b/lib/open_api_sdk/license_keys.rb @@ -0,0 +1,638 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class LicenseKeys + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(organization_id: T.nilable(T.any(::String, T::Array[::String])), benefit_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), limit: T.nilable(::Integer), timeout_ms: T.nilable(Integer)).returns(Models::Operations::LicenseKeysListResponse) } + def list(organization_id: nil, benefit_id: nil, page: nil, limit: nil, timeout_ms: nil) + # list - List License Keys + # Get license keys connected to the given organization & filters. + # + # **Scopes**: `license_keys:read` `license_keys:write` + request = Models::Operations::LicenseKeysListRequest.new( + + organization_id: organization_id, + benefit_id: benefit_id, + page: page, + limit: limit + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/license-keys" + headers = {} + query_params = Utils.get_query_params(Models::Operations::LicenseKeysListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'license_keys:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceLicenseKeyRead) + response = Models::Operations::LicenseKeysListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_license_key_read: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['401']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Unauthorized) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::LicenseKeysGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get License Key + # Get a license key. + # + # **Scopes**: `license_keys:read` `license_keys:write` + request = Models::Operations::LicenseKeysGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::LicenseKeysGetRequest, + base_url, + '/v1/license-keys/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'license_keys:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::LicenseKeyWithActivations) + response = Models::Operations::LicenseKeysGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + license_key_with_activations: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['401']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Unauthorized) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(license_key_update: Models::Shared::LicenseKeyUpdate, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::LicenseKeysUpdateResponse) } + def update(license_key_update:, id:, timeout_ms: nil) + # update - Update License Key + # Update a license key. + # + # **Scopes**: `license_keys:write` + request = Models::Operations::LicenseKeysUpdateRequest.new( + + id: id, + license_key_update: license_key_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::LicenseKeysUpdateRequest, + base_url, + '/v1/license-keys/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :license_key_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'license_keys:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::LicenseKeyRead) + response = Models::Operations::LicenseKeysUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + license_key_read: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['401']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Unauthorized) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, activation_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::LicenseKeysGetActivationResponse) } + def get_activation(id:, activation_id:, timeout_ms: nil) + # get_activation - Get Activation + # Get a license key activation. + # + # **Scopes**: `license_keys:read` `license_keys:write` + request = Models::Operations::LicenseKeysGetActivationRequest.new( + + id: id, + activation_id: activation_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::LicenseKeysGetActivationRequest, + base_url, + '/v1/license-keys/{id}/activations/{activation_id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'license_keys:get_activation', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::LicenseKeyActivationRead) + response = Models::Operations::LicenseKeysGetActivationResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + license_key_activation_read: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['401']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::Unauthorized) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/meters.rb b/lib/open_api_sdk/meters.rb new file mode 100644 index 0000000..379c31c --- /dev/null +++ b/lib/open_api_sdk/meters.rb @@ -0,0 +1,690 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Meters + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::MetersListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::MetersListResponse) } + def list(request:, timeout_ms: nil) + # list - List Meters + # List meters. + # + # **Scopes**: `meters:read` `meters:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/meters/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::MetersListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'meters:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceMeter) + response = Models::Operations::MetersListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_meter: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::MeterCreate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::MetersCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Meter + # Create a meter. + # + # **Scopes**: `meters:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/meters/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'meters:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Meter) + response = Models::Operations::MetersCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + meter: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::MetersGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Meter + # Get a meter by ID. + # + # **Scopes**: `meters:read` `meters:write` + request = Models::Operations::MetersGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::MetersGetRequest, + base_url, + '/v1/meters/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'meters:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Meter) + response = Models::Operations::MetersGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + meter: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(meter_update: Models::Shared::MeterUpdate, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::MetersUpdateResponse) } + def update(meter_update:, id:, timeout_ms: nil) + # update - Update Meter + # Update a meter. + # + # **Scopes**: `meters:write` + request = Models::Operations::MetersUpdateRequest.new( + + id: id, + meter_update: meter_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::MetersUpdateRequest, + base_url, + '/v1/meters/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :meter_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'meters:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Meter) + response = Models::Operations::MetersUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + meter: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Operations::MetersQuantitiesRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::MetersQuantitiesResponse) } + def quantities(request:, timeout_ms: nil) + # quantities - Get Meter Quantities + # Get quantities of a meter over a time period. + # + # **Scopes**: `meters:read` `meters:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::MetersQuantitiesRequest, + base_url, + '/v1/meters/{id}/quantities', + request + ) + headers = {} + query_params = Utils.get_query_params(Models::Operations::MetersQuantitiesRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'meters:quantities', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::MeterQuantities) + response = Models::Operations::MetersQuantitiesResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + meter_quantities: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/metrics.rb b/lib/open_api_sdk/metrics.rb new file mode 100644 index 0000000..159e1ee --- /dev/null +++ b/lib/open_api_sdk/metrics.rb @@ -0,0 +1,245 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Metrics + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::MetricsGetRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::MetricsGetResponse) } + def get(request:, timeout_ms: nil) + # get - Get Metrics + # Get metrics about your orders and subscriptions. + # + # Currency values are output in cents. + # + # **Scopes**: `metrics:read` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/metrics/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::MetricsGetRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'metrics:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::MetricsResponse) + response = Models::Operations::MetricsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + metrics_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::MetricsLimitsResponse) } + def limits(timeout_ms: nil) + # limits - Get Metrics Limits + # Get the interval limits for the metrics endpoint. + # + # **Scopes**: `metrics:read` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/metrics/limits" + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'metrics:limits', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::MetricsLimits) + response = Models::Operations::MetricsLimitsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + metrics_limits: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/models/errors.rb b/lib/open_api_sdk/models/errors.rb new file mode 100644 index 0000000..e7c41aa --- /dev/null +++ b/lib/open_api_sdk/models/errors.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module OpenApiSDK + module Models + module Errors + autoload :APIError, 'open_api_sdk/models/errors/apierror.rb' + autoload :AlreadyCanceledSubscription, 'open_api_sdk/models/errors/alreadycanceledsubscription.rb' + autoload :ExpiredCheckoutError, 'open_api_sdk/models/errors/expiredcheckouterror.rb' + autoload :HTTPValidationError, 'open_api_sdk/models/errors/httpvalidationerror.rb' + autoload :NotPermitted, 'open_api_sdk/models/errors/notpermitted.rb' + autoload :RefundAmountTooHigh, 'open_api_sdk/models/errors/refundamounttoohigh.rb' + autoload :RefundedAlready, 'open_api_sdk/models/errors/refundedalready.rb' + autoload :ResourceNotFound, 'open_api_sdk/models/errors/resourcenotfound.rb' + autoload :Unauthorized, 'open_api_sdk/models/errors/unauthorized.rb' + end + end +end diff --git a/lib/open_api_sdk/models/errors/alreadycanceledsubscription.rb b/lib/open_api_sdk/models/errors/alreadycanceledsubscription.rb new file mode 100644 index 0000000..eb7aedf --- /dev/null +++ b/lib/open_api_sdk/models/errors/alreadycanceledsubscription.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Errors + + + class AlreadyCanceledSubscription + extend T::Sig + include Crystalline::MetadataFields + + + field :detail, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('detail') } } + + field :error, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } + + + sig { params(detail: ::String, error: ::String).void } + def initialize(detail: nil, error: nil) + @detail = detail + @error = error + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @detail == other.detail + return false unless @error == other.error + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/errors/apierror.rb b/lib/open_api_sdk/models/errors/apierror.rb new file mode 100644 index 0000000..140d3fc --- /dev/null +++ b/lib/open_api_sdk/models/errors/apierror.rb @@ -0,0 +1,38 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module OpenApiSDK + module Models + module Errors + + class APIError < StandardError + include Crystalline::MetadataFields + extend T::Sig + + + field :body, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('body') } } + field :raw_response, T.nilable(Faraday::Response), {} + field :status_code, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status_code') } } + + + sig { params(status_code: ::Integer, body: ::String, raw_response: Faraday::Response).void } + def initialize(status_code:, body:, raw_response:) + @status_code = status_code + @body = body + @raw_response = raw_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @msg == other.msg + return false unless @status_code == other.status_code + return false unless @body == other.body + return false unless @raw_response == other.raw_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/errors/expiredcheckouterror.rb b/lib/open_api_sdk/models/errors/expiredcheckouterror.rb new file mode 100644 index 0000000..4d0fc2f --- /dev/null +++ b/lib/open_api_sdk/models/errors/expiredcheckouterror.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Errors + + + class ExpiredCheckoutError + extend T::Sig + include Crystalline::MetadataFields + + + field :detail, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('detail') } } + + field :error, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } + + + sig { params(detail: ::String, error: ::String).void } + def initialize(detail: nil, error: nil) + @detail = detail + @error = error + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @detail == other.detail + return false unless @error == other.error + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/errors/httpvalidationerror.rb b/lib/open_api_sdk/models/errors/httpvalidationerror.rb new file mode 100644 index 0000000..6ed6461 --- /dev/null +++ b/lib/open_api_sdk/models/errors/httpvalidationerror.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Errors + + + class HTTPValidationError + extend T::Sig + include Crystalline::MetadataFields + + + field :detail, T.nilable(T::Array[Models::Shared::ValidationError]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('detail') } } + + + sig { params(detail: T.nilable(T::Array[Models::Shared::ValidationError])).void } + def initialize(detail: nil) + @detail = detail + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @detail == other.detail + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/errors/notpermitted.rb b/lib/open_api_sdk/models/errors/notpermitted.rb new file mode 100644 index 0000000..e78d5e7 --- /dev/null +++ b/lib/open_api_sdk/models/errors/notpermitted.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Errors + + + class NotPermitted + extend T::Sig + include Crystalline::MetadataFields + + + field :detail, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('detail') } } + + field :error, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } + + + sig { params(detail: ::String, error: ::String).void } + def initialize(detail: nil, error: nil) + @detail = detail + @error = error + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @detail == other.detail + return false unless @error == other.error + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/errors/refundamounttoohigh.rb b/lib/open_api_sdk/models/errors/refundamounttoohigh.rb new file mode 100644 index 0000000..189093c --- /dev/null +++ b/lib/open_api_sdk/models/errors/refundamounttoohigh.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Errors + + + class RefundAmountTooHigh + extend T::Sig + include Crystalline::MetadataFields + + + field :detail, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('detail') } } + + field :error, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } + + + sig { params(detail: ::String, error: ::String).void } + def initialize(detail: nil, error: nil) + @detail = detail + @error = error + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @detail == other.detail + return false unless @error == other.error + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/errors/refundedalready.rb b/lib/open_api_sdk/models/errors/refundedalready.rb new file mode 100644 index 0000000..7cf6fe2 --- /dev/null +++ b/lib/open_api_sdk/models/errors/refundedalready.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Errors + + + class RefundedAlready + extend T::Sig + include Crystalline::MetadataFields + + + field :detail, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('detail') } } + + field :error, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } + + + sig { params(detail: ::String, error: ::String).void } + def initialize(detail: nil, error: nil) + @detail = detail + @error = error + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @detail == other.detail + return false unless @error == other.error + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/errors/resourcenotfound.rb b/lib/open_api_sdk/models/errors/resourcenotfound.rb new file mode 100644 index 0000000..e67a528 --- /dev/null +++ b/lib/open_api_sdk/models/errors/resourcenotfound.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Errors + + + class ResourceNotFound + extend T::Sig + include Crystalline::MetadataFields + + + field :detail, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('detail') } } + + field :error, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } + + + sig { params(detail: ::String, error: ::String).void } + def initialize(detail: nil, error: nil) + @detail = detail + @error = error + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @detail == other.detail + return false unless @error == other.error + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/errors/unauthorized.rb b/lib/open_api_sdk/models/errors/unauthorized.rb new file mode 100644 index 0000000..663146e --- /dev/null +++ b/lib/open_api_sdk/models/errors/unauthorized.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Errors + + + class Unauthorized + extend T::Sig + include Crystalline::MetadataFields + + + field :detail, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('detail') } } + + field :error, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('error') } } + + + sig { params(detail: ::String, error: ::String).void } + def initialize(detail: nil, error: nil) + @detail = detail + @error = error + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @detail == other.detail + return false unless @error == other.error + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations.rb b/lib/open_api_sdk/models/operations.rb new file mode 100644 index 0000000..eb0f767 --- /dev/null +++ b/lib/open_api_sdk/models/operations.rb @@ -0,0 +1,306 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module OpenApiSDK + module Models + module Operations + autoload :BenefitIDFilter, 'open_api_sdk/models/operations/benefitid_filter.rb' + autoload :BenefitTypeFilter, 'open_api_sdk/models/operations/benefittype_filter.rb' + autoload :CheckoutIDFilter, 'open_api_sdk/models/operations/checkoutid_filter.rb' + autoload :CustomFieldTypeFilter, 'open_api_sdk/models/operations/customfieldtype_filter.rb' + autoload :CustomerIDFilter, 'open_api_sdk/models/operations/customerid_filter.rb' + autoload :DiscountIDFilter, 'open_api_sdk/models/operations/discountid_filter.rb' + autoload :ExternalCustomerIDFilter, 'open_api_sdk/models/operations/externalcustomerid_filter.rb' + autoload :MeterIDFilter, 'open_api_sdk/models/operations/meterid_filter.rb' + autoload :NameFilter, 'open_api_sdk/models/operations/name_filter.rb' + autoload :OrderIDFilter, 'open_api_sdk/models/operations/orderid_filter.rb' + autoload :OrganizationId, 'open_api_sdk/models/operations/organization_id.rb' + autoload :OrganizationIDFilter, 'open_api_sdk/models/operations/organizationid_filter.rb' + autoload :ProductBillingTypeFilter, 'open_api_sdk/models/operations/productbillingtype_filter.rb' + autoload :ProductIDFilter, 'open_api_sdk/models/operations/productid_filter.rb' + autoload :RefundIDFilter, 'open_api_sdk/models/operations/refundid_filter.rb' + autoload :SourceFilter, 'open_api_sdk/models/operations/source_filter.rb' + autoload :SubscriptionIDFilter, 'open_api_sdk/models/operations/subscriptionid_filter.rb' + autoload :BenefitsCreateResponse, 'open_api_sdk/models/operations/benefits_create_response.rb' + autoload :BenefitsDeleteRequest, 'open_api_sdk/models/operations/benefits_delete_request.rb' + autoload :BenefitsDeleteResponse, 'open_api_sdk/models/operations/benefits_delete_response.rb' + autoload :BenefitsGetRequest, 'open_api_sdk/models/operations/benefits_get_request.rb' + autoload :BenefitsGetResponse, 'open_api_sdk/models/operations/benefits_get_response.rb' + autoload :BenefitsGrantsRequest, 'open_api_sdk/models/operations/benefits_grants_request.rb' + autoload :BenefitsGrantsResponse, 'open_api_sdk/models/operations/benefits_grants_response.rb' + autoload :BenefitsListRequest, 'open_api_sdk/models/operations/benefits_list_request.rb' + autoload :BenefitsListResponse, 'open_api_sdk/models/operations/benefits_list_response.rb' + autoload :BenefitsUpdateBenefitUpdate, 'open_api_sdk/models/operations/benefits_update_benefit_update.rb' + autoload :BenefitsUpdateRequest, 'open_api_sdk/models/operations/benefits_update_request.rb' + autoload :BenefitsUpdateResponse, 'open_api_sdk/models/operations/benefits_update_response.rb' + autoload :CheckoutLinksCreateCheckoutLinkCreate, 'open_api_sdk/models/operations/checkout_links_create_checkout_link_create.rb' + autoload :CheckoutLinksCreateResponse, 'open_api_sdk/models/operations/checkout_links_create_response.rb' + autoload :CheckoutLinksDeleteRequest, 'open_api_sdk/models/operations/checkout_links_delete_request.rb' + autoload :CheckoutLinksDeleteResponse, 'open_api_sdk/models/operations/checkout_links_delete_response.rb' + autoload :CheckoutLinksGetRequest, 'open_api_sdk/models/operations/checkout_links_get_request.rb' + autoload :CheckoutLinksGetResponse, 'open_api_sdk/models/operations/checkout_links_get_response.rb' + autoload :CheckoutLinksListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/checkout_links_list_queryparam_organizationid_filter.rb' + autoload :CheckoutLinksListQueryParamProductIDFilter, 'open_api_sdk/models/operations/checkout_links_list_queryparam_productid_filter.rb' + autoload :CheckoutLinksListRequest, 'open_api_sdk/models/operations/checkout_links_list_request.rb' + autoload :CheckoutLinksListResponse, 'open_api_sdk/models/operations/checkout_links_list_response.rb' + autoload :CheckoutLinksUpdateRequest, 'open_api_sdk/models/operations/checkout_links_update_request.rb' + autoload :CheckoutLinksUpdateResponse, 'open_api_sdk/models/operations/checkout_links_update_response.rb' + autoload :CheckoutsClientGetRequest, 'open_api_sdk/models/operations/checkouts_client_get_request.rb' + autoload :CheckoutsClientGetResponse, 'open_api_sdk/models/operations/checkouts_client_get_response.rb' + autoload :CheckoutsCreateResponse, 'open_api_sdk/models/operations/checkouts_create_response.rb' + autoload :CheckoutsGetRequest, 'open_api_sdk/models/operations/checkouts_get_request.rb' + autoload :CheckoutsGetResponse, 'open_api_sdk/models/operations/checkouts_get_response.rb' + autoload :CheckoutsListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/checkouts_list_queryparam_organizationid_filter.rb' + autoload :CheckoutsListQueryParamProductIDFilter, 'open_api_sdk/models/operations/checkouts_list_queryparam_productid_filter.rb' + autoload :CheckoutsListRequest, 'open_api_sdk/models/operations/checkouts_list_request.rb' + autoload :CheckoutsListResponse, 'open_api_sdk/models/operations/checkouts_list_response.rb' + autoload :CustomFieldsCreateResponse, 'open_api_sdk/models/operations/custom_fields_create_response.rb' + autoload :CustomFieldsDeleteRequest, 'open_api_sdk/models/operations/custom_fields_delete_request.rb' + autoload :CustomFieldsDeleteResponse, 'open_api_sdk/models/operations/custom_fields_delete_response.rb' + autoload :CustomFieldsGetRequest, 'open_api_sdk/models/operations/custom_fields_get_request.rb' + autoload :CustomFieldsGetResponse, 'open_api_sdk/models/operations/custom_fields_get_response.rb' + autoload :CustomFieldsListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/custom_fields_list_queryparam_organizationid_filter.rb' + autoload :CustomFieldsListRequest, 'open_api_sdk/models/operations/custom_fields_list_request.rb' + autoload :CustomFieldsListResponse, 'open_api_sdk/models/operations/custom_fields_list_response.rb' + autoload :CustomFieldsUpdateRequest, 'open_api_sdk/models/operations/custom_fields_update_request.rb' + autoload :CustomFieldsUpdateResponse, 'open_api_sdk/models/operations/custom_fields_update_response.rb' + autoload :CustomerSessionsCreateCustomerSessionCreate, 'open_api_sdk/models/operations/customer_sessions_create_customer_session_create.rb' + autoload :CustomerSessionsCreateResponse, 'open_api_sdk/models/operations/customer_sessions_create_response.rb' + autoload :CustomerMetersGetRequest, 'open_api_sdk/models/operations/customer_meters_get_request.rb' + autoload :CustomerMetersGetResponse, 'open_api_sdk/models/operations/customer_meters_get_response.rb' + autoload :CustomerMetersListQueryParamCustomerIDFilter, 'open_api_sdk/models/operations/customer_meters_list_queryparam_customerid_filter.rb' + autoload :CustomerMetersListQueryParamExternalCustomerIDFilter, 'open_api_sdk/models/operations/customer_meters_list_queryparam_externalcustomerid_filter.rb' + autoload :CustomerMetersListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/customer_meters_list_queryparam_organizationid_filter.rb' + autoload :CustomerMetersListRequest, 'open_api_sdk/models/operations/customer_meters_list_request.rb' + autoload :CustomerMetersListResponse, 'open_api_sdk/models/operations/customer_meters_list_response.rb' + autoload :CustomerPortalBenefitGrantsGetSecurity, 'open_api_sdk/models/operations/customer_portal_benefit_grants_get_security.rb' + autoload :CustomerPortalBenefitGrantsGetRequest, 'open_api_sdk/models/operations/customer_portal_benefit_grants_get_request.rb' + autoload :CustomerPortalBenefitGrantsGetResponse, 'open_api_sdk/models/operations/customer_portal_benefit_grants_get_response.rb' + autoload :CustomerPortalBenefitGrantsListSecurity, 'open_api_sdk/models/operations/customer_portal_benefit_grants_list_security.rb' + autoload :CustomerPortalBenefitGrantsListQueryParamBenefitIDFilter, 'open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_benefitid_filter.rb' + autoload :CustomerPortalBenefitGrantsListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_organizationid_filter.rb' + autoload :CustomerPortalBenefitGrantsListRequest, 'open_api_sdk/models/operations/customer_portal_benefit_grants_list_request.rb' + autoload :CustomerPortalBenefitGrantsListResponse, 'open_api_sdk/models/operations/customer_portal_benefit_grants_list_response.rb' + autoload :CustomerPortalBenefitGrantsUpdateSecurity, 'open_api_sdk/models/operations/customer_portal_benefit_grants_update_security.rb' + autoload :CustomerPortalBenefitGrantsUpdateRequest, 'open_api_sdk/models/operations/customer_portal_benefit_grants_update_request.rb' + autoload :CustomerPortalBenefitGrantsUpdateResponse, 'open_api_sdk/models/operations/customer_portal_benefit_grants_update_response.rb' + autoload :CustomerPortalCustomerMetersGetSecurity, 'open_api_sdk/models/operations/customer_portal_customer_meters_get_security.rb' + autoload :CustomerPortalCustomerMetersGetRequest, 'open_api_sdk/models/operations/customer_portal_customer_meters_get_request.rb' + autoload :CustomerPortalCustomerMetersGetResponse, 'open_api_sdk/models/operations/customer_portal_customer_meters_get_response.rb' + autoload :CustomerPortalCustomerMetersListSecurity, 'open_api_sdk/models/operations/customer_portal_customer_meters_list_security.rb' + autoload :CustomerPortalCustomerMetersListRequest, 'open_api_sdk/models/operations/customer_portal_customer_meters_list_request.rb' + autoload :CustomerPortalCustomerMetersListResponse, 'open_api_sdk/models/operations/customer_portal_customer_meters_list_response.rb' + autoload :CustomerPortalCustomersAddPaymentMethodResponseCustomerPortalCustomersAddPaymentMethod, 'open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response_customer_portal_customers_add_payment_method.rb' + autoload :CustomerPortalCustomersAddPaymentMethodSecurity, 'open_api_sdk/models/operations/customer_portal_customers_add_payment_method_security.rb' + autoload :CustomerPortalCustomersAddPaymentMethodResponse, 'open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response.rb' + autoload :CustomerPortalCustomersDeletePaymentMethodSecurity, 'open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_security.rb' + autoload :CustomerPortalCustomersDeletePaymentMethodRequest, 'open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_request.rb' + autoload :CustomerPortalCustomersDeletePaymentMethodResponse, 'open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_response.rb' + autoload :CustomerPortalCustomersGetSecurity, 'open_api_sdk/models/operations/customer_portal_customers_get_security.rb' + autoload :CustomerPortalCustomersGetPaymentMethodsSecurity, 'open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_security.rb' + autoload :CustomerPortalCustomersGetPaymentMethodsRequest, 'open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_request.rb' + autoload :CustomerPortalCustomersGetPaymentMethodsResponse, 'open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_response.rb' + autoload :CustomerPortalCustomersGetResponse, 'open_api_sdk/models/operations/customer_portal_customers_get_response.rb' + autoload :CustomerPortalCustomersUpdateSecurity, 'open_api_sdk/models/operations/customer_portal_customers_update_security.rb' + autoload :CustomerPortalCustomersUpdateResponse, 'open_api_sdk/models/operations/customer_portal_customers_update_response.rb' + autoload :CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest, 'open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_request.rb' + autoload :CustomerPortalDownloadablesCustomerPortalDownloadablesGetResponse, 'open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_response.rb' + autoload :CustomerPortalDownloadablesListSecurity, 'open_api_sdk/models/operations/customer_portal_downloadables_list_security.rb' + autoload :CustomerPortalDownloadablesListQueryParamBenefitIDFilter, 'open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_benefitid_filter.rb' + autoload :CustomerPortalDownloadablesListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_organizationid_filter.rb' + autoload :CustomerPortalDownloadablesListRequest, 'open_api_sdk/models/operations/customer_portal_downloadables_list_request.rb' + autoload :CustomerPortalDownloadablesListResponse, 'open_api_sdk/models/operations/customer_portal_downloadables_list_response.rb' + autoload :CustomerPortalLicenseKeysActivateResponse, 'open_api_sdk/models/operations/customer_portal_license_keys_activate_response.rb' + autoload :CustomerPortalLicenseKeysDeactivateResponse, 'open_api_sdk/models/operations/customer_portal_license_keys_deactivate_response.rb' + autoload :CustomerPortalLicenseKeysGetSecurity, 'open_api_sdk/models/operations/customer_portal_license_keys_get_security.rb' + autoload :CustomerPortalLicenseKeysGetRequest, 'open_api_sdk/models/operations/customer_portal_license_keys_get_request.rb' + autoload :CustomerPortalLicenseKeysGetResponse, 'open_api_sdk/models/operations/customer_portal_license_keys_get_response.rb' + autoload :CustomerPortalLicenseKeysListSecurity, 'open_api_sdk/models/operations/customer_portal_license_keys_list_security.rb' + autoload :CustomerPortalLicenseKeysListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/customer_portal_license_keys_list_queryparam_organizationid_filter.rb' + autoload :CustomerPortalLicenseKeysListRequest, 'open_api_sdk/models/operations/customer_portal_license_keys_list_request.rb' + autoload :CustomerPortalLicenseKeysListResponse, 'open_api_sdk/models/operations/customer_portal_license_keys_list_response.rb' + autoload :CustomerPortalLicenseKeysValidateResponse, 'open_api_sdk/models/operations/customer_portal_license_keys_validate_response.rb' + autoload :CustomerPortalOrdersGetSecurity, 'open_api_sdk/models/operations/customer_portal_orders_get_security.rb' + autoload :CustomerPortalOrdersGetRequest, 'open_api_sdk/models/operations/customer_portal_orders_get_request.rb' + autoload :CustomerPortalOrdersGetResponse, 'open_api_sdk/models/operations/customer_portal_orders_get_response.rb' + autoload :CustomerPortalOrdersInvoiceSecurity, 'open_api_sdk/models/operations/customer_portal_orders_invoice_security.rb' + autoload :CustomerPortalOrdersInvoiceRequest, 'open_api_sdk/models/operations/customer_portal_orders_invoice_request.rb' + autoload :CustomerPortalOrdersInvoiceResponse, 'open_api_sdk/models/operations/customer_portal_orders_invoice_response.rb' + autoload :CustomerPortalOrdersListSecurity, 'open_api_sdk/models/operations/customer_portal_orders_list_security.rb' + autoload :CustomerPortalOrdersListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/customer_portal_orders_list_queryparam_organizationid_filter.rb' + autoload :CustomerPortalOrdersListQueryParamProductBillingTypeFilter, 'open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productbillingtype_filter.rb' + autoload :CustomerPortalOrdersListQueryParamProductIDFilter, 'open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productid_filter.rb' + autoload :CustomerPortalOrdersListQueryParamSubscriptionIDFilter, 'open_api_sdk/models/operations/customer_portal_orders_list_queryparam_subscriptionid_filter.rb' + autoload :CustomerPortalOrdersListRequest, 'open_api_sdk/models/operations/customer_portal_orders_list_request.rb' + autoload :CustomerPortalOrdersListResponse, 'open_api_sdk/models/operations/customer_portal_orders_list_response.rb' + autoload :CustomerPortalOrganizationsGetRequest, 'open_api_sdk/models/operations/customer_portal_organizations_get_request.rb' + autoload :CustomerPortalOrganizationsGetResponse, 'open_api_sdk/models/operations/customer_portal_organizations_get_response.rb' + autoload :CustomerPortalSubscriptionsCancelSecurity, 'open_api_sdk/models/operations/customer_portal_subscriptions_cancel_security.rb' + autoload :CustomerPortalSubscriptionsCancelRequest, 'open_api_sdk/models/operations/customer_portal_subscriptions_cancel_request.rb' + autoload :CustomerPortalSubscriptionsCancelResponse, 'open_api_sdk/models/operations/customer_portal_subscriptions_cancel_response.rb' + autoload :CustomerPortalSubscriptionsGetSecurity, 'open_api_sdk/models/operations/customer_portal_subscriptions_get_security.rb' + autoload :CustomerPortalSubscriptionsGetRequest, 'open_api_sdk/models/operations/customer_portal_subscriptions_get_request.rb' + autoload :CustomerPortalSubscriptionsGetResponse, 'open_api_sdk/models/operations/customer_portal_subscriptions_get_response.rb' + autoload :CustomerPortalSubscriptionsListSecurity, 'open_api_sdk/models/operations/customer_portal_subscriptions_list_security.rb' + autoload :CustomerPortalSubscriptionsListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_organizationid_filter.rb' + autoload :CustomerPortalSubscriptionsListQueryParamProductIDFilter, 'open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_productid_filter.rb' + autoload :CustomerPortalSubscriptionsListRequest, 'open_api_sdk/models/operations/customer_portal_subscriptions_list_request.rb' + autoload :CustomerPortalSubscriptionsListResponse, 'open_api_sdk/models/operations/customer_portal_subscriptions_list_response.rb' + autoload :CustomerPortalSubscriptionsUpdateSecurity, 'open_api_sdk/models/operations/customer_portal_subscriptions_update_security.rb' + autoload :CustomerPortalSubscriptionsUpdateRequest, 'open_api_sdk/models/operations/customer_portal_subscriptions_update_request.rb' + autoload :CustomerPortalSubscriptionsUpdateResponse, 'open_api_sdk/models/operations/customer_portal_subscriptions_update_response.rb' + autoload :CustomersCreateResponse, 'open_api_sdk/models/operations/customers_create_response.rb' + autoload :CustomersDeleteExternalRequest, 'open_api_sdk/models/operations/customers_delete_external_request.rb' + autoload :CustomersDeleteExternalResponse, 'open_api_sdk/models/operations/customers_delete_external_response.rb' + autoload :CustomersDeleteRequest, 'open_api_sdk/models/operations/customers_delete_request.rb' + autoload :CustomersDeleteResponse, 'open_api_sdk/models/operations/customers_delete_response.rb' + autoload :CustomersGetExternalRequest, 'open_api_sdk/models/operations/customers_get_external_request.rb' + autoload :CustomersGetExternalResponse, 'open_api_sdk/models/operations/customers_get_external_response.rb' + autoload :CustomersGetRequest, 'open_api_sdk/models/operations/customers_get_request.rb' + autoload :CustomersGetResponse, 'open_api_sdk/models/operations/customers_get_response.rb' + autoload :CustomersGetStateExternalRequest, 'open_api_sdk/models/operations/customers_get_state_external_request.rb' + autoload :CustomersGetStateExternalResponse, 'open_api_sdk/models/operations/customers_get_state_external_response.rb' + autoload :CustomersGetStateRequest, 'open_api_sdk/models/operations/customers_get_state_request.rb' + autoload :CustomersGetStateResponse, 'open_api_sdk/models/operations/customers_get_state_response.rb' + autoload :CustomersListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/customers_list_queryparam_organizationid_filter.rb' + autoload :CustomersListRequest, 'open_api_sdk/models/operations/customers_list_request.rb' + autoload :CustomersListResponse, 'open_api_sdk/models/operations/customers_list_response.rb' + autoload :CustomersUpdateExternalRequest, 'open_api_sdk/models/operations/customers_update_external_request.rb' + autoload :CustomersUpdateExternalResponse, 'open_api_sdk/models/operations/customers_update_external_response.rb' + autoload :CustomersUpdateRequest, 'open_api_sdk/models/operations/customers_update_request.rb' + autoload :CustomersUpdateResponse, 'open_api_sdk/models/operations/customers_update_response.rb' + autoload :DiscountsCreateResponse, 'open_api_sdk/models/operations/discounts_create_response.rb' + autoload :DiscountsDeleteRequest, 'open_api_sdk/models/operations/discounts_delete_request.rb' + autoload :DiscountsDeleteResponse, 'open_api_sdk/models/operations/discounts_delete_response.rb' + autoload :DiscountsGetRequest, 'open_api_sdk/models/operations/discounts_get_request.rb' + autoload :DiscountsGetResponse, 'open_api_sdk/models/operations/discounts_get_response.rb' + autoload :DiscountsListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/discounts_list_queryparam_organizationid_filter.rb' + autoload :DiscountsListRequest, 'open_api_sdk/models/operations/discounts_list_request.rb' + autoload :DiscountsListResponse, 'open_api_sdk/models/operations/discounts_list_response.rb' + autoload :DiscountsUpdateRequest, 'open_api_sdk/models/operations/discounts_update_request.rb' + autoload :DiscountsUpdateResponse, 'open_api_sdk/models/operations/discounts_update_response.rb' + autoload :EventsGetRequest, 'open_api_sdk/models/operations/events_get_request.rb' + autoload :EventsGetResponse, 'open_api_sdk/models/operations/events_get_response.rb' + autoload :EventsIngestResponse, 'open_api_sdk/models/operations/events_ingest_response.rb' + autoload :EventsListNamesQueryParamCustomerIDFilter, 'open_api_sdk/models/operations/events_list_names_queryparam_customerid_filter.rb' + autoload :EventsListNamesQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/events_list_names_queryparam_organizationid_filter.rb' + autoload :EventsListNamesRequest, 'open_api_sdk/models/operations/events_list_names_request.rb' + autoload :EventsListNamesResponse, 'open_api_sdk/models/operations/events_list_names_response.rb' + autoload :EventsListQueryParamCustomerIDFilter, 'open_api_sdk/models/operations/events_list_queryparam_customerid_filter.rb' + autoload :EventsListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/events_list_queryparam_organizationid_filter.rb' + autoload :EventsListRequest, 'open_api_sdk/models/operations/events_list_request.rb' + autoload :EventsListResponse, 'open_api_sdk/models/operations/events_list_response.rb' + autoload :FilesCreateResponse, 'open_api_sdk/models/operations/files_create_response.rb' + autoload :FilesDeleteRequest, 'open_api_sdk/models/operations/files_delete_request.rb' + autoload :FilesDeleteResponse, 'open_api_sdk/models/operations/files_delete_response.rb' + autoload :FilesListRequest, 'open_api_sdk/models/operations/files_list_request.rb' + autoload :FilesListResponse, 'open_api_sdk/models/operations/files_list_response.rb' + autoload :FilesUpdateResponseFilesUpdate, 'open_api_sdk/models/operations/files_update_response_files_update.rb' + autoload :FilesUpdateRequest, 'open_api_sdk/models/operations/files_update_request.rb' + autoload :FilesUpdateResponse, 'open_api_sdk/models/operations/files_update_response.rb' + autoload :FilesUploadedResponseFilesUploaded, 'open_api_sdk/models/operations/files_uploaded_response_files_uploaded.rb' + autoload :FilesUploadedRequest, 'open_api_sdk/models/operations/files_uploaded_request.rb' + autoload :FilesUploadedResponse, 'open_api_sdk/models/operations/files_uploaded_response.rb' + autoload :LicenseKeysGetActivationRequest, 'open_api_sdk/models/operations/license_keys_get_activation_request.rb' + autoload :LicenseKeysGetActivationResponse, 'open_api_sdk/models/operations/license_keys_get_activation_response.rb' + autoload :LicenseKeysGetRequest, 'open_api_sdk/models/operations/license_keys_get_request.rb' + autoload :LicenseKeysGetResponse, 'open_api_sdk/models/operations/license_keys_get_response.rb' + autoload :LicenseKeysListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/license_keys_list_queryparam_organizationid_filter.rb' + autoload :LicenseKeysListRequest, 'open_api_sdk/models/operations/license_keys_list_request.rb' + autoload :LicenseKeysListResponse, 'open_api_sdk/models/operations/license_keys_list_response.rb' + autoload :LicenseKeysUpdateRequest, 'open_api_sdk/models/operations/license_keys_update_request.rb' + autoload :LicenseKeysUpdateResponse, 'open_api_sdk/models/operations/license_keys_update_response.rb' + autoload :MetersCreateResponse, 'open_api_sdk/models/operations/meters_create_response.rb' + autoload :MetersGetRequest, 'open_api_sdk/models/operations/meters_get_request.rb' + autoload :MetersGetResponse, 'open_api_sdk/models/operations/meters_get_response.rb' + autoload :MetersListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/meters_list_queryparam_organizationid_filter.rb' + autoload :MetersListRequest, 'open_api_sdk/models/operations/meters_list_request.rb' + autoload :MetersListResponse, 'open_api_sdk/models/operations/meters_list_response.rb' + autoload :MetersQuantitiesQueryParamCustomerIDFilter, 'open_api_sdk/models/operations/meters_quantities_queryparam_customerid_filter.rb' + autoload :MetersQuantitiesQueryParamExternalCustomerIDFilter, 'open_api_sdk/models/operations/meters_quantities_queryparam_externalcustomerid_filter.rb' + autoload :MetersQuantitiesRequest, 'open_api_sdk/models/operations/meters_quantities_request.rb' + autoload :MetersQuantitiesResponse, 'open_api_sdk/models/operations/meters_quantities_response.rb' + autoload :MetersUpdateRequest, 'open_api_sdk/models/operations/meters_update_request.rb' + autoload :MetersUpdateResponse, 'open_api_sdk/models/operations/meters_update_response.rb' + autoload :MetricsGetQueryParamCustomerIDFilter, 'open_api_sdk/models/operations/metrics_get_queryparam_customerid_filter.rb' + autoload :MetricsGetQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/metrics_get_queryparam_organizationid_filter.rb' + autoload :MetricsGetQueryParamProductIDFilter, 'open_api_sdk/models/operations/metrics_get_queryparam_productid_filter.rb' + autoload :MetricsGetRequest, 'open_api_sdk/models/operations/metrics_get_request.rb' + autoload :MetricsGetResponse, 'open_api_sdk/models/operations/metrics_get_response.rb' + autoload :MetricsLimitsResponse, 'open_api_sdk/models/operations/metrics_limits_response.rb' + autoload :Oauth2AuthorizeResponseOauth2Authorize, 'open_api_sdk/models/operations/oauth2_authorize_response_oauth2_authorize.rb' + autoload :Oauth2AuthorizeResponse, 'open_api_sdk/models/operations/oauth2_authorize_response.rb' + autoload :Oauth2ClientsListRequest, 'open_api_sdk/models/operations/oauth2_clients_list_request.rb' + autoload :Oauth2ClientsListResponse, 'open_api_sdk/models/operations/oauth2_clients_list_response.rb' + autoload :Oauth2ClientsOauth2CreateClientResponse, 'open_api_sdk/models/operations/oauth2_clients_oauth2_create_client_response.rb' + autoload :Oauth2ClientsOauth2DeleteClientRequest, 'open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_request.rb' + autoload :Oauth2ClientsOauth2DeleteClientResponse, 'open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_response.rb' + autoload :Oauth2ClientsOauth2GetClientRequest, 'open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_request.rb' + autoload :Oauth2ClientsOauth2GetClientResponse, 'open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_response.rb' + autoload :Oauth2ClientsOauth2UpdateClientRequest, 'open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_request.rb' + autoload :Oauth2ClientsOauth2UpdateClientResponse, 'open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_response.rb' + autoload :Oauth2IntrospectTokenResponse, 'open_api_sdk/models/operations/oauth2_introspect_token_response.rb' + autoload :Oauth2RequestTokenRequestBody, 'open_api_sdk/models/operations/oauth2_request_token_requestbody.rb' + autoload :Oauth2RequestTokenResponse, 'open_api_sdk/models/operations/oauth2_request_token_response.rb' + autoload :Oauth2RevokeTokenResponse, 'open_api_sdk/models/operations/oauth2_revoke_token_response.rb' + autoload :Oauth2UserinfoResponseOauth2Userinfo, 'open_api_sdk/models/operations/oauth2_userinfo_response_oauth2_userinfo.rb' + autoload :Oauth2UserinfoResponse, 'open_api_sdk/models/operations/oauth2_userinfo_response.rb' + autoload :OrdersGetRequest, 'open_api_sdk/models/operations/orders_get_request.rb' + autoload :OrdersGetResponse, 'open_api_sdk/models/operations/orders_get_response.rb' + autoload :OrdersInvoiceRequest, 'open_api_sdk/models/operations/orders_invoice_request.rb' + autoload :OrdersInvoiceResponse, 'open_api_sdk/models/operations/orders_invoice_response.rb' + autoload :OrdersListQueryParamCustomerIDFilter, 'open_api_sdk/models/operations/orders_list_queryparam_customerid_filter.rb' + autoload :OrdersListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/orders_list_queryparam_organizationid_filter.rb' + autoload :OrdersListQueryParamProductIDFilter, 'open_api_sdk/models/operations/orders_list_queryparam_productid_filter.rb' + autoload :OrdersListRequest, 'open_api_sdk/models/operations/orders_list_request.rb' + autoload :OrdersListResponse, 'open_api_sdk/models/operations/orders_list_response.rb' + autoload :OrganizationsCreateResponse, 'open_api_sdk/models/operations/organizations_create_response.rb' + autoload :OrganizationsGetRequest, 'open_api_sdk/models/operations/organizations_get_request.rb' + autoload :OrganizationsGetResponse, 'open_api_sdk/models/operations/organizations_get_response.rb' + autoload :OrganizationsListRequest, 'open_api_sdk/models/operations/organizations_list_request.rb' + autoload :OrganizationsListResponse, 'open_api_sdk/models/operations/organizations_list_response.rb' + autoload :OrganizationsUpdateRequest, 'open_api_sdk/models/operations/organizations_update_request.rb' + autoload :OrganizationsUpdateResponse, 'open_api_sdk/models/operations/organizations_update_response.rb' + autoload :ProductsCreateResponse, 'open_api_sdk/models/operations/products_create_response.rb' + autoload :ProductsGetRequest, 'open_api_sdk/models/operations/products_get_request.rb' + autoload :ProductsGetResponse, 'open_api_sdk/models/operations/products_get_response.rb' + autoload :ProductsListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/products_list_queryparam_organizationid_filter.rb' + autoload :ProductsListRequest, 'open_api_sdk/models/operations/products_list_request.rb' + autoload :ProductsListResponse, 'open_api_sdk/models/operations/products_list_response.rb' + autoload :ProductsUpdateBenefitsRequest, 'open_api_sdk/models/operations/products_update_benefits_request.rb' + autoload :ProductsUpdateBenefitsResponse, 'open_api_sdk/models/operations/products_update_benefits_response.rb' + autoload :ProductsUpdateRequest, 'open_api_sdk/models/operations/products_update_request.rb' + autoload :ProductsUpdateResponse, 'open_api_sdk/models/operations/products_update_response.rb' + autoload :QueryParamBenefitIDFilter, 'open_api_sdk/models/operations/queryparam_benefitid_filter.rb' + autoload :QueryParamBenefitTypeFilter, 'open_api_sdk/models/operations/queryparam_benefittype_filter.rb' + autoload :QueryParamCheckoutIDFilter, 'open_api_sdk/models/operations/queryparam_checkoutid_filter.rb' + autoload :QueryParamCustomerIDFilter, 'open_api_sdk/models/operations/queryparam_customerid_filter.rb' + autoload :QueryParamDiscountIDFilter, 'open_api_sdk/models/operations/queryparam_discountid_filter.rb' + autoload :QueryParamExternalCustomerIDFilter, 'open_api_sdk/models/operations/queryparam_externalcustomerid_filter.rb' + autoload :QueryParamMeterIDFilter, 'open_api_sdk/models/operations/queryparam_meterid_filter.rb' + autoload :QueryParamOrderIDFilter, 'open_api_sdk/models/operations/queryparam_orderid_filter.rb' + autoload :QueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/queryparam_organizationid_filter.rb' + autoload :QueryParamProductBillingTypeFilter, 'open_api_sdk/models/operations/queryparam_productbillingtype_filter.rb' + autoload :QueryParamProductIDFilter, 'open_api_sdk/models/operations/queryparam_productid_filter.rb' + autoload :QueryParamSourceFilter, 'open_api_sdk/models/operations/queryparam_source_filter.rb' + autoload :QueryParamSubscriptionIDFilter, 'open_api_sdk/models/operations/queryparam_subscriptionid_filter.rb' + autoload :RefundsCreateResponse, 'open_api_sdk/models/operations/refunds_create_response.rb' + autoload :RefundsListQueryParamCustomerIDFilter, 'open_api_sdk/models/operations/refunds_list_queryparam_customerid_filter.rb' + autoload :RefundsListQueryParamOrganizationIDFilter, 'open_api_sdk/models/operations/refunds_list_queryparam_organizationid_filter.rb' + autoload :RefundsListRequest, 'open_api_sdk/models/operations/refunds_list_request.rb' + autoload :RefundsListResponse, 'open_api_sdk/models/operations/refunds_list_response.rb' + autoload :SubscriptionsExportRequest, 'open_api_sdk/models/operations/subscriptions_export_request.rb' + autoload :SubscriptionsExportResponse, 'open_api_sdk/models/operations/subscriptions_export_response.rb' + autoload :SubscriptionsGetRequest, 'open_api_sdk/models/operations/subscriptions_get_request.rb' + autoload :SubscriptionsGetResponse, 'open_api_sdk/models/operations/subscriptions_get_response.rb' + autoload :SubscriptionsListRequest, 'open_api_sdk/models/operations/subscriptions_list_request.rb' + autoload :SubscriptionsListResponse, 'open_api_sdk/models/operations/subscriptions_list_response.rb' + autoload :SubscriptionsRevokeRequest, 'open_api_sdk/models/operations/subscriptions_revoke_request.rb' + autoload :SubscriptionsRevokeResponse, 'open_api_sdk/models/operations/subscriptions_revoke_response.rb' + autoload :SubscriptionsUpdateRequest, 'open_api_sdk/models/operations/subscriptions_update_request.rb' + autoload :SubscriptionsUpdateResponse, 'open_api_sdk/models/operations/subscriptions_update_response.rb' + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefitid_filter.rb b/lib/open_api_sdk/models/operations/benefitid_filter.rb new file mode 100644 index 0000000..4495254 --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefitid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter products granting specific benefit. + class BenefitIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_create_response.rb b/lib/open_api_sdk/models/operations/benefits_create_response.rb new file mode 100644 index 0000000..d3072c0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Benefit created. + field :benefit, T.nilable(T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, benefit: T.nilable(T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, benefit: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @benefit = benefit + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @benefit == other.benefit + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_delete_request.rb b/lib/open_api_sdk/models/operations/benefits_delete_request.rb new file mode 100644 index 0000000..cae9197 --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_delete_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsDeleteRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_delete_response.rb b/lib/open_api_sdk/models/operations/benefits_delete_response.rb new file mode 100644 index 0000000..65ee01f --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_delete_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsDeleteResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_get_request.rb b/lib/open_api_sdk/models/operations/benefits_get_request.rb new file mode 100644 index 0000000..acd48b6 --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_get_response.rb b/lib/open_api_sdk/models/operations/benefits_get_response.rb new file mode 100644 index 0000000..1786396 --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :benefit, T.nilable(T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, benefit: T.nilable(T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, benefit: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @benefit = benefit + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @benefit == other.benefit + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_grants_request.rb b/lib/open_api_sdk/models/operations/benefits_grants_request.rb new file mode 100644 index 0000000..0e89d93 --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_grants_request.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsGrantsRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + # Filter by customer. + field :customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } } + # Filter by granted status. If `true`, only granted benefits will be returned. If `false`, only revoked benefits will be returned. + field :is_granted, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'is_granted', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + + + sig { params(id: ::String, customer_id: T.nilable(T.any(::String, T::Array[::String])), is_granted: T.nilable(T::Boolean), limit: T.nilable(::Integer), page: T.nilable(::Integer)).void } + def initialize(id: nil, customer_id: nil, is_granted: nil, limit: nil, page: nil) + @id = id + @customer_id = customer_id + @is_granted = is_granted + @limit = limit + @page = page + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @customer_id == other.customer_id + return false unless @is_granted == other.is_granted + return false unless @limit == other.limit + return false unless @page == other.page + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_grants_response.rb b/lib/open_api_sdk/models/operations/benefits_grants_response.rb new file mode 100644 index 0000000..b121ee5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_grants_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsGrantsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_benefit_grant, T.nilable(Models::Shared::ListResourceBenefitGrant) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_benefit_grant: T.nilable(Models::Shared::ListResourceBenefitGrant)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_benefit_grant: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_benefit_grant = list_resource_benefit_grant + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_benefit_grant == other.list_resource_benefit_grant + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_list_request.rb b/lib/open_api_sdk/models/operations/benefits_list_request.rb new file mode 100644 index 0000000..e4fc06a --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_list_request.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by description. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::BenefitSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + # Filter by benefit type. + field :type_filter, T.nilable(T.any(Models::Shared::BenefitType, T::Array[Models::Shared::BenefitType])), { 'query_param': { 'field_name': 'type', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::BenefitSortProperty]), type_filter: T.nilable(T.any(Models::Shared::BenefitType, T::Array[Models::Shared::BenefitType]))).void } + def initialize(limit: nil, organization_id: nil, page: nil, query: nil, sorting: nil, type_filter: nil) + @limit = limit + @organization_id = organization_id + @page = page + @query = query + @sorting = sorting + @type_filter = type_filter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @query == other.query + return false unless @sorting == other.sorting + return false unless @type_filter == other.type_filter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_list_response.rb b/lib/open_api_sdk/models/operations/benefits_list_response.rb new file mode 100644 index 0000000..943530a --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_benefit, T.nilable(Models::Shared::ListResourceBenefit) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_benefit: T.nilable(Models::Shared::ListResourceBenefit)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_benefit: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_benefit = list_resource_benefit + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_benefit == other.list_resource_benefit + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_update_benefit_update.rb b/lib/open_api_sdk/models/operations/benefits_update_benefit_update.rb new file mode 100644 index 0000000..42f73f3 --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_update_benefit_update.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsUpdateBenefitUpdate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_update_request.rb b/lib/open_api_sdk/models/operations/benefits_update_request.rb new file mode 100644 index 0000000..e5c1c6d --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + field :request_body, T.any(Models::Shared::BenefitCustomUpdate, Models::Shared::BenefitDiscordUpdate, Models::Shared::BenefitGitHubRepositoryUpdate, Models::Shared::BenefitDownloadablesUpdate, Models::Shared::BenefitLicenseKeysUpdate, Models::Shared::BenefitMeterCreditUpdate), { 'request': { 'media_type': 'application/json' } } + + + sig { params(id: ::String, request_body: T.any(Models::Shared::BenefitCustomUpdate, Models::Shared::BenefitDiscordUpdate, Models::Shared::BenefitGitHubRepositoryUpdate, Models::Shared::BenefitDownloadablesUpdate, Models::Shared::BenefitLicenseKeysUpdate, Models::Shared::BenefitMeterCreditUpdate)).void } + def initialize(id: nil, request_body: nil) + @id = id + @request_body = request_body + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @request_body == other.request_body + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefits_update_response.rb b/lib/open_api_sdk/models/operations/benefits_update_response.rb new file mode 100644 index 0000000..d71cfe3 --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefits_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class BenefitsUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Benefit updated. + field :benefit, T.nilable(T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, benefit: T.nilable(T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, benefit: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @benefit = benefit + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @benefit == other.benefit + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/benefittype_filter.rb b/lib/open_api_sdk/models/operations/benefittype_filter.rb new file mode 100644 index 0000000..e2caecf --- /dev/null +++ b/lib/open_api_sdk/models/operations/benefittype_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by benefit type. + class BenefitTypeFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_create_checkout_link_create.rb b/lib/open_api_sdk/models/operations/checkout_links_create_checkout_link_create.rb new file mode 100644 index 0000000..c853333 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_create_checkout_link_create.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksCreateCheckoutLinkCreate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_create_response.rb b/lib/open_api_sdk/models/operations/checkout_links_create_response.rb new file mode 100644 index 0000000..8cfae74 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Checkout link created. + field :checkout_link, T.nilable(Models::Shared::CheckoutLink) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, checkout_link: T.nilable(Models::Shared::CheckoutLink)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, checkout_link: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @checkout_link = checkout_link + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @checkout_link == other.checkout_link + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_delete_request.rb b/lib/open_api_sdk/models/operations/checkout_links_delete_request.rb new file mode 100644 index 0000000..0b2bbdd --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_delete_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksDeleteRequest + extend T::Sig + include Crystalline::MetadataFields + + # The checkout link ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_delete_response.rb b/lib/open_api_sdk/models/operations/checkout_links_delete_response.rb new file mode 100644 index 0000000..ac4b9ac --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_delete_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksDeleteResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_get_request.rb b/lib/open_api_sdk/models/operations/checkout_links_get_request.rb new file mode 100644 index 0000000..5d8dc0e --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The checkout link ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_get_response.rb b/lib/open_api_sdk/models/operations/checkout_links_get_response.rb new file mode 100644 index 0000000..bbf3945 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :checkout_link, T.nilable(Models::Shared::CheckoutLink) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, checkout_link: T.nilable(Models::Shared::CheckoutLink)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, checkout_link: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @checkout_link = checkout_link + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @checkout_link == other.checkout_link + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/checkout_links_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..670a005 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CheckoutLinksListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_list_queryparam_productid_filter.rb b/lib/open_api_sdk/models/operations/checkout_links_list_queryparam_productid_filter.rb new file mode 100644 index 0000000..14df184 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_list_queryparam_productid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product ID. + class CheckoutLinksListQueryParamProductIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_list_request.rb b/lib/open_api_sdk/models/operations/checkout_links_list_request.rb new file mode 100644 index 0000000..b0e75aa --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_list_request.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by product ID. + field :product_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'product_id', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::CheckoutLinkSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), product_id: T.nilable(T.any(::String, T::Array[::String])), sorting: T.nilable(T::Array[Models::Shared::CheckoutLinkSortProperty])).void } + def initialize(limit: nil, organization_id: nil, page: nil, product_id: nil, sorting: nil) + @limit = limit + @organization_id = organization_id + @page = page + @product_id = product_id + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @product_id == other.product_id + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_list_response.rb b/lib/open_api_sdk/models/operations/checkout_links_list_response.rb new file mode 100644 index 0000000..67eb8ad --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_checkout_link, T.nilable(Models::Shared::ListResourceCheckoutLink) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_checkout_link: T.nilable(Models::Shared::ListResourceCheckoutLink)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_checkout_link: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_checkout_link = list_resource_checkout_link + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_checkout_link == other.list_resource_checkout_link + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_update_request.rb b/lib/open_api_sdk/models/operations/checkout_links_update_request.rb new file mode 100644 index 0000000..6b0ae4c --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :checkout_link_update, Models::Shared::CheckoutLinkUpdate, { 'request': { 'media_type': 'application/json' } } + # The checkout link ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(checkout_link_update: Models::Shared::CheckoutLinkUpdate, id: ::String).void } + def initialize(checkout_link_update: nil, id: nil) + @checkout_link_update = checkout_link_update + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @checkout_link_update == other.checkout_link_update + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkout_links_update_response.rb b/lib/open_api_sdk/models/operations/checkout_links_update_response.rb new file mode 100644 index 0000000..c83e6d7 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkout_links_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutLinksUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Checkout link updated. + field :checkout_link, T.nilable(Models::Shared::CheckoutLink) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, checkout_link: T.nilable(Models::Shared::CheckoutLink)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, checkout_link: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @checkout_link = checkout_link + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @checkout_link == other.checkout_link + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkoutid_filter.rb b/lib/open_api_sdk/models/operations/checkoutid_filter.rb new file mode 100644 index 0000000..82cef70 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkoutid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by checkout ID. + class CheckoutIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkouts_client_get_request.rb b/lib/open_api_sdk/models/operations/checkouts_client_get_request.rb new file mode 100644 index 0000000..e151b42 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkouts_client_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutsClientGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The checkout session client secret. + field :client_secret, ::String, { 'path_param': { 'field_name': 'client_secret', 'style': 'simple', 'explode': false } } + + + sig { params(client_secret: ::String).void } + def initialize(client_secret: nil) + @client_secret = client_secret + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_secret == other.client_secret + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkouts_client_get_response.rb b/lib/open_api_sdk/models/operations/checkouts_client_get_response.rb new file mode 100644 index 0000000..b4bfa58 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkouts_client_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutsClientGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :checkout_public, T.nilable(Models::Shared::CheckoutPublic) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, checkout_public: T.nilable(Models::Shared::CheckoutPublic)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, checkout_public: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @checkout_public = checkout_public + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @checkout_public == other.checkout_public + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkouts_create_response.rb b/lib/open_api_sdk/models/operations/checkouts_create_response.rb new file mode 100644 index 0000000..0d70645 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkouts_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutsCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Checkout session created. + field :checkout, T.nilable(Models::Shared::Checkout) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, checkout: T.nilable(Models::Shared::Checkout)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, checkout: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @checkout = checkout + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @checkout == other.checkout + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkouts_get_request.rb b/lib/open_api_sdk/models/operations/checkouts_get_request.rb new file mode 100644 index 0000000..62a6fcb --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkouts_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The checkout session ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkouts_get_response.rb b/lib/open_api_sdk/models/operations/checkouts_get_response.rb new file mode 100644 index 0000000..3360996 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkouts_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :checkout, T.nilable(Models::Shared::Checkout) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, checkout: T.nilable(Models::Shared::Checkout)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, checkout: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @checkout = checkout + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @checkout == other.checkout + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkouts_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/checkouts_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..236c419 --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkouts_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CheckoutsListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkouts_list_queryparam_productid_filter.rb b/lib/open_api_sdk/models/operations/checkouts_list_queryparam_productid_filter.rb new file mode 100644 index 0000000..97acd5f --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkouts_list_queryparam_productid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product ID. + class CheckoutsListQueryParamProductIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkouts_list_request.rb b/lib/open_api_sdk/models/operations/checkouts_list_request.rb new file mode 100644 index 0000000..0c5740a --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkouts_list_request.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by product ID. + field :product_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'product_id', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::CheckoutSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), product_id: T.nilable(T.any(::String, T::Array[::String])), sorting: T.nilable(T::Array[Models::Shared::CheckoutSortProperty])).void } + def initialize(limit: nil, organization_id: nil, page: nil, product_id: nil, sorting: nil) + @limit = limit + @organization_id = organization_id + @page = page + @product_id = product_id + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @product_id == other.product_id + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/checkouts_list_response.rb b/lib/open_api_sdk/models/operations/checkouts_list_response.rb new file mode 100644 index 0000000..68e0a7f --- /dev/null +++ b/lib/open_api_sdk/models/operations/checkouts_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CheckoutsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_checkout, T.nilable(Models::Shared::ListResourceCheckout) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_checkout: T.nilable(Models::Shared::ListResourceCheckout)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_checkout: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_checkout = list_resource_checkout + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_checkout == other.list_resource_checkout + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_create_response.rb b/lib/open_api_sdk/models/operations/custom_fields_create_response.rb new file mode 100644 index 0000000..ce886a8 --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomFieldsCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Custom field created. + field :custom_field, T.nilable(T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, custom_field: T.nilable(T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, custom_field: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @custom_field = custom_field + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @custom_field == other.custom_field + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_delete_request.rb b/lib/open_api_sdk/models/operations/custom_fields_delete_request.rb new file mode 100644 index 0000000..4597ed6 --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_delete_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomFieldsDeleteRequest + extend T::Sig + include Crystalline::MetadataFields + + # The custom field ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_delete_response.rb b/lib/open_api_sdk/models/operations/custom_fields_delete_response.rb new file mode 100644 index 0000000..20eab61 --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_delete_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomFieldsDeleteResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_get_request.rb b/lib/open_api_sdk/models/operations/custom_fields_get_request.rb new file mode 100644 index 0000000..413ad4c --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomFieldsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The custom field ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_get_response.rb b/lib/open_api_sdk/models/operations/custom_fields_get_response.rb new file mode 100644 index 0000000..d8107b1 --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomFieldsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :custom_field, T.nilable(T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, custom_field: T.nilable(T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, custom_field: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @custom_field = custom_field + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @custom_field == other.custom_field + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/custom_fields_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..05450a8 --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CustomFieldsListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_list_request.rb b/lib/open_api_sdk/models/operations/custom_fields_list_request.rb new file mode 100644 index 0000000..8992582 --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_list_request.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomFieldsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by custom field name or slug. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::CustomFieldSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + # Filter by custom field type. + field :type_filter, T.nilable(T.any(Models::Shared::CustomFieldType, T::Array[Models::Shared::CustomFieldType])), { 'query_param': { 'field_name': 'type', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::CustomFieldSortProperty]), type_filter: T.nilable(T.any(Models::Shared::CustomFieldType, T::Array[Models::Shared::CustomFieldType]))).void } + def initialize(limit: nil, organization_id: nil, page: nil, query: nil, sorting: nil, type_filter: nil) + @limit = limit + @organization_id = organization_id + @page = page + @query = query + @sorting = sorting + @type_filter = type_filter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @query == other.query + return false unless @sorting == other.sorting + return false unless @type_filter == other.type_filter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_list_response.rb b/lib/open_api_sdk/models/operations/custom_fields_list_response.rb new file mode 100644 index 0000000..a82c925 --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomFieldsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_custom_field, T.nilable(Models::Shared::ListResourceCustomField) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_custom_field: T.nilable(Models::Shared::ListResourceCustomField)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_custom_field: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_custom_field = list_resource_custom_field + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_custom_field == other.list_resource_custom_field + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_update_request.rb b/lib/open_api_sdk/models/operations/custom_fields_update_request.rb new file mode 100644 index 0000000..9a29d1b --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomFieldsUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :custom_field_update, T.any(Models::Shared::CustomFieldUpdateText, Models::Shared::CustomFieldUpdateNumber, Models::Shared::CustomFieldUpdateDate, Models::Shared::CustomFieldUpdateCheckbox, Models::Shared::CustomFieldUpdateSelect), { 'request': { 'media_type': 'application/json' } } + # The custom field ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(custom_field_update: T.any(Models::Shared::CustomFieldUpdateText, Models::Shared::CustomFieldUpdateNumber, Models::Shared::CustomFieldUpdateDate, Models::Shared::CustomFieldUpdateCheckbox, Models::Shared::CustomFieldUpdateSelect), id: ::String).void } + def initialize(custom_field_update: nil, id: nil) + @custom_field_update = custom_field_update + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @custom_field_update == other.custom_field_update + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/custom_fields_update_response.rb b/lib/open_api_sdk/models/operations/custom_fields_update_response.rb new file mode 100644 index 0000000..775e4a2 --- /dev/null +++ b/lib/open_api_sdk/models/operations/custom_fields_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomFieldsUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Custom field updated. + field :custom_field, T.nilable(T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, custom_field: T.nilable(T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, custom_field: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @custom_field = custom_field + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @custom_field == other.custom_field + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_meters_get_request.rb b/lib/open_api_sdk/models/operations/customer_meters_get_request.rb new file mode 100644 index 0000000..377a1f7 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_meters_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerMetersGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The customer meter ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_meters_get_response.rb b/lib/open_api_sdk/models/operations/customer_meters_get_response.rb new file mode 100644 index 0000000..ba49375 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_meters_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerMetersGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_meter, T.nilable(Models::Shared::CustomerMeter) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_meter: T.nilable(Models::Shared::CustomerMeter)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_meter: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_meter = customer_meter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_meter == other.customer_meter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_meters_list_queryparam_customerid_filter.rb b/lib/open_api_sdk/models/operations/customer_meters_list_queryparam_customerid_filter.rb new file mode 100644 index 0000000..c55b98b --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_meters_list_queryparam_customerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by customer ID. + class CustomerMetersListQueryParamCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_meters_list_queryparam_externalcustomerid_filter.rb b/lib/open_api_sdk/models/operations/customer_meters_list_queryparam_externalcustomerid_filter.rb new file mode 100644 index 0000000..bb4dd7b --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_meters_list_queryparam_externalcustomerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by external customer ID. + class CustomerMetersListQueryParamExternalCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_meters_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/customer_meters_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..f58788e --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_meters_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CustomerMetersListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_meters_list_request.rb b/lib/open_api_sdk/models/operations/customer_meters_list_request.rb new file mode 100644 index 0000000..18bc852 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_meters_list_request.rb @@ -0,0 +1,57 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerMetersListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by customer ID. + field :customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } } + # Filter by external customer ID. + field :external_customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'external_customer_id', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by meter ID. + field :meter_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'meter_id', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::CustomerMeterSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(customer_id: T.nilable(T.any(::String, T::Array[::String])), external_customer_id: T.nilable(T.any(::String, T::Array[::String])), limit: T.nilable(::Integer), meter_id: T.nilable(T.any(::String, T::Array[::String])), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), sorting: T.nilable(T::Array[Models::Shared::CustomerMeterSortProperty])).void } + def initialize(customer_id: nil, external_customer_id: nil, limit: nil, meter_id: nil, organization_id: nil, page: nil, sorting: nil) + @customer_id = customer_id + @external_customer_id = external_customer_id + @limit = limit + @meter_id = meter_id + @organization_id = organization_id + @page = page + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_id == other.customer_id + return false unless @external_customer_id == other.external_customer_id + return false unless @limit == other.limit + return false unless @meter_id == other.meter_id + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_meters_list_response.rb b/lib/open_api_sdk/models/operations/customer_meters_list_response.rb new file mode 100644 index 0000000..d11a15d --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_meters_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerMetersListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_customer_meter, T.nilable(Models::Shared::ListResourceCustomerMeter) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_customer_meter: T.nilable(Models::Shared::ListResourceCustomerMeter)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_customer_meter: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_customer_meter = list_resource_customer_meter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_customer_meter == other.list_resource_customer_meter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_request.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_request.rb new file mode 100644 index 0000000..399a127 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalBenefitGrantsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The benefit grant ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_response.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_response.rb new file mode 100644 index 0000000..a017bbd --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalBenefitGrantsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_benefit_grant, T.nilable(T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_benefit_grant: T.nilable(T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_benefit_grant: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_benefit_grant = customer_benefit_grant + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_benefit_grant == other.customer_benefit_grant + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_security.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_security.rb new file mode 100644 index 0000000..2896dfb --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_get_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalBenefitGrantsGetSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_benefitid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_benefitid_filter.rb new file mode 100644 index 0000000..e0810e1 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_benefitid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by benefit ID. + class CustomerPortalBenefitGrantsListQueryParamBenefitIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..34a9c4f --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CustomerPortalBenefitGrantsListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_request.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_request.rb new file mode 100644 index 0000000..bbafc77 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_request.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalBenefitGrantsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by benefit ID. + field :benefit_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'benefit_id', 'style': 'form', 'explode': true } } + # Filter by checkout ID. + field :checkout_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'checkout_id', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by order ID. + field :order_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'order_id', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::CustomerBenefitGrantSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + # Filter by subscription ID. + field :subscription_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'subscription_id', 'style': 'form', 'explode': true } } + # Filter by benefit type. + field :type_filter, T.nilable(T.any(Models::Shared::BenefitType, T::Array[Models::Shared::BenefitType])), { 'query_param': { 'field_name': 'type', 'style': 'form', 'explode': true } } + + + sig { params(benefit_id: T.nilable(T.any(::String, T::Array[::String])), checkout_id: T.nilable(T.any(::String, T::Array[::String])), limit: T.nilable(::Integer), order_id: T.nilable(T.any(::String, T::Array[::String])), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), sorting: T.nilable(T::Array[Models::Shared::CustomerBenefitGrantSortProperty]), subscription_id: T.nilable(T.any(::String, T::Array[::String])), type_filter: T.nilable(T.any(Models::Shared::BenefitType, T::Array[Models::Shared::BenefitType]))).void } + def initialize(benefit_id: nil, checkout_id: nil, limit: nil, order_id: nil, organization_id: nil, page: nil, sorting: nil, subscription_id: nil, type_filter: nil) + @benefit_id = benefit_id + @checkout_id = checkout_id + @limit = limit + @order_id = order_id + @organization_id = organization_id + @page = page + @sorting = sorting + @subscription_id = subscription_id + @type_filter = type_filter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @checkout_id == other.checkout_id + return false unless @limit == other.limit + return false unless @order_id == other.order_id + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @sorting == other.sorting + return false unless @subscription_id == other.subscription_id + return false unless @type_filter == other.type_filter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_response.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_response.rb new file mode 100644 index 0000000..2f6b734 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalBenefitGrantsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_customer_benefit_grant, T.nilable(Models::Shared::ListResourceCustomerBenefitGrant) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_customer_benefit_grant: T.nilable(Models::Shared::ListResourceCustomerBenefitGrant)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_customer_benefit_grant: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_customer_benefit_grant = list_resource_customer_benefit_grant + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_customer_benefit_grant == other.list_resource_customer_benefit_grant + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_security.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_security.rb new file mode 100644 index 0000000..48d45fe --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_list_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalBenefitGrantsListSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_request.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_request.rb new file mode 100644 index 0000000..a9de705 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalBenefitGrantsUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_benefit_grant_update, T.any(Models::Shared::CustomerBenefitGrantDiscordUpdate, Models::Shared::CustomerBenefitGrantGitHubRepositoryUpdate, Models::Shared::CustomerBenefitGrantDownloadablesUpdate, Models::Shared::CustomerBenefitGrantLicenseKeysUpdate, Models::Shared::CustomerBenefitGrantCustomUpdate, Models::Shared::CustomerBenefitGrantMeterCreditUpdate), { 'request': { 'media_type': 'application/json' } } + # The benefit grant ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(customer_benefit_grant_update: T.any(Models::Shared::CustomerBenefitGrantDiscordUpdate, Models::Shared::CustomerBenefitGrantGitHubRepositoryUpdate, Models::Shared::CustomerBenefitGrantDownloadablesUpdate, Models::Shared::CustomerBenefitGrantLicenseKeysUpdate, Models::Shared::CustomerBenefitGrantCustomUpdate, Models::Shared::CustomerBenefitGrantMeterCreditUpdate), id: ::String).void } + def initialize(customer_benefit_grant_update: nil, id: nil) + @customer_benefit_grant_update = customer_benefit_grant_update + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_benefit_grant_update == other.customer_benefit_grant_update + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_response.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_response.rb new file mode 100644 index 0000000..51be1cf --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalBenefitGrantsUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Benefit grant updated. + field :customer_benefit_grant, T.nilable(T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_benefit_grant: T.nilable(T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_benefit_grant: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_benefit_grant = customer_benefit_grant + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_benefit_grant == other.customer_benefit_grant + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_security.rb b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_security.rb new file mode 100644 index 0000000..e24ca46 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_benefit_grants_update_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalBenefitGrantsUpdateSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_request.rb b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_request.rb new file mode 100644 index 0000000..03d02ab --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomerMetersGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The customer meter ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_response.rb b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_response.rb new file mode 100644 index 0000000..3276284 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomerMetersGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_customer_meter, T.nilable(Models::Shared::CustomerCustomerMeter) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_customer_meter: T.nilable(Models::Shared::CustomerCustomerMeter)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_customer_meter: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_customer_meter = customer_customer_meter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_customer_meter == other.customer_customer_meter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_security.rb b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_security.rb new file mode 100644 index 0000000..0d6dea6 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_get_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomerMetersGetSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_request.rb b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_request.rb new file mode 100644 index 0000000..bbd12f4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_request.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomerMetersListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by meter ID. + field :meter_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'meter_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by meter name. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::CustomerCustomerMeterSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), meter_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::CustomerCustomerMeterSortProperty])).void } + def initialize(limit: nil, meter_id: nil, page: nil, query: nil, sorting: nil) + @limit = limit + @meter_id = meter_id + @page = page + @query = query + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @meter_id == other.meter_id + return false unless @page == other.page + return false unless @query == other.query + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_response.rb b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_response.rb new file mode 100644 index 0000000..5ff335f --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomerMetersListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_customer_customer_meter, T.nilable(Models::Shared::ListResourceCustomerCustomerMeter) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_customer_customer_meter: T.nilable(Models::Shared::ListResourceCustomerCustomerMeter)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_customer_customer_meter: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_customer_customer_meter = list_resource_customer_customer_meter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_customer_customer_meter == other.list_resource_customer_customer_meter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_security.rb b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_security.rb new file mode 100644 index 0000000..41cdcb8 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customer_meters_list_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomerMetersListSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response.rb new file mode 100644 index 0000000..0559e67 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersAddPaymentMethodResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Payment method created. + field :response_customer_portal_customers_add_payment_method, T.nilable(T.any(Models::Shared::PaymentMethodCard, Models::Shared::PaymentMethodGeneric)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, response_customer_portal_customers_add_payment_method: T.nilable(T.any(Models::Shared::PaymentMethodCard, Models::Shared::PaymentMethodGeneric))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, response_customer_portal_customers_add_payment_method: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @response_customer_portal_customers_add_payment_method = response_customer_portal_customers_add_payment_method + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @response_customer_portal_customers_add_payment_method == other.response_customer_portal_customers_add_payment_method + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response_customer_portal_customers_add_payment_method.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response_customer_portal_customers_add_payment_method.rb new file mode 100644 index 0000000..0278055 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_response_customer_portal_customers_add_payment_method.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Payment method created. + class CustomerPortalCustomersAddPaymentMethodResponseCustomerPortalCustomersAddPaymentMethod + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_security.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_security.rb new file mode 100644 index 0000000..e08a421 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_add_payment_method_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersAddPaymentMethodSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_request.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_request.rb new file mode 100644 index 0000000..6ba9dc4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersDeletePaymentMethodRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_response.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_response.rb new file mode 100644 index 0000000..04cc8a1 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersDeletePaymentMethodResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_security.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_security.rb new file mode 100644 index 0000000..579bf38 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_delete_payment_method_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersDeletePaymentMethodSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_request.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_request.rb new file mode 100644 index 0000000..ef54e96 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersGetPaymentMethodsRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), page: T.nilable(::Integer)).void } + def initialize(limit: nil, page: nil) + @limit = limit + @page = page + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @page == other.page + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_response.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_response.rb new file mode 100644 index 0000000..85f6073 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersGetPaymentMethodsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_union_payment_method_card_payment_method_generic, T.nilable(Models::Shared::ListResourceUnionPaymentMethodCardPaymentMethodGeneric) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_union_payment_method_card_payment_method_generic: T.nilable(Models::Shared::ListResourceUnionPaymentMethodCardPaymentMethodGeneric)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_union_payment_method_card_payment_method_generic: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_union_payment_method_card_payment_method_generic = list_resource_union_payment_method_card_payment_method_generic + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_union_payment_method_card_payment_method_generic == other.list_resource_union_payment_method_card_payment_method_generic + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_security.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_security.rb new file mode 100644 index 0000000..8e6e641 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_get_payment_methods_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersGetPaymentMethodsSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_get_response.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_get_response.rb new file mode 100644 index 0000000..c87e9bc --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_portal_customer, T.nilable(Models::Shared::CustomerPortalCustomer) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_portal_customer: T.nilable(Models::Shared::CustomerPortalCustomer)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_portal_customer: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_portal_customer = customer_portal_customer + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_portal_customer == other.customer_portal_customer + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_get_security.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_get_security.rb new file mode 100644 index 0000000..62854c3 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_get_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersGetSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_update_response.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_update_response.rb new file mode 100644 index 0000000..1cd6003 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Customer updated. + field :customer_portal_customer, T.nilable(Models::Shared::CustomerPortalCustomer) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_portal_customer: T.nilable(Models::Shared::CustomerPortalCustomer)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_portal_customer: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_portal_customer = customer_portal_customer + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_portal_customer == other.customer_portal_customer + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_customers_update_security.rb b/lib/open_api_sdk/models/operations/customer_portal_customers_update_security.rb new file mode 100644 index 0000000..5ae40ea --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_customers_update_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalCustomersUpdateSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_request.rb b/lib/open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_request.rb new file mode 100644 index 0000000..9757551 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :token, ::String, { 'path_param': { 'field_name': 'token', 'style': 'simple', 'explode': false } } + + + sig { params(token: ::String).void } + def initialize(token: nil) + @token = token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @token == other.token + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_response.rb b/lib/open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_response.rb new file mode 100644 index 0000000..50682c8 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_downloadables_customer_portal_downloadables_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalDownloadablesCustomerPortalDownloadablesGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_benefitid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_benefitid_filter.rb new file mode 100644 index 0000000..d14a210 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_benefitid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by benefit ID. + class CustomerPortalDownloadablesListQueryParamBenefitIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..5dccf39 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CustomerPortalDownloadablesListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_request.rb b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_request.rb new file mode 100644 index 0000000..d91b684 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_request.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalDownloadablesListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by benefit ID. + field :benefit_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'benefit_id', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + + + sig { params(benefit_id: T.nilable(T.any(::String, T::Array[::String])), limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer)).void } + def initialize(benefit_id: nil, limit: nil, organization_id: nil, page: nil) + @benefit_id = benefit_id + @limit = limit + @organization_id = organization_id + @page = page + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_response.rb b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_response.rb new file mode 100644 index 0000000..1053e12 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalDownloadablesListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_downloadable_read, T.nilable(Models::Shared::ListResourceDownloadableRead) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_downloadable_read: T.nilable(Models::Shared::ListResourceDownloadableRead)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_downloadable_read: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_downloadable_read = list_resource_downloadable_read + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_downloadable_read == other.list_resource_downloadable_read + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_security.rb b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_security.rb new file mode 100644 index 0000000..f5f03a5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_downloadables_list_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalDownloadablesListSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_activate_response.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_activate_response.rb new file mode 100644 index 0000000..d5c42fe --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_activate_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalLicenseKeysActivateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :license_key_activation_read, T.nilable(Models::Shared::LicenseKeyActivationRead) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, license_key_activation_read: T.nilable(Models::Shared::LicenseKeyActivationRead)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, license_key_activation_read: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @license_key_activation_read = license_key_activation_read + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @license_key_activation_read == other.license_key_activation_read + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_deactivate_response.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_deactivate_response.rb new file mode 100644 index 0000000..235fbe0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_deactivate_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalLicenseKeysDeactivateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_get_request.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_get_request.rb new file mode 100644 index 0000000..c90ba20 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalLicenseKeysGetRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_get_response.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_get_response.rb new file mode 100644 index 0000000..8c818db --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalLicenseKeysGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :license_key_with_activations, T.nilable(Models::Shared::LicenseKeyWithActivations) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, license_key_with_activations: T.nilable(Models::Shared::LicenseKeyWithActivations)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, license_key_with_activations: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @license_key_with_activations = license_key_with_activations + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @license_key_with_activations == other.license_key_with_activations + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_get_security.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_get_security.rb new file mode 100644 index 0000000..581aba0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_get_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalLicenseKeysGetSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..ecfb19d --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CustomerPortalLicenseKeysListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_request.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_request.rb new file mode 100644 index 0000000..b39798e --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_request.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalLicenseKeysListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by a specific benefit + field :benefit_id, T.nilable(::String), { 'query_param': { 'field_name': 'benefit_id', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + + + sig { params(benefit_id: T.nilable(::String), limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer)).void } + def initialize(benefit_id: nil, limit: nil, organization_id: nil, page: nil) + @benefit_id = benefit_id + @limit = limit + @organization_id = organization_id + @page = page + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_response.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_response.rb new file mode 100644 index 0000000..b39a971 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalLicenseKeysListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_license_key_read, T.nilable(Models::Shared::ListResourceLicenseKeyRead) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_license_key_read: T.nilable(Models::Shared::ListResourceLicenseKeyRead)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_license_key_read: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_license_key_read = list_resource_license_key_read + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_license_key_read == other.list_resource_license_key_read + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_security.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_security.rb new file mode 100644 index 0000000..39ffb45 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_list_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalLicenseKeysListSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_license_keys_validate_response.rb b/lib/open_api_sdk/models/operations/customer_portal_license_keys_validate_response.rb new file mode 100644 index 0000000..40f2da7 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_license_keys_validate_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalLicenseKeysValidateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :validated_license_key, T.nilable(Models::Shared::ValidatedLicenseKey) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, validated_license_key: T.nilable(Models::Shared::ValidatedLicenseKey)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, validated_license_key: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @validated_license_key = validated_license_key + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @validated_license_key == other.validated_license_key + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_get_request.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_get_request.rb new file mode 100644 index 0000000..0e855e5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrdersGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The order ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_get_response.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_get_response.rb new file mode 100644 index 0000000..e143ee8 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrdersGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_order, T.nilable(Models::Shared::CustomerOrder) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_order: T.nilable(Models::Shared::CustomerOrder)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_order: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_order = customer_order + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_order == other.customer_order + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_get_security.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_get_security.rb new file mode 100644 index 0000000..863a578 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_get_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrdersGetSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_invoice_request.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_invoice_request.rb new file mode 100644 index 0000000..a2fc7b0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_invoice_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrdersInvoiceRequest + extend T::Sig + include Crystalline::MetadataFields + + # The order ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_invoice_response.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_invoice_response.rb new file mode 100644 index 0000000..0cc3d60 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_invoice_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrdersInvoiceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_order_invoice, T.nilable(Models::Shared::CustomerOrderInvoice) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_order_invoice: T.nilable(Models::Shared::CustomerOrderInvoice)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_order_invoice: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_order_invoice = customer_order_invoice + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_order_invoice == other.customer_order_invoice + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_invoice_security.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_invoice_security.rb new file mode 100644 index 0000000..263baa4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_invoice_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrdersInvoiceSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..0960e34 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CustomerPortalOrdersListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productbillingtype_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productbillingtype_filter.rb new file mode 100644 index 0000000..ab8688c --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productbillingtype_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. + class CustomerPortalOrdersListQueryParamProductBillingTypeFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productid_filter.rb new file mode 100644 index 0000000..669ecf5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_productid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product ID. + class CustomerPortalOrdersListQueryParamProductIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_subscriptionid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_subscriptionid_filter.rb new file mode 100644 index 0000000..ce58948 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_list_queryparam_subscriptionid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by subscription ID. + class CustomerPortalOrdersListQueryParamSubscriptionIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_list_request.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_list_request.rb new file mode 100644 index 0000000..648c3e4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_list_request.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrdersListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. + field :product_billing_type, T.nilable(T.any(Models::Shared::ProductBillingType, T::Array[Models::Shared::ProductBillingType])), { 'query_param': { 'field_name': 'product_billing_type', 'style': 'form', 'explode': true } } + # Filter by product ID. + field :product_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'product_id', 'style': 'form', 'explode': true } } + # Search by product or organization name. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::CustomerOrderSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + # Filter by subscription ID. + field :subscription_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'subscription_id', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), product_billing_type: T.nilable(T.any(Models::Shared::ProductBillingType, T::Array[Models::Shared::ProductBillingType])), product_id: T.nilable(T.any(::String, T::Array[::String])), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::CustomerOrderSortProperty]), subscription_id: T.nilable(T.any(::String, T::Array[::String]))).void } + def initialize(limit: nil, organization_id: nil, page: nil, product_billing_type: nil, product_id: nil, query: nil, sorting: nil, subscription_id: nil) + @limit = limit + @organization_id = organization_id + @page = page + @product_billing_type = product_billing_type + @product_id = product_id + @query = query + @sorting = sorting + @subscription_id = subscription_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @product_billing_type == other.product_billing_type + return false unless @product_id == other.product_id + return false unless @query == other.query + return false unless @sorting == other.sorting + return false unless @subscription_id == other.subscription_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_list_response.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_list_response.rb new file mode 100644 index 0000000..759414b --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrdersListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_customer_order, T.nilable(Models::Shared::ListResourceCustomerOrder) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_customer_order: T.nilable(Models::Shared::ListResourceCustomerOrder)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_customer_order: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_customer_order = list_resource_customer_order + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_customer_order == other.list_resource_customer_order + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_orders_list_security.rb b/lib/open_api_sdk/models/operations/customer_portal_orders_list_security.rb new file mode 100644 index 0000000..14cb99a --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_orders_list_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrdersListSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_organizations_get_request.rb b/lib/open_api_sdk/models/operations/customer_portal_organizations_get_request.rb new file mode 100644 index 0000000..7429db7 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_organizations_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrganizationsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The organization slug. + field :slug, ::String, { 'path_param': { 'field_name': 'slug', 'style': 'simple', 'explode': false } } + + + sig { params(slug: ::String).void } + def initialize(slug: nil) + @slug = slug + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @slug == other.slug + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_organizations_get_response.rb b/lib/open_api_sdk/models/operations/customer_portal_organizations_get_response.rb new file mode 100644 index 0000000..2bd2fb5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_organizations_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalOrganizationsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_organization, T.nilable(Models::Shared::CustomerOrganization) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_organization: T.nilable(Models::Shared::CustomerOrganization)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_organization: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_organization = customer_organization + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_organization == other.customer_organization + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_request.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_request.rb new file mode 100644 index 0000000..3681a64 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsCancelRequest + extend T::Sig + include Crystalline::MetadataFields + + # The subscription ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_response.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_response.rb new file mode 100644 index 0000000..3da794c --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsCancelResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Customer subscription is canceled. + field :customer_subscription, T.nilable(Models::Shared::CustomerSubscription) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_subscription: T.nilable(Models::Shared::CustomerSubscription)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_subscription: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_subscription = customer_subscription + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_subscription == other.customer_subscription + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_security.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_security.rb new file mode 100644 index 0000000..a8f89b6 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_cancel_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsCancelSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_request.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_request.rb new file mode 100644 index 0000000..a5e5101 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The subscription ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_response.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_response.rb new file mode 100644 index 0000000..d3a1d2d --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_subscription, T.nilable(Models::Shared::CustomerSubscription) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_subscription: T.nilable(Models::Shared::CustomerSubscription)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_subscription: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_subscription = customer_subscription + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_subscription == other.customer_subscription + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_security.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_security.rb new file mode 100644 index 0000000..c57133e --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_get_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsGetSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..b37707f --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CustomerPortalSubscriptionsListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_productid_filter.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_productid_filter.rb new file mode 100644 index 0000000..29e635f --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_queryparam_productid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product ID. + class CustomerPortalSubscriptionsListQueryParamProductIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_request.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_request.rb new file mode 100644 index 0000000..660e51a --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_request.rb @@ -0,0 +1,57 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by active or cancelled subscription. + field :active, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'active', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by product ID. + field :product_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'product_id', 'style': 'form', 'explode': true } } + # Search by product or organization name. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::CustomerSubscriptionSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(active: T.nilable(T::Boolean), limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), product_id: T.nilable(T.any(::String, T::Array[::String])), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::CustomerSubscriptionSortProperty])).void } + def initialize(active: nil, limit: nil, organization_id: nil, page: nil, product_id: nil, query: nil, sorting: nil) + @active = active + @limit = limit + @organization_id = organization_id + @page = page + @product_id = product_id + @query = query + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @active == other.active + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @product_id == other.product_id + return false unless @query == other.query + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_response.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_response.rb new file mode 100644 index 0000000..fe1e1ed --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_customer_subscription, T.nilable(Models::Shared::ListResourceCustomerSubscription) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_customer_subscription: T.nilable(Models::Shared::ListResourceCustomerSubscription)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_customer_subscription: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_customer_subscription = list_resource_customer_subscription + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_customer_subscription == other.list_resource_customer_subscription + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_security.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_security.rb new file mode 100644 index 0000000..706d5ee --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_list_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsListSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_request.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_request.rb new file mode 100644 index 0000000..701ec53 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_subscription_update, T.any(Models::Shared::CustomerSubscriptionUpdateProduct, Models::Shared::CustomerSubscriptionCancel), { 'request': { 'media_type': 'application/json' } } + # The subscription ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(customer_subscription_update: T.any(Models::Shared::CustomerSubscriptionUpdateProduct, Models::Shared::CustomerSubscriptionCancel), id: ::String).void } + def initialize(customer_subscription_update: nil, id: nil) + @customer_subscription_update = customer_subscription_update + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_subscription_update == other.customer_subscription_update + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_response.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_response.rb new file mode 100644 index 0000000..c3e0b3c --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Customer subscription updated. + field :customer_subscription, T.nilable(Models::Shared::CustomerSubscription) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_subscription: T.nilable(Models::Shared::CustomerSubscription)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_subscription: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_subscription = customer_subscription + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_subscription == other.customer_subscription + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_security.rb b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_security.rb new file mode 100644 index 0000000..47051d0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_portal_subscriptions_update_security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerPortalSubscriptionsUpdateSecurity + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_session, ::String, { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(customer_session: ::String).void } + def initialize(customer_session: nil) + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_sessions_create_customer_session_create.rb b/lib/open_api_sdk/models/operations/customer_sessions_create_customer_session_create.rb new file mode 100644 index 0000000..2447292 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_sessions_create_customer_session_create.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerSessionsCreateCustomerSessionCreate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer_sessions_create_response.rb b/lib/open_api_sdk/models/operations/customer_sessions_create_response.rb new file mode 100644 index 0000000..8d700ae --- /dev/null +++ b/lib/open_api_sdk/models/operations/customer_sessions_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomerSessionsCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Customer session created. + field :customer_session, T.nilable(Models::Shared::CustomerSession) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_session: T.nilable(Models::Shared::CustomerSession)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_session: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_session = customer_session + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_session == other.customer_session + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customerid_filter.rb b/lib/open_api_sdk/models/operations/customerid_filter.rb new file mode 100644 index 0000000..f95d268 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by customer ID. + class CustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_create_response.rb b/lib/open_api_sdk/models/operations/customers_create_response.rb new file mode 100644 index 0000000..18545a7 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Customer created. + field :customer, T.nilable(Models::Shared::Customer) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer: T.nilable(Models::Shared::Customer)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer = customer + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer == other.customer + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_delete_external_request.rb b/lib/open_api_sdk/models/operations/customers_delete_external_request.rb new file mode 100644 index 0000000..4f9708a --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_delete_external_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersDeleteExternalRequest + extend T::Sig + include Crystalline::MetadataFields + + # The customer external ID. + field :external_id, ::String, { 'path_param': { 'field_name': 'external_id', 'style': 'simple', 'explode': false } } + + + sig { params(external_id: ::String).void } + def initialize(external_id: nil) + @external_id = external_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @external_id == other.external_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_delete_external_response.rb b/lib/open_api_sdk/models/operations/customers_delete_external_response.rb new file mode 100644 index 0000000..a8327ff --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_delete_external_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersDeleteExternalResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_delete_request.rb b/lib/open_api_sdk/models/operations/customers_delete_request.rb new file mode 100644 index 0000000..01b250a --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_delete_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersDeleteRequest + extend T::Sig + include Crystalline::MetadataFields + + # The customer ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_delete_response.rb b/lib/open_api_sdk/models/operations/customers_delete_response.rb new file mode 100644 index 0000000..0fdfef1 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_delete_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersDeleteResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_get_external_request.rb b/lib/open_api_sdk/models/operations/customers_get_external_request.rb new file mode 100644 index 0000000..5a14a42 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_get_external_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersGetExternalRequest + extend T::Sig + include Crystalline::MetadataFields + + # The customer external ID. + field :external_id, ::String, { 'path_param': { 'field_name': 'external_id', 'style': 'simple', 'explode': false } } + + + sig { params(external_id: ::String).void } + def initialize(external_id: nil) + @external_id = external_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @external_id == other.external_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_get_external_response.rb b/lib/open_api_sdk/models/operations/customers_get_external_response.rb new file mode 100644 index 0000000..8926984 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_get_external_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersGetExternalResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer, T.nilable(Models::Shared::Customer) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer: T.nilable(Models::Shared::Customer)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer = customer + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer == other.customer + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_get_request.rb b/lib/open_api_sdk/models/operations/customers_get_request.rb new file mode 100644 index 0000000..e36a3ce --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The customer ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_get_response.rb b/lib/open_api_sdk/models/operations/customers_get_response.rb new file mode 100644 index 0000000..06c3631 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer, T.nilable(Models::Shared::Customer) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer: T.nilable(Models::Shared::Customer)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer = customer + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer == other.customer + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_get_state_external_request.rb b/lib/open_api_sdk/models/operations/customers_get_state_external_request.rb new file mode 100644 index 0000000..c9fe6a2 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_get_state_external_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersGetStateExternalRequest + extend T::Sig + include Crystalline::MetadataFields + + # The customer external ID. + field :external_id, ::String, { 'path_param': { 'field_name': 'external_id', 'style': 'simple', 'explode': false } } + + + sig { params(external_id: ::String).void } + def initialize(external_id: nil) + @external_id = external_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @external_id == other.external_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_get_state_external_response.rb b/lib/open_api_sdk/models/operations/customers_get_state_external_response.rb new file mode 100644 index 0000000..a017307 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_get_state_external_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersGetStateExternalResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_state, T.nilable(Models::Shared::CustomerState) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_state: T.nilable(Models::Shared::CustomerState)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_state: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_state = customer_state + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_state == other.customer_state + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_get_state_request.rb b/lib/open_api_sdk/models/operations/customers_get_state_request.rb new file mode 100644 index 0000000..db11cce --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_get_state_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersGetStateRequest + extend T::Sig + include Crystalline::MetadataFields + + # The customer ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_get_state_response.rb b/lib/open_api_sdk/models/operations/customers_get_state_response.rb new file mode 100644 index 0000000..741a0e0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_get_state_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersGetStateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :customer_state, T.nilable(Models::Shared::CustomerState) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer_state: T.nilable(Models::Shared::CustomerState)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer_state: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer_state = customer_state + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer_state == other.customer_state + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/customers_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..031dd44 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class CustomersListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_list_request.rb b/lib/open_api_sdk/models/operations/customers_list_request.rb new file mode 100644 index 0000000..4bcb7ae --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_list_request.rb @@ -0,0 +1,57 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by exact email. + field :email, T.nilable(::String), { 'query_param': { 'field_name': 'email', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, T::Array[::String], T::Array[::Integer], T::Array[T::Boolean])]), { 'query_param': { 'field_name': 'metadata', 'style': 'deepObject', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by name or email. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::CustomerSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(email: T.nilable(::String), limit: T.nilable(::Integer), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, T::Array[::String], T::Array[::Integer], T::Array[T::Boolean])]), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::CustomerSortProperty])).void } + def initialize(email: nil, limit: nil, metadata: nil, organization_id: nil, page: nil, query: nil, sorting: nil) + @email = email + @limit = limit + @metadata = metadata + @organization_id = organization_id + @page = page + @query = query + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @email == other.email + return false unless @limit == other.limit + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @query == other.query + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_list_response.rb b/lib/open_api_sdk/models/operations/customers_list_response.rb new file mode 100644 index 0000000..bb012b2 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_customer, T.nilable(Models::Shared::ListResourceCustomer) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_customer: T.nilable(Models::Shared::ListResourceCustomer)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_customer: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_customer = list_resource_customer + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_customer == other.list_resource_customer + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_update_external_request.rb b/lib/open_api_sdk/models/operations/customers_update_external_request.rb new file mode 100644 index 0000000..839b3a0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_update_external_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersUpdateExternalRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_update_external_id, Models::Shared::CustomerUpdateExternalID, { 'request': { 'media_type': 'application/json' } } + # The customer external ID. + field :external_id, ::String, { 'path_param': { 'field_name': 'external_id', 'style': 'simple', 'explode': false } } + + + sig { params(customer_update_external_id: Models::Shared::CustomerUpdateExternalID, external_id: ::String).void } + def initialize(customer_update_external_id: nil, external_id: nil) + @customer_update_external_id = customer_update_external_id + @external_id = external_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_update_external_id == other.customer_update_external_id + return false unless @external_id == other.external_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_update_external_response.rb b/lib/open_api_sdk/models/operations/customers_update_external_response.rb new file mode 100644 index 0000000..46462fd --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_update_external_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersUpdateExternalResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Customer updated. + field :customer, T.nilable(Models::Shared::Customer) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer: T.nilable(Models::Shared::Customer)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer = customer + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer == other.customer + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_update_request.rb b/lib/open_api_sdk/models/operations/customers_update_request.rb new file mode 100644 index 0000000..8f3dedf --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :customer_update, Models::Shared::CustomerUpdate, { 'request': { 'media_type': 'application/json' } } + # The customer ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(customer_update: Models::Shared::CustomerUpdate, id: ::String).void } + def initialize(customer_update: nil, id: nil) + @customer_update = customer_update + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_update == other.customer_update + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customers_update_response.rb b/lib/open_api_sdk/models/operations/customers_update_response.rb new file mode 100644 index 0000000..25318be --- /dev/null +++ b/lib/open_api_sdk/models/operations/customers_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class CustomersUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Customer updated. + field :customer, T.nilable(Models::Shared::Customer) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, customer: T.nilable(Models::Shared::Customer)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, customer: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @customer = customer + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @customer == other.customer + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customfieldtype_filter.rb b/lib/open_api_sdk/models/operations/customfieldtype_filter.rb new file mode 100644 index 0000000..37db78b --- /dev/null +++ b/lib/open_api_sdk/models/operations/customfieldtype_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by custom field type. + class CustomFieldTypeFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discountid_filter.rb b/lib/open_api_sdk/models/operations/discountid_filter.rb new file mode 100644 index 0000000..a306262 --- /dev/null +++ b/lib/open_api_sdk/models/operations/discountid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by discount ID. + class DiscountIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_create_response.rb b/lib/open_api_sdk/models/operations/discounts_create_response.rb new file mode 100644 index 0000000..2646ce6 --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DiscountsCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Discount created. + field :discount, T.nilable(T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, discount: T.nilable(T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, discount: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @discount = discount + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @discount == other.discount + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_delete_request.rb b/lib/open_api_sdk/models/operations/discounts_delete_request.rb new file mode 100644 index 0000000..4c80773 --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_delete_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DiscountsDeleteRequest + extend T::Sig + include Crystalline::MetadataFields + + # The discount ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_delete_response.rb b/lib/open_api_sdk/models/operations/discounts_delete_response.rb new file mode 100644 index 0000000..20f58f2 --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_delete_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DiscountsDeleteResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_get_request.rb b/lib/open_api_sdk/models/operations/discounts_get_request.rb new file mode 100644 index 0000000..6ec673b --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DiscountsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The discount ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_get_response.rb b/lib/open_api_sdk/models/operations/discounts_get_response.rb new file mode 100644 index 0000000..781216f --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DiscountsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :discount, T.nilable(T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, discount: T.nilable(T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, discount: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @discount = discount + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @discount == other.discount + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/discounts_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..75aab56 --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class DiscountsListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_list_request.rb b/lib/open_api_sdk/models/operations/discounts_list_request.rb new file mode 100644 index 0000000..2cb047a --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_list_request.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DiscountsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by name. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::DiscountSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::DiscountSortProperty])).void } + def initialize(limit: nil, organization_id: nil, page: nil, query: nil, sorting: nil) + @limit = limit + @organization_id = organization_id + @page = page + @query = query + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @query == other.query + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_list_response.rb b/lib/open_api_sdk/models/operations/discounts_list_response.rb new file mode 100644 index 0000000..cef8b6d --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DiscountsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_discount, T.nilable(Models::Shared::ListResourceDiscount) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_discount: T.nilable(Models::Shared::ListResourceDiscount)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_discount: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_discount = list_resource_discount + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_discount == other.list_resource_discount + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_update_request.rb b/lib/open_api_sdk/models/operations/discounts_update_request.rb new file mode 100644 index 0000000..a7db4fa --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DiscountsUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :discount_update, Models::Shared::DiscountUpdate, { 'request': { 'media_type': 'application/json' } } + # The discount ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(discount_update: Models::Shared::DiscountUpdate, id: ::String).void } + def initialize(discount_update: nil, id: nil) + @discount_update = discount_update + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @discount_update == other.discount_update + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/discounts_update_response.rb b/lib/open_api_sdk/models/operations/discounts_update_response.rb new file mode 100644 index 0000000..5d268a4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/discounts_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class DiscountsUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Discount updated. + field :discount, T.nilable(T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, discount: T.nilable(T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, discount: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @discount = discount + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @discount == other.discount + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_get_request.rb b/lib/open_api_sdk/models/operations/events_get_request.rb new file mode 100644 index 0000000..e4aa3c9 --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class EventsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The event ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_get_response.rb b/lib/open_api_sdk/models/operations/events_get_response.rb new file mode 100644 index 0000000..8a819ba --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class EventsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :event, T.nilable(Models::Shared::Event) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, event: T.nilable(Models::Shared::Event)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, event: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @event = event + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @event == other.event + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_ingest_response.rb b/lib/open_api_sdk/models/operations/events_ingest_response.rb new file mode 100644 index 0000000..650e1ca --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_ingest_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class EventsIngestResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :events_ingest_response, T.nilable(Models::Shared::EventsIngestResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, events_ingest_response: T.nilable(Models::Shared::EventsIngestResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, events_ingest_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @events_ingest_response = events_ingest_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @events_ingest_response == other.events_ingest_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_list_names_queryparam_customerid_filter.rb b/lib/open_api_sdk/models/operations/events_list_names_queryparam_customerid_filter.rb new file mode 100644 index 0000000..509d91e --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_list_names_queryparam_customerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by customer ID. + class EventsListNamesQueryParamCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_list_names_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/events_list_names_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..480ff25 --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_list_names_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class EventsListNamesQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_list_names_request.rb b/lib/open_api_sdk/models/operations/events_list_names_request.rb new file mode 100644 index 0000000..460fa14 --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_list_names_request.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class EventsListNamesRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by customer ID. + field :customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } } + # Filter by external customer ID. + field :external_customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'external_customer_id', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Query to filter event names. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::EventNamesSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + # Filter by event source. + field :source, T.nilable(T.any(Models::Shared::EventSource, T::Array[Models::Shared::EventSource])), { 'query_param': { 'field_name': 'source', 'style': 'form', 'explode': true } } + + + sig { params(customer_id: T.nilable(T.any(::String, T::Array[::String])), external_customer_id: T.nilable(T.any(::String, T::Array[::String])), limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::EventNamesSortProperty]), source: T.nilable(T.any(Models::Shared::EventSource, T::Array[Models::Shared::EventSource]))).void } + def initialize(customer_id: nil, external_customer_id: nil, limit: nil, organization_id: nil, page: nil, query: nil, sorting: nil, source: nil) + @customer_id = customer_id + @external_customer_id = external_customer_id + @limit = limit + @organization_id = organization_id + @page = page + @query = query + @sorting = sorting + @source = source + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_id == other.customer_id + return false unless @external_customer_id == other.external_customer_id + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @query == other.query + return false unless @sorting == other.sorting + return false unless @source == other.source + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_list_names_response.rb b/lib/open_api_sdk/models/operations/events_list_names_response.rb new file mode 100644 index 0000000..c7b2566 --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_list_names_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class EventsListNamesResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_event_name, T.nilable(Models::Shared::ListResourceEventName) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_event_name: T.nilable(Models::Shared::ListResourceEventName)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_event_name: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_event_name = list_resource_event_name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_event_name == other.list_resource_event_name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_list_queryparam_customerid_filter.rb b/lib/open_api_sdk/models/operations/events_list_queryparam_customerid_filter.rb new file mode 100644 index 0000000..b2a0c2d --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_list_queryparam_customerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by customer ID. + class EventsListQueryParamCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/events_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..4907c2a --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class EventsListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_list_request.rb b/lib/open_api_sdk/models/operations/events_list_request.rb new file mode 100644 index 0000000..d72893d --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_list_request.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class EventsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by customer ID. + field :customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } } + # Filter events before this timestamp. + field :end_timestamp, T.nilable(::DateTime), { 'query_param': { 'field_name': 'end_timestamp', 'style': 'form', 'explode': true } } + # Filter by external customer ID. + field :external_customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'external_customer_id', 'style': 'form', 'explode': true } } + # Filter events following filter clauses. JSON string following the same schema a meter filter clause. + field :filter, T.nilable(::String), { 'query_param': { 'field_name': 'filter', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, T::Array[::String], T::Array[::Integer], T::Array[T::Boolean])]), { 'query_param': { 'field_name': 'metadata', 'style': 'deepObject', 'explode': true } } + # Filter by a meter filter clause. + field :meter_id, T.nilable(::String), { 'query_param': { 'field_name': 'meter_id', 'style': 'form', 'explode': true } } + # Filter by event name. + field :name, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'name', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::EventSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + # Filter by event source. + field :source, T.nilable(T.any(Models::Shared::EventSource, T::Array[Models::Shared::EventSource])), { 'query_param': { 'field_name': 'source', 'style': 'form', 'explode': true } } + # Filter events after this timestamp. + field :start_timestamp, T.nilable(::DateTime), { 'query_param': { 'field_name': 'start_timestamp', 'style': 'form', 'explode': true } } + + + sig { params(customer_id: T.nilable(T.any(::String, T::Array[::String])), end_timestamp: T.nilable(::DateTime), external_customer_id: T.nilable(T.any(::String, T::Array[::String])), filter: T.nilable(::String), limit: T.nilable(::Integer), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, T::Array[::String], T::Array[::Integer], T::Array[T::Boolean])]), meter_id: T.nilable(::String), name: T.nilable(T.any(::String, T::Array[::String])), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), sorting: T.nilable(T::Array[Models::Shared::EventSortProperty]), source: T.nilable(T.any(Models::Shared::EventSource, T::Array[Models::Shared::EventSource])), start_timestamp: T.nilable(::DateTime)).void } + def initialize(customer_id: nil, end_timestamp: nil, external_customer_id: nil, filter: nil, limit: nil, metadata: nil, meter_id: nil, name: nil, organization_id: nil, page: nil, sorting: nil, source: nil, start_timestamp: nil) + @customer_id = customer_id + @end_timestamp = end_timestamp + @external_customer_id = external_customer_id + @filter = filter + @limit = limit + @metadata = metadata + @meter_id = meter_id + @name = name + @organization_id = organization_id + @page = page + @sorting = sorting + @source = source + @start_timestamp = start_timestamp + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_id == other.customer_id + return false unless @end_timestamp == other.end_timestamp + return false unless @external_customer_id == other.external_customer_id + return false unless @filter == other.filter + return false unless @limit == other.limit + return false unless @metadata == other.metadata + return false unless @meter_id == other.meter_id + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @sorting == other.sorting + return false unless @source == other.source + return false unless @start_timestamp == other.start_timestamp + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/events_list_response.rb b/lib/open_api_sdk/models/operations/events_list_response.rb new file mode 100644 index 0000000..044f750 --- /dev/null +++ b/lib/open_api_sdk/models/operations/events_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class EventsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_event, T.nilable(Models::Shared::ListResourceEvent) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_event: T.nilable(Models::Shared::ListResourceEvent)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_event: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_event = list_resource_event + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_event == other.list_resource_event + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/externalcustomerid_filter.rb b/lib/open_api_sdk/models/operations/externalcustomerid_filter.rb new file mode 100644 index 0000000..99a5811 --- /dev/null +++ b/lib/open_api_sdk/models/operations/externalcustomerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by external customer ID. + class ExternalCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_create_response.rb b/lib/open_api_sdk/models/operations/files_create_response.rb new file mode 100644 index 0000000..21c8e31 --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class FilesCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # File created. + field :file_upload, T.nilable(Models::Shared::FileUpload) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, file_upload: T.nilable(Models::Shared::FileUpload)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, file_upload: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @file_upload = file_upload + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @file_upload == other.file_upload + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_delete_request.rb b/lib/open_api_sdk/models/operations/files_delete_request.rb new file mode 100644 index 0000000..41ac1d4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_delete_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class FilesDeleteRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_delete_response.rb b/lib/open_api_sdk/models/operations/files_delete_response.rb new file mode 100644 index 0000000..1f28356 --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_delete_response.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class FilesDeleteResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_list_request.rb b/lib/open_api_sdk/models/operations/files_list_request.rb new file mode 100644 index 0000000..7c2f449 --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_list_request.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class FilesListRequest + extend T::Sig + include Crystalline::MetadataFields + + # List of file IDs to get. + field :ids, T.nilable(T::Array[::String]), { 'query_param': { 'field_name': 'ids', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + + field :organization_id, T.nilable(::String), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + + + sig { params(ids: T.nilable(T::Array[::String]), limit: T.nilable(::Integer), organization_id: T.nilable(::String), page: T.nilable(::Integer)).void } + def initialize(ids: nil, limit: nil, organization_id: nil, page: nil) + @ids = ids + @limit = limit + @organization_id = organization_id + @page = page + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @ids == other.ids + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_list_response.rb b/lib/open_api_sdk/models/operations/files_list_response.rb new file mode 100644 index 0000000..7c7db7c --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class FilesListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_file_read, T.nilable(Models::Shared::ListResourceFileRead) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_file_read: T.nilable(Models::Shared::ListResourceFileRead)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_file_read: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_file_read = list_resource_file_read + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_file_read == other.list_resource_file_read + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_update_request.rb b/lib/open_api_sdk/models/operations/files_update_request.rb new file mode 100644 index 0000000..b7329a0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class FilesUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :file_patch, Models::Shared::FilePatch, { 'request': { 'media_type': 'application/json' } } + # The file ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(file_patch: Models::Shared::FilePatch, id: ::String).void } + def initialize(file_patch: nil, id: nil) + @file_patch = file_patch + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @file_patch == other.file_patch + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_update_response.rb b/lib/open_api_sdk/models/operations/files_update_response.rb new file mode 100644 index 0000000..7ca11e4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class FilesUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # File updated. + field :response_files_update, T.nilable(T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, response_files_update: T.nilable(T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, response_files_update: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @response_files_update = response_files_update + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @response_files_update == other.response_files_update + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_update_response_files_update.rb b/lib/open_api_sdk/models/operations/files_update_response_files_update.rb new file mode 100644 index 0000000..3885eae --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_update_response_files_update.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # File updated. + class FilesUpdateResponseFilesUpdate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_uploaded_request.rb b/lib/open_api_sdk/models/operations/files_uploaded_request.rb new file mode 100644 index 0000000..a4fd03f --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_uploaded_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class FilesUploadedRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :file_upload_completed, Models::Shared::FileUploadCompleted, { 'request': { 'media_type': 'application/json' } } + # The file ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(file_upload_completed: Models::Shared::FileUploadCompleted, id: ::String).void } + def initialize(file_upload_completed: nil, id: nil) + @file_upload_completed = file_upload_completed + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @file_upload_completed == other.file_upload_completed + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_uploaded_response.rb b/lib/open_api_sdk/models/operations/files_uploaded_response.rb new file mode 100644 index 0000000..03c3c62 --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_uploaded_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class FilesUploadedResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # File upload completed. + field :response_files_uploaded, T.nilable(T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, response_files_uploaded: T.nilable(T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, response_files_uploaded: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @response_files_uploaded = response_files_uploaded + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @response_files_uploaded == other.response_files_uploaded + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/files_uploaded_response_files_uploaded.rb b/lib/open_api_sdk/models/operations/files_uploaded_response_files_uploaded.rb new file mode 100644 index 0000000..a007089 --- /dev/null +++ b/lib/open_api_sdk/models/operations/files_uploaded_response_files_uploaded.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # File upload completed. + class FilesUploadedResponseFilesUploaded + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/license_keys_get_activation_request.rb b/lib/open_api_sdk/models/operations/license_keys_get_activation_request.rb new file mode 100644 index 0000000..c0ba8a2 --- /dev/null +++ b/lib/open_api_sdk/models/operations/license_keys_get_activation_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LicenseKeysGetActivationRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :activation_id, ::String, { 'path_param': { 'field_name': 'activation_id', 'style': 'simple', 'explode': false } } + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(activation_id: ::String, id: ::String).void } + def initialize(activation_id: nil, id: nil) + @activation_id = activation_id + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @activation_id == other.activation_id + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/license_keys_get_activation_response.rb b/lib/open_api_sdk/models/operations/license_keys_get_activation_response.rb new file mode 100644 index 0000000..48b5634 --- /dev/null +++ b/lib/open_api_sdk/models/operations/license_keys_get_activation_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LicenseKeysGetActivationResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :license_key_activation_read, T.nilable(Models::Shared::LicenseKeyActivationRead) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, license_key_activation_read: T.nilable(Models::Shared::LicenseKeyActivationRead)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, license_key_activation_read: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @license_key_activation_read = license_key_activation_read + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @license_key_activation_read == other.license_key_activation_read + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/license_keys_get_request.rb b/lib/open_api_sdk/models/operations/license_keys_get_request.rb new file mode 100644 index 0000000..17385b4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/license_keys_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LicenseKeysGetRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/license_keys_get_response.rb b/lib/open_api_sdk/models/operations/license_keys_get_response.rb new file mode 100644 index 0000000..e275453 --- /dev/null +++ b/lib/open_api_sdk/models/operations/license_keys_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LicenseKeysGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :license_key_with_activations, T.nilable(Models::Shared::LicenseKeyWithActivations) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, license_key_with_activations: T.nilable(Models::Shared::LicenseKeyWithActivations)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, license_key_with_activations: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @license_key_with_activations = license_key_with_activations + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @license_key_with_activations == other.license_key_with_activations + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/license_keys_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/license_keys_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..708ec7d --- /dev/null +++ b/lib/open_api_sdk/models/operations/license_keys_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class LicenseKeysListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/license_keys_list_request.rb b/lib/open_api_sdk/models/operations/license_keys_list_request.rb new file mode 100644 index 0000000..c7692e6 --- /dev/null +++ b/lib/open_api_sdk/models/operations/license_keys_list_request.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LicenseKeysListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by benefit ID. + field :benefit_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'benefit_id', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + + + sig { params(benefit_id: T.nilable(T.any(::String, T::Array[::String])), limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer)).void } + def initialize(benefit_id: nil, limit: nil, organization_id: nil, page: nil) + @benefit_id = benefit_id + @limit = limit + @organization_id = organization_id + @page = page + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/license_keys_list_response.rb b/lib/open_api_sdk/models/operations/license_keys_list_response.rb new file mode 100644 index 0000000..e051f65 --- /dev/null +++ b/lib/open_api_sdk/models/operations/license_keys_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LicenseKeysListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_license_key_read, T.nilable(Models::Shared::ListResourceLicenseKeyRead) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_license_key_read: T.nilable(Models::Shared::ListResourceLicenseKeyRead)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_license_key_read: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_license_key_read = list_resource_license_key_read + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_license_key_read == other.list_resource_license_key_read + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/license_keys_update_request.rb b/lib/open_api_sdk/models/operations/license_keys_update_request.rb new file mode 100644 index 0000000..c873c93 --- /dev/null +++ b/lib/open_api_sdk/models/operations/license_keys_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LicenseKeysUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + field :license_key_update, Models::Shared::LicenseKeyUpdate, { 'request': { 'media_type': 'application/json' } } + + + sig { params(id: ::String, license_key_update: Models::Shared::LicenseKeyUpdate).void } + def initialize(id: nil, license_key_update: nil) + @id = id + @license_key_update = license_key_update + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @license_key_update == other.license_key_update + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/license_keys_update_response.rb b/lib/open_api_sdk/models/operations/license_keys_update_response.rb new file mode 100644 index 0000000..b83a770 --- /dev/null +++ b/lib/open_api_sdk/models/operations/license_keys_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class LicenseKeysUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :license_key_read, T.nilable(Models::Shared::LicenseKeyRead) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, license_key_read: T.nilable(Models::Shared::LicenseKeyRead)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, license_key_read: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @license_key_read = license_key_read + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @license_key_read == other.license_key_read + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meterid_filter.rb b/lib/open_api_sdk/models/operations/meterid_filter.rb new file mode 100644 index 0000000..96ccbba --- /dev/null +++ b/lib/open_api_sdk/models/operations/meterid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by meter ID. + class MeterIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_create_response.rb b/lib/open_api_sdk/models/operations/meters_create_response.rb new file mode 100644 index 0000000..774320b --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetersCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Meter created. + field :meter, T.nilable(Models::Shared::Meter) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, meter: T.nilable(Models::Shared::Meter)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, meter: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @meter = meter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @meter == other.meter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_get_request.rb b/lib/open_api_sdk/models/operations/meters_get_request.rb new file mode 100644 index 0000000..ccf77df --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetersGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The meter ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_get_response.rb b/lib/open_api_sdk/models/operations/meters_get_response.rb new file mode 100644 index 0000000..005d9da --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetersGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :meter, T.nilable(Models::Shared::Meter) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, meter: T.nilable(Models::Shared::Meter)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, meter: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @meter = meter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @meter == other.meter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/meters_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..3fc8019 --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class MetersListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_list_request.rb b/lib/open_api_sdk/models/operations/meters_list_request.rb new file mode 100644 index 0000000..bf7bd43 --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_list_request.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetersListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by metadata key-value pairs. It uses the `deepObject` style, e.g. `?metadata[key]=value`. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, T::Array[::String], T::Array[::Integer], T::Array[T::Boolean])]), { 'query_param': { 'field_name': 'metadata', 'style': 'deepObject', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by name. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::MeterSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, T::Array[::String], T::Array[::Integer], T::Array[T::Boolean])]), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::MeterSortProperty])).void } + def initialize(limit: nil, metadata: nil, organization_id: nil, page: nil, query: nil, sorting: nil) + @limit = limit + @metadata = metadata + @organization_id = organization_id + @page = page + @query = query + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @query == other.query + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_list_response.rb b/lib/open_api_sdk/models/operations/meters_list_response.rb new file mode 100644 index 0000000..4f70b7c --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetersListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_meter, T.nilable(Models::Shared::ListResourceMeter) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_meter: T.nilable(Models::Shared::ListResourceMeter)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_meter: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_meter = list_resource_meter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_meter == other.list_resource_meter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_quantities_queryparam_customerid_filter.rb b/lib/open_api_sdk/models/operations/meters_quantities_queryparam_customerid_filter.rb new file mode 100644 index 0000000..ef07938 --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_quantities_queryparam_customerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by customer ID. + class MetersQuantitiesQueryParamCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_quantities_queryparam_externalcustomerid_filter.rb b/lib/open_api_sdk/models/operations/meters_quantities_queryparam_externalcustomerid_filter.rb new file mode 100644 index 0000000..20fcc4c --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_quantities_queryparam_externalcustomerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by external customer ID. + class MetersQuantitiesQueryParamExternalCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_quantities_request.rb b/lib/open_api_sdk/models/operations/meters_quantities_request.rb new file mode 100644 index 0000000..013ee99 --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_quantities_request.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetersQuantitiesRequest + extend T::Sig + include Crystalline::MetadataFields + + # End timestamp. + field :end_timestamp, ::DateTime, { 'query_param': { 'field_name': 'end_timestamp', 'style': 'form', 'explode': true } } + # The meter ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + # Interval between two timestamps. + field :interval, Models::Shared::TimeInterval, { 'query_param': { 'field_name': 'interval', 'style': 'form', 'explode': true } } + # Start timestamp. + field :start_timestamp, ::DateTime, { 'query_param': { 'field_name': 'start_timestamp', 'style': 'form', 'explode': true } } + # Filter by customer ID. + field :customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } } + # Filter by external customer ID. + field :external_customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'external_customer_id', 'style': 'form', 'explode': true } } + + + sig { params(end_timestamp: ::DateTime, id: ::String, interval: Models::Shared::TimeInterval, start_timestamp: ::DateTime, customer_id: T.nilable(T.any(::String, T::Array[::String])), external_customer_id: T.nilable(T.any(::String, T::Array[::String]))).void } + def initialize(end_timestamp: nil, id: nil, interval: nil, start_timestamp: nil, customer_id: nil, external_customer_id: nil) + @end_timestamp = end_timestamp + @id = id + @interval = interval + @start_timestamp = start_timestamp + @customer_id = customer_id + @external_customer_id = external_customer_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @end_timestamp == other.end_timestamp + return false unless @id == other.id + return false unless @interval == other.interval + return false unless @start_timestamp == other.start_timestamp + return false unless @customer_id == other.customer_id + return false unless @external_customer_id == other.external_customer_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_quantities_response.rb b/lib/open_api_sdk/models/operations/meters_quantities_response.rb new file mode 100644 index 0000000..020f2fb --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_quantities_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetersQuantitiesResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :meter_quantities, T.nilable(Models::Shared::MeterQuantities) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, meter_quantities: T.nilable(Models::Shared::MeterQuantities)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, meter_quantities: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @meter_quantities = meter_quantities + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @meter_quantities == other.meter_quantities + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_update_request.rb b/lib/open_api_sdk/models/operations/meters_update_request.rb new file mode 100644 index 0000000..6f54c4c --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetersUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + # The meter ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + field :meter_update, Models::Shared::MeterUpdate, { 'request': { 'media_type': 'application/json' } } + + + sig { params(id: ::String, meter_update: Models::Shared::MeterUpdate).void } + def initialize(id: nil, meter_update: nil) + @id = id + @meter_update = meter_update + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @meter_update == other.meter_update + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/meters_update_response.rb b/lib/open_api_sdk/models/operations/meters_update_response.rb new file mode 100644 index 0000000..3ffee4d --- /dev/null +++ b/lib/open_api_sdk/models/operations/meters_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetersUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Meter updated. + field :meter, T.nilable(Models::Shared::Meter) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, meter: T.nilable(Models::Shared::Meter)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, meter: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @meter = meter + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @meter == other.meter + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/metrics_get_queryparam_customerid_filter.rb b/lib/open_api_sdk/models/operations/metrics_get_queryparam_customerid_filter.rb new file mode 100644 index 0000000..61b6dbc --- /dev/null +++ b/lib/open_api_sdk/models/operations/metrics_get_queryparam_customerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by customer ID. + class MetricsGetQueryParamCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/metrics_get_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/metrics_get_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..1d97b01 --- /dev/null +++ b/lib/open_api_sdk/models/operations/metrics_get_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class MetricsGetQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/metrics_get_queryparam_productid_filter.rb b/lib/open_api_sdk/models/operations/metrics_get_queryparam_productid_filter.rb new file mode 100644 index 0000000..13d1c54 --- /dev/null +++ b/lib/open_api_sdk/models/operations/metrics_get_queryparam_productid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product ID. + class MetricsGetQueryParamProductIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/metrics_get_request.rb b/lib/open_api_sdk/models/operations/metrics_get_request.rb new file mode 100644 index 0000000..c7c7d38 --- /dev/null +++ b/lib/open_api_sdk/models/operations/metrics_get_request.rb @@ -0,0 +1,57 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetricsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # End date. + field :end_date, ::Date, { 'query_param': { 'field_name': 'end_date', 'style': 'form', 'explode': true } } + # Interval between two timestamps. + field :interval, Models::Shared::TimeInterval, { 'query_param': { 'field_name': 'interval', 'style': 'form', 'explode': true } } + # Start date. + field :start_date, ::Date, { 'query_param': { 'field_name': 'start_date', 'style': 'form', 'explode': true } } + # Filter by billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. + field :billing_type, T.nilable(T.any(Models::Shared::ProductBillingType, T::Array[Models::Shared::ProductBillingType])), { 'query_param': { 'field_name': 'billing_type', 'style': 'form', 'explode': true } } + # Filter by customer ID. + field :customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Filter by product ID. + field :product_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'product_id', 'style': 'form', 'explode': true } } + + + sig { params(end_date: ::Date, interval: Models::Shared::TimeInterval, start_date: ::Date, billing_type: T.nilable(T.any(Models::Shared::ProductBillingType, T::Array[Models::Shared::ProductBillingType])), customer_id: T.nilable(T.any(::String, T::Array[::String])), organization_id: T.nilable(T.any(::String, T::Array[::String])), product_id: T.nilable(T.any(::String, T::Array[::String]))).void } + def initialize(end_date: nil, interval: nil, start_date: nil, billing_type: nil, customer_id: nil, organization_id: nil, product_id: nil) + @end_date = end_date + @interval = interval + @start_date = start_date + @billing_type = billing_type + @customer_id = customer_id + @organization_id = organization_id + @product_id = product_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @end_date == other.end_date + return false unless @interval == other.interval + return false unless @start_date == other.start_date + return false unless @billing_type == other.billing_type + return false unless @customer_id == other.customer_id + return false unless @organization_id == other.organization_id + return false unless @product_id == other.product_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/metrics_get_response.rb b/lib/open_api_sdk/models/operations/metrics_get_response.rb new file mode 100644 index 0000000..e3b778d --- /dev/null +++ b/lib/open_api_sdk/models/operations/metrics_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetricsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :metrics_response, T.nilable(Models::Shared::MetricsResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, metrics_response: T.nilable(Models::Shared::MetricsResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, metrics_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @metrics_response = metrics_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @metrics_response == other.metrics_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/metrics_limits_response.rb b/lib/open_api_sdk/models/operations/metrics_limits_response.rb new file mode 100644 index 0000000..789d7a5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/metrics_limits_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class MetricsLimitsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :metrics_limits, T.nilable(Models::Shared::MetricsLimits) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, metrics_limits: T.nilable(Models::Shared::MetricsLimits)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, metrics_limits: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @metrics_limits = metrics_limits + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @metrics_limits == other.metrics_limits + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/name_filter.rb b/lib/open_api_sdk/models/operations/name_filter.rb new file mode 100644 index 0000000..8e716b5 --- /dev/null +++ b/lib/open_api_sdk/models/operations/name_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by event name. + class NameFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_authorize_response.rb b/lib/open_api_sdk/models/operations/oauth2_authorize_response.rb new file mode 100644 index 0000000..8bfdc88 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_authorize_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2AuthorizeResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :response_oauth2_authorize, T.nilable(T.any(Models::Shared::AuthorizeResponseUser, Models::Shared::AuthorizeResponseOrganization)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, response_oauth2_authorize: T.nilable(T.any(Models::Shared::AuthorizeResponseUser, Models::Shared::AuthorizeResponseOrganization))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, response_oauth2_authorize: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @response_oauth2_authorize = response_oauth2_authorize + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @response_oauth2_authorize == other.response_oauth2_authorize + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_authorize_response_oauth2_authorize.rb b/lib/open_api_sdk/models/operations/oauth2_authorize_response_oauth2_authorize.rb new file mode 100644 index 0000000..68c4f34 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_authorize_response_oauth2_authorize.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Successful Response + class Oauth2AuthorizeResponseOauth2Authorize + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_clients_list_request.rb b/lib/open_api_sdk/models/operations/oauth2_clients_list_request.rb new file mode 100644 index 0000000..bad03df --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_clients_list_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2ClientsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), page: T.nilable(::Integer)).void } + def initialize(limit: nil, page: nil) + @limit = limit + @page = page + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @page == other.page + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_clients_list_response.rb b/lib/open_api_sdk/models/operations/oauth2_clients_list_response.rb new file mode 100644 index 0000000..250107d --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_clients_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2ClientsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_o_auth2_client, T.nilable(Models::Shared::ListResourceOAuth2Client) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_o_auth2_client: T.nilable(Models::Shared::ListResourceOAuth2Client)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_o_auth2_client: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_o_auth2_client = list_resource_o_auth2_client + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_o_auth2_client == other.list_resource_o_auth2_client + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_create_client_response.rb b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_create_client_response.rb new file mode 100644 index 0000000..ebeb165 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_create_client_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2ClientsOauth2CreateClientResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_request.rb b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_request.rb new file mode 100644 index 0000000..cbc9db3 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2ClientsOauth2DeleteClientRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'path_param': { 'field_name': 'client_id', 'style': 'simple', 'explode': false } } + + + sig { params(client_id: ::String).void } + def initialize(client_id: nil) + @client_id = client_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_response.rb b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_response.rb new file mode 100644 index 0000000..1478a10 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_delete_client_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2ClientsOauth2DeleteClientResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_request.rb b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_request.rb new file mode 100644 index 0000000..c55964c --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2ClientsOauth2GetClientRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'path_param': { 'field_name': 'client_id', 'style': 'simple', 'explode': false } } + + + sig { params(client_id: ::String).void } + def initialize(client_id: nil) + @client_id = client_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_response.rb b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_response.rb new file mode 100644 index 0000000..f89dc5f --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_get_client_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2ClientsOauth2GetClientResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_request.rb b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_request.rb new file mode 100644 index 0000000..9afc87e --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2ClientsOauth2UpdateClientRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'path_param': { 'field_name': 'client_id', 'style': 'simple', 'explode': false } } + + field :o_auth2_client_configuration_update, Models::Shared::OAuth2ClientConfigurationUpdate, { 'request': { 'media_type': 'application/json' } } + + + sig { params(client_id: ::String, o_auth2_client_configuration_update: Models::Shared::OAuth2ClientConfigurationUpdate).void } + def initialize(client_id: nil, o_auth2_client_configuration_update: nil) + @client_id = client_id + @o_auth2_client_configuration_update = o_auth2_client_configuration_update + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + return false unless @o_auth2_client_configuration_update == other.o_auth2_client_configuration_update + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_response.rb b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_response.rb new file mode 100644 index 0000000..6556b00 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_clients_oauth2_update_client_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2ClientsOauth2UpdateClientResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_introspect_token_response.rb b/lib/open_api_sdk/models/operations/oauth2_introspect_token_response.rb new file mode 100644 index 0000000..67c153a --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_introspect_token_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2IntrospectTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :introspect_token_response, T.nilable(Models::Shared::IntrospectTokenResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, introspect_token_response: T.nilable(Models::Shared::IntrospectTokenResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, introspect_token_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @introspect_token_response = introspect_token_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @introspect_token_response == other.introspect_token_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_request_token_requestbody.rb b/lib/open_api_sdk/models/operations/oauth2_request_token_requestbody.rb new file mode 100644 index 0000000..46a9db0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_request_token_requestbody.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2RequestTokenRequestBody + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_request_token_response.rb b/lib/open_api_sdk/models/operations/oauth2_request_token_response.rb new file mode 100644 index 0000000..2d22f4a --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_request_token_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2RequestTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :token_response, T.nilable(Models::Shared::TokenResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, token_response: T.nilable(Models::Shared::TokenResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, token_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @token_response = token_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @token_response == other.token_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_revoke_token_response.rb b/lib/open_api_sdk/models/operations/oauth2_revoke_token_response.rb new file mode 100644 index 0000000..dd73f84 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_revoke_token_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2RevokeTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :revoke_token_response, T.nilable(Models::Shared::RevokeTokenResponse) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, revoke_token_response: T.nilable(Models::Shared::RevokeTokenResponse)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, revoke_token_response: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @revoke_token_response = revoke_token_response + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @revoke_token_response == other.revoke_token_response + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_userinfo_response.rb b/lib/open_api_sdk/models/operations/oauth2_userinfo_response.rb new file mode 100644 index 0000000..dc5db38 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_userinfo_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class Oauth2UserinfoResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :response_oauth2_userinfo, T.nilable(T.any(Models::Shared::UserInfoUser, Models::Shared::UserInfoOrganization)) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, response_oauth2_userinfo: T.nilable(T.any(Models::Shared::UserInfoUser, Models::Shared::UserInfoOrganization))).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, response_oauth2_userinfo: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @response_oauth2_userinfo = response_oauth2_userinfo + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @response_oauth2_userinfo == other.response_oauth2_userinfo + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/oauth2_userinfo_response_oauth2_userinfo.rb b/lib/open_api_sdk/models/operations/oauth2_userinfo_response_oauth2_userinfo.rb new file mode 100644 index 0000000..3a05a87 --- /dev/null +++ b/lib/open_api_sdk/models/operations/oauth2_userinfo_response_oauth2_userinfo.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Successful Response + class Oauth2UserinfoResponseOauth2Userinfo + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orderid_filter.rb b/lib/open_api_sdk/models/operations/orderid_filter.rb new file mode 100644 index 0000000..4f87d70 --- /dev/null +++ b/lib/open_api_sdk/models/operations/orderid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by order ID. + class OrderIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orders_get_request.rb b/lib/open_api_sdk/models/operations/orders_get_request.rb new file mode 100644 index 0000000..7f2de77 --- /dev/null +++ b/lib/open_api_sdk/models/operations/orders_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrdersGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The order ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orders_get_response.rb b/lib/open_api_sdk/models/operations/orders_get_response.rb new file mode 100644 index 0000000..dcdd998 --- /dev/null +++ b/lib/open_api_sdk/models/operations/orders_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrdersGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :order, T.nilable(Models::Shared::Order) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, order: T.nilable(Models::Shared::Order)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, order: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @order = order + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @order == other.order + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orders_invoice_request.rb b/lib/open_api_sdk/models/operations/orders_invoice_request.rb new file mode 100644 index 0000000..6734866 --- /dev/null +++ b/lib/open_api_sdk/models/operations/orders_invoice_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrdersInvoiceRequest + extend T::Sig + include Crystalline::MetadataFields + + # The order ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orders_invoice_response.rb b/lib/open_api_sdk/models/operations/orders_invoice_response.rb new file mode 100644 index 0000000..2a0ec5b --- /dev/null +++ b/lib/open_api_sdk/models/operations/orders_invoice_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrdersInvoiceResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :order_invoice, T.nilable(Models::Shared::OrderInvoice) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, order_invoice: T.nilable(Models::Shared::OrderInvoice)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, order_invoice: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @order_invoice = order_invoice + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @order_invoice == other.order_invoice + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orders_list_queryparam_customerid_filter.rb b/lib/open_api_sdk/models/operations/orders_list_queryparam_customerid_filter.rb new file mode 100644 index 0000000..6a0dafe --- /dev/null +++ b/lib/open_api_sdk/models/operations/orders_list_queryparam_customerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by customer ID. + class OrdersListQueryParamCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orders_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/orders_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..e88540d --- /dev/null +++ b/lib/open_api_sdk/models/operations/orders_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class OrdersListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orders_list_queryparam_productid_filter.rb b/lib/open_api_sdk/models/operations/orders_list_queryparam_productid_filter.rb new file mode 100644 index 0000000..28ccf44 --- /dev/null +++ b/lib/open_api_sdk/models/operations/orders_list_queryparam_productid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product ID. + class OrdersListQueryParamProductIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orders_list_request.rb b/lib/open_api_sdk/models/operations/orders_list_request.rb new file mode 100644 index 0000000..5250b93 --- /dev/null +++ b/lib/open_api_sdk/models/operations/orders_list_request.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrdersListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by checkout ID. + field :checkout_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'checkout_id', 'style': 'form', 'explode': true } } + # Filter by customer ID. + field :customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } } + # Filter by discount ID. + field :discount_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'discount_id', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. + field :product_billing_type, T.nilable(T.any(Models::Shared::ProductBillingType, T::Array[Models::Shared::ProductBillingType])), { 'query_param': { 'field_name': 'product_billing_type', 'style': 'form', 'explode': true } } + # Filter by product ID. + field :product_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'product_id', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::OrderSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(checkout_id: T.nilable(T.any(::String, T::Array[::String])), customer_id: T.nilable(T.any(::String, T::Array[::String])), discount_id: T.nilable(T.any(::String, T::Array[::String])), limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), product_billing_type: T.nilable(T.any(Models::Shared::ProductBillingType, T::Array[Models::Shared::ProductBillingType])), product_id: T.nilable(T.any(::String, T::Array[::String])), sorting: T.nilable(T::Array[Models::Shared::OrderSortProperty])).void } + def initialize(checkout_id: nil, customer_id: nil, discount_id: nil, limit: nil, organization_id: nil, page: nil, product_billing_type: nil, product_id: nil, sorting: nil) + @checkout_id = checkout_id + @customer_id = customer_id + @discount_id = discount_id + @limit = limit + @organization_id = organization_id + @page = page + @product_billing_type = product_billing_type + @product_id = product_id + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @checkout_id == other.checkout_id + return false unless @customer_id == other.customer_id + return false unless @discount_id == other.discount_id + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @product_billing_type == other.product_billing_type + return false unless @product_id == other.product_id + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/orders_list_response.rb b/lib/open_api_sdk/models/operations/orders_list_response.rb new file mode 100644 index 0000000..351a039 --- /dev/null +++ b/lib/open_api_sdk/models/operations/orders_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrdersListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_order, T.nilable(Models::Shared::ListResourceOrder) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_order: T.nilable(Models::Shared::ListResourceOrder)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_order: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_order = list_resource_order + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_order == other.list_resource_order + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/organization_id.rb b/lib/open_api_sdk/models/operations/organization_id.rb new file mode 100644 index 0000000..617c005 --- /dev/null +++ b/lib/open_api_sdk/models/operations/organization_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class OrganizationId + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/organizationid_filter.rb b/lib/open_api_sdk/models/operations/organizationid_filter.rb new file mode 100644 index 0000000..6affe65 --- /dev/null +++ b/lib/open_api_sdk/models/operations/organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class OrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/organizations_create_response.rb b/lib/open_api_sdk/models/operations/organizations_create_response.rb new file mode 100644 index 0000000..bde6d22 --- /dev/null +++ b/lib/open_api_sdk/models/operations/organizations_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrganizationsCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Organization created. + field :organization, T.nilable(Models::Shared::Organization) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, organization: T.nilable(Models::Shared::Organization)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, organization: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @organization = organization + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @organization == other.organization + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/organizations_get_request.rb b/lib/open_api_sdk/models/operations/organizations_get_request.rb new file mode 100644 index 0000000..3fd36e6 --- /dev/null +++ b/lib/open_api_sdk/models/operations/organizations_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrganizationsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/organizations_get_response.rb b/lib/open_api_sdk/models/operations/organizations_get_response.rb new file mode 100644 index 0000000..68e03e4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/organizations_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrganizationsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :organization, T.nilable(Models::Shared::Organization) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, organization: T.nilable(Models::Shared::Organization)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, organization: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @organization = organization + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @organization == other.organization + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/organizations_list_request.rb b/lib/open_api_sdk/models/operations/organizations_list_request.rb new file mode 100644 index 0000000..0060adb --- /dev/null +++ b/lib/open_api_sdk/models/operations/organizations_list_request.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrganizationsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by slug. + field :slug, T.nilable(::String), { 'query_param': { 'field_name': 'slug', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::OrganizationSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(limit: T.nilable(::Integer), page: T.nilable(::Integer), slug: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::OrganizationSortProperty])).void } + def initialize(limit: nil, page: nil, slug: nil, sorting: nil) + @limit = limit + @page = page + @slug = slug + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @limit == other.limit + return false unless @page == other.page + return false unless @slug == other.slug + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/organizations_list_response.rb b/lib/open_api_sdk/models/operations/organizations_list_response.rb new file mode 100644 index 0000000..2cbc110 --- /dev/null +++ b/lib/open_api_sdk/models/operations/organizations_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrganizationsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_organization, T.nilable(Models::Shared::ListResourceOrganization) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_organization: T.nilable(Models::Shared::ListResourceOrganization)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_organization: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_organization = list_resource_organization + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_organization == other.list_resource_organization + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/organizations_update_request.rb b/lib/open_api_sdk/models/operations/organizations_update_request.rb new file mode 100644 index 0000000..a4318c4 --- /dev/null +++ b/lib/open_api_sdk/models/operations/organizations_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrganizationsUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + field :organization_update, Models::Shared::OrganizationUpdate, { 'request': { 'media_type': 'application/json' } } + + + sig { params(id: ::String, organization_update: Models::Shared::OrganizationUpdate).void } + def initialize(id: nil, organization_update: nil) + @id = id + @organization_update = organization_update + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @organization_update == other.organization_update + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/organizations_update_response.rb b/lib/open_api_sdk/models/operations/organizations_update_response.rb new file mode 100644 index 0000000..30f41ad --- /dev/null +++ b/lib/open_api_sdk/models/operations/organizations_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class OrganizationsUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Organization updated. + field :organization, T.nilable(Models::Shared::Organization) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, organization: T.nilable(Models::Shared::Organization)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, organization: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @organization = organization + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @organization == other.organization + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/productbillingtype_filter.rb b/lib/open_api_sdk/models/operations/productbillingtype_filter.rb new file mode 100644 index 0000000..c256cb3 --- /dev/null +++ b/lib/open_api_sdk/models/operations/productbillingtype_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. + class ProductBillingTypeFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/productid_filter.rb b/lib/open_api_sdk/models/operations/productid_filter.rb new file mode 100644 index 0000000..94a8a47 --- /dev/null +++ b/lib/open_api_sdk/models/operations/productid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product ID. + class ProductIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_create_response.rb b/lib/open_api_sdk/models/operations/products_create_response.rb new file mode 100644 index 0000000..2dfbaa3 --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ProductsCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Product created. + field :product, T.nilable(Models::Shared::Product) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, product: T.nilable(Models::Shared::Product)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, product: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @product = product + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @product == other.product + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_get_request.rb b/lib/open_api_sdk/models/operations/products_get_request.rb new file mode 100644 index 0000000..ab2304d --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ProductsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_get_response.rb b/lib/open_api_sdk/models/operations/products_get_response.rb new file mode 100644 index 0000000..a37e81c --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ProductsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :product, T.nilable(Models::Shared::Product) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, product: T.nilable(Models::Shared::Product)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, product: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @product = product + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @product == other.product + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/products_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..01c1717 --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class ProductsListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_list_request.rb b/lib/open_api_sdk/models/operations/products_list_request.rb new file mode 100644 index 0000000..83d9adc --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_list_request.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ProductsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter products granting specific benefit. + field :benefit_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'benefit_id', 'style': 'form', 'explode': true } } + # Filter by product ID. + field :id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'id', 'style': 'form', 'explode': true } } + # Filter on archived products. + field :is_archived, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'is_archived', 'style': 'form', 'explode': true } } + # Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. + field :is_recurring, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'is_recurring', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by product name. + field :query, T.nilable(::String), { 'query_param': { 'field_name': 'query', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::ProductSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(benefit_id: T.nilable(T.any(::String, T::Array[::String])), id: T.nilable(T.any(::String, T::Array[::String])), is_archived: T.nilable(T::Boolean), is_recurring: T.nilable(T::Boolean), limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), query: T.nilable(::String), sorting: T.nilable(T::Array[Models::Shared::ProductSortProperty])).void } + def initialize(benefit_id: nil, id: nil, is_archived: nil, is_recurring: nil, limit: nil, organization_id: nil, page: nil, query: nil, sorting: nil) + @benefit_id = benefit_id + @id = id + @is_archived = is_archived + @is_recurring = is_recurring + @limit = limit + @organization_id = organization_id + @page = page + @query = query + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @is_recurring == other.is_recurring + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @query == other.query + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_list_response.rb b/lib/open_api_sdk/models/operations/products_list_response.rb new file mode 100644 index 0000000..9d0ec2f --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ProductsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_product, T.nilable(Models::Shared::ListResourceProduct) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_product: T.nilable(Models::Shared::ListResourceProduct)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_product: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_product = list_resource_product + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_product == other.list_resource_product + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_update_benefits_request.rb b/lib/open_api_sdk/models/operations/products_update_benefits_request.rb new file mode 100644 index 0000000..d934e9d --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_update_benefits_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ProductsUpdateBenefitsRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + field :product_benefits_update, Models::Shared::ProductBenefitsUpdate, { 'request': { 'media_type': 'application/json' } } + + + sig { params(id: ::String, product_benefits_update: Models::Shared::ProductBenefitsUpdate).void } + def initialize(id: nil, product_benefits_update: nil) + @id = id + @product_benefits_update = product_benefits_update + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @product_benefits_update == other.product_benefits_update + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_update_benefits_response.rb b/lib/open_api_sdk/models/operations/products_update_benefits_response.rb new file mode 100644 index 0000000..0f655fc --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_update_benefits_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ProductsUpdateBenefitsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Product benefits updated. + field :product, T.nilable(Models::Shared::Product) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, product: T.nilable(Models::Shared::Product)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, product: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @product = product + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @product == other.product + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_update_request.rb b/lib/open_api_sdk/models/operations/products_update_request.rb new file mode 100644 index 0000000..7b7b70a --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ProductsUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + field :product_update, Models::Shared::ProductUpdate, { 'request': { 'media_type': 'application/json' } } + + + sig { params(id: ::String, product_update: Models::Shared::ProductUpdate).void } + def initialize(id: nil, product_update: nil) + @id = id + @product_update = product_update + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @product_update == other.product_update + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/products_update_response.rb b/lib/open_api_sdk/models/operations/products_update_response.rb new file mode 100644 index 0000000..e3f1357 --- /dev/null +++ b/lib/open_api_sdk/models/operations/products_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class ProductsUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Product updated. + field :product, T.nilable(Models::Shared::Product) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, product: T.nilable(Models::Shared::Product)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, product: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @product = product + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @product == other.product + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_benefitid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_benefitid_filter.rb new file mode 100644 index 0000000..565ba64 --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_benefitid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by benefit ID. + class QueryParamBenefitIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_benefittype_filter.rb b/lib/open_api_sdk/models/operations/queryparam_benefittype_filter.rb new file mode 100644 index 0000000..f68c708 --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_benefittype_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by benefit type. + class QueryParamBenefitTypeFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_checkoutid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_checkoutid_filter.rb new file mode 100644 index 0000000..8241e3a --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_checkoutid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by checkout ID. + class QueryParamCheckoutIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_customerid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_customerid_filter.rb new file mode 100644 index 0000000..f37265d --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_customerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by customer. + class QueryParamCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_discountid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_discountid_filter.rb new file mode 100644 index 0000000..f9cab5a --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_discountid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by discount ID. + class QueryParamDiscountIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_externalcustomerid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_externalcustomerid_filter.rb new file mode 100644 index 0000000..6af70df --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_externalcustomerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by external customer ID. + class QueryParamExternalCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_meterid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_meterid_filter.rb new file mode 100644 index 0000000..f999e2f --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_meterid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by meter ID. + class QueryParamMeterIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_orderid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_orderid_filter.rb new file mode 100644 index 0000000..3c17f6b --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_orderid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by order ID. + class QueryParamOrderIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_organizationid_filter.rb new file mode 100644 index 0000000..0399f5d --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class QueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_productbillingtype_filter.rb b/lib/open_api_sdk/models/operations/queryparam_productbillingtype_filter.rb new file mode 100644 index 0000000..0eb8c8c --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_productbillingtype_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by billing type. `recurring` will filter data corresponding to subscriptions creations or renewals. `one_time` will filter data corresponding to one-time purchases. + class QueryParamProductBillingTypeFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_productid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_productid_filter.rb new file mode 100644 index 0000000..d450423 --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_productid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by product ID. + class QueryParamProductIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_source_filter.rb b/lib/open_api_sdk/models/operations/queryparam_source_filter.rb new file mode 100644 index 0000000..f3c3c63 --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_source_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by event source. + class QueryParamSourceFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/queryparam_subscriptionid_filter.rb b/lib/open_api_sdk/models/operations/queryparam_subscriptionid_filter.rb new file mode 100644 index 0000000..d4c4751 --- /dev/null +++ b/lib/open_api_sdk/models/operations/queryparam_subscriptionid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by subscription ID. + class QueryParamSubscriptionIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/refundid_filter.rb b/lib/open_api_sdk/models/operations/refundid_filter.rb new file mode 100644 index 0000000..c1d35f6 --- /dev/null +++ b/lib/open_api_sdk/models/operations/refundid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by refund ID. + class RefundIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/refunds_create_response.rb b/lib/open_api_sdk/models/operations/refunds_create_response.rb new file mode 100644 index 0000000..c8f0924 --- /dev/null +++ b/lib/open_api_sdk/models/operations/refunds_create_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class RefundsCreateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :refund, T.nilable(Models::Shared::Refund) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, refund: T.nilable(Models::Shared::Refund)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, refund: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @refund = refund + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @refund == other.refund + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/refunds_list_queryparam_customerid_filter.rb b/lib/open_api_sdk/models/operations/refunds_list_queryparam_customerid_filter.rb new file mode 100644 index 0000000..b3fb776 --- /dev/null +++ b/lib/open_api_sdk/models/operations/refunds_list_queryparam_customerid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by customer ID. + class RefundsListQueryParamCustomerIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/refunds_list_queryparam_organizationid_filter.rb b/lib/open_api_sdk/models/operations/refunds_list_queryparam_organizationid_filter.rb new file mode 100644 index 0000000..8b89de3 --- /dev/null +++ b/lib/open_api_sdk/models/operations/refunds_list_queryparam_organizationid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by organization ID. + class RefundsListQueryParamOrganizationIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/refunds_list_request.rb b/lib/open_api_sdk/models/operations/refunds_list_request.rb new file mode 100644 index 0000000..430e571 --- /dev/null +++ b/lib/open_api_sdk/models/operations/refunds_list_request.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class RefundsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by customer ID. + field :customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } } + # Filter by refund ID. + field :id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'id', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by order ID. + field :order_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'order_id', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::RefundSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + # Filter by subscription ID. + field :subscription_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'subscription_id', 'style': 'form', 'explode': true } } + # Filter by `succeeded`. + field :succeeded, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'succeeded', 'style': 'form', 'explode': true } } + + + sig { params(customer_id: T.nilable(T.any(::String, T::Array[::String])), id: T.nilable(T.any(::String, T::Array[::String])), limit: T.nilable(::Integer), order_id: T.nilable(T.any(::String, T::Array[::String])), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), sorting: T.nilable(T::Array[Models::Shared::RefundSortProperty]), subscription_id: T.nilable(T.any(::String, T::Array[::String])), succeeded: T.nilable(T::Boolean)).void } + def initialize(customer_id: nil, id: nil, limit: nil, order_id: nil, organization_id: nil, page: nil, sorting: nil, subscription_id: nil, succeeded: nil) + @customer_id = customer_id + @id = id + @limit = limit + @order_id = order_id + @organization_id = organization_id + @page = page + @sorting = sorting + @subscription_id = subscription_id + @succeeded = succeeded + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_id == other.customer_id + return false unless @id == other.id + return false unless @limit == other.limit + return false unless @order_id == other.order_id + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @sorting == other.sorting + return false unless @subscription_id == other.subscription_id + return false unless @succeeded == other.succeeded + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/refunds_list_response.rb b/lib/open_api_sdk/models/operations/refunds_list_response.rb new file mode 100644 index 0000000..fa022e1 --- /dev/null +++ b/lib/open_api_sdk/models/operations/refunds_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class RefundsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_refund, T.nilable(Models::Shared::ListResourceRefund) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_refund: T.nilable(Models::Shared::ListResourceRefund)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_refund: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_refund = list_resource_refund + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_refund == other.list_resource_refund + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/source_filter.rb b/lib/open_api_sdk/models/operations/source_filter.rb new file mode 100644 index 0000000..943505e --- /dev/null +++ b/lib/open_api_sdk/models/operations/source_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by event source. + class SourceFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptionid_filter.rb b/lib/open_api_sdk/models/operations/subscriptionid_filter.rb new file mode 100644 index 0000000..1cd444b --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptionid_filter.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + # Filter by subscription ID. + class SubscriptionIDFilter + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_export_request.rb b/lib/open_api_sdk/models/operations/subscriptions_export_request.rb new file mode 100644 index 0000000..b05093b --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_export_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsExportRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + + + sig { params(organization_id: T.nilable(T.any(::String, T::Array[::String]))).void } + def initialize(organization_id: nil) + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_export_response.rb b/lib/open_api_sdk/models/operations/subscriptions_export_response.rb new file mode 100644 index 0000000..72d233e --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_export_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsExportResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_get_request.rb b/lib/open_api_sdk/models/operations/subscriptions_get_request.rb new file mode 100644 index 0000000..efbdfe3 --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_get_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsGetRequest + extend T::Sig + include Crystalline::MetadataFields + + # The subscription ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_get_response.rb b/lib/open_api_sdk/models/operations/subscriptions_get_response.rb new file mode 100644 index 0000000..a816789 --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_get_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsGetResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :subscription, T.nilable(Models::Shared::Subscription) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, subscription: T.nilable(Models::Shared::Subscription)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, subscription: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @subscription = subscription + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @subscription == other.subscription + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_list_request.rb b/lib/open_api_sdk/models/operations/subscriptions_list_request.rb new file mode 100644 index 0000000..6638fb2 --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_list_request.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsListRequest + extend T::Sig + include Crystalline::MetadataFields + + # Filter by active or inactive subscription. + field :active, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'active', 'style': 'form', 'explode': true } } + # Filter by customer ID. + field :customer_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } } + # Filter by discount ID. + field :discount_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'discount_id', 'style': 'form', 'explode': true } } + # Size of a page, defaults to 10. Maximum is 100. + field :limit, T.nilable(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } } + # Filter by organization ID. + field :organization_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'organization_id', 'style': 'form', 'explode': true } } + # Page number, defaults to 1. + field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } } + # Filter by product ID. + field :product_id, T.nilable(T.any(::String, T::Array[::String])), { 'query_param': { 'field_name': 'product_id', 'style': 'form', 'explode': true } } + # Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + field :sorting, T.nilable(T::Array[Models::Shared::SubscriptionSortProperty]), { 'query_param': { 'field_name': 'sorting', 'style': 'form', 'explode': true } } + + + sig { params(active: T.nilable(T::Boolean), customer_id: T.nilable(T.any(::String, T::Array[::String])), discount_id: T.nilable(T.any(::String, T::Array[::String])), limit: T.nilable(::Integer), organization_id: T.nilable(T.any(::String, T::Array[::String])), page: T.nilable(::Integer), product_id: T.nilable(T.any(::String, T::Array[::String])), sorting: T.nilable(T::Array[Models::Shared::SubscriptionSortProperty])).void } + def initialize(active: nil, customer_id: nil, discount_id: nil, limit: nil, organization_id: nil, page: nil, product_id: nil, sorting: nil) + @active = active + @customer_id = customer_id + @discount_id = discount_id + @limit = limit + @organization_id = organization_id + @page = page + @product_id = product_id + @sorting = sorting + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @active == other.active + return false unless @customer_id == other.customer_id + return false unless @discount_id == other.discount_id + return false unless @limit == other.limit + return false unless @organization_id == other.organization_id + return false unless @page == other.page + return false unless @product_id == other.product_id + return false unless @sorting == other.sorting + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_list_response.rb b/lib/open_api_sdk/models/operations/subscriptions_list_response.rb new file mode 100644 index 0000000..ad8023e --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_list_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsListResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :list_resource_subscription, T.nilable(Models::Shared::ListResourceSubscription) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, list_resource_subscription: T.nilable(Models::Shared::ListResourceSubscription)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, list_resource_subscription: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @list_resource_subscription = list_resource_subscription + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @list_resource_subscription == other.list_resource_subscription + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_revoke_request.rb b/lib/open_api_sdk/models/operations/subscriptions_revoke_request.rb new file mode 100644 index 0000000..9e7eb97 --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_revoke_request.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsRevokeRequest + extend T::Sig + include Crystalline::MetadataFields + + # The subscription ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_revoke_response.rb b/lib/open_api_sdk/models/operations/subscriptions_revoke_response.rb new file mode 100644 index 0000000..6ec25c8 --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_revoke_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsRevokeResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Subscription revoked. + field :subscription, T.nilable(Models::Shared::Subscription) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, subscription: T.nilable(Models::Shared::Subscription)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, subscription: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @subscription = subscription + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @subscription == other.subscription + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_update_request.rb b/lib/open_api_sdk/models/operations/subscriptions_update_request.rb new file mode 100644 index 0000000..53deeff --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_update_request.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsUpdateRequest + extend T::Sig + include Crystalline::MetadataFields + + # The subscription ID. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + field :subscription_update, T.any(Models::Shared::SubscriptionUpdateProduct, Models::Shared::SubscriptionCancel, Models::Shared::SubscriptionRevoke), { 'request': { 'media_type': 'application/json' } } + + + sig { params(id: ::String, subscription_update: T.any(Models::Shared::SubscriptionUpdateProduct, Models::Shared::SubscriptionCancel, Models::Shared::SubscriptionRevoke)).void } + def initialize(id: nil, subscription_update: nil) + @id = id + @subscription_update = subscription_update + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @subscription_update == other.subscription_update + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/subscriptions_update_response.rb b/lib/open_api_sdk/models/operations/subscriptions_update_response.rb new file mode 100644 index 0000000..5f1fbb8 --- /dev/null +++ b/lib/open_api_sdk/models/operations/subscriptions_update_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Operations + + + class SubscriptionsUpdateResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Subscription updated. + field :subscription, T.nilable(Models::Shared::Subscription) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, subscription: T.nilable(Models::Shared::Subscription)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, subscription: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @subscription = subscription + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @subscription == other.subscription + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared.rb b/lib/open_api_sdk/models/shared.rb new file mode 100644 index 0000000..380bff0 --- /dev/null +++ b/lib/open_api_sdk/models/shared.rb @@ -0,0 +1,566 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module OpenApiSDK + module Models + module Shared + autoload :Address, 'open_api_sdk/models/shared/address.rb' + autoload :AttachedCustomField, 'open_api_sdk/models/shared/attachedcustomfield.rb' + autoload :AttachedCustomFieldCreate, 'open_api_sdk/models/shared/attachedcustomfieldcreate.rb' + autoload :AuthorizationCodeTokenRequest, 'open_api_sdk/models/shared/authorizationcodetokenrequest.rb' + autoload :AuthorizeOrganization, 'open_api_sdk/models/shared/authorizeorganization.rb' + autoload :AuthorizeResponseOrganization, 'open_api_sdk/models/shared/authorizeresponseorganization.rb' + autoload :AuthorizeResponseUser, 'open_api_sdk/models/shared/authorizeresponseuser.rb' + autoload :AuthorizeUser, 'open_api_sdk/models/shared/authorizeuser.rb' + autoload :Benefit, 'open_api_sdk/models/shared/benefit.rb' + autoload :BenefitCreate, 'open_api_sdk/models/shared/benefitcreate.rb' + autoload :BenefitCustom, 'open_api_sdk/models/shared/benefitcustom.rb' + autoload :BenefitCustomCreate, 'open_api_sdk/models/shared/benefitcustomcreate.rb' + autoload :BenefitCustomCreateProperties, 'open_api_sdk/models/shared/benefitcustomcreateproperties.rb' + autoload :BenefitCustomCreateMetadata, 'open_api_sdk/models/shared/benefitcustomcreate_metadata.rb' + autoload :BenefitCustomProperties, 'open_api_sdk/models/shared/benefitcustomproperties.rb' + autoload :BenefitCustomSubscriber, 'open_api_sdk/models/shared/benefitcustomsubscriber.rb' + autoload :BenefitCustomSubscriberProperties, 'open_api_sdk/models/shared/benefitcustomsubscriberproperties.rb' + autoload :BenefitCustomSubscriberMetadata, 'open_api_sdk/models/shared/benefitcustomsubscriber_metadata.rb' + autoload :BenefitCustomUpdate, 'open_api_sdk/models/shared/benefitcustomupdate.rb' + autoload :BenefitCustomUpdateMetadata, 'open_api_sdk/models/shared/benefitcustomupdate_metadata.rb' + autoload :BenefitCustomMetadata, 'open_api_sdk/models/shared/benefitcustom_metadata.rb' + autoload :BenefitDiscord, 'open_api_sdk/models/shared/benefitdiscord.rb' + autoload :BenefitDiscordCreate, 'open_api_sdk/models/shared/benefitdiscordcreate.rb' + autoload :BenefitDiscordCreateProperties, 'open_api_sdk/models/shared/benefitdiscordcreateproperties.rb' + autoload :BenefitDiscordCreateMetadata, 'open_api_sdk/models/shared/benefitdiscordcreate_metadata.rb' + autoload :BenefitDiscordProperties, 'open_api_sdk/models/shared/benefitdiscordproperties.rb' + autoload :BenefitDiscordSubscriber, 'open_api_sdk/models/shared/benefitdiscordsubscriber.rb' + autoload :BenefitDiscordSubscriberProperties, 'open_api_sdk/models/shared/benefitdiscordsubscriberproperties.rb' + autoload :BenefitDiscordSubscriberMetadata, 'open_api_sdk/models/shared/benefitdiscordsubscriber_metadata.rb' + autoload :BenefitDiscordUpdate, 'open_api_sdk/models/shared/benefitdiscordupdate.rb' + autoload :BenefitDiscordUpdateMetadata, 'open_api_sdk/models/shared/benefitdiscordupdate_metadata.rb' + autoload :BenefitDiscordMetadata, 'open_api_sdk/models/shared/benefitdiscord_metadata.rb' + autoload :BenefitDownloadables, 'open_api_sdk/models/shared/benefitdownloadables.rb' + autoload :BenefitDownloadablesCreate, 'open_api_sdk/models/shared/benefitdownloadablescreate.rb' + autoload :BenefitDownloadablesCreateProperties, 'open_api_sdk/models/shared/benefitdownloadablescreateproperties.rb' + autoload :BenefitDownloadablesCreateMetadata, 'open_api_sdk/models/shared/benefitdownloadablescreate_metadata.rb' + autoload :BenefitDownloadablesProperties, 'open_api_sdk/models/shared/benefitdownloadablesproperties.rb' + autoload :BenefitDownloadablesSubscriber, 'open_api_sdk/models/shared/benefitdownloadablessubscriber.rb' + autoload :BenefitDownloadablesSubscriberProperties, 'open_api_sdk/models/shared/benefitdownloadablessubscriberproperties.rb' + autoload :BenefitDownloadablesSubscriberMetadata, 'open_api_sdk/models/shared/benefitdownloadablessubscriber_metadata.rb' + autoload :BenefitDownloadablesUpdate, 'open_api_sdk/models/shared/benefitdownloadablesupdate.rb' + autoload :BenefitDownloadablesUpdateMetadata, 'open_api_sdk/models/shared/benefitdownloadablesupdate_metadata.rb' + autoload :BenefitDownloadablesMetadata, 'open_api_sdk/models/shared/benefitdownloadables_metadata.rb' + autoload :BenefitGitHubRepository, 'open_api_sdk/models/shared/benefitgithubrepository.rb' + autoload :BenefitGitHubRepositoryCreate, 'open_api_sdk/models/shared/benefitgithubrepositorycreate.rb' + autoload :BenefitGitHubRepositoryCreateProperties, 'open_api_sdk/models/shared/benefitgithubrepositorycreateproperties.rb' + autoload :BenefitGitHubRepositoryCreatePropertiesPermission, 'open_api_sdk/models/shared/benefitgithubrepositorycreateproperties_permission.rb' + autoload :BenefitGitHubRepositoryCreateMetadata, 'open_api_sdk/models/shared/benefitgithubrepositorycreate_metadata.rb' + autoload :BenefitGitHubRepositoryProperties, 'open_api_sdk/models/shared/benefitgithubrepositoryproperties.rb' + autoload :BenefitGitHubRepositorySubscriber, 'open_api_sdk/models/shared/benefitgithubrepositorysubscriber.rb' + autoload :BenefitGitHubRepositorySubscriberProperties, 'open_api_sdk/models/shared/benefitgithubrepositorysubscriberproperties.rb' + autoload :BenefitGitHubRepositorySubscriberMetadata, 'open_api_sdk/models/shared/benefitgithubrepositorysubscriber_metadata.rb' + autoload :BenefitGitHubRepositoryUpdate, 'open_api_sdk/models/shared/benefitgithubrepositoryupdate.rb' + autoload :BenefitGitHubRepositoryUpdateMetadata, 'open_api_sdk/models/shared/benefitgithubrepositoryupdate_metadata.rb' + autoload :BenefitGitHubRepositoryMetadata, 'open_api_sdk/models/shared/benefitgithubrepository_metadata.rb' + autoload :BenefitGrant, 'open_api_sdk/models/shared/benefitgrant.rb' + autoload :BenefitGrantCustomProperties, 'open_api_sdk/models/shared/benefitgrantcustomproperties.rb' + autoload :BenefitGrantDiscordProperties, 'open_api_sdk/models/shared/benefitgrantdiscordproperties.rb' + autoload :BenefitGrantDownloadablesProperties, 'open_api_sdk/models/shared/benefitgrantdownloadablesproperties.rb' + autoload :BenefitGrantGitHubRepositoryProperties, 'open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties.rb' + autoload :BenefitGrantGitHubRepositoryPropertiesPermission, 'open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties_permission.rb' + autoload :BenefitGrantLicenseKeysProperties, 'open_api_sdk/models/shared/benefitgrantlicensekeysproperties.rb' + autoload :BenefitGrantMeterCreditProperties, 'open_api_sdk/models/shared/benefitgrantmetercreditproperties.rb' + autoload :BenefitGrantWebhook, 'open_api_sdk/models/shared/benefitgrantwebhook.rb' + autoload :BenefitGrantWebhookProperties, 'open_api_sdk/models/shared/benefitgrantwebhook_properties.rb' + autoload :BenefitLicenseKeyActivationCreateProperties, 'open_api_sdk/models/shared/benefitlicensekeyactivationcreateproperties.rb' + autoload :BenefitLicenseKeyActivationProperties, 'open_api_sdk/models/shared/benefitlicensekeyactivationproperties.rb' + autoload :BenefitLicenseKeyExpirationProperties, 'open_api_sdk/models/shared/benefitlicensekeyexpirationproperties.rb' + autoload :BenefitLicenseKeys, 'open_api_sdk/models/shared/benefitlicensekeys.rb' + autoload :BenefitLicenseKeysCreate, 'open_api_sdk/models/shared/benefitlicensekeyscreate.rb' + autoload :BenefitLicenseKeysCreateProperties, 'open_api_sdk/models/shared/benefitlicensekeyscreateproperties.rb' + autoload :BenefitLicenseKeysCreateMetadata, 'open_api_sdk/models/shared/benefitlicensekeyscreate_metadata.rb' + autoload :BenefitLicenseKeysProperties, 'open_api_sdk/models/shared/benefitlicensekeysproperties.rb' + autoload :BenefitLicenseKeysSubscriber, 'open_api_sdk/models/shared/benefitlicensekeyssubscriber.rb' + autoload :BenefitLicenseKeysSubscriberProperties, 'open_api_sdk/models/shared/benefitlicensekeyssubscriberproperties.rb' + autoload :BenefitLicenseKeysSubscriberMetadata, 'open_api_sdk/models/shared/benefitlicensekeyssubscriber_metadata.rb' + autoload :BenefitLicenseKeysUpdate, 'open_api_sdk/models/shared/benefitlicensekeysupdate.rb' + autoload :BenefitLicenseKeysUpdateMetadata, 'open_api_sdk/models/shared/benefitlicensekeysupdate_metadata.rb' + autoload :BenefitLicenseKeysMetadata, 'open_api_sdk/models/shared/benefitlicensekeys_metadata.rb' + autoload :BenefitMeterCredit, 'open_api_sdk/models/shared/benefitmetercredit.rb' + autoload :BenefitMeterCreditCreate, 'open_api_sdk/models/shared/benefitmetercreditcreate.rb' + autoload :BenefitMeterCreditCreateProperties, 'open_api_sdk/models/shared/benefitmetercreditcreateproperties.rb' + autoload :BenefitMeterCreditCreateMetadata, 'open_api_sdk/models/shared/benefitmetercreditcreate_metadata.rb' + autoload :BenefitMeterCreditProperties, 'open_api_sdk/models/shared/benefitmetercreditproperties.rb' + autoload :BenefitMeterCreditSubscriber, 'open_api_sdk/models/shared/benefitmetercreditsubscriber.rb' + autoload :BenefitMeterCreditSubscriberProperties, 'open_api_sdk/models/shared/benefitmetercreditsubscriberproperties.rb' + autoload :BenefitMeterCreditSubscriberMetadata, 'open_api_sdk/models/shared/benefitmetercreditsubscriber_metadata.rb' + autoload :BenefitMeterCreditUpdate, 'open_api_sdk/models/shared/benefitmetercreditupdate.rb' + autoload :BenefitMeterCreditUpdateMetadata, 'open_api_sdk/models/shared/benefitmetercreditupdate_metadata.rb' + autoload :BenefitMeterCreditMetadata, 'open_api_sdk/models/shared/benefitmetercredit_metadata.rb' + autoload :BenefitPublic, 'open_api_sdk/models/shared/benefitpublic.rb' + autoload :BenefitSortProperty, 'open_api_sdk/models/shared/benefitsortproperty.rb' + autoload :BenefitType, 'open_api_sdk/models/shared/benefittype.rb' + autoload :Checkout, 'open_api_sdk/models/shared/checkout.rb' + autoload :CheckoutCreate, 'open_api_sdk/models/shared/checkoutcreate.rb' + autoload :CheckoutCreateCustomFieldData, 'open_api_sdk/models/shared/checkoutcreate_custom_field_data.rb' + autoload :CheckoutCreateCustomerMetadata, 'open_api_sdk/models/shared/checkoutcreate_customer_metadata.rb' + autoload :CheckoutCreateMetadata, 'open_api_sdk/models/shared/checkoutcreate_metadata.rb' + autoload :CheckoutCustomerBillingAddressFields, 'open_api_sdk/models/shared/checkoutcustomerbillingaddressfields.rb' + autoload :CheckoutDiscountFixedOnceForeverDuration, 'open_api_sdk/models/shared/checkoutdiscountfixedonceforeverduration.rb' + autoload :CheckoutDiscountFixedRepeatDuration, 'open_api_sdk/models/shared/checkoutdiscountfixedrepeatduration.rb' + autoload :CheckoutDiscountPercentageOnceForeverDuration, 'open_api_sdk/models/shared/checkoutdiscountpercentageonceforeverduration.rb' + autoload :CheckoutDiscountPercentageRepeatDuration, 'open_api_sdk/models/shared/checkoutdiscountpercentagerepeatduration.rb' + autoload :CheckoutLink, 'open_api_sdk/models/shared/checkoutlink.rb' + autoload :CheckoutLinkCreateProduct, 'open_api_sdk/models/shared/checkoutlinkcreateproduct.rb' + autoload :CheckoutLinkCreateProductPrice, 'open_api_sdk/models/shared/checkoutlinkcreateproductprice.rb' + autoload :CheckoutLinkCreateProductPriceMetadata, 'open_api_sdk/models/shared/checkoutlinkcreateproductprice_metadata.rb' + autoload :CheckoutLinkCreateProductMetadata, 'open_api_sdk/models/shared/checkoutlinkcreateproduct_metadata.rb' + autoload :CheckoutLinkCreateProducts, 'open_api_sdk/models/shared/checkoutlinkcreateproducts.rb' + autoload :CheckoutLinkCreateProductsMetadata, 'open_api_sdk/models/shared/checkoutlinkcreateproducts_metadata.rb' + autoload :CheckoutLinkDiscount, 'open_api_sdk/models/shared/checkoutlinkdiscount.rb' + autoload :CheckoutLinkProduct, 'open_api_sdk/models/shared/checkoutlinkproduct.rb' + autoload :CheckoutLinkProductMetadata, 'open_api_sdk/models/shared/checkoutlinkproduct_metadata.rb' + autoload :CheckoutLinkProductPrices, 'open_api_sdk/models/shared/checkoutlinkproduct_prices.rb' + autoload :CheckoutLinkSortProperty, 'open_api_sdk/models/shared/checkoutlinksortproperty.rb' + autoload :CheckoutLinkUpdate, 'open_api_sdk/models/shared/checkoutlinkupdate.rb' + autoload :CheckoutLinkUpdateMetadata, 'open_api_sdk/models/shared/checkoutlinkupdate_metadata.rb' + autoload :CheckoutLinkMetadata, 'open_api_sdk/models/shared/checkoutlink_metadata.rb' + autoload :CheckoutProduct, 'open_api_sdk/models/shared/checkoutproduct.rb' + autoload :CheckoutProductPrices, 'open_api_sdk/models/shared/checkoutproduct_prices.rb' + autoload :CheckoutPublic, 'open_api_sdk/models/shared/checkoutpublic.rb' + autoload :CheckoutPublicProductPrice, 'open_api_sdk/models/shared/checkoutpublic_product_price.rb' + autoload :CheckoutPublicCustomFieldData, 'open_api_sdk/models/shared/checkoutpublic_custom_field_data.rb' + autoload :CheckoutPublicDiscount, 'open_api_sdk/models/shared/checkoutpublic_discount.rb' + autoload :CheckoutSortProperty, 'open_api_sdk/models/shared/checkoutsortproperty.rb' + autoload :CheckoutStatus, 'open_api_sdk/models/shared/checkoutstatus.rb' + autoload :CheckoutProductPrice, 'open_api_sdk/models/shared/checkout_product_price.rb' + autoload :CheckoutCustomFieldData, 'open_api_sdk/models/shared/checkout_custom_field_data.rb' + autoload :CheckoutDiscount, 'open_api_sdk/models/shared/checkout_discount.rb' + autoload :CheckoutMetadata, 'open_api_sdk/models/shared/checkout_metadata.rb' + autoload :CountAggregation, 'open_api_sdk/models/shared/countaggregation.rb' + autoload :CustomField, 'open_api_sdk/models/shared/customfield.rb' + autoload :CustomFieldCheckbox, 'open_api_sdk/models/shared/customfieldcheckbox.rb' + autoload :CustomFieldCheckboxProperties, 'open_api_sdk/models/shared/customfieldcheckboxproperties.rb' + autoload :CustomFieldCheckboxMetadata, 'open_api_sdk/models/shared/customfieldcheckbox_metadata.rb' + autoload :CustomFieldCreate, 'open_api_sdk/models/shared/customfieldcreate.rb' + autoload :CustomFieldCreateCheckbox, 'open_api_sdk/models/shared/customfieldcreatecheckbox.rb' + autoload :CustomFieldCreateCheckboxMetadata, 'open_api_sdk/models/shared/customfieldcreatecheckbox_metadata.rb' + autoload :CustomFieldCreateDate, 'open_api_sdk/models/shared/customfieldcreatedate.rb' + autoload :CustomFieldCreateDateMetadata, 'open_api_sdk/models/shared/customfieldcreatedate_metadata.rb' + autoload :CustomFieldCreateNumber, 'open_api_sdk/models/shared/customfieldcreatenumber.rb' + autoload :CustomFieldCreateNumberMetadata, 'open_api_sdk/models/shared/customfieldcreatenumber_metadata.rb' + autoload :CustomFieldCreateSelect, 'open_api_sdk/models/shared/customfieldcreateselect.rb' + autoload :CustomFieldCreateSelectMetadata, 'open_api_sdk/models/shared/customfieldcreateselect_metadata.rb' + autoload :CustomFieldCreateText, 'open_api_sdk/models/shared/customfieldcreatetext.rb' + autoload :CustomFieldCreateTextMetadata, 'open_api_sdk/models/shared/customfieldcreatetext_metadata.rb' + autoload :CustomFieldDate, 'open_api_sdk/models/shared/customfielddate.rb' + autoload :CustomFieldDateProperties, 'open_api_sdk/models/shared/customfielddateproperties.rb' + autoload :CustomFieldDateMetadata, 'open_api_sdk/models/shared/customfielddate_metadata.rb' + autoload :CustomFieldNumber, 'open_api_sdk/models/shared/customfieldnumber.rb' + autoload :CustomFieldNumberProperties, 'open_api_sdk/models/shared/customfieldnumberproperties.rb' + autoload :CustomFieldNumberMetadata, 'open_api_sdk/models/shared/customfieldnumber_metadata.rb' + autoload :CustomFieldSelect, 'open_api_sdk/models/shared/customfieldselect.rb' + autoload :CustomFieldSelectOption, 'open_api_sdk/models/shared/customfieldselectoption.rb' + autoload :CustomFieldSelectProperties, 'open_api_sdk/models/shared/customfieldselectproperties.rb' + autoload :CustomFieldSelectMetadata, 'open_api_sdk/models/shared/customfieldselect_metadata.rb' + autoload :CustomFieldSortProperty, 'open_api_sdk/models/shared/customfieldsortproperty.rb' + autoload :CustomFieldText, 'open_api_sdk/models/shared/customfieldtext.rb' + autoload :CustomFieldTextProperties, 'open_api_sdk/models/shared/customfieldtextproperties.rb' + autoload :CustomFieldTextMetadata, 'open_api_sdk/models/shared/customfieldtext_metadata.rb' + autoload :CustomFieldType, 'open_api_sdk/models/shared/customfieldtype.rb' + autoload :CustomFieldUpdate, 'open_api_sdk/models/shared/customfieldupdate.rb' + autoload :CustomFieldUpdateCheckbox, 'open_api_sdk/models/shared/customfieldupdatecheckbox.rb' + autoload :CustomFieldUpdateCheckboxMetadata, 'open_api_sdk/models/shared/customfieldupdatecheckbox_metadata.rb' + autoload :CustomFieldUpdateDate, 'open_api_sdk/models/shared/customfieldupdatedate.rb' + autoload :CustomFieldUpdateDateMetadata, 'open_api_sdk/models/shared/customfieldupdatedate_metadata.rb' + autoload :CustomFieldUpdateNumber, 'open_api_sdk/models/shared/customfieldupdatenumber.rb' + autoload :CustomFieldUpdateNumberMetadata, 'open_api_sdk/models/shared/customfieldupdatenumber_metadata.rb' + autoload :CustomFieldUpdateSelect, 'open_api_sdk/models/shared/customfieldupdateselect.rb' + autoload :CustomFieldUpdateSelectMetadata, 'open_api_sdk/models/shared/customfieldupdateselect_metadata.rb' + autoload :CustomFieldUpdateText, 'open_api_sdk/models/shared/customfieldupdatetext.rb' + autoload :CustomFieldUpdateTextMetadata, 'open_api_sdk/models/shared/customfieldupdatetext_metadata.rb' + autoload :Customer, 'open_api_sdk/models/shared/customer.rb' + autoload :CustomerBenefitGrant, 'open_api_sdk/models/shared/customerbenefitgrant.rb' + autoload :CustomerBenefitGrantCustom, 'open_api_sdk/models/shared/customerbenefitgrantcustom.rb' + autoload :CustomerBenefitGrantCustomUpdate, 'open_api_sdk/models/shared/customerbenefitgrantcustomupdate.rb' + autoload :CustomerBenefitGrantDiscord, 'open_api_sdk/models/shared/customerbenefitgrantdiscord.rb' + autoload :CustomerBenefitGrantDiscordPropertiesUpdate, 'open_api_sdk/models/shared/customerbenefitgrantdiscordpropertiesupdate.rb' + autoload :CustomerBenefitGrantDiscordUpdate, 'open_api_sdk/models/shared/customerbenefitgrantdiscordupdate.rb' + autoload :CustomerBenefitGrantDownloadables, 'open_api_sdk/models/shared/customerbenefitgrantdownloadables.rb' + autoload :CustomerBenefitGrantDownloadablesUpdate, 'open_api_sdk/models/shared/customerbenefitgrantdownloadablesupdate.rb' + autoload :CustomerBenefitGrantGitHubRepository, 'open_api_sdk/models/shared/customerbenefitgrantgithubrepository.rb' + autoload :CustomerBenefitGrantGitHubRepositoryPropertiesUpdate, 'open_api_sdk/models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.rb' + autoload :CustomerBenefitGrantGitHubRepositoryUpdate, 'open_api_sdk/models/shared/customerbenefitgrantgithubrepositoryupdate.rb' + autoload :CustomerBenefitGrantLicenseKeys, 'open_api_sdk/models/shared/customerbenefitgrantlicensekeys.rb' + autoload :CustomerBenefitGrantLicenseKeysUpdate, 'open_api_sdk/models/shared/customerbenefitgrantlicensekeysupdate.rb' + autoload :CustomerBenefitGrantMeterCredit, 'open_api_sdk/models/shared/customerbenefitgrantmetercredit.rb' + autoload :CustomerBenefitGrantMeterCreditUpdate, 'open_api_sdk/models/shared/customerbenefitgrantmetercreditupdate.rb' + autoload :CustomerBenefitGrantSortProperty, 'open_api_sdk/models/shared/customerbenefitgrantsortproperty.rb' + autoload :CustomerBenefitGrantUpdate, 'open_api_sdk/models/shared/customerbenefitgrantupdate.rb' + autoload :CustomerCancellationReason, 'open_api_sdk/models/shared/customercancellationreason.rb' + autoload :CustomerCreate, 'open_api_sdk/models/shared/customercreate.rb' + autoload :CustomerCreateMetadata, 'open_api_sdk/models/shared/customercreate_metadata.rb' + autoload :CustomerCreateTaxId, 'open_api_sdk/models/shared/customercreate_tax_id.rb' + autoload :CustomerCustomerMeter, 'open_api_sdk/models/shared/customercustomermeter.rb' + autoload :CustomerCustomerMeterMeter, 'open_api_sdk/models/shared/customercustomermetermeter.rb' + autoload :CustomerCustomerMeterSortProperty, 'open_api_sdk/models/shared/customercustomermetersortproperty.rb' + autoload :CustomerMeter, 'open_api_sdk/models/shared/customermeter.rb' + autoload :CustomerMeterSortProperty, 'open_api_sdk/models/shared/customermetersortproperty.rb' + autoload :CustomerOrder, 'open_api_sdk/models/shared/customerorder.rb' + autoload :CustomerOrderInvoice, 'open_api_sdk/models/shared/customerorderinvoice.rb' + autoload :CustomerOrderProduct, 'open_api_sdk/models/shared/customerorderproduct.rb' + autoload :CustomerOrderProductPrices, 'open_api_sdk/models/shared/customerorderproduct_prices.rb' + autoload :CustomerOrderSortProperty, 'open_api_sdk/models/shared/customerordersortproperty.rb' + autoload :CustomerOrderSubscription, 'open_api_sdk/models/shared/customerordersubscription.rb' + autoload :CustomerOrganization, 'open_api_sdk/models/shared/customerorganization.rb' + autoload :CustomerPaymentMethodCreate, 'open_api_sdk/models/shared/customerpaymentmethodcreate.rb' + autoload :CustomerPortalCustomer, 'open_api_sdk/models/shared/customerportalcustomer.rb' + autoload :CustomerPortalCustomerUpdate, 'open_api_sdk/models/shared/customerportalcustomerupdate.rb' + autoload :CustomerPortalCustomerTaxId, 'open_api_sdk/models/shared/customerportalcustomer_tax_id.rb' + autoload :CustomerPortalOAuthAccount, 'open_api_sdk/models/shared/customerportaloauthaccount.rb' + autoload :CustomerProduct, 'open_api_sdk/models/shared/customerproduct.rb' + autoload :CustomerProductPrices, 'open_api_sdk/models/shared/customerproduct_prices.rb' + autoload :CustomerSession, 'open_api_sdk/models/shared/customersession.rb' + autoload :CustomerSessionCustomerExternalIDCreate, 'open_api_sdk/models/shared/customersessioncustomerexternalidcreate.rb' + autoload :CustomerSessionCustomerIDCreate, 'open_api_sdk/models/shared/customersessioncustomeridcreate.rb' + autoload :CustomerSortProperty, 'open_api_sdk/models/shared/customersortproperty.rb' + autoload :CustomerState, 'open_api_sdk/models/shared/customerstate.rb' + autoload :CustomerStateBenefitGrant, 'open_api_sdk/models/shared/customerstatebenefitgrant.rb' + autoload :CustomerStateBenefitGrantProperties, 'open_api_sdk/models/shared/customerstatebenefitgrant_properties.rb' + autoload :CustomerStateMeter, 'open_api_sdk/models/shared/customerstatemeter.rb' + autoload :CustomerStateSubscription, 'open_api_sdk/models/shared/customerstatesubscription.rb' + autoload :CustomerStateSubscriptionMeter, 'open_api_sdk/models/shared/customerstatesubscriptionmeter.rb' + autoload :CustomerStateSubscriptionCustomFieldData, 'open_api_sdk/models/shared/customerstatesubscription_custom_field_data.rb' + autoload :CustomerStateSubscriptionMetadata, 'open_api_sdk/models/shared/customerstatesubscription_metadata.rb' + autoload :CustomerStateMetadata, 'open_api_sdk/models/shared/customerstate_metadata.rb' + autoload :CustomerStateTaxId, 'open_api_sdk/models/shared/customerstate_tax_id.rb' + autoload :CustomerSubscription, 'open_api_sdk/models/shared/customersubscription.rb' + autoload :CustomerSubscriptionCancel, 'open_api_sdk/models/shared/customersubscriptioncancel.rb' + autoload :CustomerSubscriptionMeter, 'open_api_sdk/models/shared/customersubscriptionmeter.rb' + autoload :CustomerSubscriptionMeterMeter, 'open_api_sdk/models/shared/customersubscriptionmetermeter.rb' + autoload :CustomerSubscriptionProduct, 'open_api_sdk/models/shared/customersubscriptionproduct.rb' + autoload :CustomerSubscriptionProductPrices, 'open_api_sdk/models/shared/customersubscriptionproduct_prices.rb' + autoload :CustomerSubscriptionSortProperty, 'open_api_sdk/models/shared/customersubscriptionsortproperty.rb' + autoload :CustomerSubscriptionUpdate, 'open_api_sdk/models/shared/customersubscriptionupdate.rb' + autoload :CustomerSubscriptionUpdateProduct, 'open_api_sdk/models/shared/customersubscriptionupdateproduct.rb' + autoload :CustomerSubscriptionPrices, 'open_api_sdk/models/shared/customersubscription_prices.rb' + autoload :CustomerUpdate, 'open_api_sdk/models/shared/customerupdate.rb' + autoload :CustomerUpdateExternalID, 'open_api_sdk/models/shared/customerupdateexternalid.rb' + autoload :CustomerUpdateExternalIDMetadata, 'open_api_sdk/models/shared/customerupdateexternalid_metadata.rb' + autoload :CustomerUpdateExternalIDTaxID, 'open_api_sdk/models/shared/customerupdateexternalid_tax_id.rb' + autoload :CustomerUpdateMetadata, 'open_api_sdk/models/shared/customerupdate_metadata.rb' + autoload :CustomerUpdateTaxId, 'open_api_sdk/models/shared/customerupdate_tax_id.rb' + autoload :CustomerMetadata1, 'open_api_sdk/models/shared/customer_metadata1.rb' + autoload :CustomerTaxId, 'open_api_sdk/models/shared/customer_tax_id.rb' + autoload :Discount, 'open_api_sdk/models/shared/discount.rb' + autoload :DiscountCreate, 'open_api_sdk/models/shared/discountcreate.rb' + autoload :DiscountDuration, 'open_api_sdk/models/shared/discountduration.rb' + autoload :DiscountFixedOnceForeverDuration, 'open_api_sdk/models/shared/discountfixedonceforeverduration.rb' + autoload :DiscountFixedOnceForeverDurationBase, 'open_api_sdk/models/shared/discountfixedonceforeverdurationbase.rb' + autoload :DiscountFixedOnceForeverDurationBaseMetadata, 'open_api_sdk/models/shared/discountfixedonceforeverdurationbase_metadata.rb' + autoload :DiscountFixedOnceForeverDurationCreate, 'open_api_sdk/models/shared/discountfixedonceforeverdurationcreate.rb' + autoload :DiscountFixedOnceForeverDurationCreateMetadata, 'open_api_sdk/models/shared/discountfixedonceforeverdurationcreate_metadata.rb' + autoload :DiscountFixedOnceForeverDurationMetadata, 'open_api_sdk/models/shared/discountfixedonceforeverduration_metadata.rb' + autoload :DiscountFixedRepeatDuration, 'open_api_sdk/models/shared/discountfixedrepeatduration.rb' + autoload :DiscountFixedRepeatDurationBase, 'open_api_sdk/models/shared/discountfixedrepeatdurationbase.rb' + autoload :DiscountFixedRepeatDurationBaseMetadata, 'open_api_sdk/models/shared/discountfixedrepeatdurationbase_metadata.rb' + autoload :DiscountFixedRepeatDurationCreate, 'open_api_sdk/models/shared/discountfixedrepeatdurationcreate.rb' + autoload :DiscountFixedRepeatDurationCreateMetadata, 'open_api_sdk/models/shared/discountfixedrepeatdurationcreate_metadata.rb' + autoload :DiscountFixedRepeatDurationMetadata, 'open_api_sdk/models/shared/discountfixedrepeatduration_metadata.rb' + autoload :DiscountPercentageOnceForeverDuration, 'open_api_sdk/models/shared/discountpercentageonceforeverduration.rb' + autoload :DiscountPercentageOnceForeverDurationBase, 'open_api_sdk/models/shared/discountpercentageonceforeverdurationbase.rb' + autoload :DiscountPercentageOnceForeverDurationBaseMetadata, 'open_api_sdk/models/shared/discountpercentageonceforeverdurationbase_metadata.rb' + autoload :DiscountPercentageOnceForeverDurationCreate, 'open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate.rb' + autoload :DiscountPercentageOnceForeverDurationCreateMetadata, 'open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate_metadata.rb' + autoload :DiscountPercentageOnceForeverDurationMetadata, 'open_api_sdk/models/shared/discountpercentageonceforeverduration_metadata.rb' + autoload :DiscountPercentageRepeatDuration, 'open_api_sdk/models/shared/discountpercentagerepeatduration.rb' + autoload :DiscountPercentageRepeatDurationBase, 'open_api_sdk/models/shared/discountpercentagerepeatdurationbase.rb' + autoload :DiscountPercentageRepeatDurationBaseMetadata, 'open_api_sdk/models/shared/discountpercentagerepeatdurationbase_metadata.rb' + autoload :DiscountPercentageRepeatDurationCreate, 'open_api_sdk/models/shared/discountpercentagerepeatdurationcreate.rb' + autoload :DiscountPercentageRepeatDurationCreateMetadata, 'open_api_sdk/models/shared/discountpercentagerepeatdurationcreate_metadata.rb' + autoload :DiscountPercentageRepeatDurationMetadata, 'open_api_sdk/models/shared/discountpercentagerepeatduration_metadata.rb' + autoload :DiscountProduct, 'open_api_sdk/models/shared/discountproduct.rb' + autoload :DiscountProductMetadata, 'open_api_sdk/models/shared/discountproduct_metadata.rb' + autoload :DiscountSortProperty, 'open_api_sdk/models/shared/discountsortproperty.rb' + autoload :DiscountType, 'open_api_sdk/models/shared/discounttype.rb' + autoload :DiscountUpdate, 'open_api_sdk/models/shared/discountupdate.rb' + autoload :DiscountUpdateMetadata, 'open_api_sdk/models/shared/discountupdate_metadata.rb' + autoload :DownloadableFileCreate, 'open_api_sdk/models/shared/downloadablefilecreate.rb' + autoload :DownloadableFileRead, 'open_api_sdk/models/shared/downloadablefileread.rb' + autoload :DownloadableRead, 'open_api_sdk/models/shared/downloadableread.rb' + autoload :Event, 'open_api_sdk/models/shared/event.rb' + autoload :EventCreateCustomer, 'open_api_sdk/models/shared/eventcreatecustomer.rb' + autoload :EventCreateCustomerMetadata, 'open_api_sdk/models/shared/eventcreatecustomer_metadata.rb' + autoload :EventCreateExternalCustomer, 'open_api_sdk/models/shared/eventcreateexternalcustomer.rb' + autoload :EventCreateExternalCustomerMetadata, 'open_api_sdk/models/shared/eventcreateexternalcustomer_metadata.rb' + autoload :EventName, 'open_api_sdk/models/shared/eventname.rb' + autoload :EventNamesSortProperty, 'open_api_sdk/models/shared/eventnamessortproperty.rb' + autoload :EventSortProperty, 'open_api_sdk/models/shared/eventsortproperty.rb' + autoload :EventSource, 'open_api_sdk/models/shared/eventsource.rb' + autoload :EventMetadata, 'open_api_sdk/models/shared/event_metadata.rb' + autoload :EventsIngest, 'open_api_sdk/models/shared/eventsingest.rb' + autoload :EventsIngestResponse, 'open_api_sdk/models/shared/eventsingestresponse.rb' + autoload :ExistingProductPrice, 'open_api_sdk/models/shared/existingproductprice.rb' + autoload :FileCreate, 'open_api_sdk/models/shared/filecreate.rb' + autoload :FileDownload, 'open_api_sdk/models/shared/filedownload.rb' + autoload :FilePatch, 'open_api_sdk/models/shared/filepatch.rb' + autoload :FileRead, 'open_api_sdk/models/shared/fileread.rb' + autoload :FileServiceTypes, 'open_api_sdk/models/shared/fileservicetypes.rb' + autoload :FileUpload, 'open_api_sdk/models/shared/fileupload.rb' + autoload :FileUploadCompleted, 'open_api_sdk/models/shared/fileuploadcompleted.rb' + autoload :Filter, 'open_api_sdk/models/shared/filter.rb' + autoload :FilterClause, 'open_api_sdk/models/shared/filterclause.rb' + autoload :FilterConjunction, 'open_api_sdk/models/shared/filterconjunction.rb' + autoload :FilterOperator, 'open_api_sdk/models/shared/filteroperator.rb' + autoload :Func, 'open_api_sdk/models/shared/func.rb' + autoload :IntrospectTokenRequest, 'open_api_sdk/models/shared/introspecttokenrequest.rb' + autoload :IntrospectTokenRequestTokenTypeHint, 'open_api_sdk/models/shared/introspecttokenrequest_token_type_hint.rb' + autoload :IntrospectTokenResponse, 'open_api_sdk/models/shared/introspecttokenresponse.rb' + autoload :LegacyRecurringProductPrice, 'open_api_sdk/models/shared/legacyrecurringproductprice.rb' + autoload :LegacyRecurringProductPriceCustom, 'open_api_sdk/models/shared/legacyrecurringproductpricecustom.rb' + autoload :LegacyRecurringProductPriceFixed, 'open_api_sdk/models/shared/legacyrecurringproductpricefixed.rb' + autoload :LegacyRecurringProductPriceFree, 'open_api_sdk/models/shared/legacyrecurringproductpricefree.rb' + autoload :LicenseKeyActivate, 'open_api_sdk/models/shared/licensekeyactivate.rb' + autoload :LicenseKeyActivateConditions, 'open_api_sdk/models/shared/licensekeyactivate_conditions.rb' + autoload :LicenseKeyActivateMeta, 'open_api_sdk/models/shared/licensekeyactivate_meta.rb' + autoload :LicenseKeyActivationBase, 'open_api_sdk/models/shared/licensekeyactivationbase.rb' + autoload :LicenseKeyActivationRead, 'open_api_sdk/models/shared/licensekeyactivationread.rb' + autoload :LicenseKeyActivationReadMeta, 'open_api_sdk/models/shared/licensekeyactivationread_meta.rb' + autoload :LicenseKeyCustomer, 'open_api_sdk/models/shared/licensekeycustomer.rb' + autoload :LicenseKeyCustomerMetadata, 'open_api_sdk/models/shared/licensekeycustomer_metadata.rb' + autoload :LicenseKeyCustomerTaxId, 'open_api_sdk/models/shared/licensekeycustomer_tax_id.rb' + autoload :LicenseKeyDeactivate, 'open_api_sdk/models/shared/licensekeydeactivate.rb' + autoload :LicenseKeyRead, 'open_api_sdk/models/shared/licensekeyread.rb' + autoload :LicenseKeyStatus, 'open_api_sdk/models/shared/licensekeystatus.rb' + autoload :LicenseKeyUpdate, 'open_api_sdk/models/shared/licensekeyupdate.rb' + autoload :LicenseKeyValidate, 'open_api_sdk/models/shared/licensekeyvalidate.rb' + autoload :LicenseKeyWithActivations, 'open_api_sdk/models/shared/licensekeywithactivations.rb' + autoload :ListResourceBenefitGrant, 'open_api_sdk/models/shared/listresource_benefitgrant_.rb' + autoload :ListResourceBenefit, 'open_api_sdk/models/shared/listresource_benefit_.rb' + autoload :ListResourceCheckoutLink, 'open_api_sdk/models/shared/listresource_checkoutlink_.rb' + autoload :ListResourceCheckout, 'open_api_sdk/models/shared/listresource_checkout_.rb' + autoload :ListResourceCustomField, 'open_api_sdk/models/shared/listresource_customfield_.rb' + autoload :ListResourceCustomerBenefitGrant, 'open_api_sdk/models/shared/listresource_customerbenefitgrant_.rb' + autoload :ListResourceCustomerCustomerMeter, 'open_api_sdk/models/shared/listresource_customercustomermeter_.rb' + autoload :ListResourceCustomerMeter, 'open_api_sdk/models/shared/listresource_customermeter_.rb' + autoload :ListResourceCustomerOrder, 'open_api_sdk/models/shared/listresource_customerorder_.rb' + autoload :ListResourceCustomerSubscription, 'open_api_sdk/models/shared/listresource_customersubscription_.rb' + autoload :ListResourceCustomer, 'open_api_sdk/models/shared/listresource_customer_.rb' + autoload :ListResourceDiscount, 'open_api_sdk/models/shared/listresource_discount_.rb' + autoload :ListResourceDownloadableRead, 'open_api_sdk/models/shared/listresource_downloadableread_.rb' + autoload :ListResourceEventName, 'open_api_sdk/models/shared/listresource_eventname_.rb' + autoload :ListResourceEvent, 'open_api_sdk/models/shared/listresource_event_.rb' + autoload :ListResourceFileRead, 'open_api_sdk/models/shared/listresource_fileread_.rb' + autoload :ListResourceLicenseKeyRead, 'open_api_sdk/models/shared/listresource_licensekeyread_.rb' + autoload :ListResourceMeter, 'open_api_sdk/models/shared/listresource_meter_.rb' + autoload :ListResourceOAuth2Client, 'open_api_sdk/models/shared/listresource_oauth2client_.rb' + autoload :ListResourceOrder, 'open_api_sdk/models/shared/listresource_order_.rb' + autoload :ListResourceOrganization, 'open_api_sdk/models/shared/listresource_organization_.rb' + autoload :ListResourceProduct, 'open_api_sdk/models/shared/listresource_product_.rb' + autoload :ListResourceRefund, 'open_api_sdk/models/shared/listresource_refund_.rb' + autoload :ListResourceSubscription, 'open_api_sdk/models/shared/listresource_subscription_.rb' + autoload :ListResourceUnionPaymentMethodCardPaymentMethodGeneric, 'open_api_sdk/models/shared/listresource_union_paymentmethodcard_paymentmethodgeneric_.rb' + autoload :MetadataQuery, 'open_api_sdk/models/shared/metadataquery.rb' + autoload :Meter, 'open_api_sdk/models/shared/meter.rb' + autoload :MeterCreate, 'open_api_sdk/models/shared/metercreate.rb' + autoload :MeterCreateAggregation, 'open_api_sdk/models/shared/metercreate_aggregation.rb' + autoload :MeterCreateMetadata, 'open_api_sdk/models/shared/metercreate_metadata.rb' + autoload :MeterQuantities, 'open_api_sdk/models/shared/meterquantities.rb' + autoload :MeterQuantity, 'open_api_sdk/models/shared/meterquantity.rb' + autoload :MeterSortProperty, 'open_api_sdk/models/shared/metersortproperty.rb' + autoload :MeterUpdate, 'open_api_sdk/models/shared/meterupdate.rb' + autoload :MeterUpdateMetadata, 'open_api_sdk/models/shared/meterupdate_metadata.rb' + autoload :MeterAggregation, 'open_api_sdk/models/shared/meter_aggregation.rb' + autoload :MeterMetadata, 'open_api_sdk/models/shared/meter_metadata.rb' + autoload :Metric, 'open_api_sdk/models/shared/metric.rb' + autoload :MetricPeriod, 'open_api_sdk/models/shared/metricperiod.rb' + autoload :MetricType, 'open_api_sdk/models/shared/metrictype.rb' + autoload :Metrics, 'open_api_sdk/models/shared/metrics.rb' + autoload :MetricsIntervalLimit, 'open_api_sdk/models/shared/metricsintervallimit.rb' + autoload :MetricsIntervalsLimits, 'open_api_sdk/models/shared/metricsintervalslimits.rb' + autoload :MetricsLimits, 'open_api_sdk/models/shared/metricslimits.rb' + autoload :MetricsResponse, 'open_api_sdk/models/shared/metricsresponse.rb' + autoload :OAuth2Client, 'open_api_sdk/models/shared/oauth2client.rb' + autoload :OAuth2ClientConfiguration, 'open_api_sdk/models/shared/oauth2clientconfiguration.rb' + autoload :OAuth2ClientConfigurationUpdate, 'open_api_sdk/models/shared/oauth2clientconfigurationupdate.rb' + autoload :OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod, 'open_api_sdk/models/shared/oauth2clientconfigurationupdate_token_endpoint_auth_method.rb' + autoload :OAuth2ClientConfigurationUpdateGrantTypes, 'open_api_sdk/models/shared/oauth2clientconfigurationupdate_grant_types.rb' + autoload :OAuth2ClientConfigurationTokenEndpointAuthMethod, 'open_api_sdk/models/shared/oauth2clientconfiguration_token_endpoint_auth_method.rb' + autoload :OAuth2ClientConfigurationGrantTypes, 'open_api_sdk/models/shared/oauth2clientconfiguration_grant_types.rb' + autoload :OAuth2ClientPublic, 'open_api_sdk/models/shared/oauth2clientpublic.rb' + autoload :Order, 'open_api_sdk/models/shared/order.rb' + autoload :OrderBillingReason, 'open_api_sdk/models/shared/orderbillingreason.rb' + autoload :OrderCustomer, 'open_api_sdk/models/shared/ordercustomer.rb' + autoload :OrderCustomerMetadata, 'open_api_sdk/models/shared/ordercustomer_metadata.rb' + autoload :OrderCustomerTaxId, 'open_api_sdk/models/shared/ordercustomer_tax_id.rb' + autoload :OrderDiscount, 'open_api_sdk/models/shared/orderdiscount.rb' + autoload :OrderInvoice, 'open_api_sdk/models/shared/orderinvoice.rb' + autoload :OrderItemSchema, 'open_api_sdk/models/shared/orderitemschema.rb' + autoload :OrderProduct, 'open_api_sdk/models/shared/orderproduct.rb' + autoload :OrderProductMetadata, 'open_api_sdk/models/shared/orderproduct_metadata.rb' + autoload :OrderSortProperty, 'open_api_sdk/models/shared/ordersortproperty.rb' + autoload :OrderStatus, 'open_api_sdk/models/shared/orderstatus.rb' + autoload :OrderSubscription, 'open_api_sdk/models/shared/ordersubscription.rb' + autoload :OrderSubscriptionMetadata, 'open_api_sdk/models/shared/ordersubscription_metadata.rb' + autoload :OrderCustomFieldData, 'open_api_sdk/models/shared/order_custom_field_data.rb' + autoload :OrderMetadata, 'open_api_sdk/models/shared/order_metadata.rb' + autoload :Organization, 'open_api_sdk/models/shared/organization.rb' + autoload :OrganizationAvatarFileCreate, 'open_api_sdk/models/shared/organizationavatarfilecreate.rb' + autoload :OrganizationAvatarFileRead, 'open_api_sdk/models/shared/organizationavatarfileread.rb' + autoload :OrganizationCreate, 'open_api_sdk/models/shared/organizationcreate.rb' + autoload :OrganizationDetails, 'open_api_sdk/models/shared/organizationdetails.rb' + autoload :OrganizationFeatureSettings, 'open_api_sdk/models/shared/organizationfeaturesettings.rb' + autoload :OrganizationSocialLink, 'open_api_sdk/models/shared/organizationsociallink.rb' + autoload :OrganizationSocialPlatforms, 'open_api_sdk/models/shared/organizationsocialplatforms.rb' + autoload :OrganizationSortProperty, 'open_api_sdk/models/shared/organizationsortproperty.rb' + autoload :OrganizationSubscriptionSettings, 'open_api_sdk/models/shared/organizationsubscriptionsettings.rb' + autoload :OrganizationUpdate, 'open_api_sdk/models/shared/organizationupdate.rb' + autoload :Pagination, 'open_api_sdk/models/shared/pagination.rb' + autoload :PaymentMethodCard, 'open_api_sdk/models/shared/paymentmethodcard.rb' + autoload :PaymentMethodCardData, 'open_api_sdk/models/shared/paymentmethodcarddata.rb' + autoload :PaymentMethodGeneric, 'open_api_sdk/models/shared/paymentmethodgeneric.rb' + autoload :PaymentProcessor, 'open_api_sdk/models/shared/paymentprocessor.rb' + autoload :Permission, 'open_api_sdk/models/shared/permission.rb' + autoload :PreviousProperties, 'open_api_sdk/models/shared/previous_properties.rb' + autoload :Product, 'open_api_sdk/models/shared/product.rb' + autoload :ProductBenefitsUpdate, 'open_api_sdk/models/shared/productbenefitsupdate.rb' + autoload :ProductBillingType, 'open_api_sdk/models/shared/productbillingtype.rb' + autoload :ProductCreate, 'open_api_sdk/models/shared/productcreate.rb' + autoload :ProductCreateMetadata, 'open_api_sdk/models/shared/productcreate_metadata.rb' + autoload :ProductCreatePrices, 'open_api_sdk/models/shared/productcreate_prices.rb' + autoload :ProductMediaFileCreate, 'open_api_sdk/models/shared/productmediafilecreate.rb' + autoload :ProductMediaFileRead, 'open_api_sdk/models/shared/productmediafileread.rb' + autoload :ProductPrice, 'open_api_sdk/models/shared/productprice.rb' + autoload :ProductPriceCustom, 'open_api_sdk/models/shared/productpricecustom.rb' + autoload :ProductPriceCustomCreate, 'open_api_sdk/models/shared/productpricecustomcreate.rb' + autoload :ProductPriceFixed, 'open_api_sdk/models/shared/productpricefixed.rb' + autoload :ProductPriceFixedCreate, 'open_api_sdk/models/shared/productpricefixedcreate.rb' + autoload :ProductPriceFree, 'open_api_sdk/models/shared/productpricefree.rb' + autoload :ProductPriceFreeCreate, 'open_api_sdk/models/shared/productpricefreecreate.rb' + autoload :ProductPriceMeter, 'open_api_sdk/models/shared/productpricemeter.rb' + autoload :ProductPriceMeteredUnit, 'open_api_sdk/models/shared/productpricemeteredunit.rb' + autoload :ProductPriceMeteredUnitCreate, 'open_api_sdk/models/shared/productpricemeteredunitcreate.rb' + autoload :ProductPriceType, 'open_api_sdk/models/shared/productpricetype.rb' + autoload :ProductSortProperty, 'open_api_sdk/models/shared/productsortproperty.rb' + autoload :ProductUpdate, 'open_api_sdk/models/shared/productupdate.rb' + autoload :ProductUpdateMetadata, 'open_api_sdk/models/shared/productupdate_metadata.rb' + autoload :ProductUpdatePrices, 'open_api_sdk/models/shared/productupdate_prices.rb' + autoload :ProductMetadata, 'open_api_sdk/models/shared/product_metadata.rb' + autoload :Properties, 'open_api_sdk/models/shared/properties.rb' + autoload :PropertyAggregation, 'open_api_sdk/models/shared/propertyaggregation.rb' + autoload :RefreshTokenRequest, 'open_api_sdk/models/shared/refreshtokenrequest.rb' + autoload :Refund, 'open_api_sdk/models/shared/refund.rb' + autoload :RefundCreate, 'open_api_sdk/models/shared/refundcreate.rb' + autoload :RefundCreateMetadata, 'open_api_sdk/models/shared/refundcreate_metadata.rb' + autoload :RefundReason, 'open_api_sdk/models/shared/refundreason.rb' + autoload :RefundSortProperty, 'open_api_sdk/models/shared/refundsortproperty.rb' + autoload :RefundStatus, 'open_api_sdk/models/shared/refundstatus.rb' + autoload :RefundMetadata, 'open_api_sdk/models/shared/refund_metadata.rb' + autoload :RevokeTokenRequest, 'open_api_sdk/models/shared/revoketokenrequest.rb' + autoload :RevokeTokenResponse, 'open_api_sdk/models/shared/revoketokenresponse.rb' + autoload :S3DownloadURL, 'open_api_sdk/models/shared/s3downloadurl.rb' + autoload :S3FileCreateMultipart, 'open_api_sdk/models/shared/s3filecreatemultipart.rb' + autoload :S3FileCreatePart, 'open_api_sdk/models/shared/s3filecreatepart.rb' + autoload :S3FileUploadCompletedPart, 'open_api_sdk/models/shared/s3fileuploadcompletedpart.rb' + autoload :S3FileUploadMultipart, 'open_api_sdk/models/shared/s3fileuploadmultipart.rb' + autoload :S3FileUploadPart, 'open_api_sdk/models/shared/s3fileuploadpart.rb' + autoload :Scope, 'open_api_sdk/models/shared/scope.rb' + autoload :Security, 'open_api_sdk/models/shared/security.rb' + autoload :SubType, 'open_api_sdk/models/shared/subtype.rb' + autoload :Subscription, 'open_api_sdk/models/shared/subscription.rb' + autoload :SubscriptionCancel, 'open_api_sdk/models/shared/subscriptioncancel.rb' + autoload :SubscriptionCustomer, 'open_api_sdk/models/shared/subscriptioncustomer.rb' + autoload :SubscriptionCustomerMetadata, 'open_api_sdk/models/shared/subscriptioncustomer_metadata.rb' + autoload :SubscriptionDiscount, 'open_api_sdk/models/shared/subscriptiondiscount.rb' + autoload :SubscriptionMeter, 'open_api_sdk/models/shared/subscriptionmeter.rb' + autoload :SubscriptionProrationBehavior, 'open_api_sdk/models/shared/subscriptionprorationbehavior.rb' + autoload :SubscriptionRecurringInterval, 'open_api_sdk/models/shared/subscriptionrecurringinterval.rb' + autoload :SubscriptionRevoke, 'open_api_sdk/models/shared/subscriptionrevoke.rb' + autoload :SubscriptionSortProperty, 'open_api_sdk/models/shared/subscriptionsortproperty.rb' + autoload :SubscriptionStatus, 'open_api_sdk/models/shared/subscriptionstatus.rb' + autoload :SubscriptionUpdate, 'open_api_sdk/models/shared/subscriptionupdate.rb' + autoload :SubscriptionUpdateProduct, 'open_api_sdk/models/shared/subscriptionupdateproduct.rb' + autoload :SubscriptionPrices, 'open_api_sdk/models/shared/subscription_prices.rb' + autoload :TaxIDFormat, 'open_api_sdk/models/shared/taxidformat.rb' + autoload :TimeInterval, 'open_api_sdk/models/shared/timeinterval.rb' + autoload :Timeframe, 'open_api_sdk/models/shared/timeframe.rb' + autoload :TokenEndpointAuthMethod, 'open_api_sdk/models/shared/token_endpoint_auth_method.rb' + autoload :TokenType, 'open_api_sdk/models/shared/token_type.rb' + autoload :TokenResponse, 'open_api_sdk/models/shared/tokenresponse.rb' + autoload :UnitAmount, 'open_api_sdk/models/shared/unit_amount.rb' + autoload :UserInfoOrganization, 'open_api_sdk/models/shared/userinfoorganization.rb' + autoload :UserInfoUser, 'open_api_sdk/models/shared/userinfouser.rb' + autoload :ValidatedLicenseKey, 'open_api_sdk/models/shared/validatedlicensekey.rb' + autoload :ValidationError, 'open_api_sdk/models/shared/validationerror.rb' + autoload :Value, 'open_api_sdk/models/shared/value.rb' + autoload :WebhookBenefitCreatedPayload, 'open_api_sdk/models/shared/webhookbenefitcreatedpayload.rb' + autoload :WebhookBenefitGrantCreatedPayload, 'open_api_sdk/models/shared/webhookbenefitgrantcreatedpayload.rb' + autoload :WebhookBenefitGrantCycledPayload, 'open_api_sdk/models/shared/webhookbenefitgrantcycledpayload.rb' + autoload :WebhookBenefitGrantRevokedPayload, 'open_api_sdk/models/shared/webhookbenefitgrantrevokedpayload.rb' + autoload :WebhookBenefitGrantUpdatedPayload, 'open_api_sdk/models/shared/webhookbenefitgrantupdatedpayload.rb' + autoload :WebhookBenefitUpdatedPayload, 'open_api_sdk/models/shared/webhookbenefitupdatedpayload.rb' + autoload :WebhookCheckoutCreatedPayload, 'open_api_sdk/models/shared/webhookcheckoutcreatedpayload.rb' + autoload :WebhookCheckoutUpdatedPayload, 'open_api_sdk/models/shared/webhookcheckoutupdatedpayload.rb' + autoload :WebhookCustomerCreatedPayload, 'open_api_sdk/models/shared/webhookcustomercreatedpayload.rb' + autoload :WebhookCustomerDeletedPayload, 'open_api_sdk/models/shared/webhookcustomerdeletedpayload.rb' + autoload :WebhookCustomerStateChangedPayload, 'open_api_sdk/models/shared/webhookcustomerstatechangedpayload.rb' + autoload :WebhookCustomerUpdatedPayload, 'open_api_sdk/models/shared/webhookcustomerupdatedpayload.rb' + autoload :WebhookOrderCreatedPayload, 'open_api_sdk/models/shared/webhookordercreatedpayload.rb' + autoload :WebhookOrderPaidPayload, 'open_api_sdk/models/shared/webhookorderpaidpayload.rb' + autoload :WebhookOrderRefundedPayload, 'open_api_sdk/models/shared/webhookorderrefundedpayload.rb' + autoload :WebhookOrderUpdatedPayload, 'open_api_sdk/models/shared/webhookorderupdatedpayload.rb' + autoload :WebhookOrganizationUpdatedPayload, 'open_api_sdk/models/shared/webhookorganizationupdatedpayload.rb' + autoload :WebhookProductCreatedPayload, 'open_api_sdk/models/shared/webhookproductcreatedpayload.rb' + autoload :WebhookProductUpdatedPayload, 'open_api_sdk/models/shared/webhookproductupdatedpayload.rb' + autoload :WebhookRefundCreatedPayload, 'open_api_sdk/models/shared/webhookrefundcreatedpayload.rb' + autoload :WebhookRefundUpdatedPayload, 'open_api_sdk/models/shared/webhookrefundupdatedpayload.rb' + autoload :WebhookSubscriptionActivePayload, 'open_api_sdk/models/shared/webhooksubscriptionactivepayload.rb' + autoload :WebhookSubscriptionCanceledPayload, 'open_api_sdk/models/shared/webhooksubscriptioncanceledpayload.rb' + autoload :WebhookSubscriptionCreatedPayload, 'open_api_sdk/models/shared/webhooksubscriptioncreatedpayload.rb' + autoload :WebhookSubscriptionRevokedPayload, 'open_api_sdk/models/shared/webhooksubscriptionrevokedpayload.rb' + autoload :WebhookSubscriptionUncanceledPayload, 'open_api_sdk/models/shared/webhooksubscriptionuncanceledpayload.rb' + autoload :WebhookSubscriptionUpdatedPayload, 'open_api_sdk/models/shared/webhooksubscriptionupdatedpayload.rb' + autoload :EndpointbenefitCreatedPostResponse, 'open_api_sdk/models/shared/_endpointbenefit_created_post_response.rb' + autoload :EndpointbenefitGrantCreatedPostResponse, 'open_api_sdk/models/shared/_endpointbenefit_grant_created_post_response.rb' + autoload :EndpointbenefitGrantCycledPostResponse, 'open_api_sdk/models/shared/_endpointbenefit_grant_cycled_post_response.rb' + autoload :EndpointbenefitGrantRevokedPostResponse, 'open_api_sdk/models/shared/_endpointbenefit_grant_revoked_post_response.rb' + autoload :EndpointbenefitGrantUpdatedPostResponse, 'open_api_sdk/models/shared/_endpointbenefit_grant_updated_post_response.rb' + autoload :EndpointbenefitUpdatedPostResponse, 'open_api_sdk/models/shared/_endpointbenefit_updated_post_response.rb' + autoload :EndpointcheckoutCreatedPostResponse, 'open_api_sdk/models/shared/_endpointcheckout_created_post_response.rb' + autoload :EndpointcheckoutUpdatedPostResponse, 'open_api_sdk/models/shared/_endpointcheckout_updated_post_response.rb' + autoload :EndpointcustomerCreatedPostResponse, 'open_api_sdk/models/shared/_endpointcustomer_created_post_response.rb' + autoload :EndpointcustomerDeletedPostResponse, 'open_api_sdk/models/shared/_endpointcustomer_deleted_post_response.rb' + autoload :EndpointcustomerStateChangedPostResponse, 'open_api_sdk/models/shared/_endpointcustomer_state_changed_post_response.rb' + autoload :EndpointcustomerUpdatedPostResponse, 'open_api_sdk/models/shared/_endpointcustomer_updated_post_response.rb' + autoload :EndpointorderCreatedPostResponse, 'open_api_sdk/models/shared/_endpointorder_created_post_response.rb' + autoload :EndpointorderPaidPostResponse, 'open_api_sdk/models/shared/_endpointorder_paid_post_response.rb' + autoload :EndpointorderRefundedPostResponse, 'open_api_sdk/models/shared/_endpointorder_refunded_post_response.rb' + autoload :EndpointorderUpdatedPostResponse, 'open_api_sdk/models/shared/_endpointorder_updated_post_response.rb' + autoload :EndpointorganizationUpdatedPostResponse, 'open_api_sdk/models/shared/_endpointorganization_updated_post_response.rb' + autoload :EndpointproductCreatedPostResponse, 'open_api_sdk/models/shared/_endpointproduct_created_post_response.rb' + autoload :EndpointproductUpdatedPostResponse, 'open_api_sdk/models/shared/_endpointproduct_updated_post_response.rb' + autoload :EndpointrefundCreatedPostResponse, 'open_api_sdk/models/shared/_endpointrefund_created_post_response.rb' + autoload :EndpointrefundUpdatedPostResponse, 'open_api_sdk/models/shared/_endpointrefund_updated_post_response.rb' + autoload :EndpointsubscriptionActivePostResponse, 'open_api_sdk/models/shared/_endpointsubscription_active_post_response.rb' + autoload :EndpointsubscriptionCanceledPostResponse, 'open_api_sdk/models/shared/_endpointsubscription_canceled_post_response.rb' + autoload :EndpointsubscriptionCreatedPostResponse, 'open_api_sdk/models/shared/_endpointsubscription_created_post_response.rb' + autoload :EndpointsubscriptionRevokedPostResponse, 'open_api_sdk/models/shared/_endpointsubscription_revoked_post_response.rb' + autoload :EndpointsubscriptionUncanceledPostResponse, 'open_api_sdk/models/shared/_endpointsubscription_uncanceled_post_response.rb' + autoload :EndpointsubscriptionUpdatedPostResponse, 'open_api_sdk/models/shared/_endpointsubscription_updated_post_response.rb' + autoload :Aggregation, 'open_api_sdk/models/shared/aggregation.rb' + autoload :Clauses, 'open_api_sdk/models/shared/clauses.rb' + autoload :Conditions, 'open_api_sdk/models/shared/conditions.rb' + autoload :CustomFieldData, 'open_api_sdk/models/shared/custom_field_data.rb' + autoload :CustomerMetadata, 'open_api_sdk/models/shared/customer_metadata.rb' + autoload :Events, 'open_api_sdk/models/shared/events.rb' + autoload :GrantTypes, 'open_api_sdk/models/shared/grant_types.rb' + autoload :Items, 'open_api_sdk/models/shared/items.rb' + autoload :Loc, 'open_api_sdk/models/shared/loc.rb' + autoload :Meta, 'open_api_sdk/models/shared/meta.rb' + autoload :Metadata, 'open_api_sdk/models/shared/metadata.rb' + autoload :Prices, 'open_api_sdk/models/shared/prices.rb' + autoload :SwitchingFrom, 'open_api_sdk/models/shared/switching_from.rb' + autoload :TaxId, 'open_api_sdk/models/shared/tax_id.rb' + autoload :TokenTypeHint, 'open_api_sdk/models/shared/token_type_hint.rb' + end + end +end diff --git a/lib/open_api_sdk/models/shared/address.rb b/lib/open_api_sdk/models/shared/address.rb new file mode 100644 index 0000000..4807bc0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/address.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Address + extend T::Sig + include Crystalline::MetadataFields + + + field :country, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('country') } } + + field :city, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('city') } } + + field :line1, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('line1') } } + + field :line2, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('line2') } } + + field :postal_code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('postal_code') } } + + field :state, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('state') } } + + + sig { params(country: ::String, city: T.nilable(::String), line1: T.nilable(::String), line2: T.nilable(::String), postal_code: T.nilable(::String), state: T.nilable(::String)).void } + def initialize(country: nil, city: nil, line1: nil, line2: nil, postal_code: nil, state: nil) + @country = country + @city = city + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @country == other.country + return false unless @city == other.city + return false unless @line1 == other.line1 + return false unless @line2 == other.line2 + return false unless @postal_code == other.postal_code + return false unless @state == other.state + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/aggregation.rb b/lib/open_api_sdk/models/shared/aggregation.rb new file mode 100644 index 0000000..c2e86ab --- /dev/null +++ b/lib/open_api_sdk/models/shared/aggregation.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Aggregation + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/attachedcustomfield.rb b/lib/open_api_sdk/models/shared/attachedcustomfield.rb new file mode 100644 index 0000000..3d7b0a1 --- /dev/null +++ b/lib/open_api_sdk/models/shared/attachedcustomfield.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema of a custom field attached to a resource. + class AttachedCustomField + extend T::Sig + include Crystalline::MetadataFields + + + field :custom_field, T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('custom_field') }, 'discriminator': 'type' } + # ID of the custom field. + field :custom_field_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('custom_field_id') } } + # Order of the custom field in the resource. + field :order, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order') } } + # Whether the value is required for this custom field. + field :required, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('required') } } + + + sig { params(custom_field: T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect), custom_field_id: ::String, order: ::Integer, required: T::Boolean).void } + def initialize(custom_field: nil, custom_field_id: nil, order: nil, required: nil) + @custom_field = custom_field + @custom_field_id = custom_field_id + @order = order + @required = required + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @custom_field == other.custom_field + return false unless @custom_field_id == other.custom_field_id + return false unless @order == other.order + return false unless @required == other.required + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/attachedcustomfieldcreate.rb b/lib/open_api_sdk/models/shared/attachedcustomfieldcreate.rb new file mode 100644 index 0000000..2e6fb56 --- /dev/null +++ b/lib/open_api_sdk/models/shared/attachedcustomfieldcreate.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to attach a custom field to a resource. + class AttachedCustomFieldCreate + extend T::Sig + include Crystalline::MetadataFields + + # ID of the custom field to attach. + field :custom_field_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('custom_field_id') } } + # Whether the value is required for this custom field. + field :required, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('required') } } + + + sig { params(custom_field_id: ::String, required: T::Boolean).void } + def initialize(custom_field_id: nil, required: nil) + @custom_field_id = custom_field_id + @required = required + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @custom_field_id == other.custom_field_id + return false unless @required == other.required + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/authorizationcodetokenrequest.rb b/lib/open_api_sdk/models/shared/authorizationcodetokenrequest.rb new file mode 100644 index 0000000..f8bd459 --- /dev/null +++ b/lib/open_api_sdk/models/shared/authorizationcodetokenrequest.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class AuthorizationCodeTokenRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'form': { 'field_name': 'client_id' } } + + field :client_secret, ::String, { 'form': { 'field_name': 'client_secret' } } + + field :code, ::String, { 'form': { 'field_name': 'code' } } + + field :grant_type, ::String, { 'form': { 'field_name': 'grant_type' } } + + field :redirect_uri, ::String, { 'form': { 'field_name': 'redirect_uri' } } + + + sig { params(client_id: ::String, client_secret: ::String, code: ::String, grant_type: ::String, redirect_uri: ::String).void } + def initialize(client_id: nil, client_secret: nil, code: nil, grant_type: nil, redirect_uri: nil) + @client_id = client_id + @client_secret = client_secret + @code = code + @grant_type = grant_type + @redirect_uri = redirect_uri + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + return false unless @client_secret == other.client_secret + return false unless @code == other.code + return false unless @grant_type == other.grant_type + return false unless @redirect_uri == other.redirect_uri + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/authorizeorganization.rb b/lib/open_api_sdk/models/shared/authorizeorganization.rb new file mode 100644 index 0000000..e5010ad --- /dev/null +++ b/lib/open_api_sdk/models/shared/authorizeorganization.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class AuthorizeOrganization + extend T::Sig + include Crystalline::MetadataFields + + + field :avatar_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + + sig { params(avatar_url: ::String, id: ::String, slug: ::String).void } + def initialize(avatar_url: nil, id: nil, slug: nil) + @avatar_url = avatar_url + @id = id + @slug = slug + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @avatar_url == other.avatar_url + return false unless @id == other.id + return false unless @slug == other.slug + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/authorizeresponseorganization.rb b/lib/open_api_sdk/models/shared/authorizeresponseorganization.rb new file mode 100644 index 0000000..99392c1 --- /dev/null +++ b/lib/open_api_sdk/models/shared/authorizeresponseorganization.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class AuthorizeResponseOrganization + extend T::Sig + include Crystalline::MetadataFields + + + field :client, Models::Shared::OAuth2ClientPublic, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client') } } + + field :organizations, T::Array[Models::Shared::AuthorizeOrganization], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organizations') } } + + field :scopes, T::Array[Models::Shared::Scope], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('scopes') } } + + field :sub, Models::Shared::AuthorizeOrganization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sub') } } + + field :sub_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sub_type') } } + + + sig { params(client: Models::Shared::OAuth2ClientPublic, organizations: T::Array[Models::Shared::AuthorizeOrganization], scopes: T::Array[Models::Shared::Scope], sub: Models::Shared::AuthorizeOrganization, sub_type: ::String).void } + def initialize(client: nil, organizations: nil, scopes: nil, sub: nil, sub_type: nil) + @client = client + @organizations = organizations + @scopes = scopes + @sub = sub + @sub_type = sub_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client == other.client + return false unless @organizations == other.organizations + return false unless @scopes == other.scopes + return false unless @sub == other.sub + return false unless @sub_type == other.sub_type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/authorizeresponseuser.rb b/lib/open_api_sdk/models/shared/authorizeresponseuser.rb new file mode 100644 index 0000000..fb27b61 --- /dev/null +++ b/lib/open_api_sdk/models/shared/authorizeresponseuser.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class AuthorizeResponseUser + extend T::Sig + include Crystalline::MetadataFields + + + field :client, Models::Shared::OAuth2ClientPublic, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client') } } + + field :scopes, T::Array[Models::Shared::Scope], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('scopes') } } + + field :sub, Models::Shared::AuthorizeUser, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sub') } } + + field :sub_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sub_type') } } + + + sig { params(client: Models::Shared::OAuth2ClientPublic, scopes: T::Array[Models::Shared::Scope], sub: Models::Shared::AuthorizeUser, sub_type: ::String).void } + def initialize(client: nil, scopes: nil, sub: nil, sub_type: nil) + @client = client + @scopes = scopes + @sub = sub + @sub_type = sub_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client == other.client + return false unless @scopes == other.scopes + return false unless @sub == other.sub + return false unless @sub_type == other.sub_type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/authorizeuser.rb b/lib/open_api_sdk/models/shared/authorizeuser.rb new file mode 100644 index 0000000..324050b --- /dev/null +++ b/lib/open_api_sdk/models/shared/authorizeuser.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class AuthorizeUser + extend T::Sig + include Crystalline::MetadataFields + + + field :avatar_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + + sig { params(avatar_url: ::String, email: ::String, id: ::String).void } + def initialize(avatar_url: nil, email: nil, id: nil) + @avatar_url = avatar_url + @email = email + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @avatar_url == other.avatar_url + return false unless @email == other.email + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefit.rb b/lib/open_api_sdk/models/shared/benefit.rb new file mode 100644 index 0000000..3ea9c97 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefit.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Benefit + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcreate.rb b/lib/open_api_sdk/models/shared/benefitcreate.rb new file mode 100644 index 0000000..5329778 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcreate.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitCreate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustom.rb b/lib/open_api_sdk/models/shared/benefitcustom.rb new file mode 100644 index 0000000..41a2d37 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustom.rb @@ -0,0 +1,71 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A benefit of type `custom`. + # + # Use it to grant any kind of benefit that doesn't fit in the other types. + class BenefitCustom + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Properties for a benefit of type `custom`. + field :properties, Models::Shared::BenefitCustomProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization_id: ::String, properties: Models::Shared::BenefitCustomProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustom_metadata.rb b/lib/open_api_sdk/models/shared/benefitcustom_metadata.rb new file mode 100644 index 0000000..7122a54 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustom_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitCustomMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustomcreate.rb b/lib/open_api_sdk/models/shared/benefitcustomcreate.rb new file mode 100644 index 0000000..bed3f3e --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustomcreate.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a benefit of type `custom`. + class BenefitCustomCreate + extend T::Sig + include Crystalline::MetadataFields + + # The description of the benefit. Will be displayed on products having this benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Properties for creating a benefit of type `custom`. + field :properties, Models::Shared::BenefitCustomCreateProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the benefit. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(description: ::String, properties: Models::Shared::BenefitCustomCreateProperties, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(description: nil, properties: nil, type: nil, metadata: nil, organization_id: nil) + @description = description + @properties = properties + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @description == other.description + return false unless @properties == other.properties + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustomcreate_metadata.rb b/lib/open_api_sdk/models/shared/benefitcustomcreate_metadata.rb new file mode 100644 index 0000000..1332454 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustomcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitCustomCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustomcreateproperties.rb b/lib/open_api_sdk/models/shared/benefitcustomcreateproperties.rb new file mode 100644 index 0000000..c76f7b1 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustomcreateproperties.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties for creating a benefit of type `custom`. + class BenefitCustomCreateProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :note, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('note') } } + + + sig { params(note: T.nilable(::String)).void } + def initialize(note: nil) + @note = note + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @note == other.note + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustomproperties.rb b/lib/open_api_sdk/models/shared/benefitcustomproperties.rb new file mode 100644 index 0000000..0e2b58e --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustomproperties.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties for a benefit of type `custom`. + class BenefitCustomProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :note, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('note') } } + + + sig { params(note: ::String).void } + def initialize(note: nil) + @note = note + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @note == other.note + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustomsubscriber.rb b/lib/open_api_sdk/models/shared/benefitcustomsubscriber.rb new file mode 100644 index 0000000..f1c4144 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustomsubscriber.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitCustomSubscriber + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Properties available to subscribers for a benefit of type `custom`. + field :properties, Models::Shared::BenefitCustomSubscriberProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization: Models::Shared::Organization, organization_id: ::String, properties: Models::Shared::BenefitCustomSubscriberProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization = organization + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization == other.organization + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustomsubscriber_metadata.rb b/lib/open_api_sdk/models/shared/benefitcustomsubscriber_metadata.rb new file mode 100644 index 0000000..bc1b609 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustomsubscriber_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitCustomSubscriberMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustomsubscriberproperties.rb b/lib/open_api_sdk/models/shared/benefitcustomsubscriberproperties.rb new file mode 100644 index 0000000..603fb5e --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustomsubscriberproperties.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties available to subscribers for a benefit of type `custom`. + class BenefitCustomSubscriberProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :note, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('note') } } + + + sig { params(note: ::String).void } + def initialize(note: nil) + @note = note + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @note == other.note + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustomupdate.rb b/lib/open_api_sdk/models/shared/benefitcustomupdate.rb new file mode 100644 index 0000000..d537cd9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustomupdate.rb @@ -0,0 +1,55 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitCustomUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # The description of the benefit. Will be displayed on products having this benefit. + field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :properties, T.nilable(Models::Shared::BenefitCustomProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + + sig { params(type: ::String, description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), properties: T.nilable(Models::Shared::BenefitCustomProperties)).void } + def initialize(type: nil, description: nil, metadata: nil, properties: nil) + @type = type + @description = description + @metadata = metadata + @properties = properties + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @description == other.description + return false unless @metadata == other.metadata + return false unless @properties == other.properties + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitcustomupdate_metadata.rb b/lib/open_api_sdk/models/shared/benefitcustomupdate_metadata.rb new file mode 100644 index 0000000..ef54230 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitcustomupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitCustomUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscord.rb b/lib/open_api_sdk/models/shared/benefitdiscord.rb new file mode 100644 index 0000000..6570ca7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscord.rb @@ -0,0 +1,71 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A benefit of type `discord`. + # + # Use it to automatically invite your backers to a Discord server. + class BenefitDiscord + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Properties for a benefit of type `discord`. + field :properties, Models::Shared::BenefitDiscordProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization_id: ::String, properties: Models::Shared::BenefitDiscordProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscord_metadata.rb b/lib/open_api_sdk/models/shared/benefitdiscord_metadata.rb new file mode 100644 index 0000000..2707448 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscord_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDiscordMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscordcreate.rb b/lib/open_api_sdk/models/shared/benefitdiscordcreate.rb new file mode 100644 index 0000000..1ed3c23 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscordcreate.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDiscordCreate + extend T::Sig + include Crystalline::MetadataFields + + # The description of the benefit. Will be displayed on products having this benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Properties to create a benefit of type `discord`. + field :properties, Models::Shared::BenefitDiscordCreateProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the benefit. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(description: ::String, properties: Models::Shared::BenefitDiscordCreateProperties, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(description: nil, properties: nil, type: nil, metadata: nil, organization_id: nil) + @description = description + @properties = properties + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @description == other.description + return false unless @properties == other.properties + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscordcreate_metadata.rb b/lib/open_api_sdk/models/shared/benefitdiscordcreate_metadata.rb new file mode 100644 index 0000000..6123005 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscordcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDiscordCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscordcreateproperties.rb b/lib/open_api_sdk/models/shared/benefitdiscordcreateproperties.rb new file mode 100644 index 0000000..5f54fa4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscordcreateproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties to create a benefit of type `discord`. + class BenefitDiscordCreateProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :guild_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guild_token') } } + # The ID of the Discord role to grant. + field :role_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('role_id') } } + + + sig { params(guild_token: ::String, role_id: ::String).void } + def initialize(guild_token: nil, role_id: nil) + @guild_token = guild_token + @role_id = role_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @guild_token == other.guild_token + return false unless @role_id == other.role_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscordproperties.rb b/lib/open_api_sdk/models/shared/benefitdiscordproperties.rb new file mode 100644 index 0000000..ac40df1 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscordproperties.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties for a benefit of type `discord`. + class BenefitDiscordProperties + extend T::Sig + include Crystalline::MetadataFields + + # The ID of the Discord server. + field :guild_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guild_id') } } + + field :guild_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guild_token') } } + # The ID of the Discord role to grant. + field :role_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('role_id') } } + + + sig { params(guild_id: ::String, guild_token: ::String, role_id: ::String).void } + def initialize(guild_id: nil, guild_token: nil, role_id: nil) + @guild_id = guild_id + @guild_token = guild_token + @role_id = role_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @guild_id == other.guild_id + return false unless @guild_token == other.guild_token + return false unless @role_id == other.role_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscordsubscriber.rb b/lib/open_api_sdk/models/shared/benefitdiscordsubscriber.rb new file mode 100644 index 0000000..476ab54 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscordsubscriber.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDiscordSubscriber + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Properties available to subscribers for a benefit of type `discord`. + field :properties, Models::Shared::BenefitDiscordSubscriberProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization: Models::Shared::Organization, organization_id: ::String, properties: Models::Shared::BenefitDiscordSubscriberProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization = organization + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization == other.organization + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscordsubscriber_metadata.rb b/lib/open_api_sdk/models/shared/benefitdiscordsubscriber_metadata.rb new file mode 100644 index 0000000..ea8902a --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscordsubscriber_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDiscordSubscriberMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscordsubscriberproperties.rb b/lib/open_api_sdk/models/shared/benefitdiscordsubscriberproperties.rb new file mode 100644 index 0000000..6434e18 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscordsubscriberproperties.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties available to subscribers for a benefit of type `discord`. + class BenefitDiscordSubscriberProperties + extend T::Sig + include Crystalline::MetadataFields + + # The ID of the Discord server. + field :guild_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guild_id') } } + + + sig { params(guild_id: ::String).void } + def initialize(guild_id: nil) + @guild_id = guild_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @guild_id == other.guild_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscordupdate.rb b/lib/open_api_sdk/models/shared/benefitdiscordupdate.rb new file mode 100644 index 0000000..f3a9a19 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscordupdate.rb @@ -0,0 +1,55 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDiscordUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # The description of the benefit. Will be displayed on products having this benefit. + field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :properties, T.nilable(Models::Shared::BenefitDiscordCreateProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + + sig { params(type: ::String, description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), properties: T.nilable(Models::Shared::BenefitDiscordCreateProperties)).void } + def initialize(type: nil, description: nil, metadata: nil, properties: nil) + @type = type + @description = description + @metadata = metadata + @properties = properties + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @description == other.description + return false unless @metadata == other.metadata + return false unless @properties == other.properties + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdiscordupdate_metadata.rb b/lib/open_api_sdk/models/shared/benefitdiscordupdate_metadata.rb new file mode 100644 index 0000000..18ffe21 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdiscordupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDiscordUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadables.rb b/lib/open_api_sdk/models/shared/benefitdownloadables.rb new file mode 100644 index 0000000..d6b02f4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadables.rb @@ -0,0 +1,69 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadables + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :properties, Models::Shared::BenefitDownloadablesProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization_id: ::String, properties: Models::Shared::BenefitDownloadablesProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadables_metadata.rb b/lib/open_api_sdk/models/shared/benefitdownloadables_metadata.rb new file mode 100644 index 0000000..95dc247 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadables_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadablescreate.rb b/lib/open_api_sdk/models/shared/benefitdownloadablescreate.rb new file mode 100644 index 0000000..60aa45e --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadablescreate.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesCreate + extend T::Sig + include Crystalline::MetadataFields + + # The description of the benefit. Will be displayed on products having this benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + + field :properties, Models::Shared::BenefitDownloadablesCreateProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the benefit. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(description: ::String, properties: Models::Shared::BenefitDownloadablesCreateProperties, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(description: nil, properties: nil, type: nil, metadata: nil, organization_id: nil) + @description = description + @properties = properties + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @description == other.description + return false unless @properties == other.properties + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadablescreate_metadata.rb b/lib/open_api_sdk/models/shared/benefitdownloadablescreate_metadata.rb new file mode 100644 index 0000000..874f134 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadablescreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadablescreateproperties.rb b/lib/open_api_sdk/models/shared/benefitdownloadablescreateproperties.rb new file mode 100644 index 0000000..063801d --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadablescreateproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesCreateProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :files, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('files') } } + + field :archived, T.nilable(T::Hash[Symbol, T::Boolean]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('archived') } } + + + sig { params(files: T::Array[::String], archived: T.nilable(T::Hash[Symbol, T::Boolean])).void } + def initialize(files: nil, archived: nil) + @files = files + @archived = archived + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @files == other.files + return false unless @archived == other.archived + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadablesproperties.rb b/lib/open_api_sdk/models/shared/benefitdownloadablesproperties.rb new file mode 100644 index 0000000..833c049 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadablesproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :archived, T::Hash[Symbol, T::Boolean], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('archived') } } + + field :files, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('files') } } + + + sig { params(archived: T::Hash[Symbol, T::Boolean], files: T::Array[::String]).void } + def initialize(archived: nil, files: nil) + @archived = archived + @files = files + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @archived == other.archived + return false unless @files == other.files + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadablessubscriber.rb b/lib/open_api_sdk/models/shared/benefitdownloadablessubscriber.rb new file mode 100644 index 0000000..ec178eb --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadablessubscriber.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesSubscriber + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :properties, Models::Shared::BenefitDownloadablesSubscriberProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization: Models::Shared::Organization, organization_id: ::String, properties: Models::Shared::BenefitDownloadablesSubscriberProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization = organization + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization == other.organization + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadablessubscriber_metadata.rb b/lib/open_api_sdk/models/shared/benefitdownloadablessubscriber_metadata.rb new file mode 100644 index 0000000..10f5b16 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadablessubscriber_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesSubscriberMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadablessubscriberproperties.rb b/lib/open_api_sdk/models/shared/benefitdownloadablessubscriberproperties.rb new file mode 100644 index 0000000..eb44519 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadablessubscriberproperties.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesSubscriberProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :active_files, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('active_files') } } + + + sig { params(active_files: T::Array[::String]).void } + def initialize(active_files: nil) + @active_files = active_files + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @active_files == other.active_files + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadablesupdate.rb b/lib/open_api_sdk/models/shared/benefitdownloadablesupdate.rb new file mode 100644 index 0000000..e8dd90f --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadablesupdate.rb @@ -0,0 +1,55 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # The description of the benefit. Will be displayed on products having this benefit. + field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :properties, T.nilable(Models::Shared::BenefitDownloadablesCreateProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + + sig { params(type: ::String, description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), properties: T.nilable(Models::Shared::BenefitDownloadablesCreateProperties)).void } + def initialize(type: nil, description: nil, metadata: nil, properties: nil) + @type = type + @description = description + @metadata = metadata + @properties = properties + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @description == other.description + return false unless @metadata == other.metadata + return false unless @properties == other.properties + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitdownloadablesupdate_metadata.rb b/lib/open_api_sdk/models/shared/benefitdownloadablesupdate_metadata.rb new file mode 100644 index 0000000..7b07432 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitdownloadablesupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitDownloadablesUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepository.rb b/lib/open_api_sdk/models/shared/benefitgithubrepository.rb new file mode 100644 index 0000000..97b5576 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepository.rb @@ -0,0 +1,71 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A benefit of type `github_repository`. + # + # Use it to automatically invite your backers to a private GitHub repository. + class BenefitGitHubRepository + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Properties for a benefit of type `github_repository`. + field :properties, Models::Shared::BenefitGitHubRepositoryProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization_id: ::String, properties: Models::Shared::BenefitGitHubRepositoryProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepository_metadata.rb b/lib/open_api_sdk/models/shared/benefitgithubrepository_metadata.rb new file mode 100644 index 0000000..aff5338 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepository_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGitHubRepositoryMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositorycreate.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositorycreate.rb new file mode 100644 index 0000000..5a3e09e --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositorycreate.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGitHubRepositoryCreate + extend T::Sig + include Crystalline::MetadataFields + + # The description of the benefit. Will be displayed on products having this benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Properties to create a benefit of type `github_repository`. + field :properties, Models::Shared::BenefitGitHubRepositoryCreateProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the benefit. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(description: ::String, properties: Models::Shared::BenefitGitHubRepositoryCreateProperties, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(description: nil, properties: nil, type: nil, metadata: nil, organization_id: nil) + @description = description + @properties = properties + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @description == other.description + return false unless @properties == other.properties + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositorycreate_metadata.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositorycreate_metadata.rb new file mode 100644 index 0000000..55ab39b --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositorycreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGitHubRepositoryCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositorycreateproperties.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositorycreateproperties.rb new file mode 100644 index 0000000..da22e37 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositorycreateproperties.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties to create a benefit of type `github_repository`. + class BenefitGitHubRepositoryCreateProperties + extend T::Sig + include Crystalline::MetadataFields + + # The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role). + field :permission, Models::Shared::BenefitGitHubRepositoryCreatePropertiesPermission, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('permission'), 'decoder': Utils.enum_from_string(Models::Shared::BenefitGitHubRepositoryCreatePropertiesPermission, false) } } + # The name of the repository. + field :repository_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repository_name') } } + # The owner of the repository. + field :repository_owner, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repository_owner') } } + + + sig { params(permission: Models::Shared::BenefitGitHubRepositoryCreatePropertiesPermission, repository_name: ::String, repository_owner: ::String).void } + def initialize(permission: nil, repository_name: nil, repository_owner: nil) + @permission = permission + @repository_name = repository_name + @repository_owner = repository_owner + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @permission == other.permission + return false unless @repository_name == other.repository_name + return false unless @repository_owner == other.repository_owner + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositorycreateproperties_permission.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositorycreateproperties_permission.rb new file mode 100644 index 0000000..b6fa110 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositorycreateproperties_permission.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # BenefitGitHubRepositoryCreatePropertiesPermission - The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role). + class BenefitGitHubRepositoryCreatePropertiesPermission < T::Enum + enums do + PULL = new('pull') + TRIAGE = new('triage') + PUSH = new('push') + MAINTAIN = new('maintain') + ADMIN = new('admin') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositoryproperties.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositoryproperties.rb new file mode 100644 index 0000000..5ead129 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositoryproperties.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties for a benefit of type `github_repository`. + class BenefitGitHubRepositoryProperties + extend T::Sig + include Crystalline::MetadataFields + + # The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role). + field :permission, Models::Shared::Permission, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('permission'), 'decoder': Utils.enum_from_string(Models::Shared::Permission, false) } } + # The name of the repository. + field :repository_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repository_name') } } + # The owner of the repository. + field :repository_owner, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repository_owner') } } + + + sig { params(permission: Models::Shared::Permission, repository_name: ::String, repository_owner: ::String).void } + def initialize(permission: nil, repository_name: nil, repository_owner: nil) + @permission = permission + @repository_name = repository_name + @repository_owner = repository_owner + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @permission == other.permission + return false unless @repository_name == other.repository_name + return false unless @repository_owner == other.repository_owner + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriber.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriber.rb new file mode 100644 index 0000000..1a7e7cc --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriber.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGitHubRepositorySubscriber + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Properties available to subscribers for a benefit of type `github_repository`. + field :properties, Models::Shared::BenefitGitHubRepositorySubscriberProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization: Models::Shared::Organization, organization_id: ::String, properties: Models::Shared::BenefitGitHubRepositorySubscriberProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization = organization + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization == other.organization + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriber_metadata.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriber_metadata.rb new file mode 100644 index 0000000..79ab59d --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriber_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGitHubRepositorySubscriberMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriberproperties.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriberproperties.rb new file mode 100644 index 0000000..5a5853a --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositorysubscriberproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties available to subscribers for a benefit of type `github_repository`. + class BenefitGitHubRepositorySubscriberProperties + extend T::Sig + include Crystalline::MetadataFields + + # The name of the repository. + field :repository_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repository_name') } } + # The owner of the repository. + field :repository_owner, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repository_owner') } } + + + sig { params(repository_name: ::String, repository_owner: ::String).void } + def initialize(repository_name: nil, repository_owner: nil) + @repository_name = repository_name + @repository_owner = repository_owner + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @repository_name == other.repository_name + return false unless @repository_owner == other.repository_owner + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositoryupdate.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositoryupdate.rb new file mode 100644 index 0000000..180d54c --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositoryupdate.rb @@ -0,0 +1,55 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGitHubRepositoryUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # The description of the benefit. Will be displayed on products having this benefit. + field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :properties, T.nilable(Models::Shared::BenefitGitHubRepositoryCreateProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + + sig { params(type: ::String, description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), properties: T.nilable(Models::Shared::BenefitGitHubRepositoryCreateProperties)).void } + def initialize(type: nil, description: nil, metadata: nil, properties: nil) + @type = type + @description = description + @metadata = metadata + @properties = properties + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @description == other.description + return false unless @metadata == other.metadata + return false unless @properties == other.properties + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgithubrepositoryupdate_metadata.rb b/lib/open_api_sdk/models/shared/benefitgithubrepositoryupdate_metadata.rb new file mode 100644 index 0000000..16559a4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgithubrepositoryupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGitHubRepositoryUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrant.rb b/lib/open_api_sdk/models/shared/benefitgrant.rb new file mode 100644 index 0000000..e83bf10 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrant.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrant + extend T::Sig + include Crystalline::MetadataFields + + # The ID of the benefit concerned by this grant. + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # A customer in an organization. + field :customer, Models::Shared::Customer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + # The ID of the customer concerned by this grant. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # The ID of the grant. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the benefit is granted. + field :is_granted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_granted') } } + # Whether the benefit is revoked. + field :is_revoked, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_revoked') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the order that granted this benefit. + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :properties, T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # The ID of the subscription that granted this benefit. + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + # The timestamp when the benefit was granted. If `None`, the benefit is not granted. + field :granted_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + # The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. + field :revoked_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::Customer, customer_id: ::String, id: ::String, is_granted: T::Boolean, is_revoked: T::Boolean, modified_at: ::DateTime, order_id: ::String, properties: T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties), subscription_id: ::String, granted_at: T.nilable(::DateTime), revoked_at: T.nilable(::DateTime)).void } + def initialize(benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, id: nil, is_granted: nil, is_revoked: nil, modified_at: nil, order_id: nil, properties: nil, subscription_id: nil, granted_at: nil, revoked_at: nil) + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @id = id + @is_granted = is_granted + @is_revoked = is_revoked + @modified_at = modified_at + @order_id = order_id + @properties = properties + @subscription_id = subscription_id + @granted_at = granted_at + @revoked_at = revoked_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @id == other.id + return false unless @is_granted == other.is_granted + return false unless @is_revoked == other.is_revoked + return false unless @modified_at == other.modified_at + return false unless @order_id == other.order_id + return false unless @properties == other.properties + return false unless @subscription_id == other.subscription_id + return false unless @granted_at == other.granted_at + return false unless @revoked_at == other.revoked_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrantcustomproperties.rb b/lib/open_api_sdk/models/shared/benefitgrantcustomproperties.rb new file mode 100644 index 0000000..446c6df --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrantcustomproperties.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrantCustomProperties + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrantdiscordproperties.rb b/lib/open_api_sdk/models/shared/benefitgrantdiscordproperties.rb new file mode 100644 index 0000000..2f51886 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrantdiscordproperties.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrantDiscordProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :account_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_id') } } + + field :guild_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('guild_id') } } + + field :role_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('role_id') } } + + + sig { params(account_id: T.nilable(::String), guild_id: T.nilable(::String), role_id: T.nilable(::String)).void } + def initialize(account_id: nil, guild_id: nil, role_id: nil) + @account_id = account_id + @guild_id = guild_id + @role_id = role_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @account_id == other.account_id + return false unless @guild_id == other.guild_id + return false unless @role_id == other.role_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrantdownloadablesproperties.rb b/lib/open_api_sdk/models/shared/benefitgrantdownloadablesproperties.rb new file mode 100644 index 0000000..0a4dc36 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrantdownloadablesproperties.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrantDownloadablesProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :files, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('files') } } + + + sig { params(files: T.nilable(T::Array[::String])).void } + def initialize(files: nil) + @files = files + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @files == other.files + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties.rb b/lib/open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties.rb new file mode 100644 index 0000000..1a7aeb1 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrantGitHubRepositoryProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :account_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_id') } } + + field :permission, T.nilable(Models::Shared::BenefitGrantGitHubRepositoryPropertiesPermission), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('permission'), 'decoder': Utils.enum_from_string(Models::Shared::BenefitGrantGitHubRepositoryPropertiesPermission, true) } } + + field :repository_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repository_name') } } + + field :repository_owner, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('repository_owner') } } + + + sig { params(account_id: T.nilable(::String), permission: T.nilable(Models::Shared::BenefitGrantGitHubRepositoryPropertiesPermission), repository_name: T.nilable(::String), repository_owner: T.nilable(::String)).void } + def initialize(account_id: nil, permission: nil, repository_name: nil, repository_owner: nil) + @account_id = account_id + @permission = permission + @repository_name = repository_name + @repository_owner = repository_owner + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @account_id == other.account_id + return false unless @permission == other.permission + return false unless @repository_name == other.repository_name + return false unless @repository_owner == other.repository_owner + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties_permission.rb b/lib/open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties_permission.rb new file mode 100644 index 0000000..afe4639 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrantgithubrepositoryproperties_permission.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrantGitHubRepositoryPropertiesPermission < T::Enum + enums do + PULL = new('pull') + TRIAGE = new('triage') + PUSH = new('push') + MAINTAIN = new('maintain') + ADMIN = new('admin') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrantlicensekeysproperties.rb b/lib/open_api_sdk/models/shared/benefitgrantlicensekeysproperties.rb new file mode 100644 index 0000000..8f068c2 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrantlicensekeysproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrantLicenseKeysProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :display_key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_key') } } + + field :license_key_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('license_key_id') } } + + + sig { params(display_key: T.nilable(::String), license_key_id: T.nilable(::String)).void } + def initialize(display_key: nil, license_key_id: nil) + @display_key = display_key + @license_key_id = license_key_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @display_key == other.display_key + return false unless @license_key_id == other.license_key_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrantmetercreditproperties.rb b/lib/open_api_sdk/models/shared/benefitgrantmetercreditproperties.rb new file mode 100644 index 0000000..81f55a4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrantmetercreditproperties.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrantMeterCreditProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :last_credited_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_credited_at') } } + + field :last_credited_meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_credited_meter_id') } } + + field :last_credited_units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_credited_units') } } + + + sig { params(last_credited_at: ::String, last_credited_meter_id: ::String, last_credited_units: ::Integer).void } + def initialize(last_credited_at: nil, last_credited_meter_id: nil, last_credited_units: nil) + @last_credited_at = last_credited_at + @last_credited_meter_id = last_credited_meter_id + @last_credited_units = last_credited_units + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @last_credited_at == other.last_credited_at + return false unless @last_credited_meter_id == other.last_credited_meter_id + return false unless @last_credited_units == other.last_credited_units + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrantwebhook.rb b/lib/open_api_sdk/models/shared/benefitgrantwebhook.rb new file mode 100644 index 0000000..64534e4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrantwebhook.rb @@ -0,0 +1,89 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrantWebhook + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit, T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit') } } + # The ID of the benefit concerned by this grant. + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # A customer in an organization. + field :customer, Models::Shared::Customer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + # The ID of the customer concerned by this grant. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # The ID of the grant. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the benefit is granted. + field :is_granted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_granted') } } + # Whether the benefit is revoked. + field :is_revoked, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_revoked') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the order that granted this benefit. + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :properties, T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # The ID of the subscription that granted this benefit. + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + # The timestamp when the benefit was granted. If `None`, the benefit is not granted. + field :granted_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :previous_properties, T.nilable(T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties)), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('previous_properties') } } + # The timestamp when the benefit was revoked. If `None`, the benefit is not revoked. + field :revoked_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(benefit: T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit), benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::Customer, customer_id: ::String, id: ::String, is_granted: T::Boolean, is_revoked: T::Boolean, modified_at: ::DateTime, order_id: ::String, properties: T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties), subscription_id: ::String, granted_at: T.nilable(::DateTime), previous_properties: T.nilable(T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties)), revoked_at: T.nilable(::DateTime)).void } + def initialize(benefit: nil, benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, id: nil, is_granted: nil, is_revoked: nil, modified_at: nil, order_id: nil, properties: nil, subscription_id: nil, granted_at: nil, previous_properties: nil, revoked_at: nil) + @benefit = benefit + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @id = id + @is_granted = is_granted + @is_revoked = is_revoked + @modified_at = modified_at + @order_id = order_id + @properties = properties + @subscription_id = subscription_id + @granted_at = granted_at + @previous_properties = previous_properties + @revoked_at = revoked_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit == other.benefit + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @id == other.id + return false unless @is_granted == other.is_granted + return false unless @is_revoked == other.is_revoked + return false unless @modified_at == other.modified_at + return false unless @order_id == other.order_id + return false unless @properties == other.properties + return false unless @subscription_id == other.subscription_id + return false unless @granted_at == other.granted_at + return false unless @previous_properties == other.previous_properties + return false unless @revoked_at == other.revoked_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitgrantwebhook_properties.rb b/lib/open_api_sdk/models/shared/benefitgrantwebhook_properties.rb new file mode 100644 index 0000000..9dd8f48 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitgrantwebhook_properties.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitGrantWebhookProperties + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeyactivationcreateproperties.rb b/lib/open_api_sdk/models/shared/benefitlicensekeyactivationcreateproperties.rb new file mode 100644 index 0000000..f69d10a --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeyactivationcreateproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeyActivationCreateProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :enable_customer_admin, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('enable_customer_admin') } } + + field :limit, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit') } } + + + sig { params(enable_customer_admin: T::Boolean, limit: ::Integer).void } + def initialize(enable_customer_admin: nil, limit: nil) + @enable_customer_admin = enable_customer_admin + @limit = limit + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @enable_customer_admin == other.enable_customer_admin + return false unless @limit == other.limit + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeyactivationproperties.rb b/lib/open_api_sdk/models/shared/benefitlicensekeyactivationproperties.rb new file mode 100644 index 0000000..d243b33 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeyactivationproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeyActivationProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :enable_customer_admin, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('enable_customer_admin') } } + + field :limit, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit') } } + + + sig { params(enable_customer_admin: T::Boolean, limit: ::Integer).void } + def initialize(enable_customer_admin: nil, limit: nil) + @enable_customer_admin = enable_customer_admin + @limit = limit + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @enable_customer_admin == other.enable_customer_admin + return false unless @limit == other.limit + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeyexpirationproperties.rb b/lib/open_api_sdk/models/shared/benefitlicensekeyexpirationproperties.rb new file mode 100644 index 0000000..d43decd --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeyexpirationproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeyExpirationProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :timeframe, Models::Shared::Timeframe, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('timeframe'), 'decoder': Utils.enum_from_string(Models::Shared::Timeframe, false) } } + + field :ttl, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ttl') } } + + + sig { params(timeframe: Models::Shared::Timeframe, ttl: ::Integer).void } + def initialize(timeframe: nil, ttl: nil) + @timeframe = timeframe + @ttl = ttl + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @timeframe == other.timeframe + return false unless @ttl == other.ttl + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeys.rb b/lib/open_api_sdk/models/shared/benefitlicensekeys.rb new file mode 100644 index 0000000..2201e52 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeys.rb @@ -0,0 +1,69 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeys + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :properties, Models::Shared::BenefitLicenseKeysProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization_id: ::String, properties: Models::Shared::BenefitLicenseKeysProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeys_metadata.rb b/lib/open_api_sdk/models/shared/benefitlicensekeys_metadata.rb new file mode 100644 index 0000000..530bf71 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeys_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeyscreate.rb b/lib/open_api_sdk/models/shared/benefitlicensekeyscreate.rb new file mode 100644 index 0000000..f2df278 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeyscreate.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysCreate + extend T::Sig + include Crystalline::MetadataFields + + # The description of the benefit. Will be displayed on products having this benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + + field :properties, Models::Shared::BenefitLicenseKeysCreateProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the benefit. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(description: ::String, properties: Models::Shared::BenefitLicenseKeysCreateProperties, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(description: nil, properties: nil, type: nil, metadata: nil, organization_id: nil) + @description = description + @properties = properties + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @description == other.description + return false unless @properties == other.properties + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeyscreate_metadata.rb b/lib/open_api_sdk/models/shared/benefitlicensekeyscreate_metadata.rb new file mode 100644 index 0000000..fa21c79 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeyscreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeyscreateproperties.rb b/lib/open_api_sdk/models/shared/benefitlicensekeyscreateproperties.rb new file mode 100644 index 0000000..1541317 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeyscreateproperties.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysCreateProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :activations, T.nilable(Models::Shared::BenefitLicenseKeyActivationCreateProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('activations') } } + + field :expires, T.nilable(Models::Shared::BenefitLicenseKeyExpirationProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires') } } + + field :limit_usage, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_usage') } } + + field :prefix, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prefix') } } + + + sig { params(activations: T.nilable(Models::Shared::BenefitLicenseKeyActivationCreateProperties), expires: T.nilable(Models::Shared::BenefitLicenseKeyExpirationProperties), limit_usage: T.nilable(::Integer), prefix: T.nilable(::String)).void } + def initialize(activations: nil, expires: nil, limit_usage: nil, prefix: nil) + @activations = activations + @expires = expires + @limit_usage = limit_usage + @prefix = prefix + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @activations == other.activations + return false unless @expires == other.expires + return false unless @limit_usage == other.limit_usage + return false unless @prefix == other.prefix + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeysproperties.rb b/lib/open_api_sdk/models/shared/benefitlicensekeysproperties.rb new file mode 100644 index 0000000..3106444 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeysproperties.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :activations, Models::Shared::BenefitLicenseKeyActivationProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('activations') } } + + field :expires, Models::Shared::BenefitLicenseKeyExpirationProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires') } } + + field :limit_usage, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_usage') } } + + field :prefix, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prefix') } } + + + sig { params(activations: Models::Shared::BenefitLicenseKeyActivationProperties, expires: Models::Shared::BenefitLicenseKeyExpirationProperties, limit_usage: ::Integer, prefix: ::String).void } + def initialize(activations: nil, expires: nil, limit_usage: nil, prefix: nil) + @activations = activations + @expires = expires + @limit_usage = limit_usage + @prefix = prefix + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @activations == other.activations + return false unless @expires == other.expires + return false unless @limit_usage == other.limit_usage + return false unless @prefix == other.prefix + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeyssubscriber.rb b/lib/open_api_sdk/models/shared/benefitlicensekeyssubscriber.rb new file mode 100644 index 0000000..c797219 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeyssubscriber.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysSubscriber + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :properties, Models::Shared::BenefitLicenseKeysSubscriberProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization: Models::Shared::Organization, organization_id: ::String, properties: Models::Shared::BenefitLicenseKeysSubscriberProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization = organization + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization == other.organization + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeyssubscriber_metadata.rb b/lib/open_api_sdk/models/shared/benefitlicensekeyssubscriber_metadata.rb new file mode 100644 index 0000000..5a4948c --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeyssubscriber_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysSubscriberMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeyssubscriberproperties.rb b/lib/open_api_sdk/models/shared/benefitlicensekeyssubscriberproperties.rb new file mode 100644 index 0000000..63273a1 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeyssubscriberproperties.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysSubscriberProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :activations, Models::Shared::BenefitLicenseKeyActivationProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('activations') } } + + field :expires, Models::Shared::BenefitLicenseKeyExpirationProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires') } } + + field :limit_usage, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_usage') } } + + field :prefix, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prefix') } } + + + sig { params(activations: Models::Shared::BenefitLicenseKeyActivationProperties, expires: Models::Shared::BenefitLicenseKeyExpirationProperties, limit_usage: ::Integer, prefix: ::String).void } + def initialize(activations: nil, expires: nil, limit_usage: nil, prefix: nil) + @activations = activations + @expires = expires + @limit_usage = limit_usage + @prefix = prefix + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @activations == other.activations + return false unless @expires == other.expires + return false unless @limit_usage == other.limit_usage + return false unless @prefix == other.prefix + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeysupdate.rb b/lib/open_api_sdk/models/shared/benefitlicensekeysupdate.rb new file mode 100644 index 0000000..df84ae4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeysupdate.rb @@ -0,0 +1,55 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # The description of the benefit. Will be displayed on products having this benefit. + field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :properties, T.nilable(Models::Shared::BenefitLicenseKeysCreateProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + + sig { params(type: ::String, description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), properties: T.nilable(Models::Shared::BenefitLicenseKeysCreateProperties)).void } + def initialize(type: nil, description: nil, metadata: nil, properties: nil) + @type = type + @description = description + @metadata = metadata + @properties = properties + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @description == other.description + return false unless @metadata == other.metadata + return false unless @properties == other.properties + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitlicensekeysupdate_metadata.rb b/lib/open_api_sdk/models/shared/benefitlicensekeysupdate_metadata.rb new file mode 100644 index 0000000..fe442bb --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitlicensekeysupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitLicenseKeysUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercredit.rb b/lib/open_api_sdk/models/shared/benefitmetercredit.rb new file mode 100644 index 0000000..14d9f12 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercredit.rb @@ -0,0 +1,71 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A benefit of type `meter_unit`. + # + # Use it to grant a number of units on a specific meter. + class BenefitMeterCredit + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Properties for a benefit of type `meter_unit`. + field :properties, Models::Shared::BenefitMeterCreditProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization_id: ::String, properties: Models::Shared::BenefitMeterCreditProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercredit_metadata.rb b/lib/open_api_sdk/models/shared/benefitmetercredit_metadata.rb new file mode 100644 index 0000000..8429d91 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercredit_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitMeterCreditMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercreditcreate.rb b/lib/open_api_sdk/models/shared/benefitmetercreditcreate.rb new file mode 100644 index 0000000..441c196 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercreditcreate.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a benefit of type `meter_unit`. + class BenefitMeterCreditCreate + extend T::Sig + include Crystalline::MetadataFields + + # The description of the benefit. Will be displayed on products having this benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Properties for creating a benefit of type `meter_unit`. + field :properties, Models::Shared::BenefitMeterCreditCreateProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the benefit. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(description: ::String, properties: Models::Shared::BenefitMeterCreditCreateProperties, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(description: nil, properties: nil, type: nil, metadata: nil, organization_id: nil) + @description = description + @properties = properties + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @description == other.description + return false unless @properties == other.properties + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercreditcreate_metadata.rb b/lib/open_api_sdk/models/shared/benefitmetercreditcreate_metadata.rb new file mode 100644 index 0000000..f403ad6 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercreditcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitMeterCreditCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercreditcreateproperties.rb b/lib/open_api_sdk/models/shared/benefitmetercreditcreateproperties.rb new file mode 100644 index 0000000..d636b29 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercreditcreateproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties for creating a benefit of type `meter_unit`. + class BenefitMeterCreditCreateProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + + field :units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('units') } } + + + sig { params(meter_id: ::String, units: ::Integer).void } + def initialize(meter_id: nil, units: nil) + @meter_id = meter_id + @units = units + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @meter_id == other.meter_id + return false unless @units == other.units + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercreditproperties.rb b/lib/open_api_sdk/models/shared/benefitmetercreditproperties.rb new file mode 100644 index 0000000..82e857e --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercreditproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties for a benefit of type `meter_unit`. + class BenefitMeterCreditProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + + field :units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('units') } } + + + sig { params(meter_id: ::String, units: ::Integer).void } + def initialize(meter_id: nil, units: nil) + @meter_id = meter_id + @units = units + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @meter_id == other.meter_id + return false unless @units == other.units + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercreditsubscriber.rb b/lib/open_api_sdk/models/shared/benefitmetercreditsubscriber.rb new file mode 100644 index 0000000..d63b351 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercreditsubscriber.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitMeterCreditSubscriber + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Properties available to subscribers for a benefit of type `meter_unit`. + field :properties, Models::Shared::BenefitMeterCreditSubscriberProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization: Models::Shared::Organization, organization_id: ::String, properties: Models::Shared::BenefitMeterCreditSubscriberProperties, selectable: T::Boolean, type: ::String).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, metadata: nil, modified_at: nil, organization: nil, organization_id: nil, properties: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @metadata = metadata + @modified_at = modified_at + @organization = organization + @organization_id = organization_id + @properties = properties + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization == other.organization + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercreditsubscriber_metadata.rb b/lib/open_api_sdk/models/shared/benefitmetercreditsubscriber_metadata.rb new file mode 100644 index 0000000..28a463b --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercreditsubscriber_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitMeterCreditSubscriberMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercreditsubscriberproperties.rb b/lib/open_api_sdk/models/shared/benefitmetercreditsubscriberproperties.rb new file mode 100644 index 0000000..f03076d --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercreditsubscriberproperties.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Properties available to subscribers for a benefit of type `meter_unit`. + class BenefitMeterCreditSubscriberProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + + field :units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('units') } } + + + sig { params(meter_id: ::String, units: ::Integer).void } + def initialize(meter_id: nil, units: nil) + @meter_id = meter_id + @units = units + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @meter_id == other.meter_id + return false unless @units == other.units + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercreditupdate.rb b/lib/open_api_sdk/models/shared/benefitmetercreditupdate.rb new file mode 100644 index 0000000..057aa24 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercreditupdate.rb @@ -0,0 +1,55 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitMeterCreditUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # The description of the benefit. Will be displayed on products having this benefit. + field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :properties, T.nilable(Models::Shared::BenefitMeterCreditCreateProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + + sig { params(type: ::String, description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), properties: T.nilable(Models::Shared::BenefitMeterCreditCreateProperties)).void } + def initialize(type: nil, description: nil, metadata: nil, properties: nil) + @type = type + @description = description + @metadata = metadata + @properties = properties + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @description == other.description + return false unless @metadata == other.metadata + return false unless @properties == other.properties + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitmetercreditupdate_metadata.rb b/lib/open_api_sdk/models/shared/benefitmetercreditupdate_metadata.rb new file mode 100644 index 0000000..0944cda --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitmetercreditupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitMeterCreditUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitpublic.rb b/lib/open_api_sdk/models/shared/benefitpublic.rb new file mode 100644 index 0000000..d050ec9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitpublic.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitPublic + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Whether the benefit is deletable. + field :deletable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deletable') } } + # The description of the benefit. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the benefit. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the organization owning the benefit. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Whether the benefit is selectable when creating a product. + field :selectable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('selectable') } } + + field :type, Models::Shared::BenefitType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::BenefitType, false) } } + + + sig { params(created_at: ::DateTime, deletable: T::Boolean, description: ::String, id: ::String, modified_at: ::DateTime, organization_id: ::String, selectable: T::Boolean, type: Models::Shared::BenefitType).void } + def initialize(created_at: nil, deletable: nil, description: nil, id: nil, modified_at: nil, organization_id: nil, selectable: nil, type: nil) + @created_at = created_at + @deletable = deletable + @description = description + @id = id + @modified_at = modified_at + @organization_id = organization_id + @selectable = selectable + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @deletable == other.deletable + return false unless @description == other.description + return false unless @id == other.id + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @selectable == other.selectable + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefitsortproperty.rb b/lib/open_api_sdk/models/shared/benefitsortproperty.rb new file mode 100644 index 0000000..e04b9e3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefitsortproperty.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + DESCRIPTION = new('description') + MINUS_DESCRIPTION = new('-description') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/benefittype.rb b/lib/open_api_sdk/models/shared/benefittype.rb new file mode 100644 index 0000000..2f3aa59 --- /dev/null +++ b/lib/open_api_sdk/models/shared/benefittype.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class BenefitType < T::Enum + enums do + CUSTOM = new('custom') + DISCORD = new('discord') + GITHUB_REPOSITORY = new('github_repository') + DOWNLOADABLES = new('downloadables') + LICENSE_KEYS = new('license_keys') + METER_CREDIT = new('meter_credit') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkout.rb b/lib/open_api_sdk/models/shared/checkout.rb new file mode 100644 index 0000000..bd3d649 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkout.rb @@ -0,0 +1,205 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Checkout session data retrieved using an access token. + class Checkout + extend T::Sig + include Crystalline::MetadataFields + + # Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. + field :allow_discount_codes, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_discount_codes') } } + # Amount in cents, before discounts and taxes. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :attached_custom_fields, T::Array[Models::Shared::AttachedCustomField], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('attached_custom_fields') } } + # Client secret used to update and complete the checkout session from the client. + field :client_secret, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_secret') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Currency code of the checkout session. + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :customer_billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_billing_address') } } + + field :customer_billing_address_fields, Models::Shared::CheckoutCustomerBillingAddressFields, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_billing_address_fields') } } + # Email address of the customer. + field :customer_email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_email') } } + # ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set. + field :customer_external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_external_id') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :customer_ip_address, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_ip_address') } } + + field :customer_metadata, T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_metadata') } } + # Name of the customer. + field :customer_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_name') } } + + field :customer_tax_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_tax_id') } } + + field :discount, T.any(Models::Shared::CheckoutDiscountFixedOnceForeverDuration, Models::Shared::CheckoutDiscountFixedRepeatDuration, Models::Shared::CheckoutDiscountPercentageOnceForeverDuration, Models::Shared::CheckoutDiscountPercentageRepeatDuration), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount') } } + # Discount amount in cents. + field :discount_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_amount') } } + # ID of the discount applied to the checkout. + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page. + field :embed_origin, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('embed_origin') } } + # Expiration date and time of the checkout session. + field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable. + field :is_discount_applicable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_discount_applicable') } } + # Whether the product price is free, regardless of discounts. + field :is_free_product_price, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_free_product_price') } } + # Whether the checkout requires a payment form, whether because of a payment or payment method setup. + field :is_payment_form_required, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_payment_form_required') } } + # Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount. + field :is_payment_required, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_payment_required') } } + # Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles. + field :is_payment_setup_required, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_payment_setup_required') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Amount in cents, after discounts but before taxes. + field :net_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('net_amount') } } + + field :payment_processor, Models::Shared::PaymentProcessor, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payment_processor'), 'decoder': Utils.enum_from_string(Models::Shared::PaymentProcessor, false) } } + + field :payment_processor_metadata, T::Hash[Symbol, ::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payment_processor_metadata') } } + # Product data for a checkout session. + field :product, Models::Shared::CheckoutProduct, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product') } } + # ID of the product to checkout. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # Price of the selected product. + field :product_price, T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit)), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_price') } } + # ID of the product price to checkout. + field :product_price_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_price_id') } } + # List of products available to select. + field :products, T::Array[Models::Shared::CheckoutProduct], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`. + field :require_billing_address, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('require_billing_address') } } + + field :status, Models::Shared::CheckoutStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::CheckoutStatus, false) } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + # URL where the customer will be redirected after a successful payment. + field :success_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success_url') } } + # Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it. + field :tax_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_amount') } } + # Amount in cents, after discounts and taxes. + field :total_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('total_amount') } } + # URL where the customer can access the checkout session. + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + # Key-value object storing custom field values. + field :custom_field_data, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('custom_field_data') } } + + + sig { params(allow_discount_codes: T::Boolean, amount: ::Integer, attached_custom_fields: T::Array[Models::Shared::AttachedCustomField], client_secret: ::String, created_at: ::DateTime, currency: ::String, customer_billing_address: Models::Shared::Address, customer_billing_address_fields: Models::Shared::CheckoutCustomerBillingAddressFields, customer_email: ::String, customer_external_id: ::String, customer_id: ::String, customer_ip_address: ::String, customer_metadata: T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean)], customer_name: ::String, customer_tax_id: ::String, discount: T.any(Models::Shared::CheckoutDiscountFixedOnceForeverDuration, Models::Shared::CheckoutDiscountFixedRepeatDuration, Models::Shared::CheckoutDiscountPercentageOnceForeverDuration, Models::Shared::CheckoutDiscountPercentageRepeatDuration), discount_amount: ::Integer, discount_id: ::String, embed_origin: ::String, expires_at: ::DateTime, id: ::String, is_discount_applicable: T::Boolean, is_free_product_price: T::Boolean, is_payment_form_required: T::Boolean, is_payment_required: T::Boolean, is_payment_setup_required: T::Boolean, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, net_amount: ::Integer, payment_processor: Models::Shared::PaymentProcessor, payment_processor_metadata: T::Hash[Symbol, ::String], product: Models::Shared::CheckoutProduct, product_id: ::String, product_price: T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit)), product_price_id: ::String, products: T::Array[Models::Shared::CheckoutProduct], require_billing_address: T::Boolean, status: Models::Shared::CheckoutStatus, subscription_id: ::String, success_url: ::String, tax_amount: ::Integer, total_amount: ::Integer, url: ::String, custom_field_data: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)])).void } + def initialize(allow_discount_codes: nil, amount: nil, attached_custom_fields: nil, client_secret: nil, created_at: nil, currency: nil, customer_billing_address: nil, customer_billing_address_fields: nil, customer_email: nil, customer_external_id: nil, customer_id: nil, customer_ip_address: nil, customer_metadata: nil, customer_name: nil, customer_tax_id: nil, discount: nil, discount_amount: nil, discount_id: nil, embed_origin: nil, expires_at: nil, id: nil, is_discount_applicable: nil, is_free_product_price: nil, is_payment_form_required: nil, is_payment_required: nil, is_payment_setup_required: nil, metadata: nil, modified_at: nil, net_amount: nil, payment_processor: nil, payment_processor_metadata: nil, product: nil, product_id: nil, product_price: nil, product_price_id: nil, products: nil, require_billing_address: nil, status: nil, subscription_id: nil, success_url: nil, tax_amount: nil, total_amount: nil, url: nil, custom_field_data: nil) + @allow_discount_codes = allow_discount_codes + @amount = amount + @attached_custom_fields = attached_custom_fields + @client_secret = client_secret + @created_at = created_at + @currency = currency + @customer_billing_address = customer_billing_address + @customer_billing_address_fields = customer_billing_address_fields + @customer_email = customer_email + @customer_external_id = customer_external_id + @customer_id = customer_id + @customer_ip_address = customer_ip_address + @customer_metadata = customer_metadata + @customer_name = customer_name + @customer_tax_id = customer_tax_id + @discount = discount + @discount_amount = discount_amount + @discount_id = discount_id + @embed_origin = embed_origin + @expires_at = expires_at + @id = id + @is_discount_applicable = is_discount_applicable + @is_free_product_price = is_free_product_price + @is_payment_form_required = is_payment_form_required + @is_payment_required = is_payment_required + @is_payment_setup_required = is_payment_setup_required + @metadata = metadata + @modified_at = modified_at + @net_amount = net_amount + @payment_processor = payment_processor + @payment_processor_metadata = payment_processor_metadata + @product = product + @product_id = product_id + @product_price = product_price + @product_price_id = product_price_id + @products = products + @require_billing_address = require_billing_address + @status = status + @subscription_id = subscription_id + @success_url = success_url + @tax_amount = tax_amount + @total_amount = total_amount + @url = url + @custom_field_data = custom_field_data + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @allow_discount_codes == other.allow_discount_codes + return false unless @amount == other.amount + return false unless @attached_custom_fields == other.attached_custom_fields + return false unless @client_secret == other.client_secret + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @customer_billing_address == other.customer_billing_address + return false unless @customer_billing_address_fields == other.customer_billing_address_fields + return false unless @customer_email == other.customer_email + return false unless @customer_external_id == other.customer_external_id + return false unless @customer_id == other.customer_id + return false unless @customer_ip_address == other.customer_ip_address + return false unless @customer_metadata == other.customer_metadata + return false unless @customer_name == other.customer_name + return false unless @customer_tax_id == other.customer_tax_id + return false unless @discount == other.discount + return false unless @discount_amount == other.discount_amount + return false unless @discount_id == other.discount_id + return false unless @embed_origin == other.embed_origin + return false unless @expires_at == other.expires_at + return false unless @id == other.id + return false unless @is_discount_applicable == other.is_discount_applicable + return false unless @is_free_product_price == other.is_free_product_price + return false unless @is_payment_form_required == other.is_payment_form_required + return false unless @is_payment_required == other.is_payment_required + return false unless @is_payment_setup_required == other.is_payment_setup_required + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @net_amount == other.net_amount + return false unless @payment_processor == other.payment_processor + return false unless @payment_processor_metadata == other.payment_processor_metadata + return false unless @product == other.product + return false unless @product_id == other.product_id + return false unless @product_price == other.product_price + return false unless @product_price_id == other.product_price_id + return false unless @products == other.products + return false unless @require_billing_address == other.require_billing_address + return false unless @status == other.status + return false unless @subscription_id == other.subscription_id + return false unless @success_url == other.success_url + return false unless @tax_amount == other.tax_amount + return false unless @total_amount == other.total_amount + return false unless @url == other.url + return false unless @custom_field_data == other.custom_field_data + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkout_custom_field_data.rb b/lib/open_api_sdk/models/shared/checkout_custom_field_data.rb new file mode 100644 index 0000000..25ca795 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkout_custom_field_data.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutCustomFieldData + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkout_discount.rb b/lib/open_api_sdk/models/shared/checkout_discount.rb new file mode 100644 index 0000000..68e5ddd --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkout_discount.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutDiscount + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkout_metadata.rb b/lib/open_api_sdk/models/shared/checkout_metadata.rb new file mode 100644 index 0000000..0517e2e --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkout_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkout_product_price.rb b/lib/open_api_sdk/models/shared/checkout_product_price.rb new file mode 100644 index 0000000..1c402a5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkout_product_price.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Price of the selected product. + class CheckoutProductPrice + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutcreate.rb b/lib/open_api_sdk/models/shared/checkoutcreate.rb new file mode 100644 index 0000000..2940567 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutcreate.rb @@ -0,0 +1,125 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Create a new checkout session from a list of products. + # Customers will be able to switch between those products. + # + # Metadata set on the checkout will be copied + # to the resulting order and/or subscription. + class CheckoutCreate + extend T::Sig + include Crystalline::MetadataFields + + # List of product IDs available to select at that checkout. The first one will be selected by default. + field :products, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. + field :allow_discount_codes, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_discount_codes') } } + + field :amount, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Key-value object storing custom field values. + field :custom_field_data, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('custom_field_data') } } + + field :customer_billing_address, T.nilable(Models::Shared::Address), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_billing_address') } } + + field :customer_email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_email') } } + # ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set. + field :customer_external_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_external_id') } } + # ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer. + field :customer_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :customer_ip_address, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_ip_address') } } + # Key-value object allowing you to store additional information that'll be copied to the created customer. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :customer_metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_metadata') } } + + field :customer_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_name') } } + + field :customer_tax_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_tax_id') } } + # ID of the discount to apply to the checkout. + field :discount_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page. + field :embed_origin, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('embed_origin') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`. + field :require_billing_address, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('require_billing_address') } } + # ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten. + field :subscription_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + # URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. + field :success_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success_url') } } + + + sig { params(products: T::Array[::String], allow_discount_codes: T.nilable(T::Boolean), amount: T.nilable(::Integer), custom_field_data: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)]), customer_billing_address: T.nilable(Models::Shared::Address), customer_email: T.nilable(::String), customer_external_id: T.nilable(::String), customer_id: T.nilable(::String), customer_ip_address: T.nilable(::String), customer_metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), customer_name: T.nilable(::String), customer_tax_id: T.nilable(::String), discount_id: T.nilable(::String), embed_origin: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), require_billing_address: T.nilable(T::Boolean), subscription_id: T.nilable(::String), success_url: T.nilable(::String)).void } + def initialize(products: nil, allow_discount_codes: nil, amount: nil, custom_field_data: nil, customer_billing_address: nil, customer_email: nil, customer_external_id: nil, customer_id: nil, customer_ip_address: nil, customer_metadata: nil, customer_name: nil, customer_tax_id: nil, discount_id: nil, embed_origin: nil, metadata: nil, require_billing_address: nil, subscription_id: nil, success_url: nil) + @products = products + @allow_discount_codes = allow_discount_codes + @amount = amount + @custom_field_data = custom_field_data + @customer_billing_address = customer_billing_address + @customer_email = customer_email + @customer_external_id = customer_external_id + @customer_id = customer_id + @customer_ip_address = customer_ip_address + @customer_metadata = customer_metadata + @customer_name = customer_name + @customer_tax_id = customer_tax_id + @discount_id = discount_id + @embed_origin = embed_origin + @metadata = metadata + @require_billing_address = require_billing_address + @subscription_id = subscription_id + @success_url = success_url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @products == other.products + return false unless @allow_discount_codes == other.allow_discount_codes + return false unless @amount == other.amount + return false unless @custom_field_data == other.custom_field_data + return false unless @customer_billing_address == other.customer_billing_address + return false unless @customer_email == other.customer_email + return false unless @customer_external_id == other.customer_external_id + return false unless @customer_id == other.customer_id + return false unless @customer_ip_address == other.customer_ip_address + return false unless @customer_metadata == other.customer_metadata + return false unless @customer_name == other.customer_name + return false unless @customer_tax_id == other.customer_tax_id + return false unless @discount_id == other.discount_id + return false unless @embed_origin == other.embed_origin + return false unless @metadata == other.metadata + return false unless @require_billing_address == other.require_billing_address + return false unless @subscription_id == other.subscription_id + return false unless @success_url == other.success_url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutcreate_custom_field_data.rb b/lib/open_api_sdk/models/shared/checkoutcreate_custom_field_data.rb new file mode 100644 index 0000000..ef3c9d6 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutcreate_custom_field_data.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutCreateCustomFieldData + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutcreate_customer_metadata.rb b/lib/open_api_sdk/models/shared/checkoutcreate_customer_metadata.rb new file mode 100644 index 0000000..d778a77 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutcreate_customer_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutCreateCustomerMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutcreate_metadata.rb b/lib/open_api_sdk/models/shared/checkoutcreate_metadata.rb new file mode 100644 index 0000000..fb434a0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutcustomerbillingaddressfields.rb b/lib/open_api_sdk/models/shared/checkoutcustomerbillingaddressfields.rb new file mode 100644 index 0000000..409df62 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutcustomerbillingaddressfields.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutCustomerBillingAddressFields + extend T::Sig + include Crystalline::MetadataFields + + + field :city, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('city') } } + + field :country, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('country') } } + + field :line1, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('line1') } } + + field :line2, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('line2') } } + + field :postal_code, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('postal_code') } } + + field :state, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('state') } } + + + sig { params(city: T::Boolean, country: T::Boolean, line1: T::Boolean, line2: T::Boolean, postal_code: T::Boolean, state: T::Boolean).void } + def initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @city == other.city + return false unless @country == other.country + return false unless @line1 == other.line1 + return false unless @line2 == other.line2 + return false unless @postal_code == other.postal_code + return false unless @state == other.state + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutdiscountfixedonceforeverduration.rb b/lib/open_api_sdk/models/shared/checkoutdiscountfixedonceforeverduration.rb new file mode 100644 index 0000000..6505be7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutdiscountfixedonceforeverduration.rb @@ -0,0 +1,57 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a fixed amount discount that is applied once or forever. + class CheckoutDiscountFixedOnceForeverDuration + extend T::Sig + include Crystalline::MetadataFields + + + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(amount: ::Integer, code: ::String, currency: ::String, duration: Models::Shared::DiscountDuration, id: ::String, name: ::String, type: Models::Shared::DiscountType).void } + def initialize(amount: nil, code: nil, currency: nil, duration: nil, id: nil, name: nil, type: nil) + @amount = amount + @code = code + @currency = currency + @duration = duration + @id = id + @name = name + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @code == other.code + return false unless @currency == other.currency + return false unless @duration == other.duration + return false unless @id == other.id + return false unless @name == other.name + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutdiscountfixedrepeatduration.rb b/lib/open_api_sdk/models/shared/checkoutdiscountfixedrepeatduration.rb new file mode 100644 index 0000000..5655852 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutdiscountfixedrepeatduration.rb @@ -0,0 +1,62 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a fixed amount discount that is applied on every invoice + # for a certain number of months. + class CheckoutDiscountFixedRepeatDuration + extend T::Sig + include Crystalline::MetadataFields + + + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + + field :duration_in_months, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_in_months') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(amount: ::Integer, code: ::String, currency: ::String, duration: Models::Shared::DiscountDuration, duration_in_months: ::Integer, id: ::String, name: ::String, type: Models::Shared::DiscountType).void } + def initialize(amount: nil, code: nil, currency: nil, duration: nil, duration_in_months: nil, id: nil, name: nil, type: nil) + @amount = amount + @code = code + @currency = currency + @duration = duration + @duration_in_months = duration_in_months + @id = id + @name = name + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @code == other.code + return false unless @currency == other.currency + return false unless @duration == other.duration + return false unless @duration_in_months == other.duration_in_months + return false unless @id == other.id + return false unless @name == other.name + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutdiscountpercentageonceforeverduration.rb b/lib/open_api_sdk/models/shared/checkoutdiscountpercentageonceforeverduration.rb new file mode 100644 index 0000000..6e170ea --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutdiscountpercentageonceforeverduration.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a percentage discount that is applied once or forever. + class CheckoutDiscountPercentageOnceForeverDuration + extend T::Sig + include Crystalline::MetadataFields + + + field :basis_points, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('basis_points') } } + + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(basis_points: ::Integer, code: ::String, duration: Models::Shared::DiscountDuration, id: ::String, name: ::String, type: Models::Shared::DiscountType).void } + def initialize(basis_points: nil, code: nil, duration: nil, id: nil, name: nil, type: nil) + @basis_points = basis_points + @code = code + @duration = duration + @id = id + @name = name + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @basis_points == other.basis_points + return false unless @code == other.code + return false unless @duration == other.duration + return false unless @id == other.id + return false unless @name == other.name + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutdiscountpercentagerepeatduration.rb b/lib/open_api_sdk/models/shared/checkoutdiscountpercentagerepeatduration.rb new file mode 100644 index 0000000..691ba69 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutdiscountpercentagerepeatduration.rb @@ -0,0 +1,58 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a percentage discount that is applied on every invoice + # for a certain number of months. + class CheckoutDiscountPercentageRepeatDuration + extend T::Sig + include Crystalline::MetadataFields + + + field :basis_points, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('basis_points') } } + + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + + field :duration_in_months, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_in_months') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(basis_points: ::Integer, code: ::String, duration: Models::Shared::DiscountDuration, duration_in_months: ::Integer, id: ::String, name: ::String, type: Models::Shared::DiscountType).void } + def initialize(basis_points: nil, code: nil, duration: nil, duration_in_months: nil, id: nil, name: nil, type: nil) + @basis_points = basis_points + @code = code + @duration = duration + @duration_in_months = duration_in_months + @id = id + @name = name + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @basis_points == other.basis_points + return false unless @code == other.code + return false unless @duration == other.duration + return false unless @duration_in_months == other.duration_in_months + return false unless @id == other.id + return false unless @name == other.name + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlink.rb b/lib/open_api_sdk/models/shared/checkoutlink.rb new file mode 100644 index 0000000..8a4bb1b --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlink.rb @@ -0,0 +1,89 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Checkout link data. + class CheckoutLink + extend T::Sig + include Crystalline::MetadataFields + + # Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. + field :allow_discount_codes, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_discount_codes') } } + # Client secret used to access the checkout link. + field :client_secret, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_secret') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :discount, T.any(Models::Shared::DiscountFixedOnceForeverDurationBase, Models::Shared::DiscountFixedRepeatDurationBase, Models::Shared::DiscountPercentageOnceForeverDurationBase, Models::Shared::DiscountPercentageRepeatDurationBase), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount') } } + # ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Optional label to distinguish links internally + field :label, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The organization ID. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :payment_processor, Models::Shared::PaymentProcessor, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payment_processor'), 'decoder': Utils.enum_from_string(Models::Shared::PaymentProcessor, false) } } + + field :products, T::Array[Models::Shared::CheckoutLinkProduct], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. + field :require_billing_address, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('require_billing_address') } } + # URL where the customer will be redirected after a successful payment. + field :success_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success_url') } } + + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + + + sig { params(allow_discount_codes: T::Boolean, client_secret: ::String, created_at: ::DateTime, discount: T.any(Models::Shared::DiscountFixedOnceForeverDurationBase, Models::Shared::DiscountFixedRepeatDurationBase, Models::Shared::DiscountPercentageOnceForeverDurationBase, Models::Shared::DiscountPercentageRepeatDurationBase), discount_id: ::String, id: ::String, label: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, organization_id: ::String, payment_processor: Models::Shared::PaymentProcessor, products: T::Array[Models::Shared::CheckoutLinkProduct], require_billing_address: T::Boolean, success_url: ::String, url: ::String).void } + def initialize(allow_discount_codes: nil, client_secret: nil, created_at: nil, discount: nil, discount_id: nil, id: nil, label: nil, metadata: nil, modified_at: nil, organization_id: nil, payment_processor: nil, products: nil, require_billing_address: nil, success_url: nil, url: nil) + @allow_discount_codes = allow_discount_codes + @client_secret = client_secret + @created_at = created_at + @discount = discount + @discount_id = discount_id + @id = id + @label = label + @metadata = metadata + @modified_at = modified_at + @organization_id = organization_id + @payment_processor = payment_processor + @products = products + @require_billing_address = require_billing_address + @success_url = success_url + @url = url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @allow_discount_codes == other.allow_discount_codes + return false unless @client_secret == other.client_secret + return false unless @created_at == other.created_at + return false unless @discount == other.discount + return false unless @discount_id == other.discount_id + return false unless @id == other.id + return false unless @label == other.label + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @payment_processor == other.payment_processor + return false unless @products == other.products + return false unless @require_billing_address == other.require_billing_address + return false unless @success_url == other.success_url + return false unless @url == other.url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlink_metadata.rb b/lib/open_api_sdk/models/shared/checkoutlink_metadata.rb new file mode 100644 index 0000000..05b6e22 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlink_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutLinkMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkcreateproduct.rb b/lib/open_api_sdk/models/shared/checkoutlinkcreateproduct.rb new file mode 100644 index 0000000..0ecb1c2 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkcreateproduct.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a new checkout link from a a single product. + # + # **Deprecated**: Use `CheckoutLinkCreateProducts` instead. + class CheckoutLinkCreateProduct + extend T::Sig + include Crystalline::MetadataFields + + # Payment processor to use. Currently only Stripe is supported. + field :payment_processor, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payment_processor') } } + + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. + field :allow_discount_codes, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_discount_codes') } } + # ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. + field :discount_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # Optional label to distinguish links internally + field :label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. + field :require_billing_address, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('require_billing_address') } } + # URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. + field :success_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success_url') } } + + + sig { params(payment_processor: ::String, product_id: ::String, allow_discount_codes: T.nilable(T::Boolean), discount_id: T.nilable(::String), label: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), require_billing_address: T.nilable(T::Boolean), success_url: T.nilable(::String)).void } + def initialize(payment_processor: nil, product_id: nil, allow_discount_codes: nil, discount_id: nil, label: nil, metadata: nil, require_billing_address: nil, success_url: nil) + @payment_processor = payment_processor + @product_id = product_id + @allow_discount_codes = allow_discount_codes + @discount_id = discount_id + @label = label + @metadata = metadata + @require_billing_address = require_billing_address + @success_url = success_url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @payment_processor == other.payment_processor + return false unless @product_id == other.product_id + return false unless @allow_discount_codes == other.allow_discount_codes + return false unless @discount_id == other.discount_id + return false unless @label == other.label + return false unless @metadata == other.metadata + return false unless @require_billing_address == other.require_billing_address + return false unless @success_url == other.success_url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkcreateproduct_metadata.rb b/lib/open_api_sdk/models/shared/checkoutlinkcreateproduct_metadata.rb new file mode 100644 index 0000000..353fb8e --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkcreateproduct_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutLinkCreateProductMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkcreateproductprice.rb b/lib/open_api_sdk/models/shared/checkoutlinkcreateproductprice.rb new file mode 100644 index 0000000..66fb2ae --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkcreateproductprice.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a new checkout link from a a single product price. + # + # **Deprecated**: Use `CheckoutLinkCreateProducts` instead. + class CheckoutLinkCreateProductPrice + extend T::Sig + include Crystalline::MetadataFields + + # Payment processor to use. Currently only Stripe is supported. + field :payment_processor, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payment_processor') } } + + field :product_price_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_price_id') } } + # Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. + field :allow_discount_codes, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_discount_codes') } } + # ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. + field :discount_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # Optional label to distinguish links internally + field :label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. + field :require_billing_address, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('require_billing_address') } } + # URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. + field :success_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success_url') } } + + + sig { params(payment_processor: ::String, product_price_id: ::String, allow_discount_codes: T.nilable(T::Boolean), discount_id: T.nilable(::String), label: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), require_billing_address: T.nilable(T::Boolean), success_url: T.nilable(::String)).void } + def initialize(payment_processor: nil, product_price_id: nil, allow_discount_codes: nil, discount_id: nil, label: nil, metadata: nil, require_billing_address: nil, success_url: nil) + @payment_processor = payment_processor + @product_price_id = product_price_id + @allow_discount_codes = allow_discount_codes + @discount_id = discount_id + @label = label + @metadata = metadata + @require_billing_address = require_billing_address + @success_url = success_url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @payment_processor == other.payment_processor + return false unless @product_price_id == other.product_price_id + return false unless @allow_discount_codes == other.allow_discount_codes + return false unless @discount_id == other.discount_id + return false unless @label == other.label + return false unless @metadata == other.metadata + return false unless @require_billing_address == other.require_billing_address + return false unless @success_url == other.success_url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkcreateproductprice_metadata.rb b/lib/open_api_sdk/models/shared/checkoutlinkcreateproductprice_metadata.rb new file mode 100644 index 0000000..31654d0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkcreateproductprice_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutLinkCreateProductPriceMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkcreateproducts.rb b/lib/open_api_sdk/models/shared/checkoutlinkcreateproducts.rb new file mode 100644 index 0000000..169b2fa --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkcreateproducts.rb @@ -0,0 +1,71 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a new checkout link. + class CheckoutLinkCreateProducts + extend T::Sig + include Crystalline::MetadataFields + + # Payment processor to use. Currently only Stripe is supported. + field :payment_processor, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payment_processor') } } + # List of products that will be available to select at checkout. + field :products, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. + field :allow_discount_codes, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_discount_codes') } } + # ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. + field :discount_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # Optional label to distinguish links internally + field :label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. + field :require_billing_address, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('require_billing_address') } } + # URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. + field :success_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success_url') } } + + + sig { params(payment_processor: ::String, products: T::Array[::String], allow_discount_codes: T.nilable(T::Boolean), discount_id: T.nilable(::String), label: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), require_billing_address: T.nilable(T::Boolean), success_url: T.nilable(::String)).void } + def initialize(payment_processor: nil, products: nil, allow_discount_codes: nil, discount_id: nil, label: nil, metadata: nil, require_billing_address: nil, success_url: nil) + @payment_processor = payment_processor + @products = products + @allow_discount_codes = allow_discount_codes + @discount_id = discount_id + @label = label + @metadata = metadata + @require_billing_address = require_billing_address + @success_url = success_url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @payment_processor == other.payment_processor + return false unless @products == other.products + return false unless @allow_discount_codes == other.allow_discount_codes + return false unless @discount_id == other.discount_id + return false unless @label == other.label + return false unless @metadata == other.metadata + return false unless @require_billing_address == other.require_billing_address + return false unless @success_url == other.success_url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkcreateproducts_metadata.rb b/lib/open_api_sdk/models/shared/checkoutlinkcreateproducts_metadata.rb new file mode 100644 index 0000000..66bd1cf --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkcreateproducts_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutLinkCreateProductsMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkdiscount.rb b/lib/open_api_sdk/models/shared/checkoutlinkdiscount.rb new file mode 100644 index 0000000..aa61d00 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkdiscount.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutLinkDiscount + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkproduct.rb b/lib/open_api_sdk/models/shared/checkoutlinkproduct.rb new file mode 100644 index 0000000..92979a0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkproduct.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Product data for a checkout link. + class CheckoutLinkProduct + extend T::Sig + include Crystalline::MetadataFields + + # List of benefits granted by the product. + field :benefits, T::Array[Models::Shared::BenefitPublic], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefits') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The description of the product. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the product. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the product is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Whether the product is a subscription. + field :is_recurring, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_recurring') } } + # List of medias associated to the product. + field :medias, T::Array[Models::Shared::ProductMediaFileRead], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('medias') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the product. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the product. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # List of prices for this product. + field :prices, T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + + sig { params(benefits: T::Array[Models::Shared::BenefitPublic], created_at: ::DateTime, description: ::String, id: ::String, is_archived: T::Boolean, is_recurring: T::Boolean, medias: T::Array[Models::Shared::ProductMediaFileRead], metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, prices: T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], recurring_interval: Models::Shared::SubscriptionRecurringInterval).void } + def initialize(benefits: nil, created_at: nil, description: nil, id: nil, is_archived: nil, is_recurring: nil, medias: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, prices: nil, recurring_interval: nil) + @benefits = benefits + @created_at = created_at + @description = description + @id = id + @is_archived = is_archived + @is_recurring = is_recurring + @medias = medias + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @prices = prices + @recurring_interval = recurring_interval + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefits == other.benefits + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @is_recurring == other.is_recurring + return false unless @medias == other.medias + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @prices == other.prices + return false unless @recurring_interval == other.recurring_interval + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkproduct_metadata.rb b/lib/open_api_sdk/models/shared/checkoutlinkproduct_metadata.rb new file mode 100644 index 0000000..ff7556f --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkproduct_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutLinkProductMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkproduct_prices.rb b/lib/open_api_sdk/models/shared/checkoutlinkproduct_prices.rb new file mode 100644 index 0000000..ad0dfad --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkproduct_prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutLinkProductPrices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinksortproperty.rb b/lib/open_api_sdk/models/shared/checkoutlinksortproperty.rb new file mode 100644 index 0000000..c6200cd --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinksortproperty.rb @@ -0,0 +1,26 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutLinkSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + LABEL = new('label') + MINUS_LABEL = new('-label') + SUCCESS_URL = new('success_url') + MINUS_SUCCESS_URL = new('-success_url') + ALLOW_DISCOUNT_CODES = new('allow_discount_codes') + MINUS_ALLOW_DISCOUNT_CODES = new('-allow_discount_codes') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkupdate.rb b/lib/open_api_sdk/models/shared/checkoutlinkupdate.rb new file mode 100644 index 0000000..6ab99d4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkupdate.rb @@ -0,0 +1,67 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to update an existing checkout link. + class CheckoutLinkUpdate + extend T::Sig + include Crystalline::MetadataFields + + # Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. + field :allow_discount_codes, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_discount_codes') } } + # ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored. + field :discount_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + + field :label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # List of products that will be available to select at checkout. + field :products, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. + field :require_billing_address, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('require_billing_address') } } + # URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id. + field :success_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success_url') } } + + + sig { params(allow_discount_codes: T.nilable(T::Boolean), discount_id: T.nilable(::String), label: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), products: T.nilable(T::Array[::String]), require_billing_address: T.nilable(T::Boolean), success_url: T.nilable(::String)).void } + def initialize(allow_discount_codes: nil, discount_id: nil, label: nil, metadata: nil, products: nil, require_billing_address: nil, success_url: nil) + @allow_discount_codes = allow_discount_codes + @discount_id = discount_id + @label = label + @metadata = metadata + @products = products + @require_billing_address = require_billing_address + @success_url = success_url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @allow_discount_codes == other.allow_discount_codes + return false unless @discount_id == other.discount_id + return false unless @label == other.label + return false unless @metadata == other.metadata + return false unless @products == other.products + return false unless @require_billing_address == other.require_billing_address + return false unless @success_url == other.success_url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutlinkupdate_metadata.rb b/lib/open_api_sdk/models/shared/checkoutlinkupdate_metadata.rb new file mode 100644 index 0000000..0d11a7c --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutlinkupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutLinkUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutproduct.rb b/lib/open_api_sdk/models/shared/checkoutproduct.rb new file mode 100644 index 0000000..45664ff --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutproduct.rb @@ -0,0 +1,77 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Product data for a checkout session. + class CheckoutProduct + extend T::Sig + include Crystalline::MetadataFields + + # List of benefits granted by the product. + field :benefits, T::Array[Models::Shared::BenefitPublic], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefits') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The description of the product. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the product. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the product is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Whether the product is a subscription. + field :is_recurring, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_recurring') } } + # List of medias associated to the product. + field :medias, T::Array[Models::Shared::ProductMediaFileRead], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('medias') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the product. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the product. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # List of prices for this product. + field :prices, T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + + sig { params(benefits: T::Array[Models::Shared::BenefitPublic], created_at: ::DateTime, description: ::String, id: ::String, is_archived: T::Boolean, is_recurring: T::Boolean, medias: T::Array[Models::Shared::ProductMediaFileRead], modified_at: ::DateTime, name: ::String, organization_id: ::String, prices: T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], recurring_interval: Models::Shared::SubscriptionRecurringInterval).void } + def initialize(benefits: nil, created_at: nil, description: nil, id: nil, is_archived: nil, is_recurring: nil, medias: nil, modified_at: nil, name: nil, organization_id: nil, prices: nil, recurring_interval: nil) + @benefits = benefits + @created_at = created_at + @description = description + @id = id + @is_archived = is_archived + @is_recurring = is_recurring + @medias = medias + @modified_at = modified_at + @name = name + @organization_id = organization_id + @prices = prices + @recurring_interval = recurring_interval + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefits == other.benefits + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @is_recurring == other.is_recurring + return false unless @medias == other.medias + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @prices == other.prices + return false unless @recurring_interval == other.recurring_interval + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutproduct_prices.rb b/lib/open_api_sdk/models/shared/checkoutproduct_prices.rb new file mode 100644 index 0000000..17cd447 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutproduct_prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutProductPrices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutpublic.rb b/lib/open_api_sdk/models/shared/checkoutpublic.rb new file mode 100644 index 0000000..2a50868 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutpublic.rb @@ -0,0 +1,193 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Checkout session data retrieved using the client secret. + class CheckoutPublic + extend T::Sig + include Crystalline::MetadataFields + + # Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it. + field :allow_discount_codes, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_discount_codes') } } + # Amount in cents, before discounts and taxes. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :attached_custom_fields, T::Array[Models::Shared::AttachedCustomField], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('attached_custom_fields') } } + # Client secret used to update and complete the checkout session from the client. + field :client_secret, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_secret') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Currency code of the checkout session. + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :customer_billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_billing_address') } } + + field :customer_billing_address_fields, Models::Shared::CheckoutCustomerBillingAddressFields, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_billing_address_fields') } } + # Email address of the customer. + field :customer_email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_email') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :customer_ip_address, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_ip_address') } } + # Name of the customer. + field :customer_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_name') } } + + field :customer_tax_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_tax_id') } } + + field :discount, T.any(Models::Shared::CheckoutDiscountFixedOnceForeverDuration, Models::Shared::CheckoutDiscountFixedRepeatDuration, Models::Shared::CheckoutDiscountPercentageOnceForeverDuration, Models::Shared::CheckoutDiscountPercentageRepeatDuration), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount') } } + # Discount amount in cents. + field :discount_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_amount') } } + # ID of the discount applied to the checkout. + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page. + field :embed_origin, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('embed_origin') } } + # Expiration date and time of the checkout session. + field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable. + field :is_discount_applicable, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_discount_applicable') } } + # Whether the product price is free, regardless of discounts. + field :is_free_product_price, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_free_product_price') } } + # Whether the checkout requires a payment form, whether because of a payment or payment method setup. + field :is_payment_form_required, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_payment_form_required') } } + # Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount. + field :is_payment_required, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_payment_required') } } + # Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles. + field :is_payment_setup_required, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_payment_setup_required') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Amount in cents, after discounts but before taxes. + field :net_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('net_amount') } } + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + + field :payment_processor, Models::Shared::PaymentProcessor, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payment_processor'), 'decoder': Utils.enum_from_string(Models::Shared::PaymentProcessor, false) } } + + field :payment_processor_metadata, T::Hash[Symbol, ::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payment_processor_metadata') } } + # Product data for a checkout session. + field :product, Models::Shared::CheckoutProduct, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product') } } + # ID of the product to checkout. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # Price of the selected product. + field :product_price, T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit)), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_price') } } + # ID of the product price to checkout. + field :product_price_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_price_id') } } + # List of products available to select. + field :products, T::Array[Models::Shared::CheckoutProduct], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`. + field :require_billing_address, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('require_billing_address') } } + + field :status, Models::Shared::CheckoutStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::CheckoutStatus, false) } } + # URL where the customer will be redirected after a successful payment. + field :success_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('success_url') } } + # Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it. + field :tax_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_amount') } } + # Amount in cents, after discounts and taxes. + field :total_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('total_amount') } } + # URL where the customer can access the checkout session. + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + # Key-value object storing custom field values. + field :custom_field_data, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('custom_field_data') } } + + + sig { params(allow_discount_codes: T::Boolean, amount: ::Integer, attached_custom_fields: T::Array[Models::Shared::AttachedCustomField], client_secret: ::String, created_at: ::DateTime, currency: ::String, customer_billing_address: Models::Shared::Address, customer_billing_address_fields: Models::Shared::CheckoutCustomerBillingAddressFields, customer_email: ::String, customer_id: ::String, customer_ip_address: ::String, customer_name: ::String, customer_tax_id: ::String, discount: T.any(Models::Shared::CheckoutDiscountFixedOnceForeverDuration, Models::Shared::CheckoutDiscountFixedRepeatDuration, Models::Shared::CheckoutDiscountPercentageOnceForeverDuration, Models::Shared::CheckoutDiscountPercentageRepeatDuration), discount_amount: ::Integer, discount_id: ::String, embed_origin: ::String, expires_at: ::DateTime, id: ::String, is_discount_applicable: T::Boolean, is_free_product_price: T::Boolean, is_payment_form_required: T::Boolean, is_payment_required: T::Boolean, is_payment_setup_required: T::Boolean, modified_at: ::DateTime, net_amount: ::Integer, organization: Models::Shared::Organization, payment_processor: Models::Shared::PaymentProcessor, payment_processor_metadata: T::Hash[Symbol, ::String], product: Models::Shared::CheckoutProduct, product_id: ::String, product_price: T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit)), product_price_id: ::String, products: T::Array[Models::Shared::CheckoutProduct], require_billing_address: T::Boolean, status: Models::Shared::CheckoutStatus, success_url: ::String, tax_amount: ::Integer, total_amount: ::Integer, url: ::String, custom_field_data: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)])).void } + def initialize(allow_discount_codes: nil, amount: nil, attached_custom_fields: nil, client_secret: nil, created_at: nil, currency: nil, customer_billing_address: nil, customer_billing_address_fields: nil, customer_email: nil, customer_id: nil, customer_ip_address: nil, customer_name: nil, customer_tax_id: nil, discount: nil, discount_amount: nil, discount_id: nil, embed_origin: nil, expires_at: nil, id: nil, is_discount_applicable: nil, is_free_product_price: nil, is_payment_form_required: nil, is_payment_required: nil, is_payment_setup_required: nil, modified_at: nil, net_amount: nil, organization: nil, payment_processor: nil, payment_processor_metadata: nil, product: nil, product_id: nil, product_price: nil, product_price_id: nil, products: nil, require_billing_address: nil, status: nil, success_url: nil, tax_amount: nil, total_amount: nil, url: nil, custom_field_data: nil) + @allow_discount_codes = allow_discount_codes + @amount = amount + @attached_custom_fields = attached_custom_fields + @client_secret = client_secret + @created_at = created_at + @currency = currency + @customer_billing_address = customer_billing_address + @customer_billing_address_fields = customer_billing_address_fields + @customer_email = customer_email + @customer_id = customer_id + @customer_ip_address = customer_ip_address + @customer_name = customer_name + @customer_tax_id = customer_tax_id + @discount = discount + @discount_amount = discount_amount + @discount_id = discount_id + @embed_origin = embed_origin + @expires_at = expires_at + @id = id + @is_discount_applicable = is_discount_applicable + @is_free_product_price = is_free_product_price + @is_payment_form_required = is_payment_form_required + @is_payment_required = is_payment_required + @is_payment_setup_required = is_payment_setup_required + @modified_at = modified_at + @net_amount = net_amount + @organization = organization + @payment_processor = payment_processor + @payment_processor_metadata = payment_processor_metadata + @product = product + @product_id = product_id + @product_price = product_price + @product_price_id = product_price_id + @products = products + @require_billing_address = require_billing_address + @status = status + @success_url = success_url + @tax_amount = tax_amount + @total_amount = total_amount + @url = url + @custom_field_data = custom_field_data + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @allow_discount_codes == other.allow_discount_codes + return false unless @amount == other.amount + return false unless @attached_custom_fields == other.attached_custom_fields + return false unless @client_secret == other.client_secret + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @customer_billing_address == other.customer_billing_address + return false unless @customer_billing_address_fields == other.customer_billing_address_fields + return false unless @customer_email == other.customer_email + return false unless @customer_id == other.customer_id + return false unless @customer_ip_address == other.customer_ip_address + return false unless @customer_name == other.customer_name + return false unless @customer_tax_id == other.customer_tax_id + return false unless @discount == other.discount + return false unless @discount_amount == other.discount_amount + return false unless @discount_id == other.discount_id + return false unless @embed_origin == other.embed_origin + return false unless @expires_at == other.expires_at + return false unless @id == other.id + return false unless @is_discount_applicable == other.is_discount_applicable + return false unless @is_free_product_price == other.is_free_product_price + return false unless @is_payment_form_required == other.is_payment_form_required + return false unless @is_payment_required == other.is_payment_required + return false unless @is_payment_setup_required == other.is_payment_setup_required + return false unless @modified_at == other.modified_at + return false unless @net_amount == other.net_amount + return false unless @organization == other.organization + return false unless @payment_processor == other.payment_processor + return false unless @payment_processor_metadata == other.payment_processor_metadata + return false unless @product == other.product + return false unless @product_id == other.product_id + return false unless @product_price == other.product_price + return false unless @product_price_id == other.product_price_id + return false unless @products == other.products + return false unless @require_billing_address == other.require_billing_address + return false unless @status == other.status + return false unless @success_url == other.success_url + return false unless @tax_amount == other.tax_amount + return false unless @total_amount == other.total_amount + return false unless @url == other.url + return false unless @custom_field_data == other.custom_field_data + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutpublic_custom_field_data.rb b/lib/open_api_sdk/models/shared/checkoutpublic_custom_field_data.rb new file mode 100644 index 0000000..b4a52ef --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutpublic_custom_field_data.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutPublicCustomFieldData + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutpublic_discount.rb b/lib/open_api_sdk/models/shared/checkoutpublic_discount.rb new file mode 100644 index 0000000..8faf834 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutpublic_discount.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutPublicDiscount + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutpublic_product_price.rb b/lib/open_api_sdk/models/shared/checkoutpublic_product_price.rb new file mode 100644 index 0000000..a7bc0ba --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutpublic_product_price.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Price of the selected product. + class CheckoutPublicProductPrice + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutsortproperty.rb b/lib/open_api_sdk/models/shared/checkoutsortproperty.rb new file mode 100644 index 0000000..07972c2 --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutsortproperty.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + EXPIRES_AT = new('expires_at') + MINUS_EXPIRES_AT = new('-expires_at') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/checkoutstatus.rb b/lib/open_api_sdk/models/shared/checkoutstatus.rb new file mode 100644 index 0000000..0b5c14e --- /dev/null +++ b/lib/open_api_sdk/models/shared/checkoutstatus.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CheckoutStatus < T::Enum + enums do + OPEN = new('open') + EXPIRED = new('expired') + CONFIRMED = new('confirmed') + SUCCEEDED = new('succeeded') + FAILED = new('failed') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/clauses.rb b/lib/open_api_sdk/models/shared/clauses.rb new file mode 100644 index 0000000..478e871 --- /dev/null +++ b/lib/open_api_sdk/models/shared/clauses.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Clauses + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/conditions.rb b/lib/open_api_sdk/models/shared/conditions.rb new file mode 100644 index 0000000..3663199 --- /dev/null +++ b/lib/open_api_sdk/models/shared/conditions.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Conditions + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/countaggregation.rb b/lib/open_api_sdk/models/shared/countaggregation.rb new file mode 100644 index 0000000..578ab63 --- /dev/null +++ b/lib/open_api_sdk/models/shared/countaggregation.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CountAggregation + extend T::Sig + include Crystalline::MetadataFields + + + field :func, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('func') } } + + + sig { params(func: T.nilable(::String)).void } + def initialize(func: nil) + @func = func + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @func == other.func + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/custom_field_data.rb b/lib/open_api_sdk/models/shared/custom_field_data.rb new file mode 100644 index 0000000..9c2d7e9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/custom_field_data.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldData + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customer.rb b/lib/open_api_sdk/models/shared/customer.rb new file mode 100644 index 0000000..d1198dd --- /dev/null +++ b/lib/open_api_sdk/models/shared/customer.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A customer in an organization. + class Customer + extend T::Sig + include Crystalline::MetadataFields + + + field :avatar_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + + field :billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Timestamp for when the customer was soft deleted. + field :deleted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deleted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The email address of the customer. This must be unique within the organization. + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. + field :email_verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } + # The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('external_id') } } + # The ID of the customer. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the customer. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the customer. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :tax_id, T::Array[T.any(::String, Models::Shared::TaxIDFormat)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(avatar_url: ::String, billing_address: Models::Shared::Address, created_at: ::DateTime, deleted_at: ::DateTime, email: ::String, email_verified: T::Boolean, external_id: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, tax_id: T::Array[T.any(::String, Models::Shared::TaxIDFormat)]).void } + def initialize(avatar_url: nil, billing_address: nil, created_at: nil, deleted_at: nil, email: nil, email_verified: nil, external_id: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, tax_id: nil) + @avatar_url = avatar_url + @billing_address = billing_address + @created_at = created_at + @deleted_at = deleted_at + @email = email + @email_verified = email_verified + @external_id = external_id + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @avatar_url == other.avatar_url + return false unless @billing_address == other.billing_address + return false unless @created_at == other.created_at + return false unless @deleted_at == other.deleted_at + return false unless @email == other.email + return false unless @email_verified == other.email_verified + return false unless @external_id == other.external_id + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customer_metadata.rb b/lib/open_api_sdk/models/shared/customer_metadata.rb new file mode 100644 index 0000000..472c615 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customer_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customer_metadata1.rb b/lib/open_api_sdk/models/shared/customer_metadata1.rb new file mode 100644 index 0000000..6b3262e --- /dev/null +++ b/lib/open_api_sdk/models/shared/customer_metadata1.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerMetadata1 + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customer_tax_id.rb b/lib/open_api_sdk/models/shared/customer_tax_id.rb new file mode 100644 index 0000000..2380747 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customer_tax_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerTaxId + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrant.rb b/lib/open_api_sdk/models/shared/customerbenefitgrant.rb new file mode 100644 index 0000000..b875137 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrant.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrant + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantcustom.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantcustom.rb new file mode 100644 index 0000000..0e7cad9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantcustom.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantCustom + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit, Models::Shared::BenefitCustomSubscriber, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit') } } + + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::CustomerPortalCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :granted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_granted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_granted') } } + + field :is_revoked, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_revoked') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :properties, Models::Shared::BenefitGrantCustomProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :revoked_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + + + sig { params(benefit: Models::Shared::BenefitCustomSubscriber, benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::CustomerPortalCustomer, customer_id: ::String, granted_at: ::DateTime, id: ::String, is_granted: T::Boolean, is_revoked: T::Boolean, modified_at: ::DateTime, order_id: ::String, properties: Models::Shared::BenefitGrantCustomProperties, revoked_at: ::DateTime, subscription_id: ::String).void } + def initialize(benefit: nil, benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, granted_at: nil, id: nil, is_granted: nil, is_revoked: nil, modified_at: nil, order_id: nil, properties: nil, revoked_at: nil, subscription_id: nil) + @benefit = benefit + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @granted_at = granted_at + @id = id + @is_granted = is_granted + @is_revoked = is_revoked + @modified_at = modified_at + @order_id = order_id + @properties = properties + @revoked_at = revoked_at + @subscription_id = subscription_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit == other.benefit + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @granted_at == other.granted_at + return false unless @id == other.id + return false unless @is_granted == other.is_granted + return false unless @is_revoked == other.is_revoked + return false unless @modified_at == other.modified_at + return false unless @order_id == other.order_id + return false unless @properties == other.properties + return false unless @revoked_at == other.revoked_at + return false unless @subscription_id == other.subscription_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantcustomupdate.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantcustomupdate.rb new file mode 100644 index 0000000..37d7902 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantcustomupdate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantCustomUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_type') } } + + + sig { params(benefit_type: ::String).void } + def initialize(benefit_type: nil) + @benefit_type = benefit_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_type == other.benefit_type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantdiscord.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantdiscord.rb new file mode 100644 index 0000000..c36c8a8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantdiscord.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantDiscord + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit, Models::Shared::BenefitDiscordSubscriber, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit') } } + + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::CustomerPortalCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :granted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_granted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_granted') } } + + field :is_revoked, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_revoked') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :properties, Models::Shared::BenefitGrantDiscordProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :revoked_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + + + sig { params(benefit: Models::Shared::BenefitDiscordSubscriber, benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::CustomerPortalCustomer, customer_id: ::String, granted_at: ::DateTime, id: ::String, is_granted: T::Boolean, is_revoked: T::Boolean, modified_at: ::DateTime, order_id: ::String, properties: Models::Shared::BenefitGrantDiscordProperties, revoked_at: ::DateTime, subscription_id: ::String).void } + def initialize(benefit: nil, benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, granted_at: nil, id: nil, is_granted: nil, is_revoked: nil, modified_at: nil, order_id: nil, properties: nil, revoked_at: nil, subscription_id: nil) + @benefit = benefit + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @granted_at = granted_at + @id = id + @is_granted = is_granted + @is_revoked = is_revoked + @modified_at = modified_at + @order_id = order_id + @properties = properties + @revoked_at = revoked_at + @subscription_id = subscription_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit == other.benefit + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @granted_at == other.granted_at + return false unless @id == other.id + return false unless @is_granted == other.is_granted + return false unless @is_revoked == other.is_revoked + return false unless @modified_at == other.modified_at + return false unless @order_id == other.order_id + return false unless @properties == other.properties + return false unless @revoked_at == other.revoked_at + return false unless @subscription_id == other.subscription_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantdiscordpropertiesupdate.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantdiscordpropertiesupdate.rb new file mode 100644 index 0000000..4f6e331 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantdiscordpropertiesupdate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantDiscordPropertiesUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :account_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_id') } } + + + sig { params(account_id: ::String).void } + def initialize(account_id: nil) + @account_id = account_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @account_id == other.account_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantdiscordupdate.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantdiscordupdate.rb new file mode 100644 index 0000000..c0374dc --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantdiscordupdate.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantDiscordUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_type') } } + + field :properties, Models::Shared::CustomerBenefitGrantDiscordPropertiesUpdate, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + + sig { params(benefit_type: ::String, properties: Models::Shared::CustomerBenefitGrantDiscordPropertiesUpdate).void } + def initialize(benefit_type: nil, properties: nil) + @benefit_type = benefit_type + @properties = properties + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_type == other.benefit_type + return false unless @properties == other.properties + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantdownloadables.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantdownloadables.rb new file mode 100644 index 0000000..412dbfd --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantdownloadables.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantDownloadables + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit, Models::Shared::BenefitDownloadablesSubscriber, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit') } } + + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::CustomerPortalCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :granted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_granted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_granted') } } + + field :is_revoked, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_revoked') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :properties, Models::Shared::BenefitGrantDownloadablesProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :revoked_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + + + sig { params(benefit: Models::Shared::BenefitDownloadablesSubscriber, benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::CustomerPortalCustomer, customer_id: ::String, granted_at: ::DateTime, id: ::String, is_granted: T::Boolean, is_revoked: T::Boolean, modified_at: ::DateTime, order_id: ::String, properties: Models::Shared::BenefitGrantDownloadablesProperties, revoked_at: ::DateTime, subscription_id: ::String).void } + def initialize(benefit: nil, benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, granted_at: nil, id: nil, is_granted: nil, is_revoked: nil, modified_at: nil, order_id: nil, properties: nil, revoked_at: nil, subscription_id: nil) + @benefit = benefit + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @granted_at = granted_at + @id = id + @is_granted = is_granted + @is_revoked = is_revoked + @modified_at = modified_at + @order_id = order_id + @properties = properties + @revoked_at = revoked_at + @subscription_id = subscription_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit == other.benefit + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @granted_at == other.granted_at + return false unless @id == other.id + return false unless @is_granted == other.is_granted + return false unless @is_revoked == other.is_revoked + return false unless @modified_at == other.modified_at + return false unless @order_id == other.order_id + return false unless @properties == other.properties + return false unless @revoked_at == other.revoked_at + return false unless @subscription_id == other.subscription_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantdownloadablesupdate.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantdownloadablesupdate.rb new file mode 100644 index 0000000..3f808e9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantdownloadablesupdate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantDownloadablesUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_type') } } + + + sig { params(benefit_type: ::String).void } + def initialize(benefit_type: nil) + @benefit_type = benefit_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_type == other.benefit_type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepository.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepository.rb new file mode 100644 index 0000000..72da5c4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepository.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantGitHubRepository + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit, Models::Shared::BenefitGitHubRepositorySubscriber, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit') } } + + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::CustomerPortalCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :granted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_granted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_granted') } } + + field :is_revoked, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_revoked') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :properties, Models::Shared::BenefitGrantGitHubRepositoryProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :revoked_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + + + sig { params(benefit: Models::Shared::BenefitGitHubRepositorySubscriber, benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::CustomerPortalCustomer, customer_id: ::String, granted_at: ::DateTime, id: ::String, is_granted: T::Boolean, is_revoked: T::Boolean, modified_at: ::DateTime, order_id: ::String, properties: Models::Shared::BenefitGrantGitHubRepositoryProperties, revoked_at: ::DateTime, subscription_id: ::String).void } + def initialize(benefit: nil, benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, granted_at: nil, id: nil, is_granted: nil, is_revoked: nil, modified_at: nil, order_id: nil, properties: nil, revoked_at: nil, subscription_id: nil) + @benefit = benefit + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @granted_at = granted_at + @id = id + @is_granted = is_granted + @is_revoked = is_revoked + @modified_at = modified_at + @order_id = order_id + @properties = properties + @revoked_at = revoked_at + @subscription_id = subscription_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit == other.benefit + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @granted_at == other.granted_at + return false unless @id == other.id + return false unless @is_granted == other.is_granted + return false unless @is_revoked == other.is_revoked + return false unless @modified_at == other.modified_at + return false unless @order_id == other.order_id + return false unless @properties == other.properties + return false unless @revoked_at == other.revoked_at + return false unless @subscription_id == other.subscription_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.rb new file mode 100644 index 0000000..3b0559e --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepositorypropertiesupdate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantGitHubRepositoryPropertiesUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :account_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_id') } } + + + sig { params(account_id: ::String).void } + def initialize(account_id: nil) + @account_id = account_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @account_id == other.account_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepositoryupdate.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepositoryupdate.rb new file mode 100644 index 0000000..39e928b --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantgithubrepositoryupdate.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantGitHubRepositoryUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_type') } } + + field :properties, Models::Shared::CustomerBenefitGrantGitHubRepositoryPropertiesUpdate, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + + sig { params(benefit_type: ::String, properties: Models::Shared::CustomerBenefitGrantGitHubRepositoryPropertiesUpdate).void } + def initialize(benefit_type: nil, properties: nil) + @benefit_type = benefit_type + @properties = properties + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_type == other.benefit_type + return false unless @properties == other.properties + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantlicensekeys.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantlicensekeys.rb new file mode 100644 index 0000000..c00070b --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantlicensekeys.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantLicenseKeys + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit, Models::Shared::BenefitLicenseKeysSubscriber, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit') } } + + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::CustomerPortalCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :granted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_granted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_granted') } } + + field :is_revoked, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_revoked') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :properties, Models::Shared::BenefitGrantLicenseKeysProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :revoked_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + + + sig { params(benefit: Models::Shared::BenefitLicenseKeysSubscriber, benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::CustomerPortalCustomer, customer_id: ::String, granted_at: ::DateTime, id: ::String, is_granted: T::Boolean, is_revoked: T::Boolean, modified_at: ::DateTime, order_id: ::String, properties: Models::Shared::BenefitGrantLicenseKeysProperties, revoked_at: ::DateTime, subscription_id: ::String).void } + def initialize(benefit: nil, benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, granted_at: nil, id: nil, is_granted: nil, is_revoked: nil, modified_at: nil, order_id: nil, properties: nil, revoked_at: nil, subscription_id: nil) + @benefit = benefit + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @granted_at = granted_at + @id = id + @is_granted = is_granted + @is_revoked = is_revoked + @modified_at = modified_at + @order_id = order_id + @properties = properties + @revoked_at = revoked_at + @subscription_id = subscription_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit == other.benefit + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @granted_at == other.granted_at + return false unless @id == other.id + return false unless @is_granted == other.is_granted + return false unless @is_revoked == other.is_revoked + return false unless @modified_at == other.modified_at + return false unless @order_id == other.order_id + return false unless @properties == other.properties + return false unless @revoked_at == other.revoked_at + return false unless @subscription_id == other.subscription_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantlicensekeysupdate.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantlicensekeysupdate.rb new file mode 100644 index 0000000..bcd9e83 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantlicensekeysupdate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantLicenseKeysUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_type') } } + + + sig { params(benefit_type: ::String).void } + def initialize(benefit_type: nil) + @benefit_type = benefit_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_type == other.benefit_type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantmetercredit.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantmetercredit.rb new file mode 100644 index 0000000..bd47528 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantmetercredit.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantMeterCredit + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit, Models::Shared::BenefitMeterCreditSubscriber, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit') } } + + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::CustomerPortalCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :granted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_granted, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_granted') } } + + field :is_revoked, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_revoked') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :properties, Models::Shared::BenefitGrantMeterCreditProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :revoked_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + + + sig { params(benefit: Models::Shared::BenefitMeterCreditSubscriber, benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::CustomerPortalCustomer, customer_id: ::String, granted_at: ::DateTime, id: ::String, is_granted: T::Boolean, is_revoked: T::Boolean, modified_at: ::DateTime, order_id: ::String, properties: Models::Shared::BenefitGrantMeterCreditProperties, revoked_at: ::DateTime, subscription_id: ::String).void } + def initialize(benefit: nil, benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, granted_at: nil, id: nil, is_granted: nil, is_revoked: nil, modified_at: nil, order_id: nil, properties: nil, revoked_at: nil, subscription_id: nil) + @benefit = benefit + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @granted_at = granted_at + @id = id + @is_granted = is_granted + @is_revoked = is_revoked + @modified_at = modified_at + @order_id = order_id + @properties = properties + @revoked_at = revoked_at + @subscription_id = subscription_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit == other.benefit + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @granted_at == other.granted_at + return false unless @id == other.id + return false unless @is_granted == other.is_granted + return false unless @is_revoked == other.is_revoked + return false unless @modified_at == other.modified_at + return false unless @order_id == other.order_id + return false unless @properties == other.properties + return false unless @revoked_at == other.revoked_at + return false unless @subscription_id == other.subscription_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantmetercreditupdate.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantmetercreditupdate.rb new file mode 100644 index 0000000..702f16b --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantmetercreditupdate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantMeterCreditUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_type') } } + + + sig { params(benefit_type: ::String).void } + def initialize(benefit_type: nil) + @benefit_type = benefit_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_type == other.benefit_type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantsortproperty.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantsortproperty.rb new file mode 100644 index 0000000..c42dd8e --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantsortproperty.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantSortProperty < T::Enum + enums do + GRANTED_AT = new('granted_at') + MINUS_GRANTED_AT = new('-granted_at') + TYPE = new('type') + MINUS_TYPE = new('-type') + ORGANIZATION = new('organization') + MINUS_ORGANIZATION = new('-organization') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerbenefitgrantupdate.rb b/lib/open_api_sdk/models/shared/customerbenefitgrantupdate.rb new file mode 100644 index 0000000..64f089d --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerbenefitgrantupdate.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerBenefitGrantUpdate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customercancellationreason.rb b/lib/open_api_sdk/models/shared/customercancellationreason.rb new file mode 100644 index 0000000..d3a5a41 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customercancellationreason.rb @@ -0,0 +1,26 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerCancellationReason < T::Enum + enums do + CUSTOMER_SERVICE = new('customer_service') + LOW_QUALITY = new('low_quality') + MISSING_FEATURES = new('missing_features') + SWITCHED_SERVICE = new('switched_service') + TOO_COMPLEX = new('too_complex') + TOO_EXPENSIVE = new('too_expensive') + UNUSED = new('unused') + OTHER = new('other') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customercreate.rb b/lib/open_api_sdk/models/shared/customercreate.rb new file mode 100644 index 0000000..70f92b4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customercreate.rb @@ -0,0 +1,67 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerCreate + extend T::Sig + include Crystalline::MetadataFields + + # The email address of the customer. This must be unique within the organization. + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + field :billing_address, T.nilable(Models::Shared::Address), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + # The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. + field :external_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('external_id') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The name of the customer. + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the customer. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :tax_id, T.nilable(T::Array[T.any(::String, Models::Shared::TaxIDFormat)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(email: ::String, billing_address: T.nilable(Models::Shared::Address), external_id: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), organization_id: T.nilable(::String), tax_id: T.nilable(T::Array[T.any(::String, Models::Shared::TaxIDFormat)])).void } + def initialize(email: nil, billing_address: nil, external_id: nil, metadata: nil, name: nil, organization_id: nil, tax_id: nil) + @email = email + @billing_address = billing_address + @external_id = external_id + @metadata = metadata + @name = name + @organization_id = organization_id + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @email == other.email + return false unless @billing_address == other.billing_address + return false unless @external_id == other.external_id + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customercreate_metadata.rb b/lib/open_api_sdk/models/shared/customercreate_metadata.rb new file mode 100644 index 0000000..23735af --- /dev/null +++ b/lib/open_api_sdk/models/shared/customercreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customercreate_tax_id.rb b/lib/open_api_sdk/models/shared/customercreate_tax_id.rb new file mode 100644 index 0000000..764409d --- /dev/null +++ b/lib/open_api_sdk/models/shared/customercreate_tax_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerCreateTaxId + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customercustomermeter.rb b/lib/open_api_sdk/models/shared/customercustomermeter.rb new file mode 100644 index 0000000..5ba3016 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customercustomermeter.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerCustomerMeter + extend T::Sig + include Crystalline::MetadataFields + + # The balance of the meter, i.e. the difference between credited and consumed units. Never goes negative. + field :balance, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('balance') } } + # The number of consumed units. + field :consumed_units, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('consumed_units') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The number of credited units. + field :credited_units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('credited_units') } } + # The ID of the customer. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :meter, Models::Shared::CustomerCustomerMeterMeter, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter') } } + # The ID of the meter. + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(balance: ::Float, consumed_units: ::Float, created_at: ::DateTime, credited_units: ::Integer, customer_id: ::String, id: ::String, meter: Models::Shared::CustomerCustomerMeterMeter, meter_id: ::String, modified_at: ::DateTime).void } + def initialize(balance: nil, consumed_units: nil, created_at: nil, credited_units: nil, customer_id: nil, id: nil, meter: nil, meter_id: nil, modified_at: nil) + @balance = balance + @consumed_units = consumed_units + @created_at = created_at + @credited_units = credited_units + @customer_id = customer_id + @id = id + @meter = meter + @meter_id = meter_id + @modified_at = modified_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @balance == other.balance + return false unless @consumed_units == other.consumed_units + return false unless @created_at == other.created_at + return false unless @credited_units == other.credited_units + return false unless @customer_id == other.customer_id + return false unless @id == other.id + return false unless @meter == other.meter + return false unless @meter_id == other.meter_id + return false unless @modified_at == other.modified_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customercustomermetermeter.rb b/lib/open_api_sdk/models/shared/customercustomermetermeter.rb new file mode 100644 index 0000000..ecb0250 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customercustomermetermeter.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerCustomerMeterMeter + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the meter. Will be shown on customer's invoices and usage. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + + sig { params(created_at: ::DateTime, id: ::String, modified_at: ::DateTime, name: ::String).void } + def initialize(created_at: nil, id: nil, modified_at: nil, name: nil) + @created_at = created_at + @id = id + @modified_at = modified_at + @name = name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @modified_at == other.modified_at + return false unless @name == other.name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customercustomermetersortproperty.rb b/lib/open_api_sdk/models/shared/customercustomermetersortproperty.rb new file mode 100644 index 0000000..e7e7f6f --- /dev/null +++ b/lib/open_api_sdk/models/shared/customercustomermetersortproperty.rb @@ -0,0 +1,32 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerCustomerMeterSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + MODIFIED_AT = new('modified_at') + MINUS_MODIFIED_AT = new('-modified_at') + METER_ID = new('meter_id') + MINUS_METER_ID = new('-meter_id') + METER_NAME = new('meter_name') + MINUS_METER_NAME = new('-meter_name') + CONSUMED_UNITS = new('consumed_units') + MINUS_CONSUMED_UNITS = new('-consumed_units') + CREDITED_UNITS = new('credited_units') + MINUS_CREDITED_UNITS = new('-credited_units') + BALANCE = new('balance') + MINUS_BALANCE = new('-balance') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customermeter.rb b/lib/open_api_sdk/models/shared/customermeter.rb new file mode 100644 index 0000000..28d2001 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customermeter.rb @@ -0,0 +1,69 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # An active customer meter, with current consumed and credited units. + class CustomerMeter + extend T::Sig + include Crystalline::MetadataFields + + # The balance of the meter, i.e. the difference between credited and consumed units. Never goes negative. + field :balance, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('balance') } } + # The number of consumed units. + field :consumed_units, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('consumed_units') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The number of credited units. + field :credited_units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('credited_units') } } + # A customer in an organization. + field :customer, Models::Shared::Customer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + # The ID of the customer. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :meter, Models::Shared::Meter, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter') } } + # The ID of the meter. + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(balance: ::Float, consumed_units: ::Float, created_at: ::DateTime, credited_units: ::Integer, customer: Models::Shared::Customer, customer_id: ::String, id: ::String, meter: Models::Shared::Meter, meter_id: ::String, modified_at: ::DateTime).void } + def initialize(balance: nil, consumed_units: nil, created_at: nil, credited_units: nil, customer: nil, customer_id: nil, id: nil, meter: nil, meter_id: nil, modified_at: nil) + @balance = balance + @consumed_units = consumed_units + @created_at = created_at + @credited_units = credited_units + @customer = customer + @customer_id = customer_id + @id = id + @meter = meter + @meter_id = meter_id + @modified_at = modified_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @balance == other.balance + return false unless @consumed_units == other.consumed_units + return false unless @created_at == other.created_at + return false unless @credited_units == other.credited_units + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @id == other.id + return false unless @meter == other.meter + return false unless @meter_id == other.meter_id + return false unless @modified_at == other.modified_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customermetersortproperty.rb b/lib/open_api_sdk/models/shared/customermetersortproperty.rb new file mode 100644 index 0000000..7754fd3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customermetersortproperty.rb @@ -0,0 +1,36 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerMeterSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + MODIFIED_AT = new('modified_at') + MINUS_MODIFIED_AT = new('-modified_at') + CUSTOMER_ID = new('customer_id') + MINUS_CUSTOMER_ID = new('-customer_id') + CUSTOMER_NAME = new('customer_name') + MINUS_CUSTOMER_NAME = new('-customer_name') + METER_ID = new('meter_id') + MINUS_METER_ID = new('-meter_id') + METER_NAME = new('meter_name') + MINUS_METER_NAME = new('-meter_name') + CONSUMED_UNITS = new('consumed_units') + MINUS_CONSUMED_UNITS = new('-consumed_units') + CREDITED_UNITS = new('credited_units') + MINUS_CREDITED_UNITS = new('-credited_units') + BALANCE = new('balance') + MINUS_BALANCE = new('-balance') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerorder.rb b/lib/open_api_sdk/models/shared/customerorder.rb new file mode 100644 index 0000000..29bc9f0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerorder.rb @@ -0,0 +1,131 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerOrder + extend T::Sig + include Crystalline::MetadataFields + + # Amount in cents, after discounts but before taxes. + # + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + + field :billing_reason, Models::Shared::OrderBillingReason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_reason'), 'decoder': Utils.enum_from_string(Models::Shared::OrderBillingReason, false) } } + + field :checkout_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checkout_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # Discount amount in cents. + field :discount_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_amount') } } + + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Line items composing the order. + field :items, T::Array[Models::Shared::OrderItemSchema], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Amount in cents, after discounts but before taxes. + field :net_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('net_amount') } } + # Whether the order has been paid for. + field :paid, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('paid') } } + + field :product, Models::Shared::CustomerOrderProduct, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product') } } + + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # Amount refunded in cents. + field :refunded_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('refunded_amount') } } + # Sales tax refunded in cents. + field :refunded_tax_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('refunded_tax_amount') } } + + field :status, Models::Shared::OrderStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::OrderStatus, false) } } + + field :subscription, Models::Shared::CustomerOrderSubscription, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription') } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + # Amount in cents, before discounts and taxes. + field :subtotal_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subtotal_amount') } } + # Sales tax amount in cents. + field :tax_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_amount') } } + # Amount in cents, after discounts and taxes. + field :total_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('total_amount') } } + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :user_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('user_id') } } + + + sig { params(amount: ::Integer, billing_address: Models::Shared::Address, billing_reason: Models::Shared::OrderBillingReason, checkout_id: ::String, created_at: ::DateTime, currency: ::String, customer_id: ::String, discount_amount: ::Integer, discount_id: ::String, id: ::String, items: T::Array[Models::Shared::OrderItemSchema], modified_at: ::DateTime, net_amount: ::Integer, paid: T::Boolean, product: Models::Shared::CustomerOrderProduct, product_id: ::String, refunded_amount: ::Integer, refunded_tax_amount: ::Integer, status: Models::Shared::OrderStatus, subscription: Models::Shared::CustomerOrderSubscription, subscription_id: ::String, subtotal_amount: ::Integer, tax_amount: ::Integer, total_amount: ::Integer, user_id: ::String).void } + def initialize(amount: nil, billing_address: nil, billing_reason: nil, checkout_id: nil, created_at: nil, currency: nil, customer_id: nil, discount_amount: nil, discount_id: nil, id: nil, items: nil, modified_at: nil, net_amount: nil, paid: nil, product: nil, product_id: nil, refunded_amount: nil, refunded_tax_amount: nil, status: nil, subscription: nil, subscription_id: nil, subtotal_amount: nil, tax_amount: nil, total_amount: nil, user_id: nil) + @amount = amount + @billing_address = billing_address + @billing_reason = billing_reason + @checkout_id = checkout_id + @created_at = created_at + @currency = currency + @customer_id = customer_id + @discount_amount = discount_amount + @discount_id = discount_id + @id = id + @items = items + @modified_at = modified_at + @net_amount = net_amount + @paid = paid + @product = product + @product_id = product_id + @refunded_amount = refunded_amount + @refunded_tax_amount = refunded_tax_amount + @status = status + @subscription = subscription + @subscription_id = subscription_id + @subtotal_amount = subtotal_amount + @tax_amount = tax_amount + @total_amount = total_amount + @user_id = user_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @billing_address == other.billing_address + return false unless @billing_reason == other.billing_reason + return false unless @checkout_id == other.checkout_id + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @customer_id == other.customer_id + return false unless @discount_amount == other.discount_amount + return false unless @discount_id == other.discount_id + return false unless @id == other.id + return false unless @items == other.items + return false unless @modified_at == other.modified_at + return false unless @net_amount == other.net_amount + return false unless @paid == other.paid + return false unless @product == other.product + return false unless @product_id == other.product_id + return false unless @refunded_amount == other.refunded_amount + return false unless @refunded_tax_amount == other.refunded_tax_amount + return false unless @status == other.status + return false unless @subscription == other.subscription + return false unless @subscription_id == other.subscription_id + return false unless @subtotal_amount == other.subtotal_amount + return false unless @tax_amount == other.tax_amount + return false unless @total_amount == other.total_amount + return false unless @user_id == other.user_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerorderinvoice.rb b/lib/open_api_sdk/models/shared/customerorderinvoice.rb new file mode 100644 index 0000000..b3f4f57 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerorderinvoice.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Order's invoice data. + class CustomerOrderInvoice + extend T::Sig + include Crystalline::MetadataFields + + # The URL to the invoice. + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + + + sig { params(url: ::String).void } + def initialize(url: nil) + @url = url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @url == other.url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerorderproduct.rb b/lib/open_api_sdk/models/shared/customerorderproduct.rb new file mode 100644 index 0000000..b690049 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerorderproduct.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerOrderProduct + extend T::Sig + include Crystalline::MetadataFields + + # List of benefits granted by the product. + field :benefits, T::Array[Models::Shared::BenefitPublic], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefits') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The description of the product. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the product. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the product is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Whether the product is a subscription. + field :is_recurring, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_recurring') } } + # List of medias associated to the product. + field :medias, T::Array[Models::Shared::ProductMediaFileRead], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('medias') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the product. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + # The ID of the organization owning the product. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # List of prices for this product. + field :prices, T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + + sig { params(benefits: T::Array[Models::Shared::BenefitPublic], created_at: ::DateTime, description: ::String, id: ::String, is_archived: T::Boolean, is_recurring: T::Boolean, medias: T::Array[Models::Shared::ProductMediaFileRead], modified_at: ::DateTime, name: ::String, organization: Models::Shared::Organization, organization_id: ::String, prices: T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], recurring_interval: Models::Shared::SubscriptionRecurringInterval).void } + def initialize(benefits: nil, created_at: nil, description: nil, id: nil, is_archived: nil, is_recurring: nil, medias: nil, modified_at: nil, name: nil, organization: nil, organization_id: nil, prices: nil, recurring_interval: nil) + @benefits = benefits + @created_at = created_at + @description = description + @id = id + @is_archived = is_archived + @is_recurring = is_recurring + @medias = medias + @modified_at = modified_at + @name = name + @organization = organization + @organization_id = organization_id + @prices = prices + @recurring_interval = recurring_interval + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefits == other.benefits + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @is_recurring == other.is_recurring + return false unless @medias == other.medias + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization == other.organization + return false unless @organization_id == other.organization_id + return false unless @prices == other.prices + return false unless @recurring_interval == other.recurring_interval + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerorderproduct_prices.rb b/lib/open_api_sdk/models/shared/customerorderproduct_prices.rb new file mode 100644 index 0000000..f32895f --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerorderproduct_prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerOrderProductPrices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerordersortproperty.rb b/lib/open_api_sdk/models/shared/customerordersortproperty.rb new file mode 100644 index 0000000..ed4566c --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerordersortproperty.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerOrderSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + AMOUNT = new('amount') + MINUS_AMOUNT = new('-amount') + NET_AMOUNT = new('net_amount') + MINUS_NET_AMOUNT = new('-net_amount') + PRODUCT = new('product') + MINUS_PRODUCT = new('-product') + SUBSCRIPTION = new('subscription') + MINUS_SUBSCRIPTION = new('-subscription') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerordersubscription.rb b/lib/open_api_sdk/models/shared/customerordersubscription.rb new file mode 100644 index 0000000..8da7a85 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerordersubscription.rb @@ -0,0 +1,109 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerOrderSubscription + extend T::Sig + include Crystalline::MetadataFields + + # The amount of the subscription. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Whether the subscription will be canceled at the end of the current period. + field :cancel_at_period_end, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cancel_at_period_end') } } + # The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. + field :canceled_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('canceled_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :checkout_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checkout_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The currency of the subscription. + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + # The end timestamp of the current billing period. + field :current_period_end, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_end'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The start timestamp of the current billing period. + field :current_period_start, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_start'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer_cancellation_comment, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_comment') } } + + field :customer_cancellation_reason, Models::Shared::CustomerCancellationReason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_reason'), 'decoder': Utils.enum_from_string(Models::Shared::CustomerCancellationReason, false) } } + # The ID of the subscribed customer. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # The ID of the applied discount, if any. + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # The timestamp when the subscription ended. + field :ended_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ended_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The timestamp when the subscription will end. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the subscribed product. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + # The timestamp when the subscription started. + field :started_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('started_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :status, Models::Shared::SubscriptionStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionStatus, false) } } + + + sig { params(amount: ::Integer, cancel_at_period_end: T::Boolean, canceled_at: ::DateTime, checkout_id: ::String, created_at: ::DateTime, currency: ::String, current_period_end: ::DateTime, current_period_start: ::DateTime, customer_cancellation_comment: ::String, customer_cancellation_reason: Models::Shared::CustomerCancellationReason, customer_id: ::String, discount_id: ::String, ended_at: ::DateTime, ends_at: ::DateTime, id: ::String, modified_at: ::DateTime, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, started_at: ::DateTime, status: Models::Shared::SubscriptionStatus).void } + def initialize(amount: nil, cancel_at_period_end: nil, canceled_at: nil, checkout_id: nil, created_at: nil, currency: nil, current_period_end: nil, current_period_start: nil, customer_cancellation_comment: nil, customer_cancellation_reason: nil, customer_id: nil, discount_id: nil, ended_at: nil, ends_at: nil, id: nil, modified_at: nil, product_id: nil, recurring_interval: nil, started_at: nil, status: nil) + @amount = amount + @cancel_at_period_end = cancel_at_period_end + @canceled_at = canceled_at + @checkout_id = checkout_id + @created_at = created_at + @currency = currency + @current_period_end = current_period_end + @current_period_start = current_period_start + @customer_cancellation_comment = customer_cancellation_comment + @customer_cancellation_reason = customer_cancellation_reason + @customer_id = customer_id + @discount_id = discount_id + @ended_at = ended_at + @ends_at = ends_at + @id = id + @modified_at = modified_at + @product_id = product_id + @recurring_interval = recurring_interval + @started_at = started_at + @status = status + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @cancel_at_period_end == other.cancel_at_period_end + return false unless @canceled_at == other.canceled_at + return false unless @checkout_id == other.checkout_id + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @current_period_end == other.current_period_end + return false unless @current_period_start == other.current_period_start + return false unless @customer_cancellation_comment == other.customer_cancellation_comment + return false unless @customer_cancellation_reason == other.customer_cancellation_reason + return false unless @customer_id == other.customer_id + return false unless @discount_id == other.discount_id + return false unless @ended_at == other.ended_at + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @modified_at == other.modified_at + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @started_at == other.started_at + return false unless @status == other.status + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerorganization.rb b/lib/open_api_sdk/models/shared/customerorganization.rb new file mode 100644 index 0000000..8bd0b1c --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerorganization.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema of an organization and related data for customer portal. + class CustomerOrganization + extend T::Sig + include Crystalline::MetadataFields + + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + + field :products, T::Array[Models::Shared::CustomerProduct], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + + + sig { params(organization: Models::Shared::Organization, products: T::Array[Models::Shared::CustomerProduct]).void } + def initialize(organization: nil, products: nil) + @organization = organization + @products = products + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @organization == other.organization + return false unless @products == other.products + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerpaymentmethodcreate.rb b/lib/open_api_sdk/models/shared/customerpaymentmethodcreate.rb new file mode 100644 index 0000000..43a7f1a --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerpaymentmethodcreate.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerPaymentMethodCreate + extend T::Sig + include Crystalline::MetadataFields + + + field :confirmation_token_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('confirmation_token_id') } } + + field :return_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('return_url') } } + + field :set_default, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('set_default') } } + + + sig { params(confirmation_token_id: ::String, return_url: ::String, set_default: T::Boolean).void } + def initialize(confirmation_token_id: nil, return_url: nil, set_default: nil) + @confirmation_token_id = confirmation_token_id + @return_url = return_url + @set_default = set_default + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @confirmation_token_id == other.confirmation_token_id + return false unless @return_url == other.return_url + return false unless @set_default == other.set_default + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerportalcustomer.rb b/lib/open_api_sdk/models/shared/customerportalcustomer.rb new file mode 100644 index 0000000..44834c3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerportalcustomer.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerPortalCustomer + extend T::Sig + include Crystalline::MetadataFields + + + field :billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + field :email_verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :oauth_accounts, T::Hash[Symbol, Models::Shared::CustomerPortalOAuthAccount], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('oauth_accounts') } } + + field :tax_id, T::Array[T.any(::String, Models::Shared::TaxIDFormat)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(billing_address: Models::Shared::Address, created_at: ::DateTime, email: ::String, email_verified: T::Boolean, id: ::String, modified_at: ::DateTime, name: ::String, oauth_accounts: T::Hash[Symbol, Models::Shared::CustomerPortalOAuthAccount], tax_id: T::Array[T.any(::String, Models::Shared::TaxIDFormat)]).void } + def initialize(billing_address: nil, created_at: nil, email: nil, email_verified: nil, id: nil, modified_at: nil, name: nil, oauth_accounts: nil, tax_id: nil) + @billing_address = billing_address + @created_at = created_at + @email = email + @email_verified = email_verified + @id = id + @modified_at = modified_at + @name = name + @oauth_accounts = oauth_accounts + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @billing_address == other.billing_address + return false unless @created_at == other.created_at + return false unless @email == other.email + return false unless @email_verified == other.email_verified + return false unless @id == other.id + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @oauth_accounts == other.oauth_accounts + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerportalcustomer_tax_id.rb b/lib/open_api_sdk/models/shared/customerportalcustomer_tax_id.rb new file mode 100644 index 0000000..79e08b2 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerportalcustomer_tax_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerPortalCustomerTaxId + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerportalcustomerupdate.rb b/lib/open_api_sdk/models/shared/customerportalcustomerupdate.rb new file mode 100644 index 0000000..e2ebb36 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerportalcustomerupdate.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerPortalCustomerUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :billing_address, T.nilable(Models::Shared::Address), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :tax_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(billing_address: T.nilable(Models::Shared::Address), email: T.nilable(::String), name: T.nilable(::String), tax_id: T.nilable(::String)).void } + def initialize(billing_address: nil, email: nil, name: nil, tax_id: nil) + @billing_address = billing_address + @email = email + @name = name + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @billing_address == other.billing_address + return false unless @email == other.email + return false unless @name == other.name + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerportaloauthaccount.rb b/lib/open_api_sdk/models/shared/customerportaloauthaccount.rb new file mode 100644 index 0000000..abffc68 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerportaloauthaccount.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerPortalOAuthAccount + extend T::Sig + include Crystalline::MetadataFields + + + field :account_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_id') } } + + field :account_username, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('account_username') } } + + + sig { params(account_id: ::String, account_username: ::String).void } + def initialize(account_id: nil, account_username: nil) + @account_id = account_id + @account_username = account_username + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @account_id == other.account_id + return false unless @account_username == other.account_username + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerproduct.rb b/lib/open_api_sdk/models/shared/customerproduct.rb new file mode 100644 index 0000000..7a5b0be --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerproduct.rb @@ -0,0 +1,77 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema of a product for customer portal. + class CustomerProduct + extend T::Sig + include Crystalline::MetadataFields + + # The benefits granted by the product. + field :benefits, T::Array[Models::Shared::BenefitPublic], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefits') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The description of the product. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the product. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the product is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Whether the product is a subscription. + field :is_recurring, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_recurring') } } + # The medias associated to the product. + field :medias, T::Array[Models::Shared::ProductMediaFileRead], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('medias') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the product. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the product. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # List of available prices for this product. + field :prices, T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + + sig { params(benefits: T::Array[Models::Shared::BenefitPublic], created_at: ::DateTime, description: ::String, id: ::String, is_archived: T::Boolean, is_recurring: T::Boolean, medias: T::Array[Models::Shared::ProductMediaFileRead], modified_at: ::DateTime, name: ::String, organization_id: ::String, prices: T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], recurring_interval: Models::Shared::SubscriptionRecurringInterval).void } + def initialize(benefits: nil, created_at: nil, description: nil, id: nil, is_archived: nil, is_recurring: nil, medias: nil, modified_at: nil, name: nil, organization_id: nil, prices: nil, recurring_interval: nil) + @benefits = benefits + @created_at = created_at + @description = description + @id = id + @is_archived = is_archived + @is_recurring = is_recurring + @medias = medias + @modified_at = modified_at + @name = name + @organization_id = organization_id + @prices = prices + @recurring_interval = recurring_interval + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefits == other.benefits + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @is_recurring == other.is_recurring + return false unless @medias == other.medias + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @prices == other.prices + return false unless @recurring_interval == other.recurring_interval + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerproduct_prices.rb b/lib/open_api_sdk/models/shared/customerproduct_prices.rb new file mode 100644 index 0000000..17bd9c2 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerproduct_prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerProductPrices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersession.rb b/lib/open_api_sdk/models/shared/customersession.rb new file mode 100644 index 0000000..98f9272 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersession.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A customer session that can be used to authenticate as a customer. + class CustomerSession + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # A customer in an organization. + field :customer, Models::Shared::Customer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :customer_portal_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_portal_url') } } + + field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token') } } + + + sig { params(created_at: ::DateTime, customer: Models::Shared::Customer, customer_id: ::String, customer_portal_url: ::String, expires_at: ::DateTime, id: ::String, modified_at: ::DateTime, token: ::String).void } + def initialize(created_at: nil, customer: nil, customer_id: nil, customer_portal_url: nil, expires_at: nil, id: nil, modified_at: nil, token: nil) + @created_at = created_at + @customer = customer + @customer_id = customer_id + @customer_portal_url = customer_portal_url + @expires_at = expires_at + @id = id + @modified_at = modified_at + @token = token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @customer_portal_url == other.customer_portal_url + return false unless @expires_at == other.expires_at + return false unless @id == other.id + return false unless @modified_at == other.modified_at + return false unless @token == other.token + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersessioncustomerexternalidcreate.rb b/lib/open_api_sdk/models/shared/customersessioncustomerexternalidcreate.rb new file mode 100644 index 0000000..466e012 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersessioncustomerexternalidcreate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for creating a customer session using an external customer ID. + class CustomerSessionCustomerExternalIDCreate + extend T::Sig + include Crystalline::MetadataFields + + # External ID of the customer to create a session for. + field :customer_external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_external_id') } } + + + sig { params(customer_external_id: ::String).void } + def initialize(customer_external_id: nil) + @customer_external_id = customer_external_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_external_id == other.customer_external_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersessioncustomeridcreate.rb b/lib/open_api_sdk/models/shared/customersessioncustomeridcreate.rb new file mode 100644 index 0000000..874765b --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersessioncustomeridcreate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for creating a customer session using a customer ID. + class CustomerSessionCustomerIDCreate + extend T::Sig + include Crystalline::MetadataFields + + # ID of the customer to create a session for. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + + sig { params(customer_id: ::String).void } + def initialize(customer_id: nil) + @customer_id = customer_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_id == other.customer_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersortproperty.rb b/lib/open_api_sdk/models/shared/customersortproperty.rb new file mode 100644 index 0000000..4c9432f --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersortproperty.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + EMAIL = new('email') + MINUS_EMAIL = new('-email') + NAME = new('name') + MINUS_NAME = new('-name') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstate.rb b/lib/open_api_sdk/models/shared/customerstate.rb new file mode 100644 index 0000000..7417846 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstate.rb @@ -0,0 +1,97 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A customer along with additional state information: + # + # * Active subscriptions + # * Granted benefits + # * Active meters + class CustomerState + extend T::Sig + include Crystalline::MetadataFields + + # The customer's active meters. + field :active_meters, T::Array[Models::Shared::CustomerStateMeter], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('active_meters') } } + # The customer's active subscriptions. + field :active_subscriptions, T::Array[Models::Shared::CustomerStateSubscription], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('active_subscriptions') } } + + field :avatar_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + + field :billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Timestamp for when the customer was soft deleted. + field :deleted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deleted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The email address of the customer. This must be unique within the organization. + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. + field :email_verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } + # The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('external_id') } } + # The customer's active benefit grants. + field :granted_benefits, T::Array[Models::Shared::CustomerStateBenefitGrant], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_benefits') } } + # The ID of the customer. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the customer. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the customer. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :tax_id, T::Array[T.any(::String, Models::Shared::TaxIDFormat)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(active_meters: T::Array[Models::Shared::CustomerStateMeter], active_subscriptions: T::Array[Models::Shared::CustomerStateSubscription], avatar_url: ::String, billing_address: Models::Shared::Address, created_at: ::DateTime, deleted_at: ::DateTime, email: ::String, email_verified: T::Boolean, external_id: ::String, granted_benefits: T::Array[Models::Shared::CustomerStateBenefitGrant], id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, tax_id: T::Array[T.any(::String, Models::Shared::TaxIDFormat)]).void } + def initialize(active_meters: nil, active_subscriptions: nil, avatar_url: nil, billing_address: nil, created_at: nil, deleted_at: nil, email: nil, email_verified: nil, external_id: nil, granted_benefits: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, tax_id: nil) + @active_meters = active_meters + @active_subscriptions = active_subscriptions + @avatar_url = avatar_url + @billing_address = billing_address + @created_at = created_at + @deleted_at = deleted_at + @email = email + @email_verified = email_verified + @external_id = external_id + @granted_benefits = granted_benefits + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @active_meters == other.active_meters + return false unless @active_subscriptions == other.active_subscriptions + return false unless @avatar_url == other.avatar_url + return false unless @billing_address == other.billing_address + return false unless @created_at == other.created_at + return false unless @deleted_at == other.deleted_at + return false unless @email == other.email + return false unless @email_verified == other.email_verified + return false unless @external_id == other.external_id + return false unless @granted_benefits == other.granted_benefits + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstate_metadata.rb b/lib/open_api_sdk/models/shared/customerstate_metadata.rb new file mode 100644 index 0000000..609df96 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerStateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstate_tax_id.rb b/lib/open_api_sdk/models/shared/customerstate_tax_id.rb new file mode 100644 index 0000000..eff1bc3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstate_tax_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerStateTaxId + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstatebenefitgrant.rb b/lib/open_api_sdk/models/shared/customerstatebenefitgrant.rb new file mode 100644 index 0000000..a1b0639 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstatebenefitgrant.rb @@ -0,0 +1,57 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # An active benefit grant for a customer. + class CustomerStateBenefitGrant + extend T::Sig + include Crystalline::MetadataFields + + # The ID of the benefit concerned by this grant. + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + + field :benefit_type, Models::Shared::BenefitType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_type'), 'decoder': Utils.enum_from_string(Models::Shared::BenefitType, false) } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The timestamp when the benefit was granted. + field :granted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('granted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the grant. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :properties, T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + + sig { params(benefit_id: ::String, benefit_type: Models::Shared::BenefitType, created_at: ::DateTime, granted_at: ::DateTime, id: ::String, modified_at: ::DateTime, properties: T.any(Models::Shared::BenefitGrantDiscordProperties, Models::Shared::BenefitGrantGitHubRepositoryProperties, Models::Shared::BenefitGrantDownloadablesProperties, Models::Shared::BenefitGrantLicenseKeysProperties, Models::Shared::BenefitGrantCustomProperties)).void } + def initialize(benefit_id: nil, benefit_type: nil, created_at: nil, granted_at: nil, id: nil, modified_at: nil, properties: nil) + @benefit_id = benefit_id + @benefit_type = benefit_type + @created_at = created_at + @granted_at = granted_at + @id = id + @modified_at = modified_at + @properties = properties + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @benefit_type == other.benefit_type + return false unless @created_at == other.created_at + return false unless @granted_at == other.granted_at + return false unless @id == other.id + return false unless @modified_at == other.modified_at + return false unless @properties == other.properties + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstatebenefitgrant_properties.rb b/lib/open_api_sdk/models/shared/customerstatebenefitgrant_properties.rb new file mode 100644 index 0000000..300abc9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstatebenefitgrant_properties.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerStateBenefitGrantProperties + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstatemeter.rb b/lib/open_api_sdk/models/shared/customerstatemeter.rb new file mode 100644 index 0000000..e71290a --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstatemeter.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # An active meter for a customer, with latest consumed and credited units. + class CustomerStateMeter + extend T::Sig + include Crystalline::MetadataFields + + # The balance of the meter, i.e. the difference between credited and consumed units. Never goes negative. + field :balance, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('balance') } } + # The number of consumed units. + field :consumed_units, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('consumed_units') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The number of credited units. + field :credited_units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('credited_units') } } + # The ID of the meter. + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(balance: ::Float, consumed_units: ::Float, created_at: ::DateTime, credited_units: ::Integer, meter_id: ::String, modified_at: ::DateTime).void } + def initialize(balance: nil, consumed_units: nil, created_at: nil, credited_units: nil, meter_id: nil, modified_at: nil) + @balance = balance + @consumed_units = consumed_units + @created_at = created_at + @credited_units = credited_units + @meter_id = meter_id + @modified_at = modified_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @balance == other.balance + return false unless @consumed_units == other.consumed_units + return false unless @created_at == other.created_at + return false unless @credited_units == other.credited_units + return false unless @meter_id == other.meter_id + return false unless @modified_at == other.modified_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstatesubscription.rb b/lib/open_api_sdk/models/shared/customerstatesubscription.rb new file mode 100644 index 0000000..1c072a8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstatesubscription.rb @@ -0,0 +1,101 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # An active customer subscription. + class CustomerStateSubscription + extend T::Sig + include Crystalline::MetadataFields + + # The amount of the subscription. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Whether the subscription will be canceled at the end of the current period. + field :cancel_at_period_end, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cancel_at_period_end') } } + # The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. + field :canceled_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('canceled_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The currency of the subscription. + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + # The end timestamp of the current billing period. + field :current_period_end, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_end'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The start timestamp of the current billing period. + field :current_period_start, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_start'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the applied discount, if any. + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # The timestamp when the subscription will end. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the subscription. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # List of meters associated with the subscription. + field :meters, T::Array[Models::Shared::CustomerStateSubscriptionMeter], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meters') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the subscribed product. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + # The timestamp when the subscription started. + field :started_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('started_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :status, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status') } } + # Key-value object storing custom field values. + field :custom_field_data, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('custom_field_data') } } + + + sig { params(amount: ::Integer, cancel_at_period_end: T::Boolean, canceled_at: ::DateTime, created_at: ::DateTime, currency: ::String, current_period_end: ::DateTime, current_period_start: ::DateTime, discount_id: ::String, ends_at: ::DateTime, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], meters: T::Array[Models::Shared::CustomerStateSubscriptionMeter], modified_at: ::DateTime, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, started_at: ::DateTime, status: ::String, custom_field_data: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)])).void } + def initialize(amount: nil, cancel_at_period_end: nil, canceled_at: nil, created_at: nil, currency: nil, current_period_end: nil, current_period_start: nil, discount_id: nil, ends_at: nil, id: nil, metadata: nil, meters: nil, modified_at: nil, product_id: nil, recurring_interval: nil, started_at: nil, status: nil, custom_field_data: nil) + @amount = amount + @cancel_at_period_end = cancel_at_period_end + @canceled_at = canceled_at + @created_at = created_at + @currency = currency + @current_period_end = current_period_end + @current_period_start = current_period_start + @discount_id = discount_id + @ends_at = ends_at + @id = id + @metadata = metadata + @meters = meters + @modified_at = modified_at + @product_id = product_id + @recurring_interval = recurring_interval + @started_at = started_at + @status = status + @custom_field_data = custom_field_data + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @cancel_at_period_end == other.cancel_at_period_end + return false unless @canceled_at == other.canceled_at + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @current_period_end == other.current_period_end + return false unless @current_period_start == other.current_period_start + return false unless @discount_id == other.discount_id + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @meters == other.meters + return false unless @modified_at == other.modified_at + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @started_at == other.started_at + return false unless @status == other.status + return false unless @custom_field_data == other.custom_field_data + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstatesubscription_custom_field_data.rb b/lib/open_api_sdk/models/shared/customerstatesubscription_custom_field_data.rb new file mode 100644 index 0000000..ff79a57 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstatesubscription_custom_field_data.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerStateSubscriptionCustomFieldData + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstatesubscription_metadata.rb b/lib/open_api_sdk/models/shared/customerstatesubscription_metadata.rb new file mode 100644 index 0000000..785ec7a --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstatesubscription_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerStateSubscriptionMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerstatesubscriptionmeter.rb b/lib/open_api_sdk/models/shared/customerstatesubscriptionmeter.rb new file mode 100644 index 0000000..7f8847e --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerstatesubscriptionmeter.rb @@ -0,0 +1,57 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Current consumption and spending for a subscription meter. + class CustomerStateSubscriptionMeter + extend T::Sig + include Crystalline::MetadataFields + + # The amount due in cents so far in this billing period. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # The number of consumed units so far in this billing period. + field :consumed_units, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('consumed_units') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The number of credited units so far in this billing period. + field :credited_units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('credited_units') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # The ID of the meter. + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(amount: ::Integer, consumed_units: ::Float, created_at: ::DateTime, credited_units: ::Integer, id: ::String, meter_id: ::String, modified_at: ::DateTime).void } + def initialize(amount: nil, consumed_units: nil, created_at: nil, credited_units: nil, id: nil, meter_id: nil, modified_at: nil) + @amount = amount + @consumed_units = consumed_units + @created_at = created_at + @credited_units = credited_units + @id = id + @meter_id = meter_id + @modified_at = modified_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @consumed_units == other.consumed_units + return false unless @created_at == other.created_at + return false unless @credited_units == other.credited_units + return false unless @id == other.id + return false unless @meter_id == other.meter_id + return false unless @modified_at == other.modified_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscription.rb b/lib/open_api_sdk/models/shared/customersubscription.rb new file mode 100644 index 0000000..331ee8d --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscription.rb @@ -0,0 +1,121 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscription + extend T::Sig + include Crystalline::MetadataFields + + # The amount of the subscription. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Whether the subscription will be canceled at the end of the current period. + field :cancel_at_period_end, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cancel_at_period_end') } } + # The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. + field :canceled_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('canceled_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :checkout_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checkout_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The currency of the subscription. + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + # The end timestamp of the current billing period. + field :current_period_end, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_end'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The start timestamp of the current billing period. + field :current_period_start, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_start'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer_cancellation_comment, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_comment') } } + + field :customer_cancellation_reason, Models::Shared::CustomerCancellationReason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_reason'), 'decoder': Utils.enum_from_string(Models::Shared::CustomerCancellationReason, false) } } + # The ID of the subscribed customer. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # The ID of the applied discount, if any. + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # The timestamp when the subscription ended. + field :ended_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ended_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The timestamp when the subscription will end. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # List of meters associated with the subscription. + field :meters, T::Array[Models::Shared::CustomerSubscriptionMeter], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meters') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # List of enabled prices for the subscription. + field :prices, T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + + field :product, Models::Shared::CustomerSubscriptionProduct, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product') } } + # The ID of the subscribed product. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + # The timestamp when the subscription started. + field :started_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('started_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :status, Models::Shared::SubscriptionStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionStatus, false) } } + + + sig { params(amount: ::Integer, cancel_at_period_end: T::Boolean, canceled_at: ::DateTime, checkout_id: ::String, created_at: ::DateTime, currency: ::String, current_period_end: ::DateTime, current_period_start: ::DateTime, customer_cancellation_comment: ::String, customer_cancellation_reason: Models::Shared::CustomerCancellationReason, customer_id: ::String, discount_id: ::String, ended_at: ::DateTime, ends_at: ::DateTime, id: ::String, meters: T::Array[Models::Shared::CustomerSubscriptionMeter], modified_at: ::DateTime, prices: T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], product: Models::Shared::CustomerSubscriptionProduct, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, started_at: ::DateTime, status: Models::Shared::SubscriptionStatus).void } + def initialize(amount: nil, cancel_at_period_end: nil, canceled_at: nil, checkout_id: nil, created_at: nil, currency: nil, current_period_end: nil, current_period_start: nil, customer_cancellation_comment: nil, customer_cancellation_reason: nil, customer_id: nil, discount_id: nil, ended_at: nil, ends_at: nil, id: nil, meters: nil, modified_at: nil, prices: nil, product: nil, product_id: nil, recurring_interval: nil, started_at: nil, status: nil) + @amount = amount + @cancel_at_period_end = cancel_at_period_end + @canceled_at = canceled_at + @checkout_id = checkout_id + @created_at = created_at + @currency = currency + @current_period_end = current_period_end + @current_period_start = current_period_start + @customer_cancellation_comment = customer_cancellation_comment + @customer_cancellation_reason = customer_cancellation_reason + @customer_id = customer_id + @discount_id = discount_id + @ended_at = ended_at + @ends_at = ends_at + @id = id + @meters = meters + @modified_at = modified_at + @prices = prices + @product = product + @product_id = product_id + @recurring_interval = recurring_interval + @started_at = started_at + @status = status + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @cancel_at_period_end == other.cancel_at_period_end + return false unless @canceled_at == other.canceled_at + return false unless @checkout_id == other.checkout_id + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @current_period_end == other.current_period_end + return false unless @current_period_start == other.current_period_start + return false unless @customer_cancellation_comment == other.customer_cancellation_comment + return false unless @customer_cancellation_reason == other.customer_cancellation_reason + return false unless @customer_id == other.customer_id + return false unless @discount_id == other.discount_id + return false unless @ended_at == other.ended_at + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @meters == other.meters + return false unless @modified_at == other.modified_at + return false unless @prices == other.prices + return false unless @product == other.product + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @started_at == other.started_at + return false unless @status == other.status + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscription_prices.rb b/lib/open_api_sdk/models/shared/customersubscription_prices.rb new file mode 100644 index 0000000..5ec56ac --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscription_prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscriptionPrices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscriptioncancel.rb b/lib/open_api_sdk/models/shared/customersubscriptioncancel.rb new file mode 100644 index 0000000..3a3786f --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscriptioncancel.rb @@ -0,0 +1,52 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscriptionCancel + extend T::Sig + include Crystalline::MetadataFields + + # Cancel an active subscription once the current period ends. + # + # Or uncancel a subscription currently set to be revoked at period end. + field :cancel_at_period_end, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cancel_at_period_end') } } + # Customer feedback and why they decided to cancel. + field :cancellation_comment, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cancellation_comment') } } + # Customers reason for cancellation. + # + # * `too_expensive`: Too expensive for the customer. + # * `missing_features`: Customer is missing certain features. + # * `switched_service`: Customer switched to another service. + # * `unused`: Customer is not using it enough. + # * `customer_service`: Customer is not satisfied with the customer service. + # * `low_quality`: Customer is unhappy with the quality. + # * `too_complex`: Customer considers the service too complicated. + # * `other`: Other reason(s). + field :cancellation_reason, T.nilable(Models::Shared::CustomerCancellationReason), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cancellation_reason'), 'decoder': Utils.enum_from_string(Models::Shared::CustomerCancellationReason, true) } } + + + sig { params(cancel_at_period_end: T.nilable(T::Boolean), cancellation_comment: T.nilable(::String), cancellation_reason: T.nilable(Models::Shared::CustomerCancellationReason)).void } + def initialize(cancel_at_period_end: nil, cancellation_comment: nil, cancellation_reason: nil) + @cancel_at_period_end = cancel_at_period_end + @cancellation_comment = cancellation_comment + @cancellation_reason = cancellation_reason + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @cancel_at_period_end == other.cancel_at_period_end + return false unless @cancellation_comment == other.cancellation_comment + return false unless @cancellation_reason == other.cancellation_reason + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscriptionmeter.rb b/lib/open_api_sdk/models/shared/customersubscriptionmeter.rb new file mode 100644 index 0000000..f0d4ed8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscriptionmeter.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscriptionMeter + extend T::Sig + include Crystalline::MetadataFields + + # The amount due in cents so far in this billing period. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # The number of consumed units so far in this billing period. + field :consumed_units, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('consumed_units') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The number of credited units so far in this billing period. + field :credited_units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('credited_units') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :meter, Models::Shared::CustomerSubscriptionMeterMeter, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter') } } + # The ID of the meter. + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(amount: ::Integer, consumed_units: ::Float, created_at: ::DateTime, credited_units: ::Integer, id: ::String, meter: Models::Shared::CustomerSubscriptionMeterMeter, meter_id: ::String, modified_at: ::DateTime).void } + def initialize(amount: nil, consumed_units: nil, created_at: nil, credited_units: nil, id: nil, meter: nil, meter_id: nil, modified_at: nil) + @amount = amount + @consumed_units = consumed_units + @created_at = created_at + @credited_units = credited_units + @id = id + @meter = meter + @meter_id = meter_id + @modified_at = modified_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @consumed_units == other.consumed_units + return false unless @created_at == other.created_at + return false unless @credited_units == other.credited_units + return false unless @id == other.id + return false unless @meter == other.meter + return false unless @meter_id == other.meter_id + return false unless @modified_at == other.modified_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscriptionmetermeter.rb b/lib/open_api_sdk/models/shared/customersubscriptionmetermeter.rb new file mode 100644 index 0000000..dd5c68a --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscriptionmetermeter.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscriptionMeterMeter + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the meter. Will be shown on customer's invoices and usage. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + + sig { params(created_at: ::DateTime, id: ::String, modified_at: ::DateTime, name: ::String).void } + def initialize(created_at: nil, id: nil, modified_at: nil, name: nil) + @created_at = created_at + @id = id + @modified_at = modified_at + @name = name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @modified_at == other.modified_at + return false unless @name == other.name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscriptionproduct.rb b/lib/open_api_sdk/models/shared/customersubscriptionproduct.rb new file mode 100644 index 0000000..ee9940e --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscriptionproduct.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscriptionProduct + extend T::Sig + include Crystalline::MetadataFields + + # List of benefits granted by the product. + field :benefits, T::Array[Models::Shared::BenefitPublic], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefits') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The description of the product. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the product. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the product is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Whether the product is a subscription. + field :is_recurring, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_recurring') } } + # List of medias associated to the product. + field :medias, T::Array[Models::Shared::ProductMediaFileRead], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('medias') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the product. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :organization, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization') } } + # The ID of the organization owning the product. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # List of prices for this product. + field :prices, T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + + sig { params(benefits: T::Array[Models::Shared::BenefitPublic], created_at: ::DateTime, description: ::String, id: ::String, is_archived: T::Boolean, is_recurring: T::Boolean, medias: T::Array[Models::Shared::ProductMediaFileRead], modified_at: ::DateTime, name: ::String, organization: Models::Shared::Organization, organization_id: ::String, prices: T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], recurring_interval: Models::Shared::SubscriptionRecurringInterval).void } + def initialize(benefits: nil, created_at: nil, description: nil, id: nil, is_archived: nil, is_recurring: nil, medias: nil, modified_at: nil, name: nil, organization: nil, organization_id: nil, prices: nil, recurring_interval: nil) + @benefits = benefits + @created_at = created_at + @description = description + @id = id + @is_archived = is_archived + @is_recurring = is_recurring + @medias = medias + @modified_at = modified_at + @name = name + @organization = organization + @organization_id = organization_id + @prices = prices + @recurring_interval = recurring_interval + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefits == other.benefits + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @is_recurring == other.is_recurring + return false unless @medias == other.medias + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization == other.organization + return false unless @organization_id == other.organization_id + return false unless @prices == other.prices + return false unless @recurring_interval == other.recurring_interval + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscriptionproduct_prices.rb b/lib/open_api_sdk/models/shared/customersubscriptionproduct_prices.rb new file mode 100644 index 0000000..2004465 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscriptionproduct_prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscriptionProductPrices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscriptionsortproperty.rb b/lib/open_api_sdk/models/shared/customersubscriptionsortproperty.rb new file mode 100644 index 0000000..d9c9016 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscriptionsortproperty.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscriptionSortProperty < T::Enum + enums do + STARTED_AT = new('started_at') + MINUS_STARTED_AT = new('-started_at') + AMOUNT = new('amount') + MINUS_AMOUNT = new('-amount') + STATUS = new('status') + MINUS_STATUS = new('-status') + ORGANIZATION = new('organization') + MINUS_ORGANIZATION = new('-organization') + PRODUCT = new('product') + MINUS_PRODUCT = new('-product') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscriptionupdate.rb b/lib/open_api_sdk/models/shared/customersubscriptionupdate.rb new file mode 100644 index 0000000..8b55631 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscriptionupdate.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscriptionUpdate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customersubscriptionupdateproduct.rb b/lib/open_api_sdk/models/shared/customersubscriptionupdateproduct.rb new file mode 100644 index 0000000..bfee9bf --- /dev/null +++ b/lib/open_api_sdk/models/shared/customersubscriptionupdateproduct.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerSubscriptionUpdateProduct + extend T::Sig + include Crystalline::MetadataFields + + # Update subscription to another product. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + + + sig { params(product_id: ::String).void } + def initialize(product_id: nil) + @product_id = product_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @product_id == other.product_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerupdate.rb b/lib/open_api_sdk/models/shared/customerupdate.rb new file mode 100644 index 0000000..d387904 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerupdate.rb @@ -0,0 +1,63 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :billing_address, T.nilable(Models::Shared::Address), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + # The email address of the customer. This must be unique within the organization. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. + field :external_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('external_id') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The name of the customer. + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :tax_id, T.nilable(T::Array[T.any(::String, Models::Shared::TaxIDFormat)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(billing_address: T.nilable(Models::Shared::Address), email: T.nilable(::String), external_id: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), tax_id: T.nilable(T::Array[T.any(::String, Models::Shared::TaxIDFormat)])).void } + def initialize(billing_address: nil, email: nil, external_id: nil, metadata: nil, name: nil, tax_id: nil) + @billing_address = billing_address + @email = email + @external_id = external_id + @metadata = metadata + @name = name + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @billing_address == other.billing_address + return false unless @email == other.email + return false unless @external_id == other.external_id + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerupdate_metadata.rb b/lib/open_api_sdk/models/shared/customerupdate_metadata.rb new file mode 100644 index 0000000..ae4adc6 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerupdate_tax_id.rb b/lib/open_api_sdk/models/shared/customerupdate_tax_id.rb new file mode 100644 index 0000000..8cad94d --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerupdate_tax_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerUpdateTaxId + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerupdateexternalid.rb b/lib/open_api_sdk/models/shared/customerupdateexternalid.rb new file mode 100644 index 0000000..2cf0530 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerupdateexternalid.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerUpdateExternalID + extend T::Sig + include Crystalline::MetadataFields + + + field :billing_address, T.nilable(Models::Shared::Address), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + # The email address of the customer. This must be unique within the organization. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The name of the customer. + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :tax_id, T.nilable(T::Array[T.any(::String, Models::Shared::TaxIDFormat)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(billing_address: T.nilable(Models::Shared::Address), email: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), tax_id: T.nilable(T::Array[T.any(::String, Models::Shared::TaxIDFormat)])).void } + def initialize(billing_address: nil, email: nil, metadata: nil, name: nil, tax_id: nil) + @billing_address = billing_address + @email = email + @metadata = metadata + @name = name + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @billing_address == other.billing_address + return false unless @email == other.email + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerupdateexternalid_metadata.rb b/lib/open_api_sdk/models/shared/customerupdateexternalid_metadata.rb new file mode 100644 index 0000000..6690d54 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerupdateexternalid_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerUpdateExternalIDMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customerupdateexternalid_tax_id.rb b/lib/open_api_sdk/models/shared/customerupdateexternalid_tax_id.rb new file mode 100644 index 0000000..56c14be --- /dev/null +++ b/lib/open_api_sdk/models/shared/customerupdateexternalid_tax_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomerUpdateExternalIDTaxID + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfield.rb b/lib/open_api_sdk/models/shared/customfield.rb new file mode 100644 index 0000000..f63b9ad --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfield.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomField + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcheckbox.rb b/lib/open_api_sdk/models/shared/customfieldcheckbox.rb new file mode 100644 index 0000000..2de7e5e --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcheckbox.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a custom field of type checkbox. + class CustomFieldCheckbox + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the custom field. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :properties, Models::Shared::CustomFieldCheckboxProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, properties: Models::Shared::CustomFieldCheckboxProperties, slug: ::String, type: ::String).void } + def initialize(created_at: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, properties: nil, slug: nil, type: nil) + @created_at = created_at + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @properties = properties + @slug = slug + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcheckbox_metadata.rb b/lib/open_api_sdk/models/shared/customfieldcheckbox_metadata.rb new file mode 100644 index 0000000..11a749e --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcheckbox_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldCheckboxMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcheckboxproperties.rb b/lib/open_api_sdk/models/shared/customfieldcheckboxproperties.rb new file mode 100644 index 0000000..cef92a0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcheckboxproperties.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldCheckboxProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :form_help_text, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_help_text') } } + + field :form_label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_label') } } + + field :form_placeholder, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_placeholder') } } + + + sig { params(form_help_text: T.nilable(::String), form_label: T.nilable(::String), form_placeholder: T.nilable(::String)).void } + def initialize(form_help_text: nil, form_label: nil, form_placeholder: nil) + @form_help_text = form_help_text + @form_label = form_label + @form_placeholder = form_placeholder + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @form_help_text == other.form_help_text + return false unless @form_label == other.form_label + return false unless @form_placeholder == other.form_placeholder + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreate.rb b/lib/open_api_sdk/models/shared/customfieldcreate.rb new file mode 100644 index 0000000..54438c3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreate.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldCreate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreatecheckbox.rb b/lib/open_api_sdk/models/shared/customfieldcreatecheckbox.rb new file mode 100644 index 0000000..50f135c --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreatecheckbox.rb @@ -0,0 +1,63 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a custom field of type checkbox. + class CustomFieldCreateCheckbox + extend T::Sig + include Crystalline::MetadataFields + + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, Models::Shared::CustomFieldCheckboxProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the custom field. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(name: ::String, properties: Models::Shared::CustomFieldCheckboxProperties, slug: ::String, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(name: nil, properties: nil, slug: nil, type: nil, metadata: nil, organization_id: nil) + @name = name + @properties = properties + @slug = slug + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreatecheckbox_metadata.rb b/lib/open_api_sdk/models/shared/customfieldcreatecheckbox_metadata.rb new file mode 100644 index 0000000..bf8f703 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreatecheckbox_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldCreateCheckboxMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreatedate.rb b/lib/open_api_sdk/models/shared/customfieldcreatedate.rb new file mode 100644 index 0000000..6b7714e --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreatedate.rb @@ -0,0 +1,63 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a custom field of type date. + class CustomFieldCreateDate + extend T::Sig + include Crystalline::MetadataFields + + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, Models::Shared::CustomFieldDateProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the custom field. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(name: ::String, properties: Models::Shared::CustomFieldDateProperties, slug: ::String, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(name: nil, properties: nil, slug: nil, type: nil, metadata: nil, organization_id: nil) + @name = name + @properties = properties + @slug = slug + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreatedate_metadata.rb b/lib/open_api_sdk/models/shared/customfieldcreatedate_metadata.rb new file mode 100644 index 0000000..bfcb923 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreatedate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldCreateDateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreatenumber.rb b/lib/open_api_sdk/models/shared/customfieldcreatenumber.rb new file mode 100644 index 0000000..075ee58 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreatenumber.rb @@ -0,0 +1,63 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a custom field of type number. + class CustomFieldCreateNumber + extend T::Sig + include Crystalline::MetadataFields + + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, Models::Shared::CustomFieldNumberProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the custom field. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(name: ::String, properties: Models::Shared::CustomFieldNumberProperties, slug: ::String, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(name: nil, properties: nil, slug: nil, type: nil, metadata: nil, organization_id: nil) + @name = name + @properties = properties + @slug = slug + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreatenumber_metadata.rb b/lib/open_api_sdk/models/shared/customfieldcreatenumber_metadata.rb new file mode 100644 index 0000000..7f83e78 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreatenumber_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldCreateNumberMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreateselect.rb b/lib/open_api_sdk/models/shared/customfieldcreateselect.rb new file mode 100644 index 0000000..b4dd859 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreateselect.rb @@ -0,0 +1,63 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a custom field of type select. + class CustomFieldCreateSelect + extend T::Sig + include Crystalline::MetadataFields + + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, Models::Shared::CustomFieldSelectProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the custom field. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(name: ::String, properties: Models::Shared::CustomFieldSelectProperties, slug: ::String, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(name: nil, properties: nil, slug: nil, type: nil, metadata: nil, organization_id: nil) + @name = name + @properties = properties + @slug = slug + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreateselect_metadata.rb b/lib/open_api_sdk/models/shared/customfieldcreateselect_metadata.rb new file mode 100644 index 0000000..94da391 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreateselect_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldCreateSelectMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreatetext.rb b/lib/open_api_sdk/models/shared/customfieldcreatetext.rb new file mode 100644 index 0000000..b9392d2 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreatetext.rb @@ -0,0 +1,63 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a custom field of type text. + class CustomFieldCreateText + extend T::Sig + include Crystalline::MetadataFields + + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, Models::Shared::CustomFieldTextProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the custom field. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(name: ::String, properties: Models::Shared::CustomFieldTextProperties, slug: ::String, type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(name: nil, properties: nil, slug: nil, type: nil, metadata: nil, organization_id: nil) + @name = name + @properties = properties + @slug = slug + @type = type + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldcreatetext_metadata.rb b/lib/open_api_sdk/models/shared/customfieldcreatetext_metadata.rb new file mode 100644 index 0000000..09cbadd --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldcreatetext_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldCreateTextMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfielddate.rb b/lib/open_api_sdk/models/shared/customfielddate.rb new file mode 100644 index 0000000..3beb4fe --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfielddate.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a custom field of type date. + class CustomFieldDate + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the custom field. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :properties, Models::Shared::CustomFieldDateProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, properties: Models::Shared::CustomFieldDateProperties, slug: ::String, type: ::String).void } + def initialize(created_at: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, properties: nil, slug: nil, type: nil) + @created_at = created_at + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @properties = properties + @slug = slug + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfielddate_metadata.rb b/lib/open_api_sdk/models/shared/customfielddate_metadata.rb new file mode 100644 index 0000000..1560753 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfielddate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldDateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfielddateproperties.rb b/lib/open_api_sdk/models/shared/customfielddateproperties.rb new file mode 100644 index 0000000..6bff983 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfielddateproperties.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldDateProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :form_help_text, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_help_text') } } + + field :form_label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_label') } } + + field :form_placeholder, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_placeholder') } } + + field :ge, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ge') } } + + field :le, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('le') } } + + + sig { params(form_help_text: T.nilable(::String), form_label: T.nilable(::String), form_placeholder: T.nilable(::String), ge: T.nilable(::Integer), le: T.nilable(::Integer)).void } + def initialize(form_help_text: nil, form_label: nil, form_placeholder: nil, ge: nil, le: nil) + @form_help_text = form_help_text + @form_label = form_label + @form_placeholder = form_placeholder + @ge = ge + @le = le + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @form_help_text == other.form_help_text + return false unless @form_label == other.form_label + return false unless @form_placeholder == other.form_placeholder + return false unless @ge == other.ge + return false unless @le == other.le + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldnumber.rb b/lib/open_api_sdk/models/shared/customfieldnumber.rb new file mode 100644 index 0000000..f9f1766 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldnumber.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a custom field of type number. + class CustomFieldNumber + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the custom field. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :properties, Models::Shared::CustomFieldNumberProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, properties: Models::Shared::CustomFieldNumberProperties, slug: ::String, type: ::String).void } + def initialize(created_at: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, properties: nil, slug: nil, type: nil) + @created_at = created_at + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @properties = properties + @slug = slug + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldnumber_metadata.rb b/lib/open_api_sdk/models/shared/customfieldnumber_metadata.rb new file mode 100644 index 0000000..9f5f46c --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldnumber_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldNumberMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldnumberproperties.rb b/lib/open_api_sdk/models/shared/customfieldnumberproperties.rb new file mode 100644 index 0000000..0c5c7d8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldnumberproperties.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldNumberProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :form_help_text, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_help_text') } } + + field :form_label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_label') } } + + field :form_placeholder, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_placeholder') } } + + field :ge, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ge') } } + + field :le, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('le') } } + + + sig { params(form_help_text: T.nilable(::String), form_label: T.nilable(::String), form_placeholder: T.nilable(::String), ge: T.nilable(::Integer), le: T.nilable(::Integer)).void } + def initialize(form_help_text: nil, form_label: nil, form_placeholder: nil, ge: nil, le: nil) + @form_help_text = form_help_text + @form_label = form_label + @form_placeholder = form_placeholder + @ge = ge + @le = le + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @form_help_text == other.form_help_text + return false unless @form_label == other.form_label + return false unless @form_placeholder == other.form_placeholder + return false unless @ge == other.ge + return false unless @le == other.le + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldselect.rb b/lib/open_api_sdk/models/shared/customfieldselect.rb new file mode 100644 index 0000000..911857a --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldselect.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a custom field of type select. + class CustomFieldSelect + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the custom field. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :properties, Models::Shared::CustomFieldSelectProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, properties: Models::Shared::CustomFieldSelectProperties, slug: ::String, type: ::String).void } + def initialize(created_at: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, properties: nil, slug: nil, type: nil) + @created_at = created_at + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @properties = properties + @slug = slug + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldselect_metadata.rb b/lib/open_api_sdk/models/shared/customfieldselect_metadata.rb new file mode 100644 index 0000000..62b21db --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldselect_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldSelectMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldselectoption.rb b/lib/open_api_sdk/models/shared/customfieldselectoption.rb new file mode 100644 index 0000000..b361f9d --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldselectoption.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldSelectOption + extend T::Sig + include Crystalline::MetadataFields + + + field :label, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + + field :value, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('value') } } + + + sig { params(label: ::String, value: ::String).void } + def initialize(label: nil, value: nil) + @label = label + @value = value + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @label == other.label + return false unless @value == other.value + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldselectproperties.rb b/lib/open_api_sdk/models/shared/customfieldselectproperties.rb new file mode 100644 index 0000000..bdaf52b --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldselectproperties.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldSelectProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :options, T::Array[Models::Shared::CustomFieldSelectOption], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('options') } } + + field :form_help_text, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_help_text') } } + + field :form_label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_label') } } + + field :form_placeholder, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_placeholder') } } + + + sig { params(options: T::Array[Models::Shared::CustomFieldSelectOption], form_help_text: T.nilable(::String), form_label: T.nilable(::String), form_placeholder: T.nilable(::String)).void } + def initialize(options: nil, form_help_text: nil, form_label: nil, form_placeholder: nil) + @options = options + @form_help_text = form_help_text + @form_label = form_label + @form_placeholder = form_placeholder + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @options == other.options + return false unless @form_help_text == other.form_help_text + return false unless @form_label == other.form_label + return false unless @form_placeholder == other.form_placeholder + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldsortproperty.rb b/lib/open_api_sdk/models/shared/customfieldsortproperty.rb new file mode 100644 index 0000000..73222bc --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldsortproperty.rb @@ -0,0 +1,26 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + SLUG = new('slug') + MINUS_SLUG = new('-slug') + NAME = new('name') + MINUS_NAME = new('-name') + TYPE = new('type') + MINUS_TYPE = new('-type') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldtext.rb b/lib/open_api_sdk/models/shared/customfieldtext.rb new file mode 100644 index 0000000..795de06 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldtext.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a custom field of type text. + class CustomFieldText + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the custom field. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the custom field. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :properties, Models::Shared::CustomFieldTextProperties, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + # Identifier of the custom field. It'll be used as key when storing the value. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, properties: Models::Shared::CustomFieldTextProperties, slug: ::String, type: ::String).void } + def initialize(created_at: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, properties: nil, slug: nil, type: nil) + @created_at = created_at + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @properties = properties + @slug = slug + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @properties == other.properties + return false unless @slug == other.slug + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldtext_metadata.rb b/lib/open_api_sdk/models/shared/customfieldtext_metadata.rb new file mode 100644 index 0000000..d5a02f9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldtext_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldTextMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldtextproperties.rb b/lib/open_api_sdk/models/shared/customfieldtextproperties.rb new file mode 100644 index 0000000..cf9f53a --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldtextproperties.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldTextProperties + extend T::Sig + include Crystalline::MetadataFields + + + field :form_help_text, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_help_text') } } + + field :form_label, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_label') } } + + field :form_placeholder, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('form_placeholder') } } + + field :max_length, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_length') } } + + field :min_length, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('min_length') } } + + field :textarea, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('textarea') } } + + + sig { params(form_help_text: T.nilable(::String), form_label: T.nilable(::String), form_placeholder: T.nilable(::String), max_length: T.nilable(::Integer), min_length: T.nilable(::Integer), textarea: T.nilable(T::Boolean)).void } + def initialize(form_help_text: nil, form_label: nil, form_placeholder: nil, max_length: nil, min_length: nil, textarea: nil) + @form_help_text = form_help_text + @form_label = form_label + @form_placeholder = form_placeholder + @max_length = max_length + @min_length = min_length + @textarea = textarea + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @form_help_text == other.form_help_text + return false unless @form_label == other.form_label + return false unless @form_placeholder == other.form_placeholder + return false unless @max_length == other.max_length + return false unless @min_length == other.min_length + return false unless @textarea == other.textarea + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldtype.rb b/lib/open_api_sdk/models/shared/customfieldtype.rb new file mode 100644 index 0000000..dafcd4e --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldtype.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldType < T::Enum + enums do + TEXT = new('text') + NUMBER = new('number') + DATE = new('date') + CHECKBOX = new('checkbox') + SELECT = new('select') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdate.rb b/lib/open_api_sdk/models/shared/customfieldupdate.rb new file mode 100644 index 0000000..903b740 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdate.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldUpdate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdatecheckbox.rb b/lib/open_api_sdk/models/shared/customfieldupdatecheckbox.rb new file mode 100644 index 0000000..6b4ee55 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdatecheckbox.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to update a custom field of type checkbox. + class CustomFieldUpdateCheckbox + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, T.nilable(Models::Shared::CustomFieldCheckboxProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :slug, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + + sig { params(type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), properties: T.nilable(Models::Shared::CustomFieldCheckboxProperties), slug: T.nilable(::String)).void } + def initialize(type: nil, metadata: nil, name: nil, properties: nil, slug: nil) + @type = type + @metadata = metadata + @name = name + @properties = properties + @slug = slug + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdatecheckbox_metadata.rb b/lib/open_api_sdk/models/shared/customfieldupdatecheckbox_metadata.rb new file mode 100644 index 0000000..bd7d0f8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdatecheckbox_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldUpdateCheckboxMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdatedate.rb b/lib/open_api_sdk/models/shared/customfieldupdatedate.rb new file mode 100644 index 0000000..7edac24 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdatedate.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to update a custom field of type date. + class CustomFieldUpdateDate + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, T.nilable(Models::Shared::CustomFieldDateProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :slug, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + + sig { params(type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), properties: T.nilable(Models::Shared::CustomFieldDateProperties), slug: T.nilable(::String)).void } + def initialize(type: nil, metadata: nil, name: nil, properties: nil, slug: nil) + @type = type + @metadata = metadata + @name = name + @properties = properties + @slug = slug + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdatedate_metadata.rb b/lib/open_api_sdk/models/shared/customfieldupdatedate_metadata.rb new file mode 100644 index 0000000..7698dbf --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdatedate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldUpdateDateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdatenumber.rb b/lib/open_api_sdk/models/shared/customfieldupdatenumber.rb new file mode 100644 index 0000000..8a7f6ff --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdatenumber.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to update a custom field of type number. + class CustomFieldUpdateNumber + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, T.nilable(Models::Shared::CustomFieldNumberProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :slug, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + + sig { params(type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), properties: T.nilable(Models::Shared::CustomFieldNumberProperties), slug: T.nilable(::String)).void } + def initialize(type: nil, metadata: nil, name: nil, properties: nil, slug: nil) + @type = type + @metadata = metadata + @name = name + @properties = properties + @slug = slug + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdatenumber_metadata.rb b/lib/open_api_sdk/models/shared/customfieldupdatenumber_metadata.rb new file mode 100644 index 0000000..146e2cb --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdatenumber_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldUpdateNumberMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdateselect.rb b/lib/open_api_sdk/models/shared/customfieldupdateselect.rb new file mode 100644 index 0000000..9ef1ba5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdateselect.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to update a custom field of type select. + class CustomFieldUpdateSelect + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, T.nilable(Models::Shared::CustomFieldSelectProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :slug, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + + sig { params(type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), properties: T.nilable(Models::Shared::CustomFieldSelectProperties), slug: T.nilable(::String)).void } + def initialize(type: nil, metadata: nil, name: nil, properties: nil, slug: nil) + @type = type + @metadata = metadata + @name = name + @properties = properties + @slug = slug + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdateselect_metadata.rb b/lib/open_api_sdk/models/shared/customfieldupdateselect_metadata.rb new file mode 100644 index 0000000..ef6903f --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdateselect_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldUpdateSelectMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdatetext.rb b/lib/open_api_sdk/models/shared/customfieldupdatetext.rb new file mode 100644 index 0000000..c214ded --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdatetext.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to update a custom field of type text. + class CustomFieldUpdateText + extend T::Sig + include Crystalline::MetadataFields + + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :properties, T.nilable(Models::Shared::CustomFieldTextProperties), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('properties') } } + + field :slug, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + + sig { params(type: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), properties: T.nilable(Models::Shared::CustomFieldTextProperties), slug: T.nilable(::String)).void } + def initialize(type: nil, metadata: nil, name: nil, properties: nil, slug: nil) + @type = type + @metadata = metadata + @name = name + @properties = properties + @slug = slug + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @type == other.type + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @properties == other.properties + return false unless @slug == other.slug + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/customfieldupdatetext_metadata.rb b/lib/open_api_sdk/models/shared/customfieldupdatetext_metadata.rb new file mode 100644 index 0000000..de34321 --- /dev/null +++ b/lib/open_api_sdk/models/shared/customfieldupdatetext_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class CustomFieldUpdateTextMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discount.rb b/lib/open_api_sdk/models/shared/discount.rb new file mode 100644 index 0000000..04d254e --- /dev/null +++ b/lib/open_api_sdk/models/shared/discount.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Discount + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountcreate.rb b/lib/open_api_sdk/models/shared/discountcreate.rb new file mode 100644 index 0000000..1510108 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountcreate.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountCreate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountduration.rb b/lib/open_api_sdk/models/shared/discountduration.rb new file mode 100644 index 0000000..a52c0a9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountduration.rb @@ -0,0 +1,21 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountDuration < T::Enum + enums do + ONCE = new('once') + FOREVER = new('forever') + REPEATING = new('repeating') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedonceforeverduration.rb b/lib/open_api_sdk/models/shared/discountfixedonceforeverduration.rb new file mode 100644 index 0000000..92a1bf1 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedonceforeverduration.rb @@ -0,0 +1,93 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a fixed amount discount that is applied once or forever. + class DiscountFixedOnceForeverDuration + extend T::Sig + include Crystalline::MetadataFields + + + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Code customers can use to apply the discount during checkout. + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # Timestamp after which the discount is no longer redeemable. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Maximum number of times the discount can be redeemed. + field :max_redemptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The organization ID. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :products, T::Array[Models::Shared::DiscountProduct], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Number of times the discount has been redeemed. + field :redemptions_count, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redemptions_count') } } + # Timestamp after which the discount is redeemable. + field :starts_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(amount: ::Integer, code: ::String, created_at: ::DateTime, currency: ::String, duration: Models::Shared::DiscountDuration, ends_at: ::DateTime, id: ::String, max_redemptions: ::Integer, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, products: T::Array[Models::Shared::DiscountProduct], redemptions_count: ::Integer, starts_at: ::DateTime, type: Models::Shared::DiscountType).void } + def initialize(amount: nil, code: nil, created_at: nil, currency: nil, duration: nil, ends_at: nil, id: nil, max_redemptions: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, products: nil, redemptions_count: nil, starts_at: nil, type: nil) + @amount = amount + @code = code + @created_at = created_at + @currency = currency + @duration = duration + @ends_at = ends_at + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @products = products + @redemptions_count = redemptions_count + @starts_at = starts_at + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @code == other.code + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @duration == other.duration + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @products == other.products + return false unless @redemptions_count == other.redemptions_count + return false unless @starts_at == other.starts_at + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedonceforeverduration_metadata.rb b/lib/open_api_sdk/models/shared/discountfixedonceforeverduration_metadata.rb new file mode 100644 index 0000000..0256ab7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedonceforeverduration_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountFixedOnceForeverDurationMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationbase.rb b/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationbase.rb new file mode 100644 index 0000000..0db1dfb --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationbase.rb @@ -0,0 +1,89 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountFixedOnceForeverDurationBase + extend T::Sig + include Crystalline::MetadataFields + + + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Code customers can use to apply the discount during checkout. + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # Timestamp after which the discount is no longer redeemable. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Maximum number of times the discount can be redeemed. + field :max_redemptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The organization ID. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Number of times the discount has been redeemed. + field :redemptions_count, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redemptions_count') } } + # Timestamp after which the discount is redeemable. + field :starts_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(amount: ::Integer, code: ::String, created_at: ::DateTime, currency: ::String, duration: Models::Shared::DiscountDuration, ends_at: ::DateTime, id: ::String, max_redemptions: ::Integer, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, redemptions_count: ::Integer, starts_at: ::DateTime, type: Models::Shared::DiscountType).void } + def initialize(amount: nil, code: nil, created_at: nil, currency: nil, duration: nil, ends_at: nil, id: nil, max_redemptions: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, redemptions_count: nil, starts_at: nil, type: nil) + @amount = amount + @code = code + @created_at = created_at + @currency = currency + @duration = duration + @ends_at = ends_at + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @redemptions_count = redemptions_count + @starts_at = starts_at + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @code == other.code + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @duration == other.duration + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @redemptions_count == other.redemptions_count + return false unless @starts_at == other.starts_at + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationbase_metadata.rb b/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationbase_metadata.rb new file mode 100644 index 0000000..a61288e --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationbase_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountFixedOnceForeverDurationBaseMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationcreate.rb b/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationcreate.rb new file mode 100644 index 0000000..4bab681 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationcreate.rb @@ -0,0 +1,87 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a fixed amount discount that is applied once or forever. + class DiscountFixedOnceForeverDurationCreate + extend T::Sig + include Crystalline::MetadataFields + + # Fixed amount to discount from the invoice total. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + # Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API. + field :code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # The currency. Currently, only `usd` is supported. + field :currency, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + # Optional timestamp after which the discount is no longer redeemable. + field :ends_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + # Optional maximum number of times the discount can be redeemed. + field :max_redemptions, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the discount. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :products, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Optional timestamp after which the discount is redeemable. + field :starts_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(amount: ::Integer, duration: Models::Shared::DiscountDuration, name: ::String, type: Models::Shared::DiscountType, code: T.nilable(::String), currency: T.nilable(::String), ends_at: T.nilable(::DateTime), max_redemptions: T.nilable(::Integer), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String), products: T.nilable(T::Array[::String]), starts_at: T.nilable(::DateTime)).void } + def initialize(amount: nil, duration: nil, name: nil, type: nil, code: nil, currency: nil, ends_at: nil, max_redemptions: nil, metadata: nil, organization_id: nil, products: nil, starts_at: nil) + @amount = amount + @duration = duration + @name = name + @type = type + @code = code + @currency = currency + @ends_at = ends_at + @max_redemptions = max_redemptions + @metadata = metadata + @organization_id = organization_id + @products = products + @starts_at = starts_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @duration == other.duration + return false unless @name == other.name + return false unless @type == other.type + return false unless @code == other.code + return false unless @currency == other.currency + return false unless @ends_at == other.ends_at + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + return false unless @products == other.products + return false unless @starts_at == other.starts_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationcreate_metadata.rb b/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationcreate_metadata.rb new file mode 100644 index 0000000..c72daaf --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedonceforeverdurationcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountFixedOnceForeverDurationCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedrepeatduration.rb b/lib/open_api_sdk/models/shared/discountfixedrepeatduration.rb new file mode 100644 index 0000000..b5f05a8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedrepeatduration.rb @@ -0,0 +1,98 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a fixed amount discount that is applied on every invoice + # for a certain number of months. + class DiscountFixedRepeatDuration + extend T::Sig + include Crystalline::MetadataFields + + + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Code customers can use to apply the discount during checkout. + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + + field :duration_in_months, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_in_months') } } + # Timestamp after which the discount is no longer redeemable. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Maximum number of times the discount can be redeemed. + field :max_redemptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The organization ID. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :products, T::Array[Models::Shared::DiscountProduct], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Number of times the discount has been redeemed. + field :redemptions_count, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redemptions_count') } } + # Timestamp after which the discount is redeemable. + field :starts_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(amount: ::Integer, code: ::String, created_at: ::DateTime, currency: ::String, duration: Models::Shared::DiscountDuration, duration_in_months: ::Integer, ends_at: ::DateTime, id: ::String, max_redemptions: ::Integer, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, products: T::Array[Models::Shared::DiscountProduct], redemptions_count: ::Integer, starts_at: ::DateTime, type: Models::Shared::DiscountType).void } + def initialize(amount: nil, code: nil, created_at: nil, currency: nil, duration: nil, duration_in_months: nil, ends_at: nil, id: nil, max_redemptions: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, products: nil, redemptions_count: nil, starts_at: nil, type: nil) + @amount = amount + @code = code + @created_at = created_at + @currency = currency + @duration = duration + @duration_in_months = duration_in_months + @ends_at = ends_at + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @products = products + @redemptions_count = redemptions_count + @starts_at = starts_at + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @code == other.code + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @duration == other.duration + return false unless @duration_in_months == other.duration_in_months + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @products == other.products + return false unless @redemptions_count == other.redemptions_count + return false unless @starts_at == other.starts_at + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedrepeatduration_metadata.rb b/lib/open_api_sdk/models/shared/discountfixedrepeatduration_metadata.rb new file mode 100644 index 0000000..e64cb0b --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedrepeatduration_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountFixedRepeatDurationMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedrepeatdurationbase.rb b/lib/open_api_sdk/models/shared/discountfixedrepeatdurationbase.rb new file mode 100644 index 0000000..f9e028d --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedrepeatdurationbase.rb @@ -0,0 +1,93 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountFixedRepeatDurationBase + extend T::Sig + include Crystalline::MetadataFields + + + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Code customers can use to apply the discount during checkout. + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + + field :duration_in_months, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_in_months') } } + # Timestamp after which the discount is no longer redeemable. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Maximum number of times the discount can be redeemed. + field :max_redemptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The organization ID. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Number of times the discount has been redeemed. + field :redemptions_count, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redemptions_count') } } + # Timestamp after which the discount is redeemable. + field :starts_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(amount: ::Integer, code: ::String, created_at: ::DateTime, currency: ::String, duration: Models::Shared::DiscountDuration, duration_in_months: ::Integer, ends_at: ::DateTime, id: ::String, max_redemptions: ::Integer, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, redemptions_count: ::Integer, starts_at: ::DateTime, type: Models::Shared::DiscountType).void } + def initialize(amount: nil, code: nil, created_at: nil, currency: nil, duration: nil, duration_in_months: nil, ends_at: nil, id: nil, max_redemptions: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, redemptions_count: nil, starts_at: nil, type: nil) + @amount = amount + @code = code + @created_at = created_at + @currency = currency + @duration = duration + @duration_in_months = duration_in_months + @ends_at = ends_at + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @redemptions_count = redemptions_count + @starts_at = starts_at + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @code == other.code + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @duration == other.duration + return false unless @duration_in_months == other.duration_in_months + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @redemptions_count == other.redemptions_count + return false unless @starts_at == other.starts_at + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedrepeatdurationbase_metadata.rb b/lib/open_api_sdk/models/shared/discountfixedrepeatdurationbase_metadata.rb new file mode 100644 index 0000000..2b52c23 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedrepeatdurationbase_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountFixedRepeatDurationBaseMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedrepeatdurationcreate.rb b/lib/open_api_sdk/models/shared/discountfixedrepeatdurationcreate.rb new file mode 100644 index 0000000..33aee29 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedrepeatdurationcreate.rb @@ -0,0 +1,95 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a fixed amount discount that is applied on every invoice + # for a certain number of months. + class DiscountFixedRepeatDurationCreate + extend T::Sig + include Crystalline::MetadataFields + + # Fixed amount to discount from the invoice total. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # Number of months the discount should be applied. + # + # For this to work on yearly pricing, you should multiply this by 12. + # For example, to apply the discount for 2 years, set this to 24. + field :duration_in_months, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_in_months') } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + # Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API. + field :code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # The currency. Currently, only `usd` is supported. + field :currency, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + # Optional timestamp after which the discount is no longer redeemable. + field :ends_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + # Optional maximum number of times the discount can be redeemed. + field :max_redemptions, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the discount. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :products, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Optional timestamp after which the discount is redeemable. + field :starts_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(amount: ::Integer, duration: Models::Shared::DiscountDuration, duration_in_months: ::Integer, name: ::String, type: Models::Shared::DiscountType, code: T.nilable(::String), currency: T.nilable(::String), ends_at: T.nilable(::DateTime), max_redemptions: T.nilable(::Integer), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String), products: T.nilable(T::Array[::String]), starts_at: T.nilable(::DateTime)).void } + def initialize(amount: nil, duration: nil, duration_in_months: nil, name: nil, type: nil, code: nil, currency: nil, ends_at: nil, max_redemptions: nil, metadata: nil, organization_id: nil, products: nil, starts_at: nil) + @amount = amount + @duration = duration + @duration_in_months = duration_in_months + @name = name + @type = type + @code = code + @currency = currency + @ends_at = ends_at + @max_redemptions = max_redemptions + @metadata = metadata + @organization_id = organization_id + @products = products + @starts_at = starts_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @duration == other.duration + return false unless @duration_in_months == other.duration_in_months + return false unless @name == other.name + return false unless @type == other.type + return false unless @code == other.code + return false unless @currency == other.currency + return false unless @ends_at == other.ends_at + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + return false unless @products == other.products + return false unless @starts_at == other.starts_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountfixedrepeatdurationcreate_metadata.rb b/lib/open_api_sdk/models/shared/discountfixedrepeatdurationcreate_metadata.rb new file mode 100644 index 0000000..a50afd0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountfixedrepeatdurationcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountFixedRepeatDurationCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentageonceforeverduration.rb b/lib/open_api_sdk/models/shared/discountpercentageonceforeverduration.rb new file mode 100644 index 0000000..8155ba8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentageonceforeverduration.rb @@ -0,0 +1,89 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a percentage discount that is applied once or forever. + class DiscountPercentageOnceForeverDuration + extend T::Sig + include Crystalline::MetadataFields + + + field :basis_points, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('basis_points') } } + # Code customers can use to apply the discount during checkout. + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # Timestamp after which the discount is no longer redeemable. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Maximum number of times the discount can be redeemed. + field :max_redemptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The organization ID. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :products, T::Array[Models::Shared::DiscountProduct], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Number of times the discount has been redeemed. + field :redemptions_count, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redemptions_count') } } + # Timestamp after which the discount is redeemable. + field :starts_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(basis_points: ::Integer, code: ::String, created_at: ::DateTime, duration: Models::Shared::DiscountDuration, ends_at: ::DateTime, id: ::String, max_redemptions: ::Integer, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, products: T::Array[Models::Shared::DiscountProduct], redemptions_count: ::Integer, starts_at: ::DateTime, type: Models::Shared::DiscountType).void } + def initialize(basis_points: nil, code: nil, created_at: nil, duration: nil, ends_at: nil, id: nil, max_redemptions: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, products: nil, redemptions_count: nil, starts_at: nil, type: nil) + @basis_points = basis_points + @code = code + @created_at = created_at + @duration = duration + @ends_at = ends_at + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @products = products + @redemptions_count = redemptions_count + @starts_at = starts_at + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @basis_points == other.basis_points + return false unless @code == other.code + return false unless @created_at == other.created_at + return false unless @duration == other.duration + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @products == other.products + return false unless @redemptions_count == other.redemptions_count + return false unless @starts_at == other.starts_at + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentageonceforeverduration_metadata.rb b/lib/open_api_sdk/models/shared/discountpercentageonceforeverduration_metadata.rb new file mode 100644 index 0000000..f9f49f3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentageonceforeverduration_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountPercentageOnceForeverDurationMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationbase.rb b/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationbase.rb new file mode 100644 index 0000000..c2bfdfb --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationbase.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountPercentageOnceForeverDurationBase + extend T::Sig + include Crystalline::MetadataFields + + + field :basis_points, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('basis_points') } } + # Code customers can use to apply the discount during checkout. + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # Timestamp after which the discount is no longer redeemable. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Maximum number of times the discount can be redeemed. + field :max_redemptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The organization ID. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Number of times the discount has been redeemed. + field :redemptions_count, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redemptions_count') } } + # Timestamp after which the discount is redeemable. + field :starts_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(basis_points: ::Integer, code: ::String, created_at: ::DateTime, duration: Models::Shared::DiscountDuration, ends_at: ::DateTime, id: ::String, max_redemptions: ::Integer, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, redemptions_count: ::Integer, starts_at: ::DateTime, type: Models::Shared::DiscountType).void } + def initialize(basis_points: nil, code: nil, created_at: nil, duration: nil, ends_at: nil, id: nil, max_redemptions: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, redemptions_count: nil, starts_at: nil, type: nil) + @basis_points = basis_points + @code = code + @created_at = created_at + @duration = duration + @ends_at = ends_at + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @redemptions_count = redemptions_count + @starts_at = starts_at + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @basis_points == other.basis_points + return false unless @code == other.code + return false unless @created_at == other.created_at + return false unless @duration == other.duration + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @redemptions_count == other.redemptions_count + return false unless @starts_at == other.starts_at + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationbase_metadata.rb b/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationbase_metadata.rb new file mode 100644 index 0000000..48a8b27 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationbase_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountPercentageOnceForeverDurationBaseMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate.rb b/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate.rb new file mode 100644 index 0000000..a4678f7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate.rb @@ -0,0 +1,86 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a percentage discount that is applied once or forever. + class DiscountPercentageOnceForeverDurationCreate + extend T::Sig + include Crystalline::MetadataFields + + # Discount percentage in basis points. + # + # A basis point is 1/100th of a percent. + # For example, to create a 25.5% discount, set this to 2550. + field :basis_points, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('basis_points') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + # Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API. + field :code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Optional timestamp after which the discount is no longer redeemable. + field :ends_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + # Optional maximum number of times the discount can be redeemed. + field :max_redemptions, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the discount. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :products, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Optional timestamp after which the discount is redeemable. + field :starts_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(basis_points: ::Integer, duration: Models::Shared::DiscountDuration, name: ::String, type: Models::Shared::DiscountType, code: T.nilable(::String), ends_at: T.nilable(::DateTime), max_redemptions: T.nilable(::Integer), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String), products: T.nilable(T::Array[::String]), starts_at: T.nilable(::DateTime)).void } + def initialize(basis_points: nil, duration: nil, name: nil, type: nil, code: nil, ends_at: nil, max_redemptions: nil, metadata: nil, organization_id: nil, products: nil, starts_at: nil) + @basis_points = basis_points + @duration = duration + @name = name + @type = type + @code = code + @ends_at = ends_at + @max_redemptions = max_redemptions + @metadata = metadata + @organization_id = organization_id + @products = products + @starts_at = starts_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @basis_points == other.basis_points + return false unless @duration == other.duration + return false unless @name == other.name + return false unless @type == other.type + return false unless @code == other.code + return false unless @ends_at == other.ends_at + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + return false unless @products == other.products + return false unless @starts_at == other.starts_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate_metadata.rb b/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate_metadata.rb new file mode 100644 index 0000000..0a1ea09 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentageonceforeverdurationcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountPercentageOnceForeverDurationCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentagerepeatduration.rb b/lib/open_api_sdk/models/shared/discountpercentagerepeatduration.rb new file mode 100644 index 0000000..101f6e7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentagerepeatduration.rb @@ -0,0 +1,94 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema for a percentage discount that is applied on every invoice + # for a certain number of months. + class DiscountPercentageRepeatDuration + extend T::Sig + include Crystalline::MetadataFields + + + field :basis_points, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('basis_points') } } + # Code customers can use to apply the discount during checkout. + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + + field :duration_in_months, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_in_months') } } + # Timestamp after which the discount is no longer redeemable. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Maximum number of times the discount can be redeemed. + field :max_redemptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The organization ID. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :products, T::Array[Models::Shared::DiscountProduct], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Number of times the discount has been redeemed. + field :redemptions_count, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redemptions_count') } } + # Timestamp after which the discount is redeemable. + field :starts_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(basis_points: ::Integer, code: ::String, created_at: ::DateTime, duration: Models::Shared::DiscountDuration, duration_in_months: ::Integer, ends_at: ::DateTime, id: ::String, max_redemptions: ::Integer, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, products: T::Array[Models::Shared::DiscountProduct], redemptions_count: ::Integer, starts_at: ::DateTime, type: Models::Shared::DiscountType).void } + def initialize(basis_points: nil, code: nil, created_at: nil, duration: nil, duration_in_months: nil, ends_at: nil, id: nil, max_redemptions: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, products: nil, redemptions_count: nil, starts_at: nil, type: nil) + @basis_points = basis_points + @code = code + @created_at = created_at + @duration = duration + @duration_in_months = duration_in_months + @ends_at = ends_at + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @products = products + @redemptions_count = redemptions_count + @starts_at = starts_at + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @basis_points == other.basis_points + return false unless @code == other.code + return false unless @created_at == other.created_at + return false unless @duration == other.duration + return false unless @duration_in_months == other.duration_in_months + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @products == other.products + return false unless @redemptions_count == other.redemptions_count + return false unless @starts_at == other.starts_at + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentagerepeatduration_metadata.rb b/lib/open_api_sdk/models/shared/discountpercentagerepeatduration_metadata.rb new file mode 100644 index 0000000..61da529 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentagerepeatduration_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountPercentageRepeatDurationMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationbase.rb b/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationbase.rb new file mode 100644 index 0000000..09c2f88 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationbase.rb @@ -0,0 +1,89 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountPercentageRepeatDurationBase + extend T::Sig + include Crystalline::MetadataFields + + + field :basis_points, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('basis_points') } } + # Code customers can use to apply the discount during checkout. + field :code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + + field :duration_in_months, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_in_months') } } + # Timestamp after which the discount is no longer redeemable. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Maximum number of times the discount can be redeemed. + field :max_redemptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The organization ID. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Number of times the discount has been redeemed. + field :redemptions_count, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redemptions_count') } } + # Timestamp after which the discount is redeemable. + field :starts_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + + + sig { params(basis_points: ::Integer, code: ::String, created_at: ::DateTime, duration: Models::Shared::DiscountDuration, duration_in_months: ::Integer, ends_at: ::DateTime, id: ::String, max_redemptions: ::Integer, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, redemptions_count: ::Integer, starts_at: ::DateTime, type: Models::Shared::DiscountType).void } + def initialize(basis_points: nil, code: nil, created_at: nil, duration: nil, duration_in_months: nil, ends_at: nil, id: nil, max_redemptions: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, redemptions_count: nil, starts_at: nil, type: nil) + @basis_points = basis_points + @code = code + @created_at = created_at + @duration = duration + @duration_in_months = duration_in_months + @ends_at = ends_at + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @redemptions_count = redemptions_count + @starts_at = starts_at + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @basis_points == other.basis_points + return false unless @code == other.code + return false unless @created_at == other.created_at + return false unless @duration == other.duration + return false unless @duration_in_months == other.duration_in_months + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @redemptions_count == other.redemptions_count + return false unless @starts_at == other.starts_at + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationbase_metadata.rb b/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationbase_metadata.rb new file mode 100644 index 0000000..2a5bc3d --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationbase_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountPercentageRepeatDurationBaseMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationcreate.rb b/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationcreate.rb new file mode 100644 index 0000000..f027ea0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationcreate.rb @@ -0,0 +1,94 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a percentage discount that is applied on every invoice + # for a certain number of months. + class DiscountPercentageRepeatDurationCreate + extend T::Sig + include Crystalline::MetadataFields + + # Discount percentage in basis points. + # + # A basis point is 1/100th of a percent. + # For example, to create a 25.5% discount, set this to 2550. + field :basis_points, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('basis_points') } } + + field :duration, Models::Shared::DiscountDuration, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, false) } } + # Number of months the discount should be applied. + # + # For this to work on yearly pricing, you should multiply this by 12. + # For example, to apply the discount for 2 years, set this to 24. + field :duration_in_months, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_in_months') } } + # Name of the discount. Will be displayed to the customer when the discount is applied. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :type, Models::Shared::DiscountType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, false) } } + # Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API. + field :code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + # Optional timestamp after which the discount is no longer redeemable. + field :ends_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + # Optional maximum number of times the discount can be redeemed. + field :max_redemptions, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the discount. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :products, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + # Optional timestamp after which the discount is redeemable. + field :starts_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(basis_points: ::Integer, duration: Models::Shared::DiscountDuration, duration_in_months: ::Integer, name: ::String, type: Models::Shared::DiscountType, code: T.nilable(::String), ends_at: T.nilable(::DateTime), max_redemptions: T.nilable(::Integer), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String), products: T.nilable(T::Array[::String]), starts_at: T.nilable(::DateTime)).void } + def initialize(basis_points: nil, duration: nil, duration_in_months: nil, name: nil, type: nil, code: nil, ends_at: nil, max_redemptions: nil, metadata: nil, organization_id: nil, products: nil, starts_at: nil) + @basis_points = basis_points + @duration = duration + @duration_in_months = duration_in_months + @name = name + @type = type + @code = code + @ends_at = ends_at + @max_redemptions = max_redemptions + @metadata = metadata + @organization_id = organization_id + @products = products + @starts_at = starts_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @basis_points == other.basis_points + return false unless @duration == other.duration + return false unless @duration_in_months == other.duration_in_months + return false unless @name == other.name + return false unless @type == other.type + return false unless @code == other.code + return false unless @ends_at == other.ends_at + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + return false unless @products == other.products + return false unless @starts_at == other.starts_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationcreate_metadata.rb b/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationcreate_metadata.rb new file mode 100644 index 0000000..052069a --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountpercentagerepeatdurationcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountPercentageRepeatDurationCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountproduct.rb b/lib/open_api_sdk/models/shared/discountproduct.rb new file mode 100644 index 0000000..ddc3721 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountproduct.rb @@ -0,0 +1,69 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A product that a discount can be applied to. + class DiscountProduct + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The description of the product. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the product. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the product is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Whether the product is a subscription. + field :is_recurring, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_recurring') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the product. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the product. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + + sig { params(created_at: ::DateTime, description: ::String, id: ::String, is_archived: T::Boolean, is_recurring: T::Boolean, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval).void } + def initialize(created_at: nil, description: nil, id: nil, is_archived: nil, is_recurring: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, recurring_interval: nil) + @created_at = created_at + @description = description + @id = id + @is_archived = is_archived + @is_recurring = is_recurring + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @recurring_interval = recurring_interval + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @is_recurring == other.is_recurring + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @recurring_interval == other.recurring_interval + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountproduct_metadata.rb b/lib/open_api_sdk/models/shared/discountproduct_metadata.rb new file mode 100644 index 0000000..1f763b3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountproduct_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountProductMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountsortproperty.rb b/lib/open_api_sdk/models/shared/discountsortproperty.rb new file mode 100644 index 0000000..e817ebc --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountsortproperty.rb @@ -0,0 +1,26 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + NAME = new('name') + MINUS_NAME = new('-name') + CODE = new('code') + MINUS_CODE = new('-code') + REDEMPTIONS_COUNT = new('redemptions_count') + MINUS_REDEMPTIONS_COUNT = new('-redemptions_count') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discounttype.rb b/lib/open_api_sdk/models/shared/discounttype.rb new file mode 100644 index 0000000..a7e9b08 --- /dev/null +++ b/lib/open_api_sdk/models/shared/discounttype.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountType < T::Enum + enums do + FIXED = new('fixed') + PERCENTAGE = new('percentage') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountupdate.rb b/lib/open_api_sdk/models/shared/discountupdate.rb new file mode 100644 index 0000000..f73ff9b --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountupdate.rb @@ -0,0 +1,91 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to update a discount. + class DiscountUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :amount, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :basis_points, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('basis_points') } } + + field :code, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('code') } } + + field :currency, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :duration, T.nilable(Models::Shared::DiscountDuration), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountDuration, true) } } + + field :duration_in_months, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration_in_months') } } + + field :ends_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :max_redemptions, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_redemptions') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :products, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('products') } } + + field :starts_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('starts_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :type, T.nilable(Models::Shared::DiscountType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::DiscountType, true) } } + + + sig { params(amount: T.nilable(::Integer), basis_points: T.nilable(::Integer), code: T.nilable(::String), currency: T.nilable(::String), duration: T.nilable(Models::Shared::DiscountDuration), duration_in_months: T.nilable(::Integer), ends_at: T.nilable(::DateTime), max_redemptions: T.nilable(::Integer), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), products: T.nilable(T::Array[::String]), starts_at: T.nilable(::DateTime), type: T.nilable(Models::Shared::DiscountType)).void } + def initialize(amount: nil, basis_points: nil, code: nil, currency: nil, duration: nil, duration_in_months: nil, ends_at: nil, max_redemptions: nil, metadata: nil, name: nil, products: nil, starts_at: nil, type: nil) + @amount = amount + @basis_points = basis_points + @code = code + @currency = currency + @duration = duration + @duration_in_months = duration_in_months + @ends_at = ends_at + @max_redemptions = max_redemptions + @metadata = metadata + @name = name + @products = products + @starts_at = starts_at + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @basis_points == other.basis_points + return false unless @code == other.code + return false unless @currency == other.currency + return false unless @duration == other.duration + return false unless @duration_in_months == other.duration_in_months + return false unless @ends_at == other.ends_at + return false unless @max_redemptions == other.max_redemptions + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @products == other.products + return false unless @starts_at == other.starts_at + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/discountupdate_metadata.rb b/lib/open_api_sdk/models/shared/discountupdate_metadata.rb new file mode 100644 index 0000000..cb6904d --- /dev/null +++ b/lib/open_api_sdk/models/shared/discountupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DiscountUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/downloadablefilecreate.rb b/lib/open_api_sdk/models/shared/downloadablefilecreate.rb new file mode 100644 index 0000000..04a6ccd --- /dev/null +++ b/lib/open_api_sdk/models/shared/downloadablefilecreate.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a file to be associated with the downloadables benefit. + class DownloadableFileCreate + extend T::Sig + include Crystalline::MetadataFields + + + field :mime_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mime_type') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :service, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('service') } } + + field :size, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + + field :upload, Models::Shared::S3FileCreateMultipart, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('upload') } } + + field :checksum_sha256_base64, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + + + sig { params(mime_type: ::String, name: ::String, service: ::String, size: ::Integer, upload: Models::Shared::S3FileCreateMultipart, checksum_sha256_base64: T.nilable(::String), organization_id: T.nilable(::String), version: T.nilable(::String)).void } + def initialize(mime_type: nil, name: nil, service: nil, size: nil, upload: nil, checksum_sha256_base64: nil, organization_id: nil, version: nil) + @mime_type = mime_type + @name = name + @service = service + @size = size + @upload = upload + @checksum_sha256_base64 = checksum_sha256_base64 + @organization_id = organization_id + @version = version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @mime_type == other.mime_type + return false unless @name == other.name + return false unless @service == other.service + return false unless @size == other.size + return false unless @upload == other.upload + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @organization_id == other.organization_id + return false unless @version == other.version + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/downloadablefileread.rb b/lib/open_api_sdk/models/shared/downloadablefileread.rb new file mode 100644 index 0000000..c35de11 --- /dev/null +++ b/lib/open_api_sdk/models/shared/downloadablefileread.rb @@ -0,0 +1,93 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # File to be associated with the downloadables benefit. + class DownloadableFileRead + extend T::Sig + include Crystalline::MetadataFields + + + field :checksum_etag, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_etag') } } + + field :checksum_sha256_base64, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :checksum_sha256_hex, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_hex') } } + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_uploaded, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_uploaded') } } + + field :last_modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :mime_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mime_type') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + + field :service, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('service') } } + + field :size, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + + field :size_readable, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size_readable') } } + + field :storage_version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('storage_version') } } + + field :version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + + + sig { params(checksum_etag: ::String, checksum_sha256_base64: ::String, checksum_sha256_hex: ::String, created_at: ::DateTime, id: ::String, is_uploaded: T::Boolean, last_modified_at: ::DateTime, mime_type: ::String, name: ::String, organization_id: ::String, path: ::String, service: ::String, size: ::Integer, size_readable: ::String, storage_version: ::String, version: ::String).void } + def initialize(checksum_etag: nil, checksum_sha256_base64: nil, checksum_sha256_hex: nil, created_at: nil, id: nil, is_uploaded: nil, last_modified_at: nil, mime_type: nil, name: nil, organization_id: nil, path: nil, service: nil, size: nil, size_readable: nil, storage_version: nil, version: nil) + @checksum_etag = checksum_etag + @checksum_sha256_base64 = checksum_sha256_base64 + @checksum_sha256_hex = checksum_sha256_hex + @created_at = created_at + @id = id + @is_uploaded = is_uploaded + @last_modified_at = last_modified_at + @mime_type = mime_type + @name = name + @organization_id = organization_id + @path = path + @service = service + @size = size + @size_readable = size_readable + @storage_version = storage_version + @version = version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @checksum_etag == other.checksum_etag + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @checksum_sha256_hex == other.checksum_sha256_hex + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_uploaded == other.is_uploaded + return false unless @last_modified_at == other.last_modified_at + return false unless @mime_type == other.mime_type + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @path == other.path + return false unless @service == other.service + return false unless @size == other.size + return false unless @size_readable == other.size_readable + return false unless @storage_version == other.storage_version + return false unless @version == other.version + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/downloadableread.rb b/lib/open_api_sdk/models/shared/downloadableread.rb new file mode 100644 index 0000000..b4ccd32 --- /dev/null +++ b/lib/open_api_sdk/models/shared/downloadableread.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class DownloadableRead + extend T::Sig + include Crystalline::MetadataFields + + + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + + field :file, Models::Shared::FileDownload, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('file') } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + + sig { params(benefit_id: ::String, file: Models::Shared::FileDownload, id: ::String).void } + def initialize(benefit_id: nil, file: nil, id: nil) + @benefit_id = benefit_id + @file = file + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @file == other.file + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/event.rb b/lib/open_api_sdk/models/shared/event.rb new file mode 100644 index 0000000..0979e77 --- /dev/null +++ b/lib/open_api_sdk/models/shared/event.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Event + extend T::Sig + include Crystalline::MetadataFields + + # The customer associated with the event. + field :customer, Models::Shared::Customer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + # ID of the customer in your Polar organization associated with the event. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # ID of the customer in your system associated with the event. + field :external_customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('external_customer_id') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The name of the event. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the event. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :source, Models::Shared::EventSource, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source'), 'decoder': Utils.enum_from_string(Models::Shared::EventSource, false) } } + # The timestamp of the event. + field :timestamp, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('timestamp'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(customer: Models::Shared::Customer, customer_id: ::String, external_customer_id: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], name: ::String, organization_id: ::String, source: Models::Shared::EventSource, timestamp: ::DateTime).void } + def initialize(customer: nil, customer_id: nil, external_customer_id: nil, id: nil, metadata: nil, name: nil, organization_id: nil, source: nil, timestamp: nil) + @customer = customer + @customer_id = customer_id + @external_customer_id = external_customer_id + @id = id + @metadata = metadata + @name = name + @organization_id = organization_id + @source = source + @timestamp = timestamp + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @external_customer_id == other.external_customer_id + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @source == other.source + return false unless @timestamp == other.timestamp + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/event_metadata.rb b/lib/open_api_sdk/models/shared/event_metadata.rb new file mode 100644 index 0000000..6e32399 --- /dev/null +++ b/lib/open_api_sdk/models/shared/event_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventcreatecustomer.rb b/lib/open_api_sdk/models/shared/eventcreatecustomer.rb new file mode 100644 index 0000000..afc4014 --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventcreatecustomer.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventCreateCustomer + extend T::Sig + include Crystalline::MetadataFields + + # ID of the customer in your Polar organization associated with the event. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # The name of the event. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the event. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # The timestamp of the event. + field :timestamp, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('timestamp'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(customer_id: ::String, name: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String), timestamp: T.nilable(::DateTime)).void } + def initialize(customer_id: nil, name: nil, metadata: nil, organization_id: nil, timestamp: nil) + @customer_id = customer_id + @name = name + @metadata = metadata + @organization_id = organization_id + @timestamp = timestamp + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @customer_id == other.customer_id + return false unless @name == other.name + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + return false unless @timestamp == other.timestamp + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventcreatecustomer_metadata.rb b/lib/open_api_sdk/models/shared/eventcreatecustomer_metadata.rb new file mode 100644 index 0000000..43dab50 --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventcreatecustomer_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventCreateCustomerMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventcreateexternalcustomer.rb b/lib/open_api_sdk/models/shared/eventcreateexternalcustomer.rb new file mode 100644 index 0000000..0a94aae --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventcreateexternalcustomer.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventCreateExternalCustomer + extend T::Sig + include Crystalline::MetadataFields + + # ID of the customer in your system associated with the event. + field :external_customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('external_customer_id') } } + # The name of the event. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the event. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # The timestamp of the event. + field :timestamp, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('timestamp'), 'decoder': Utils.datetime_from_iso_format(true) } } + + + sig { params(external_customer_id: ::String, name: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String), timestamp: T.nilable(::DateTime)).void } + def initialize(external_customer_id: nil, name: nil, metadata: nil, organization_id: nil, timestamp: nil) + @external_customer_id = external_customer_id + @name = name + @metadata = metadata + @organization_id = organization_id + @timestamp = timestamp + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @external_customer_id == other.external_customer_id + return false unless @name == other.name + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + return false unless @timestamp == other.timestamp + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventcreateexternalcustomer_metadata.rb b/lib/open_api_sdk/models/shared/eventcreateexternalcustomer_metadata.rb new file mode 100644 index 0000000..2fc0bb8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventcreateexternalcustomer_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventCreateExternalCustomerMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventname.rb b/lib/open_api_sdk/models/shared/eventname.rb new file mode 100644 index 0000000..1c9ee66 --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventname.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventName + extend T::Sig + include Crystalline::MetadataFields + + # The first time the event occurred. + field :first_seen, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('first_seen'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The last time the event occurred. + field :last_seen, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_seen'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the event. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Number of times the event has occurred. + field :occurrences, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('occurrences') } } + + field :source, Models::Shared::EventSource, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('source'), 'decoder': Utils.enum_from_string(Models::Shared::EventSource, false) } } + + + sig { params(first_seen: ::DateTime, last_seen: ::DateTime, name: ::String, occurrences: ::Integer, source: Models::Shared::EventSource).void } + def initialize(first_seen: nil, last_seen: nil, name: nil, occurrences: nil, source: nil) + @first_seen = first_seen + @last_seen = last_seen + @name = name + @occurrences = occurrences + @source = source + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @first_seen == other.first_seen + return false unless @last_seen == other.last_seen + return false unless @name == other.name + return false unless @occurrences == other.occurrences + return false unless @source == other.source + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventnamessortproperty.rb b/lib/open_api_sdk/models/shared/eventnamessortproperty.rb new file mode 100644 index 0000000..80a706e --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventnamessortproperty.rb @@ -0,0 +1,26 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventNamesSortProperty < T::Enum + enums do + NAME = new('name') + MINUS_NAME = new('-name') + OCCURRENCES = new('occurrences') + MINUS_OCCURRENCES = new('-occurrences') + FIRST_SEEN = new('first_seen') + MINUS_FIRST_SEEN = new('-first_seen') + LAST_SEEN = new('last_seen') + MINUS_LAST_SEEN = new('-last_seen') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/events.rb b/lib/open_api_sdk/models/shared/events.rb new file mode 100644 index 0000000..444d8c8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/events.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Events + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventsingest.rb b/lib/open_api_sdk/models/shared/eventsingest.rb new file mode 100644 index 0000000..ac654a0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventsingest.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventsIngest + extend T::Sig + include Crystalline::MetadataFields + + # List of events to ingest. + field :events, T::Array[T.any(Models::Shared::EventCreateCustomer, Models::Shared::EventCreateExternalCustomer)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('events') } } + + + sig { params(events: T::Array[T.any(Models::Shared::EventCreateCustomer, Models::Shared::EventCreateExternalCustomer)]).void } + def initialize(events: nil) + @events = events + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @events == other.events + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventsingestresponse.rb b/lib/open_api_sdk/models/shared/eventsingestresponse.rb new file mode 100644 index 0000000..c5c9d1e --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventsingestresponse.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventsIngestResponse + extend T::Sig + include Crystalline::MetadataFields + + # Number of events inserted. + field :inserted, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('inserted') } } + + + sig { params(inserted: ::Integer).void } + def initialize(inserted: nil) + @inserted = inserted + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @inserted == other.inserted + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventsortproperty.rb b/lib/open_api_sdk/models/shared/eventsortproperty.rb new file mode 100644 index 0000000..6d58691 --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventsortproperty.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventSortProperty < T::Enum + enums do + TIMESTAMP = new('timestamp') + MINUS_TIMESTAMP = new('-timestamp') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/eventsource.rb b/lib/open_api_sdk/models/shared/eventsource.rb new file mode 100644 index 0000000..086f2f9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/eventsource.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class EventSource < T::Enum + enums do + SYSTEM = new('system') + USER = new('user') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/existingproductprice.rb b/lib/open_api_sdk/models/shared/existingproductprice.rb new file mode 100644 index 0000000..f2ebb55 --- /dev/null +++ b/lib/open_api_sdk/models/shared/existingproductprice.rb @@ -0,0 +1,35 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A price that already exists for this product. + # + # Useful when updating a product if you want to keep an existing price. + class ExistingProductPrice + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/filecreate.rb b/lib/open_api_sdk/models/shared/filecreate.rb new file mode 100644 index 0000000..69d974b --- /dev/null +++ b/lib/open_api_sdk/models/shared/filecreate.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FileCreate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/filedownload.rb b/lib/open_api_sdk/models/shared/filedownload.rb new file mode 100644 index 0000000..2ebc784 --- /dev/null +++ b/lib/open_api_sdk/models/shared/filedownload.rb @@ -0,0 +1,93 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FileDownload + extend T::Sig + include Crystalline::MetadataFields + + + field :checksum_etag, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_etag') } } + + field :checksum_sha256_base64, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :checksum_sha256_hex, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_hex') } } + + field :download, Models::Shared::S3DownloadURL, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('download') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_uploaded, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_uploaded') } } + + field :last_modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :mime_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mime_type') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + + field :service, Models::Shared::FileServiceTypes, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('service'), 'decoder': Utils.enum_from_string(Models::Shared::FileServiceTypes, false) } } + + field :size, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + + field :size_readable, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size_readable') } } + + field :storage_version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('storage_version') } } + + field :version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + + + sig { params(checksum_etag: ::String, checksum_sha256_base64: ::String, checksum_sha256_hex: ::String, download: Models::Shared::S3DownloadURL, id: ::String, is_uploaded: T::Boolean, last_modified_at: ::DateTime, mime_type: ::String, name: ::String, organization_id: ::String, path: ::String, service: Models::Shared::FileServiceTypes, size: ::Integer, size_readable: ::String, storage_version: ::String, version: ::String).void } + def initialize(checksum_etag: nil, checksum_sha256_base64: nil, checksum_sha256_hex: nil, download: nil, id: nil, is_uploaded: nil, last_modified_at: nil, mime_type: nil, name: nil, organization_id: nil, path: nil, service: nil, size: nil, size_readable: nil, storage_version: nil, version: nil) + @checksum_etag = checksum_etag + @checksum_sha256_base64 = checksum_sha256_base64 + @checksum_sha256_hex = checksum_sha256_hex + @download = download + @id = id + @is_uploaded = is_uploaded + @last_modified_at = last_modified_at + @mime_type = mime_type + @name = name + @organization_id = organization_id + @path = path + @service = service + @size = size + @size_readable = size_readable + @storage_version = storage_version + @version = version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @checksum_etag == other.checksum_etag + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @checksum_sha256_hex == other.checksum_sha256_hex + return false unless @download == other.download + return false unless @id == other.id + return false unless @is_uploaded == other.is_uploaded + return false unless @last_modified_at == other.last_modified_at + return false unless @mime_type == other.mime_type + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @path == other.path + return false unless @service == other.service + return false unless @size == other.size + return false unless @size_readable == other.size_readable + return false unless @storage_version == other.storage_version + return false unless @version == other.version + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/filepatch.rb b/lib/open_api_sdk/models/shared/filepatch.rb new file mode 100644 index 0000000..c1e9449 --- /dev/null +++ b/lib/open_api_sdk/models/shared/filepatch.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FilePatch + extend T::Sig + include Crystalline::MetadataFields + + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + + + sig { params(name: T.nilable(::String), version: T.nilable(::String)).void } + def initialize(name: nil, version: nil) + @name = name + @version = version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @name == other.name + return false unless @version == other.version + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/fileread.rb b/lib/open_api_sdk/models/shared/fileread.rb new file mode 100644 index 0000000..8cf64ea --- /dev/null +++ b/lib/open_api_sdk/models/shared/fileread.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FileRead + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/fileservicetypes.rb b/lib/open_api_sdk/models/shared/fileservicetypes.rb new file mode 100644 index 0000000..0d149db --- /dev/null +++ b/lib/open_api_sdk/models/shared/fileservicetypes.rb @@ -0,0 +1,21 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FileServiceTypes < T::Enum + enums do + DOWNLOADABLE = new('downloadable') + PRODUCT_MEDIA = new('product_media') + ORGANIZATION_AVATAR = new('organization_avatar') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/fileupload.rb b/lib/open_api_sdk/models/shared/fileupload.rb new file mode 100644 index 0000000..f33756c --- /dev/null +++ b/lib/open_api_sdk/models/shared/fileupload.rb @@ -0,0 +1,93 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FileUpload + extend T::Sig + include Crystalline::MetadataFields + + + field :checksum_etag, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_etag') } } + + field :checksum_sha256_base64, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :checksum_sha256_hex, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_hex') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :last_modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :mime_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mime_type') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + + field :service, Models::Shared::FileServiceTypes, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('service'), 'decoder': Utils.enum_from_string(Models::Shared::FileServiceTypes, false) } } + + field :size, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + + field :size_readable, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size_readable') } } + + field :storage_version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('storage_version') } } + + field :upload, Models::Shared::S3FileUploadMultipart, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('upload') } } + + field :version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + + field :is_uploaded, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_uploaded') } } + + + sig { params(checksum_etag: ::String, checksum_sha256_base64: ::String, checksum_sha256_hex: ::String, id: ::String, last_modified_at: ::DateTime, mime_type: ::String, name: ::String, organization_id: ::String, path: ::String, service: Models::Shared::FileServiceTypes, size: ::Integer, size_readable: ::String, storage_version: ::String, upload: Models::Shared::S3FileUploadMultipart, version: ::String, is_uploaded: T.nilable(T::Boolean)).void } + def initialize(checksum_etag: nil, checksum_sha256_base64: nil, checksum_sha256_hex: nil, id: nil, last_modified_at: nil, mime_type: nil, name: nil, organization_id: nil, path: nil, service: nil, size: nil, size_readable: nil, storage_version: nil, upload: nil, version: nil, is_uploaded: nil) + @checksum_etag = checksum_etag + @checksum_sha256_base64 = checksum_sha256_base64 + @checksum_sha256_hex = checksum_sha256_hex + @id = id + @last_modified_at = last_modified_at + @mime_type = mime_type + @name = name + @organization_id = organization_id + @path = path + @service = service + @size = size + @size_readable = size_readable + @storage_version = storage_version + @upload = upload + @version = version + @is_uploaded = is_uploaded + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @checksum_etag == other.checksum_etag + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @checksum_sha256_hex == other.checksum_sha256_hex + return false unless @id == other.id + return false unless @last_modified_at == other.last_modified_at + return false unless @mime_type == other.mime_type + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @path == other.path + return false unless @service == other.service + return false unless @size == other.size + return false unless @size_readable == other.size_readable + return false unless @storage_version == other.storage_version + return false unless @upload == other.upload + return false unless @version == other.version + return false unless @is_uploaded == other.is_uploaded + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/fileuploadcompleted.rb b/lib/open_api_sdk/models/shared/fileuploadcompleted.rb new file mode 100644 index 0000000..06e7956 --- /dev/null +++ b/lib/open_api_sdk/models/shared/fileuploadcompleted.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FileUploadCompleted + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :parts, T::Array[Models::Shared::S3FileUploadCompletedPart], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('parts') } } + + field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + + + sig { params(id: ::String, parts: T::Array[Models::Shared::S3FileUploadCompletedPart], path: ::String).void } + def initialize(id: nil, parts: nil, path: nil) + @id = id + @parts = parts + @path = path + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @parts == other.parts + return false unless @path == other.path + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/filter.rb b/lib/open_api_sdk/models/shared/filter.rb new file mode 100644 index 0000000..1520559 --- /dev/null +++ b/lib/open_api_sdk/models/shared/filter.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Filter + extend T::Sig + include Crystalline::MetadataFields + + + field :clauses, T::Array[T.any(Models::Shared::FilterClause, Models::Shared::Filter)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clauses') } } + + field :conjunction, Models::Shared::FilterConjunction, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('conjunction'), 'decoder': Utils.enum_from_string(Models::Shared::FilterConjunction, false) } } + + + sig { params(clauses: T::Array[T.any(Models::Shared::FilterClause, Models::Shared::Filter)], conjunction: Models::Shared::FilterConjunction).void } + def initialize(clauses: nil, conjunction: nil) + @clauses = clauses + @conjunction = conjunction + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @clauses == other.clauses + return false unless @conjunction == other.conjunction + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/filterclause.rb b/lib/open_api_sdk/models/shared/filterclause.rb new file mode 100644 index 0000000..a197778 --- /dev/null +++ b/lib/open_api_sdk/models/shared/filterclause.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FilterClause + extend T::Sig + include Crystalline::MetadataFields + + + field :operator, Models::Shared::FilterOperator, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('operator'), 'decoder': Utils.enum_from_string(Models::Shared::FilterOperator, false) } } + + field :property, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('property') } } + + field :value, T.any(::String, ::Integer, T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('value') } } + + + sig { params(operator: Models::Shared::FilterOperator, property: ::String, value: T.any(::String, ::Integer, T::Boolean)).void } + def initialize(operator: nil, property: nil, value: nil) + @operator = operator + @property = property + @value = value + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @operator == other.operator + return false unless @property == other.property + return false unless @value == other.value + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/filterconjunction.rb b/lib/open_api_sdk/models/shared/filterconjunction.rb new file mode 100644 index 0000000..dc9fb28 --- /dev/null +++ b/lib/open_api_sdk/models/shared/filterconjunction.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FilterConjunction < T::Enum + enums do + AND = new('and') + OR = new('or') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/filteroperator.rb b/lib/open_api_sdk/models/shared/filteroperator.rb new file mode 100644 index 0000000..fdbefd9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/filteroperator.rb @@ -0,0 +1,26 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class FilterOperator < T::Enum + enums do + EQ = new('eq') + NE = new('ne') + GT = new('gt') + GTE = new('gte') + LT = new('lt') + LTE = new('lte') + LIKE = new('like') + NOT_LIKE = new('not_like') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/func.rb b/lib/open_api_sdk/models/shared/func.rb new file mode 100644 index 0000000..a021ab5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/func.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Func < T::Enum + enums do + SUM = new('sum') + MAX = new('max') + MIN = new('min') + AVG = new('avg') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/grant_types.rb b/lib/open_api_sdk/models/shared/grant_types.rb new file mode 100644 index 0000000..3f0b161 --- /dev/null +++ b/lib/open_api_sdk/models/shared/grant_types.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class GrantTypes < T::Enum + enums do + AUTHORIZATION_CODE = new('authorization_code') + REFRESH_TOKEN = new('refresh_token') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/introspecttokenrequest.rb b/lib/open_api_sdk/models/shared/introspecttokenrequest.rb new file mode 100644 index 0000000..24b4f20 --- /dev/null +++ b/lib/open_api_sdk/models/shared/introspecttokenrequest.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class IntrospectTokenRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'form': { 'field_name': 'client_id' } } + + field :client_secret, ::String, { 'form': { 'field_name': 'client_secret' } } + + field :token, ::String, { 'form': { 'field_name': 'token' } } + + field :token_type_hint, T.nilable(Models::Shared::IntrospectTokenRequestTokenTypeHint), { 'form': { 'field_name': 'token_type_hint' } } + + + sig { params(client_id: ::String, client_secret: ::String, token: ::String, token_type_hint: T.nilable(Models::Shared::IntrospectTokenRequestTokenTypeHint)).void } + def initialize(client_id: nil, client_secret: nil, token: nil, token_type_hint: nil) + @client_id = client_id + @client_secret = client_secret + @token = token + @token_type_hint = token_type_hint + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + return false unless @client_secret == other.client_secret + return false unless @token == other.token + return false unless @token_type_hint == other.token_type_hint + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/introspecttokenrequest_token_type_hint.rb b/lib/open_api_sdk/models/shared/introspecttokenrequest_token_type_hint.rb new file mode 100644 index 0000000..ed58573 --- /dev/null +++ b/lib/open_api_sdk/models/shared/introspecttokenrequest_token_type_hint.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class IntrospectTokenRequestTokenTypeHint < T::Enum + enums do + ACCESS_TOKEN = new('access_token') + REFRESH_TOKEN = new('refresh_token') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/introspecttokenresponse.rb b/lib/open_api_sdk/models/shared/introspecttokenresponse.rb new file mode 100644 index 0000000..a846403 --- /dev/null +++ b/lib/open_api_sdk/models/shared/introspecttokenresponse.rb @@ -0,0 +1,69 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class IntrospectTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + + field :active, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('active') } } + + field :aud, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('aud') } } + + field :client_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_id') } } + + field :exp, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('exp') } } + + field :iat, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('iat') } } + + field :iss, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('iss') } } + + field :scope, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('scope') } } + + field :sub, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sub') } } + + field :sub_type, Models::Shared::SubType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sub_type'), 'decoder': Utils.enum_from_string(Models::Shared::SubType, false) } } + + field :token_type, Models::Shared::TokenType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token_type'), 'decoder': Utils.enum_from_string(Models::Shared::TokenType, false) } } + + + sig { params(active: T::Boolean, aud: ::String, client_id: ::String, exp: ::Integer, iat: ::Integer, iss: ::String, scope: ::String, sub: ::String, sub_type: Models::Shared::SubType, token_type: Models::Shared::TokenType).void } + def initialize(active: nil, aud: nil, client_id: nil, exp: nil, iat: nil, iss: nil, scope: nil, sub: nil, sub_type: nil, token_type: nil) + @active = active + @aud = aud + @client_id = client_id + @exp = exp + @iat = iat + @iss = iss + @scope = scope + @sub = sub + @sub_type = sub_type + @token_type = token_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @active == other.active + return false unless @aud == other.aud + return false unless @client_id == other.client_id + return false unless @exp == other.exp + return false unless @iat == other.iat + return false unless @iss == other.iss + return false unless @scope == other.scope + return false unless @sub == other.sub + return false unless @sub_type == other.sub_type + return false unless @token_type == other.token_type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/items.rb b/lib/open_api_sdk/models/shared/items.rb new file mode 100644 index 0000000..22bc540 --- /dev/null +++ b/lib/open_api_sdk/models/shared/items.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Items + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/legacyrecurringproductprice.rb b/lib/open_api_sdk/models/shared/legacyrecurringproductprice.rb new file mode 100644 index 0000000..7de39f9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/legacyrecurringproductprice.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LegacyRecurringProductPrice + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/legacyrecurringproductpricecustom.rb b/lib/open_api_sdk/models/shared/legacyrecurringproductpricecustom.rb new file mode 100644 index 0000000..57e38a0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/legacyrecurringproductpricecustom.rb @@ -0,0 +1,83 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A pay-what-you-want recurring price for a product, i.e. a subscription. + # + # **Deprecated**: The recurring interval should be set on the product itself. + class LegacyRecurringProductPriceCustom + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the price. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the price is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + + field :legacy, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('legacy') } } + # The maximum amount the customer can pay. + field :maximum_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('maximum_amount') } } + # The minimum amount the customer can pay. + field :minimum_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('minimum_amount') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The initial amount shown to the customer. + field :preset_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('preset_amount') } } + # The currency. + field :price_currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_currency') } } + # The ID of the product owning the price. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + # The type of the price. + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(amount_type: ::String, created_at: ::DateTime, id: ::String, is_archived: T::Boolean, legacy: T::Boolean, maximum_amount: ::Integer, minimum_amount: ::Integer, modified_at: ::DateTime, preset_amount: ::Integer, price_currency: ::String, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, type: ::String).void } + def initialize(amount_type: nil, created_at: nil, id: nil, is_archived: nil, legacy: nil, maximum_amount: nil, minimum_amount: nil, modified_at: nil, preset_amount: nil, price_currency: nil, product_id: nil, recurring_interval: nil, type: nil) + @amount_type = amount_type + @created_at = created_at + @id = id + @is_archived = is_archived + @legacy = legacy + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @modified_at = modified_at + @preset_amount = preset_amount + @price_currency = price_currency + @product_id = product_id + @recurring_interval = recurring_interval + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @legacy == other.legacy + return false unless @maximum_amount == other.maximum_amount + return false unless @minimum_amount == other.minimum_amount + return false unless @modified_at == other.modified_at + return false unless @preset_amount == other.preset_amount + return false unless @price_currency == other.price_currency + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/legacyrecurringproductpricefixed.rb b/lib/open_api_sdk/models/shared/legacyrecurringproductpricefixed.rb new file mode 100644 index 0000000..9f6037c --- /dev/null +++ b/lib/open_api_sdk/models/shared/legacyrecurringproductpricefixed.rb @@ -0,0 +1,75 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A recurring price for a product, i.e. a subscription. + # + # **Deprecated**: The recurring interval should be set on the product itself. + class LegacyRecurringProductPriceFixed + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the price. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the price is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + + field :legacy, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('legacy') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The price in cents. + field :price_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_amount') } } + # The currency. + field :price_currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_currency') } } + # The ID of the product owning the price. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + # The type of the price. + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(amount_type: ::String, created_at: ::DateTime, id: ::String, is_archived: T::Boolean, legacy: T::Boolean, modified_at: ::DateTime, price_amount: ::Integer, price_currency: ::String, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, type: ::String).void } + def initialize(amount_type: nil, created_at: nil, id: nil, is_archived: nil, legacy: nil, modified_at: nil, price_amount: nil, price_currency: nil, product_id: nil, recurring_interval: nil, type: nil) + @amount_type = amount_type + @created_at = created_at + @id = id + @is_archived = is_archived + @legacy = legacy + @modified_at = modified_at + @price_amount = price_amount + @price_currency = price_currency + @product_id = product_id + @recurring_interval = recurring_interval + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @legacy == other.legacy + return false unless @modified_at == other.modified_at + return false unless @price_amount == other.price_amount + return false unless @price_currency == other.price_currency + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/legacyrecurringproductpricefree.rb b/lib/open_api_sdk/models/shared/legacyrecurringproductpricefree.rb new file mode 100644 index 0000000..4baecc9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/legacyrecurringproductpricefree.rb @@ -0,0 +1,67 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A free recurring price for a product, i.e. a subscription. + # + # **Deprecated**: The recurring interval should be set on the product itself. + class LegacyRecurringProductPriceFree + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the price. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the price is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + + field :legacy, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('legacy') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the product owning the price. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + # The type of the price. + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(amount_type: ::String, created_at: ::DateTime, id: ::String, is_archived: T::Boolean, legacy: T::Boolean, modified_at: ::DateTime, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, type: ::String).void } + def initialize(amount_type: nil, created_at: nil, id: nil, is_archived: nil, legacy: nil, modified_at: nil, product_id: nil, recurring_interval: nil, type: nil) + @amount_type = amount_type + @created_at = created_at + @id = id + @is_archived = is_archived + @legacy = legacy + @modified_at = modified_at + @product_id = product_id + @recurring_interval = recurring_interval + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @legacy == other.legacy + return false unless @modified_at == other.modified_at + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeyactivate.rb b/lib/open_api_sdk/models/shared/licensekeyactivate.rb new file mode 100644 index 0000000..62a6aaf --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeyactivate.rb @@ -0,0 +1,69 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyActivate + extend T::Sig + include Crystalline::MetadataFields + + + field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + + field :label, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # Key-value object allowing you to set conditions that must match when validating the license key. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :conditions, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('conditions') } } + # Key-value object allowing you to store additional information about the activation + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :meta, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meta') } } + + + sig { params(key: ::String, label: ::String, organization_id: ::String, conditions: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), meta: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)])).void } + def initialize(key: nil, label: nil, organization_id: nil, conditions: nil, meta: nil) + @key = key + @label = label + @organization_id = organization_id + @conditions = conditions + @meta = meta + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @key == other.key + return false unless @label == other.label + return false unless @organization_id == other.organization_id + return false unless @conditions == other.conditions + return false unless @meta == other.meta + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeyactivate_conditions.rb b/lib/open_api_sdk/models/shared/licensekeyactivate_conditions.rb new file mode 100644 index 0000000..be5c60c --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeyactivate_conditions.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyActivateConditions + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeyactivate_meta.rb b/lib/open_api_sdk/models/shared/licensekeyactivate_meta.rb new file mode 100644 index 0000000..2251433 --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeyactivate_meta.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyActivateMeta + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeyactivationbase.rb b/lib/open_api_sdk/models/shared/licensekeyactivationbase.rb new file mode 100644 index 0000000..f93edad --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeyactivationbase.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyActivationBase + extend T::Sig + include Crystalline::MetadataFields + + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :label, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + + field :license_key_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('license_key_id') } } + + field :meta, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meta') } } + + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(created_at: ::DateTime, id: ::String, label: ::String, license_key_id: ::String, meta: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime).void } + def initialize(created_at: nil, id: nil, label: nil, license_key_id: nil, meta: nil, modified_at: nil) + @created_at = created_at + @id = id + @label = label + @license_key_id = license_key_id + @meta = meta + @modified_at = modified_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @label == other.label + return false unless @license_key_id == other.license_key_id + return false unless @meta == other.meta + return false unless @modified_at == other.modified_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeyactivationread.rb b/lib/open_api_sdk/models/shared/licensekeyactivationread.rb new file mode 100644 index 0000000..6f19f9f --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeyactivationread.rb @@ -0,0 +1,57 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyActivationRead + extend T::Sig + include Crystalline::MetadataFields + + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :label, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + + field :license_key, Models::Shared::LicenseKeyRead, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('license_key') } } + + field :license_key_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('license_key_id') } } + + field :meta, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meta') } } + + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(created_at: ::DateTime, id: ::String, label: ::String, license_key: Models::Shared::LicenseKeyRead, license_key_id: ::String, meta: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime).void } + def initialize(created_at: nil, id: nil, label: nil, license_key: nil, license_key_id: nil, meta: nil, modified_at: nil) + @created_at = created_at + @id = id + @label = label + @license_key = license_key + @license_key_id = license_key_id + @meta = meta + @modified_at = modified_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @label == other.label + return false unless @license_key == other.license_key + return false unless @license_key_id == other.license_key_id + return false unless @meta == other.meta + return false unless @modified_at == other.modified_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeyactivationread_meta.rb b/lib/open_api_sdk/models/shared/licensekeyactivationread_meta.rb new file mode 100644 index 0000000..e8babfb --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeyactivationread_meta.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyActivationReadMeta + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeycustomer.rb b/lib/open_api_sdk/models/shared/licensekeycustomer.rb new file mode 100644 index 0000000..bacbde8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeycustomer.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyCustomer + extend T::Sig + include Crystalline::MetadataFields + + + field :avatar_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + + field :billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Timestamp for when the customer was soft deleted. + field :deleted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deleted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The email address of the customer. This must be unique within the organization. + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. + field :email_verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } + # The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('external_id') } } + # The ID of the customer. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the customer. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the customer. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :tax_id, T::Array[T.any(::String, Models::Shared::TaxIDFormat)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(avatar_url: ::String, billing_address: Models::Shared::Address, created_at: ::DateTime, deleted_at: ::DateTime, email: ::String, email_verified: T::Boolean, external_id: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, tax_id: T::Array[T.any(::String, Models::Shared::TaxIDFormat)]).void } + def initialize(avatar_url: nil, billing_address: nil, created_at: nil, deleted_at: nil, email: nil, email_verified: nil, external_id: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, tax_id: nil) + @avatar_url = avatar_url + @billing_address = billing_address + @created_at = created_at + @deleted_at = deleted_at + @email = email + @email_verified = email_verified + @external_id = external_id + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @avatar_url == other.avatar_url + return false unless @billing_address == other.billing_address + return false unless @created_at == other.created_at + return false unless @deleted_at == other.deleted_at + return false unless @email == other.email + return false unless @email_verified == other.email_verified + return false unless @external_id == other.external_id + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeycustomer_metadata.rb b/lib/open_api_sdk/models/shared/licensekeycustomer_metadata.rb new file mode 100644 index 0000000..268e703 --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeycustomer_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyCustomerMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeycustomer_tax_id.rb b/lib/open_api_sdk/models/shared/licensekeycustomer_tax_id.rb new file mode 100644 index 0000000..67909b0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeycustomer_tax_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyCustomerTaxId + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeydeactivate.rb b/lib/open_api_sdk/models/shared/licensekeydeactivate.rb new file mode 100644 index 0000000..0fda5cc --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeydeactivate.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyDeactivate + extend T::Sig + include Crystalline::MetadataFields + + + field :activation_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('activation_id') } } + + field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(activation_id: ::String, key: ::String, organization_id: ::String).void } + def initialize(activation_id: nil, key: nil, organization_id: nil) + @activation_id = activation_id + @key = key + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @activation_id == other.activation_id + return false unless @key == other.key + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeyread.rb b/lib/open_api_sdk/models/shared/licensekeyread.rb new file mode 100644 index 0000000..11f3024 --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeyread.rb @@ -0,0 +1,93 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyRead + extend T::Sig + include Crystalline::MetadataFields + + # The benefit ID. + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::LicenseKeyCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :display_key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_key') } } + + field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + + field :last_validated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_validated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :limit_activations, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_activations') } } + + field :limit_usage, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_usage') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :status, Models::Shared::LicenseKeyStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::LicenseKeyStatus, false) } } + + field :usage, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('usage') } } + + field :validations, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('validations') } } + + + sig { params(benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::LicenseKeyCustomer, customer_id: ::String, display_key: ::String, expires_at: ::DateTime, id: ::String, key: ::String, last_validated_at: ::DateTime, limit_activations: ::Integer, limit_usage: ::Integer, modified_at: ::DateTime, organization_id: ::String, status: Models::Shared::LicenseKeyStatus, usage: ::Integer, validations: ::Integer).void } + def initialize(benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, display_key: nil, expires_at: nil, id: nil, key: nil, last_validated_at: nil, limit_activations: nil, limit_usage: nil, modified_at: nil, organization_id: nil, status: nil, usage: nil, validations: nil) + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @display_key = display_key + @expires_at = expires_at + @id = id + @key = key + @last_validated_at = last_validated_at + @limit_activations = limit_activations + @limit_usage = limit_usage + @modified_at = modified_at + @organization_id = organization_id + @status = status + @usage = usage + @validations = validations + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @display_key == other.display_key + return false unless @expires_at == other.expires_at + return false unless @id == other.id + return false unless @key == other.key + return false unless @last_validated_at == other.last_validated_at + return false unless @limit_activations == other.limit_activations + return false unless @limit_usage == other.limit_usage + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @status == other.status + return false unless @usage == other.usage + return false unless @validations == other.validations + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeystatus.rb b/lib/open_api_sdk/models/shared/licensekeystatus.rb new file mode 100644 index 0000000..bd66b18 --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeystatus.rb @@ -0,0 +1,21 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyStatus < T::Enum + enums do + GRANTED = new('granted') + REVOKED = new('revoked') + DISABLED = new('disabled') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeyupdate.rb b/lib/open_api_sdk/models/shared/licensekeyupdate.rb new file mode 100644 index 0000000..1f51103 --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeyupdate.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :expires_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(true) } } + + field :limit_activations, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_activations') } } + + field :limit_usage, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_usage') } } + + field :status, T.nilable(Models::Shared::LicenseKeyStatus), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::LicenseKeyStatus, true) } } + + field :usage, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('usage') } } + + + sig { params(expires_at: T.nilable(::DateTime), limit_activations: T.nilable(::Integer), limit_usage: T.nilable(::Integer), status: T.nilable(Models::Shared::LicenseKeyStatus), usage: T.nilable(::Integer)).void } + def initialize(expires_at: nil, limit_activations: nil, limit_usage: nil, status: nil, usage: nil) + @expires_at = expires_at + @limit_activations = limit_activations + @limit_usage = limit_usage + @status = status + @usage = usage + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @expires_at == other.expires_at + return false unless @limit_activations == other.limit_activations + return false unless @limit_usage == other.limit_usage + return false unless @status == other.status + return false unless @usage == other.usage + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeyvalidate.rb b/lib/open_api_sdk/models/shared/licensekeyvalidate.rb new file mode 100644 index 0000000..04d5204 --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeyvalidate.rb @@ -0,0 +1,67 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyValidate + extend T::Sig + include Crystalline::MetadataFields + + + field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :activation_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('activation_id') } } + + field :benefit_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Key-value object allowing you to set conditions that must match when validating the license key. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :conditions, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('conditions') } } + + field :customer_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :increment_usage, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('increment_usage') } } + + + sig { params(key: ::String, organization_id: ::String, activation_id: T.nilable(::String), benefit_id: T.nilable(::String), conditions: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), customer_id: T.nilable(::String), increment_usage: T.nilable(::Integer)).void } + def initialize(key: nil, organization_id: nil, activation_id: nil, benefit_id: nil, conditions: nil, customer_id: nil, increment_usage: nil) + @key = key + @organization_id = organization_id + @activation_id = activation_id + @benefit_id = benefit_id + @conditions = conditions + @customer_id = customer_id + @increment_usage = increment_usage + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @key == other.key + return false unless @organization_id == other.organization_id + return false unless @activation_id == other.activation_id + return false unless @benefit_id == other.benefit_id + return false unless @conditions == other.conditions + return false unless @customer_id == other.customer_id + return false unless @increment_usage == other.increment_usage + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/licensekeywithactivations.rb b/lib/open_api_sdk/models/shared/licensekeywithactivations.rb new file mode 100644 index 0000000..650121c --- /dev/null +++ b/lib/open_api_sdk/models/shared/licensekeywithactivations.rb @@ -0,0 +1,97 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class LicenseKeyWithActivations + extend T::Sig + include Crystalline::MetadataFields + + + field :activations, T::Array[Models::Shared::LicenseKeyActivationBase], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('activations') } } + # The benefit ID. + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::LicenseKeyCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :display_key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_key') } } + + field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + + field :last_validated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_validated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :limit_activations, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_activations') } } + + field :limit_usage, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_usage') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :status, Models::Shared::LicenseKeyStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::LicenseKeyStatus, false) } } + + field :usage, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('usage') } } + + field :validations, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('validations') } } + + + sig { params(activations: T::Array[Models::Shared::LicenseKeyActivationBase], benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::LicenseKeyCustomer, customer_id: ::String, display_key: ::String, expires_at: ::DateTime, id: ::String, key: ::String, last_validated_at: ::DateTime, limit_activations: ::Integer, limit_usage: ::Integer, modified_at: ::DateTime, organization_id: ::String, status: Models::Shared::LicenseKeyStatus, usage: ::Integer, validations: ::Integer).void } + def initialize(activations: nil, benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, display_key: nil, expires_at: nil, id: nil, key: nil, last_validated_at: nil, limit_activations: nil, limit_usage: nil, modified_at: nil, organization_id: nil, status: nil, usage: nil, validations: nil) + @activations = activations + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @display_key = display_key + @expires_at = expires_at + @id = id + @key = key + @last_validated_at = last_validated_at + @limit_activations = limit_activations + @limit_usage = limit_usage + @modified_at = modified_at + @organization_id = organization_id + @status = status + @usage = usage + @validations = validations + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @activations == other.activations + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @display_key == other.display_key + return false unless @expires_at == other.expires_at + return false unless @id == other.id + return false unless @key == other.key + return false unless @last_validated_at == other.last_validated_at + return false unless @limit_activations == other.limit_activations + return false unless @limit_usage == other.limit_usage + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @status == other.status + return false unless @usage == other.usage + return false unless @validations == other.validations + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_benefit_.rb b/lib/open_api_sdk/models/shared/listresource_benefit_.rb new file mode 100644 index 0000000..97d2b86 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_benefit_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceBenefit + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_benefitgrant_.rb b/lib/open_api_sdk/models/shared/listresource_benefitgrant_.rb new file mode 100644 index 0000000..de3972d --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_benefitgrant_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceBenefitGrant + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::BenefitGrant], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::BenefitGrant], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_checkout_.rb b/lib/open_api_sdk/models/shared/listresource_checkout_.rb new file mode 100644 index 0000000..80a06ac --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_checkout_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceCheckout + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::Checkout], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::Checkout], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_checkoutlink_.rb b/lib/open_api_sdk/models/shared/listresource_checkoutlink_.rb new file mode 100644 index 0000000..d035409 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_checkoutlink_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceCheckoutLink + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::CheckoutLink], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::CheckoutLink], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_customer_.rb b/lib/open_api_sdk/models/shared/listresource_customer_.rb new file mode 100644 index 0000000..6e67559 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_customer_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceCustomer + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::Customer], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::Customer], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_customerbenefitgrant_.rb b/lib/open_api_sdk/models/shared/listresource_customerbenefitgrant_.rb new file mode 100644 index 0000000..b30f8f3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_customerbenefitgrant_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceCustomerBenefitGrant + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[T.any(Models::Shared::CustomerBenefitGrantDiscord, Models::Shared::CustomerBenefitGrantGitHubRepository, Models::Shared::CustomerBenefitGrantDownloadables, Models::Shared::CustomerBenefitGrantLicenseKeys, Models::Shared::CustomerBenefitGrantCustom, Models::Shared::CustomerBenefitGrantMeterCredit)], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_customercustomermeter_.rb b/lib/open_api_sdk/models/shared/listresource_customercustomermeter_.rb new file mode 100644 index 0000000..a01d8ee --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_customercustomermeter_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceCustomerCustomerMeter + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::CustomerCustomerMeter], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::CustomerCustomerMeter], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_customermeter_.rb b/lib/open_api_sdk/models/shared/listresource_customermeter_.rb new file mode 100644 index 0000000..b192edc --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_customermeter_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceCustomerMeter + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::CustomerMeter], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::CustomerMeter], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_customerorder_.rb b/lib/open_api_sdk/models/shared/listresource_customerorder_.rb new file mode 100644 index 0000000..5d2ab99 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_customerorder_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceCustomerOrder + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::CustomerOrder], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::CustomerOrder], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_customersubscription_.rb b/lib/open_api_sdk/models/shared/listresource_customersubscription_.rb new file mode 100644 index 0000000..22ebc33 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_customersubscription_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceCustomerSubscription + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::CustomerSubscription], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::CustomerSubscription], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_customfield_.rb b/lib/open_api_sdk/models/shared/listresource_customfield_.rb new file mode 100644 index 0000000..cb9ce0e --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_customfield_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceCustomField + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[T.any(Models::Shared::CustomFieldText, Models::Shared::CustomFieldNumber, Models::Shared::CustomFieldDate, Models::Shared::CustomFieldCheckbox, Models::Shared::CustomFieldSelect)], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_discount_.rb b/lib/open_api_sdk/models/shared/listresource_discount_.rb new file mode 100644 index 0000000..b307e3f --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_discount_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceDiscount + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[T.any(Models::Shared::DiscountFixedOnceForeverDuration, Models::Shared::DiscountFixedRepeatDuration, Models::Shared::DiscountPercentageOnceForeverDuration, Models::Shared::DiscountPercentageRepeatDuration)], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_downloadableread_.rb b/lib/open_api_sdk/models/shared/listresource_downloadableread_.rb new file mode 100644 index 0000000..9312405 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_downloadableread_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceDownloadableRead + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::DownloadableRead], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::DownloadableRead], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_event_.rb b/lib/open_api_sdk/models/shared/listresource_event_.rb new file mode 100644 index 0000000..63d1ebb --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_event_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceEvent + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::Event], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::Event], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_eventname_.rb b/lib/open_api_sdk/models/shared/listresource_eventname_.rb new file mode 100644 index 0000000..168c7c9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_eventname_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceEventName + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::EventName], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::EventName], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_fileread_.rb b/lib/open_api_sdk/models/shared/listresource_fileread_.rb new file mode 100644 index 0000000..6ca8e4c --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_fileread_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceFileRead + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[T.any(Models::Shared::DownloadableFileRead, Models::Shared::ProductMediaFileRead, Models::Shared::OrganizationAvatarFileRead)], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_licensekeyread_.rb b/lib/open_api_sdk/models/shared/listresource_licensekeyread_.rb new file mode 100644 index 0000000..f674db3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_licensekeyread_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceLicenseKeyRead + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::LicenseKeyRead], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::LicenseKeyRead], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_meter_.rb b/lib/open_api_sdk/models/shared/listresource_meter_.rb new file mode 100644 index 0000000..337356c --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_meter_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceMeter + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::Meter], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::Meter], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_oauth2client_.rb b/lib/open_api_sdk/models/shared/listresource_oauth2client_.rb new file mode 100644 index 0000000..0254c1a --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_oauth2client_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceOAuth2Client + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::OAuth2Client], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::OAuth2Client], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_order_.rb b/lib/open_api_sdk/models/shared/listresource_order_.rb new file mode 100644 index 0000000..b0121c6 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_order_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceOrder + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::Order], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::Order], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_organization_.rb b/lib/open_api_sdk/models/shared/listresource_organization_.rb new file mode 100644 index 0000000..7df1fa0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_organization_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceOrganization + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::Organization], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::Organization], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_product_.rb b/lib/open_api_sdk/models/shared/listresource_product_.rb new file mode 100644 index 0000000..b1d722a --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_product_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceProduct + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::Product], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::Product], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_refund_.rb b/lib/open_api_sdk/models/shared/listresource_refund_.rb new file mode 100644 index 0000000..de25f54 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_refund_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceRefund + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::Refund], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::Refund], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_subscription_.rb b/lib/open_api_sdk/models/shared/listresource_subscription_.rb new file mode 100644 index 0000000..4ce10d0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_subscription_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceSubscription + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[Models::Shared::Subscription], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[Models::Shared::Subscription], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/listresource_union_paymentmethodcard_paymentmethodgeneric_.rb b/lib/open_api_sdk/models/shared/listresource_union_paymentmethodcard_paymentmethodgeneric_.rb new file mode 100644 index 0000000..f27b99c --- /dev/null +++ b/lib/open_api_sdk/models/shared/listresource_union_paymentmethodcard_paymentmethodgeneric_.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ListResourceUnionPaymentMethodCardPaymentMethodGeneric + extend T::Sig + include Crystalline::MetadataFields + + + field :items, T::Array[T.any(Models::Shared::PaymentMethodCard, Models::Shared::PaymentMethodGeneric)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :pagination, Models::Shared::Pagination, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('pagination') } } + + + sig { params(items: T::Array[T.any(Models::Shared::PaymentMethodCard, Models::Shared::PaymentMethodGeneric)], pagination: Models::Shared::Pagination).void } + def initialize(items: nil, pagination: nil) + @items = items + @pagination = pagination + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @items == other.items + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/loc.rb b/lib/open_api_sdk/models/shared/loc.rb new file mode 100644 index 0000000..09b29c7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/loc.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Loc + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/meta.rb b/lib/open_api_sdk/models/shared/meta.rb new file mode 100644 index 0000000..cd005ff --- /dev/null +++ b/lib/open_api_sdk/models/shared/meta.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Meta + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metadata.rb b/lib/open_api_sdk/models/shared/metadata.rb new file mode 100644 index 0000000..781b892 --- /dev/null +++ b/lib/open_api_sdk/models/shared/metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Metadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metadataquery.rb b/lib/open_api_sdk/models/shared/metadataquery.rb new file mode 100644 index 0000000..3201a4d --- /dev/null +++ b/lib/open_api_sdk/models/shared/metadataquery.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MetadataQuery + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/meter.rb b/lib/open_api_sdk/models/shared/meter.rb new file mode 100644 index 0000000..633fb18 --- /dev/null +++ b/lib/open_api_sdk/models/shared/meter.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Meter + extend T::Sig + include Crystalline::MetadataFields + + # The aggregation to apply on the filtered events to calculate the meter. + field :aggregation, T.any(Models::Shared::CountAggregation, Models::Shared::PropertyAggregation), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('aggregation') }, 'discriminator': 'func' } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :filter, Models::Shared::Filter, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('filter') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the meter. Will be shown on customer's invoices and usage. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the meter. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(aggregation: T.any(Models::Shared::CountAggregation, Models::Shared::PropertyAggregation), created_at: ::DateTime, filter: Models::Shared::Filter, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String).void } + def initialize(aggregation: nil, created_at: nil, filter: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil) + @aggregation = aggregation + @created_at = created_at + @filter = filter + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @aggregation == other.aggregation + return false unless @created_at == other.created_at + return false unless @filter == other.filter + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/meter_aggregation.rb b/lib/open_api_sdk/models/shared/meter_aggregation.rb new file mode 100644 index 0000000..9711570 --- /dev/null +++ b/lib/open_api_sdk/models/shared/meter_aggregation.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # The aggregation to apply on the filtered events to calculate the meter. + class MeterAggregation + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/meter_metadata.rb b/lib/open_api_sdk/models/shared/meter_metadata.rb new file mode 100644 index 0000000..ec81278 --- /dev/null +++ b/lib/open_api_sdk/models/shared/meter_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MeterMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metercreate.rb b/lib/open_api_sdk/models/shared/metercreate.rb new file mode 100644 index 0000000..e2774e0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/metercreate.rb @@ -0,0 +1,59 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MeterCreate + extend T::Sig + include Crystalline::MetadataFields + + # The aggregation to apply on the filtered events to calculate the meter. + field :aggregation, T.any(Models::Shared::CountAggregation, Models::Shared::PropertyAggregation), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('aggregation') }, 'discriminator': 'func' } + + field :filter, Models::Shared::Filter, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('filter') } } + # The name of the meter. Will be shown on customer's invoices and usage. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the meter. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(aggregation: T.any(Models::Shared::CountAggregation, Models::Shared::PropertyAggregation), filter: Models::Shared::Filter, name: ::String, metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(aggregation: nil, filter: nil, name: nil, metadata: nil, organization_id: nil) + @aggregation = aggregation + @filter = filter + @name = name + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @aggregation == other.aggregation + return false unless @filter == other.filter + return false unless @name == other.name + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metercreate_aggregation.rb b/lib/open_api_sdk/models/shared/metercreate_aggregation.rb new file mode 100644 index 0000000..fb573fd --- /dev/null +++ b/lib/open_api_sdk/models/shared/metercreate_aggregation.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # The aggregation to apply on the filtered events to calculate the meter. + class MeterCreateAggregation + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metercreate_metadata.rb b/lib/open_api_sdk/models/shared/metercreate_metadata.rb new file mode 100644 index 0000000..93efbca --- /dev/null +++ b/lib/open_api_sdk/models/shared/metercreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MeterCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/meterquantities.rb b/lib/open_api_sdk/models/shared/meterquantities.rb new file mode 100644 index 0000000..b915740 --- /dev/null +++ b/lib/open_api_sdk/models/shared/meterquantities.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MeterQuantities + extend T::Sig + include Crystalline::MetadataFields + + + field :quantities, T::Array[Models::Shared::MeterQuantity], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('quantities') } } + # The total quantity for the period. + field :total, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('total') } } + + + sig { params(quantities: T::Array[Models::Shared::MeterQuantity], total: ::Float).void } + def initialize(quantities: nil, total: nil) + @quantities = quantities + @total = total + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @quantities == other.quantities + return false unless @total == other.total + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/meterquantity.rb b/lib/open_api_sdk/models/shared/meterquantity.rb new file mode 100644 index 0000000..c352db6 --- /dev/null +++ b/lib/open_api_sdk/models/shared/meterquantity.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MeterQuantity + extend T::Sig + include Crystalline::MetadataFields + + # The quantity for the current period. + field :quantity, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('quantity') } } + # The timestamp for the current period. + field :timestamp, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('timestamp'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(quantity: ::Float, timestamp: ::DateTime).void } + def initialize(quantity: nil, timestamp: nil) + @quantity = quantity + @timestamp = timestamp + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @quantity == other.quantity + return false unless @timestamp == other.timestamp + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metersortproperty.rb b/lib/open_api_sdk/models/shared/metersortproperty.rb new file mode 100644 index 0000000..746ef0e --- /dev/null +++ b/lib/open_api_sdk/models/shared/metersortproperty.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MeterSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + NAME = new('name') + MINUS_NAME = new('-name') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/meterupdate.rb b/lib/open_api_sdk/models/shared/meterupdate.rb new file mode 100644 index 0000000..2a7c905 --- /dev/null +++ b/lib/open_api_sdk/models/shared/meterupdate.rb @@ -0,0 +1,55 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MeterUpdate + extend T::Sig + include Crystalline::MetadataFields + + # The aggregation to apply on the filtered events to calculate the meter. + field :aggregation, T.nilable(T.any(Models::Shared::CountAggregation, Models::Shared::PropertyAggregation)), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('aggregation') }, 'discriminator': 'func' } + # The filter to apply on events that'll be used to calculate the meter. + field :filter, T.nilable(Models::Shared::Filter), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('filter') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The name of the meter. Will be shown on customer's invoices and usage. + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + + sig { params(aggregation: T.nilable(T.any(Models::Shared::CountAggregation, Models::Shared::PropertyAggregation)), filter: T.nilable(Models::Shared::Filter), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String)).void } + def initialize(aggregation: nil, filter: nil, metadata: nil, name: nil) + @aggregation = aggregation + @filter = filter + @metadata = metadata + @name = name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @aggregation == other.aggregation + return false unless @filter == other.filter + return false unless @metadata == other.metadata + return false unless @name == other.name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/meterupdate_metadata.rb b/lib/open_api_sdk/models/shared/meterupdate_metadata.rb new file mode 100644 index 0000000..233a3e0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/meterupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MeterUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metric.rb b/lib/open_api_sdk/models/shared/metric.rb new file mode 100644 index 0000000..f773c30 --- /dev/null +++ b/lib/open_api_sdk/models/shared/metric.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Information about a metric. + class Metric + extend T::Sig + include Crystalline::MetadataFields + + # Human-readable name for the metric. + field :display_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_name') } } + # Unique identifier for the metric. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :type, Models::Shared::MetricType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::MetricType, false) } } + + + sig { params(display_name: ::String, slug: ::String, type: Models::Shared::MetricType).void } + def initialize(display_name: nil, slug: nil, type: nil) + @display_name = display_name + @slug = slug + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @display_name == other.display_name + return false unless @slug == other.slug + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metricperiod.rb b/lib/open_api_sdk/models/shared/metricperiod.rb new file mode 100644 index 0000000..349795d --- /dev/null +++ b/lib/open_api_sdk/models/shared/metricperiod.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MetricPeriod + extend T::Sig + include Crystalline::MetadataFields + + + field :active_subscriptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('active_subscriptions') } } + + field :average_order_value, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('average_order_value') } } + + field :cumulative_revenue, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cumulative_revenue') } } + + field :monthly_recurring_revenue, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('monthly_recurring_revenue') } } + + field :new_subscriptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('new_subscriptions') } } + + field :new_subscriptions_revenue, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('new_subscriptions_revenue') } } + + field :one_time_products, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('one_time_products') } } + + field :one_time_products_revenue, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('one_time_products_revenue') } } + + field :orders, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('orders') } } + + field :renewed_subscriptions, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('renewed_subscriptions') } } + + field :renewed_subscriptions_revenue, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('renewed_subscriptions_revenue') } } + + field :revenue, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revenue') } } + # Timestamp of this period data. + field :timestamp, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('timestamp'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(active_subscriptions: ::Integer, average_order_value: ::Integer, cumulative_revenue: ::Integer, monthly_recurring_revenue: ::Integer, new_subscriptions: ::Integer, new_subscriptions_revenue: ::Integer, one_time_products: ::Integer, one_time_products_revenue: ::Integer, orders: ::Integer, renewed_subscriptions: ::Integer, renewed_subscriptions_revenue: ::Integer, revenue: ::Integer, timestamp: ::DateTime).void } + def initialize(active_subscriptions: nil, average_order_value: nil, cumulative_revenue: nil, monthly_recurring_revenue: nil, new_subscriptions: nil, new_subscriptions_revenue: nil, one_time_products: nil, one_time_products_revenue: nil, orders: nil, renewed_subscriptions: nil, renewed_subscriptions_revenue: nil, revenue: nil, timestamp: nil) + @active_subscriptions = active_subscriptions + @average_order_value = average_order_value + @cumulative_revenue = cumulative_revenue + @monthly_recurring_revenue = monthly_recurring_revenue + @new_subscriptions = new_subscriptions + @new_subscriptions_revenue = new_subscriptions_revenue + @one_time_products = one_time_products + @one_time_products_revenue = one_time_products_revenue + @orders = orders + @renewed_subscriptions = renewed_subscriptions + @renewed_subscriptions_revenue = renewed_subscriptions_revenue + @revenue = revenue + @timestamp = timestamp + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @active_subscriptions == other.active_subscriptions + return false unless @average_order_value == other.average_order_value + return false unless @cumulative_revenue == other.cumulative_revenue + return false unless @monthly_recurring_revenue == other.monthly_recurring_revenue + return false unless @new_subscriptions == other.new_subscriptions + return false unless @new_subscriptions_revenue == other.new_subscriptions_revenue + return false unless @one_time_products == other.one_time_products + return false unless @one_time_products_revenue == other.one_time_products_revenue + return false unless @orders == other.orders + return false unless @renewed_subscriptions == other.renewed_subscriptions + return false unless @renewed_subscriptions_revenue == other.renewed_subscriptions_revenue + return false unless @revenue == other.revenue + return false unless @timestamp == other.timestamp + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metrics.rb b/lib/open_api_sdk/models/shared/metrics.rb new file mode 100644 index 0000000..9f516c7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/metrics.rb @@ -0,0 +1,77 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Metrics + extend T::Sig + include Crystalline::MetadataFields + + # Information about a metric. + field :active_subscriptions, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('active_subscriptions') } } + # Information about a metric. + field :average_order_value, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('average_order_value') } } + # Information about a metric. + field :cumulative_revenue, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cumulative_revenue') } } + # Information about a metric. + field :monthly_recurring_revenue, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('monthly_recurring_revenue') } } + # Information about a metric. + field :new_subscriptions, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('new_subscriptions') } } + # Information about a metric. + field :new_subscriptions_revenue, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('new_subscriptions_revenue') } } + # Information about a metric. + field :one_time_products, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('one_time_products') } } + # Information about a metric. + field :one_time_products_revenue, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('one_time_products_revenue') } } + # Information about a metric. + field :orders, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('orders') } } + # Information about a metric. + field :renewed_subscriptions, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('renewed_subscriptions') } } + # Information about a metric. + field :renewed_subscriptions_revenue, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('renewed_subscriptions_revenue') } } + # Information about a metric. + field :revenue, Models::Shared::Metric, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revenue') } } + + + sig { params(active_subscriptions: Models::Shared::Metric, average_order_value: Models::Shared::Metric, cumulative_revenue: Models::Shared::Metric, monthly_recurring_revenue: Models::Shared::Metric, new_subscriptions: Models::Shared::Metric, new_subscriptions_revenue: Models::Shared::Metric, one_time_products: Models::Shared::Metric, one_time_products_revenue: Models::Shared::Metric, orders: Models::Shared::Metric, renewed_subscriptions: Models::Shared::Metric, renewed_subscriptions_revenue: Models::Shared::Metric, revenue: Models::Shared::Metric).void } + def initialize(active_subscriptions: nil, average_order_value: nil, cumulative_revenue: nil, monthly_recurring_revenue: nil, new_subscriptions: nil, new_subscriptions_revenue: nil, one_time_products: nil, one_time_products_revenue: nil, orders: nil, renewed_subscriptions: nil, renewed_subscriptions_revenue: nil, revenue: nil) + @active_subscriptions = active_subscriptions + @average_order_value = average_order_value + @cumulative_revenue = cumulative_revenue + @monthly_recurring_revenue = monthly_recurring_revenue + @new_subscriptions = new_subscriptions + @new_subscriptions_revenue = new_subscriptions_revenue + @one_time_products = one_time_products + @one_time_products_revenue = one_time_products_revenue + @orders = orders + @renewed_subscriptions = renewed_subscriptions + @renewed_subscriptions_revenue = renewed_subscriptions_revenue + @revenue = revenue + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @active_subscriptions == other.active_subscriptions + return false unless @average_order_value == other.average_order_value + return false unless @cumulative_revenue == other.cumulative_revenue + return false unless @monthly_recurring_revenue == other.monthly_recurring_revenue + return false unless @new_subscriptions == other.new_subscriptions + return false unless @new_subscriptions_revenue == other.new_subscriptions_revenue + return false unless @one_time_products == other.one_time_products + return false unless @one_time_products_revenue == other.one_time_products_revenue + return false unless @orders == other.orders + return false unless @renewed_subscriptions == other.renewed_subscriptions + return false unless @renewed_subscriptions_revenue == other.renewed_subscriptions_revenue + return false unless @revenue == other.revenue + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metricsintervallimit.rb b/lib/open_api_sdk/models/shared/metricsintervallimit.rb new file mode 100644 index 0000000..7a10ca7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/metricsintervallimit.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Date interval limit to get metrics for a given interval. + class MetricsIntervalLimit + extend T::Sig + include Crystalline::MetadataFields + + # Maximum number of days for this interval. + field :max_days, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_days') } } + + + sig { params(max_days: ::Integer).void } + def initialize(max_days: nil) + @max_days = max_days + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @max_days == other.max_days + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metricsintervalslimits.rb b/lib/open_api_sdk/models/shared/metricsintervalslimits.rb new file mode 100644 index 0000000..13f0202 --- /dev/null +++ b/lib/open_api_sdk/models/shared/metricsintervalslimits.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Date interval limits to get metrics for each interval. + class MetricsIntervalsLimits + extend T::Sig + include Crystalline::MetadataFields + + # Date interval limit to get metrics for a given interval. + field :day, Models::Shared::MetricsIntervalLimit, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('day') } } + # Date interval limit to get metrics for a given interval. + field :hour, Models::Shared::MetricsIntervalLimit, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('hour') } } + # Date interval limit to get metrics for a given interval. + field :month, Models::Shared::MetricsIntervalLimit, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('month') } } + # Date interval limit to get metrics for a given interval. + field :week, Models::Shared::MetricsIntervalLimit, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('week') } } + # Date interval limit to get metrics for a given interval. + field :year, Models::Shared::MetricsIntervalLimit, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('year') } } + + + sig { params(day: Models::Shared::MetricsIntervalLimit, hour: Models::Shared::MetricsIntervalLimit, month: Models::Shared::MetricsIntervalLimit, week: Models::Shared::MetricsIntervalLimit, year: Models::Shared::MetricsIntervalLimit).void } + def initialize(day: nil, hour: nil, month: nil, week: nil, year: nil) + @day = day + @hour = hour + @month = month + @week = week + @year = year + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @day == other.day + return false unless @hour == other.hour + return false unless @month == other.month + return false unless @week == other.week + return false unless @year == other.year + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metricslimits.rb b/lib/open_api_sdk/models/shared/metricslimits.rb new file mode 100644 index 0000000..d262a38 --- /dev/null +++ b/lib/open_api_sdk/models/shared/metricslimits.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Date limits to get metrics. + class MetricsLimits + extend T::Sig + include Crystalline::MetadataFields + + # Date interval limits to get metrics for each interval. + field :intervals, Models::Shared::MetricsIntervalsLimits, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('intervals') } } + # Minimum date to get metrics. + field :min_date, ::Date, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('min_date'), 'decoder': Utils.date_from_iso_format(false) } } + + + sig { params(intervals: Models::Shared::MetricsIntervalsLimits, min_date: ::Date).void } + def initialize(intervals: nil, min_date: nil) + @intervals = intervals + @min_date = min_date + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @intervals == other.intervals + return false unless @min_date == other.min_date + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metricsresponse.rb b/lib/open_api_sdk/models/shared/metricsresponse.rb new file mode 100644 index 0000000..28155fe --- /dev/null +++ b/lib/open_api_sdk/models/shared/metricsresponse.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Metrics response schema. + class MetricsResponse + extend T::Sig + include Crystalline::MetadataFields + + + field :metrics, Models::Shared::Metrics, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metrics') } } + # List of data for each timestamp. + field :periods, T::Array[Models::Shared::MetricPeriod], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('periods') } } + + + sig { params(metrics: Models::Shared::Metrics, periods: T::Array[Models::Shared::MetricPeriod]).void } + def initialize(metrics: nil, periods: nil) + @metrics = metrics + @periods = periods + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @metrics == other.metrics + return false unless @periods == other.periods + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/metrictype.rb b/lib/open_api_sdk/models/shared/metrictype.rb new file mode 100644 index 0000000..c2f20f0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/metrictype.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class MetricType < T::Enum + enums do + SCALAR = new('scalar') + CURRENCY = new('currency') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/oauth2client.rb b/lib/open_api_sdk/models/shared/oauth2client.rb new file mode 100644 index 0000000..0e5900a --- /dev/null +++ b/lib/open_api_sdk/models/shared/oauth2client.rb @@ -0,0 +1,93 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OAuth2Client + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_id') } } + + field :client_id_issued_at, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_id_issued_at') } } + + field :client_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_name') } } + + field :client_secret, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_secret') } } + + field :client_secret_expires_at, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_secret_expires_at') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :redirect_uris, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redirect_uris') } } + + field :client_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_uri') } } + + field :grant_types, T.nilable(T::Array[Models::Shared::GrantTypes]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('grant_types') } } + + field :logo_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('logo_uri') } } + + field :policy_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('policy_uri') } } + + field :response_types, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('response_types') } } + + field :scope, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('scope') } } + + field :token_endpoint_auth_method, T.nilable(Models::Shared::TokenEndpointAuthMethod), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token_endpoint_auth_method'), 'decoder': Utils.enum_from_string(Models::Shared::TokenEndpointAuthMethod, true) } } + + field :tos_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tos_uri') } } + + + sig { params(client_id: ::String, client_id_issued_at: ::Integer, client_name: ::String, client_secret: ::String, client_secret_expires_at: ::Integer, created_at: ::DateTime, modified_at: ::DateTime, redirect_uris: T::Array[::String], client_uri: T.nilable(::String), grant_types: T.nilable(T::Array[Models::Shared::GrantTypes]), logo_uri: T.nilable(::String), policy_uri: T.nilable(::String), response_types: T.nilable(T::Array[::String]), scope: T.nilable(::String), token_endpoint_auth_method: T.nilable(Models::Shared::TokenEndpointAuthMethod), tos_uri: T.nilable(::String)).void } + def initialize(client_id: nil, client_id_issued_at: nil, client_name: nil, client_secret: nil, client_secret_expires_at: nil, created_at: nil, modified_at: nil, redirect_uris: nil, client_uri: nil, grant_types: nil, logo_uri: nil, policy_uri: nil, response_types: nil, scope: nil, token_endpoint_auth_method: nil, tos_uri: nil) + @client_id = client_id + @client_id_issued_at = client_id_issued_at + @client_name = client_name + @client_secret = client_secret + @client_secret_expires_at = client_secret_expires_at + @created_at = created_at + @modified_at = modified_at + @redirect_uris = redirect_uris + @client_uri = client_uri + @grant_types = grant_types + @logo_uri = logo_uri + @policy_uri = policy_uri + @response_types = response_types + @scope = scope + @token_endpoint_auth_method = token_endpoint_auth_method + @tos_uri = tos_uri + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + return false unless @client_id_issued_at == other.client_id_issued_at + return false unless @client_name == other.client_name + return false unless @client_secret == other.client_secret + return false unless @client_secret_expires_at == other.client_secret_expires_at + return false unless @created_at == other.created_at + return false unless @modified_at == other.modified_at + return false unless @redirect_uris == other.redirect_uris + return false unless @client_uri == other.client_uri + return false unless @grant_types == other.grant_types + return false unless @logo_uri == other.logo_uri + return false unless @policy_uri == other.policy_uri + return false unless @response_types == other.response_types + return false unless @scope == other.scope + return false unless @token_endpoint_auth_method == other.token_endpoint_auth_method + return false unless @tos_uri == other.tos_uri + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/oauth2clientconfiguration.rb b/lib/open_api_sdk/models/shared/oauth2clientconfiguration.rb new file mode 100644 index 0000000..3fcfeb8 --- /dev/null +++ b/lib/open_api_sdk/models/shared/oauth2clientconfiguration.rb @@ -0,0 +1,69 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OAuth2ClientConfiguration + extend T::Sig + include Crystalline::MetadataFields + + + field :client_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_name') } } + + field :redirect_uris, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redirect_uris') } } + + field :client_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_uri') } } + + field :grant_types, T.nilable(T::Array[Models::Shared::OAuth2ClientConfigurationGrantTypes]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('grant_types') } } + + field :logo_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('logo_uri') } } + + field :policy_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('policy_uri') } } + + field :response_types, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('response_types') } } + + field :scope, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('scope') } } + + field :token_endpoint_auth_method, T.nilable(Models::Shared::OAuth2ClientConfigurationTokenEndpointAuthMethod), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token_endpoint_auth_method'), 'decoder': Utils.enum_from_string(Models::Shared::OAuth2ClientConfigurationTokenEndpointAuthMethod, true) } } + + field :tos_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tos_uri') } } + + + sig { params(client_name: ::String, redirect_uris: T::Array[::String], client_uri: T.nilable(::String), grant_types: T.nilable(T::Array[Models::Shared::OAuth2ClientConfigurationGrantTypes]), logo_uri: T.nilable(::String), policy_uri: T.nilable(::String), response_types: T.nilable(T::Array[::String]), scope: T.nilable(::String), token_endpoint_auth_method: T.nilable(Models::Shared::OAuth2ClientConfigurationTokenEndpointAuthMethod), tos_uri: T.nilable(::String)).void } + def initialize(client_name: nil, redirect_uris: nil, client_uri: nil, grant_types: nil, logo_uri: nil, policy_uri: nil, response_types: nil, scope: nil, token_endpoint_auth_method: nil, tos_uri: nil) + @client_name = client_name + @redirect_uris = redirect_uris + @client_uri = client_uri + @grant_types = grant_types + @logo_uri = logo_uri + @policy_uri = policy_uri + @response_types = response_types + @scope = scope + @token_endpoint_auth_method = token_endpoint_auth_method + @tos_uri = tos_uri + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_name == other.client_name + return false unless @redirect_uris == other.redirect_uris + return false unless @client_uri == other.client_uri + return false unless @grant_types == other.grant_types + return false unless @logo_uri == other.logo_uri + return false unless @policy_uri == other.policy_uri + return false unless @response_types == other.response_types + return false unless @scope == other.scope + return false unless @token_endpoint_auth_method == other.token_endpoint_auth_method + return false unless @tos_uri == other.tos_uri + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/oauth2clientconfiguration_grant_types.rb b/lib/open_api_sdk/models/shared/oauth2clientconfiguration_grant_types.rb new file mode 100644 index 0000000..079009b --- /dev/null +++ b/lib/open_api_sdk/models/shared/oauth2clientconfiguration_grant_types.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OAuth2ClientConfigurationGrantTypes < T::Enum + enums do + AUTHORIZATION_CODE = new('authorization_code') + REFRESH_TOKEN = new('refresh_token') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/oauth2clientconfiguration_token_endpoint_auth_method.rb b/lib/open_api_sdk/models/shared/oauth2clientconfiguration_token_endpoint_auth_method.rb new file mode 100644 index 0000000..2ab3cb7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/oauth2clientconfiguration_token_endpoint_auth_method.rb @@ -0,0 +1,21 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OAuth2ClientConfigurationTokenEndpointAuthMethod < T::Enum + enums do + CLIENT_SECRET_BASIC = new('client_secret_basic') + CLIENT_SECRET_POST = new('client_secret_post') + NONE = new('none') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate.rb b/lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate.rb new file mode 100644 index 0000000..5da9b89 --- /dev/null +++ b/lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate.rb @@ -0,0 +1,73 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OAuth2ClientConfigurationUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_id') } } + + field :client_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_name') } } + + field :redirect_uris, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('redirect_uris') } } + + field :client_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_uri') } } + + field :grant_types, T.nilable(T::Array[Models::Shared::OAuth2ClientConfigurationUpdateGrantTypes]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('grant_types') } } + + field :logo_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('logo_uri') } } + + field :policy_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('policy_uri') } } + + field :response_types, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('response_types') } } + + field :scope, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('scope') } } + + field :token_endpoint_auth_method, T.nilable(Models::Shared::OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token_endpoint_auth_method'), 'decoder': Utils.enum_from_string(Models::Shared::OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod, true) } } + + field :tos_uri, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tos_uri') } } + + + sig { params(client_id: ::String, client_name: ::String, redirect_uris: T::Array[::String], client_uri: T.nilable(::String), grant_types: T.nilable(T::Array[Models::Shared::OAuth2ClientConfigurationUpdateGrantTypes]), logo_uri: T.nilable(::String), policy_uri: T.nilable(::String), response_types: T.nilable(T::Array[::String]), scope: T.nilable(::String), token_endpoint_auth_method: T.nilable(Models::Shared::OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod), tos_uri: T.nilable(::String)).void } + def initialize(client_id: nil, client_name: nil, redirect_uris: nil, client_uri: nil, grant_types: nil, logo_uri: nil, policy_uri: nil, response_types: nil, scope: nil, token_endpoint_auth_method: nil, tos_uri: nil) + @client_id = client_id + @client_name = client_name + @redirect_uris = redirect_uris + @client_uri = client_uri + @grant_types = grant_types + @logo_uri = logo_uri + @policy_uri = policy_uri + @response_types = response_types + @scope = scope + @token_endpoint_auth_method = token_endpoint_auth_method + @tos_uri = tos_uri + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + return false unless @client_name == other.client_name + return false unless @redirect_uris == other.redirect_uris + return false unless @client_uri == other.client_uri + return false unless @grant_types == other.grant_types + return false unless @logo_uri == other.logo_uri + return false unless @policy_uri == other.policy_uri + return false unless @response_types == other.response_types + return false unless @scope == other.scope + return false unless @token_endpoint_auth_method == other.token_endpoint_auth_method + return false unless @tos_uri == other.tos_uri + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate_grant_types.rb b/lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate_grant_types.rb new file mode 100644 index 0000000..db11796 --- /dev/null +++ b/lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate_grant_types.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OAuth2ClientConfigurationUpdateGrantTypes < T::Enum + enums do + AUTHORIZATION_CODE = new('authorization_code') + REFRESH_TOKEN = new('refresh_token') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate_token_endpoint_auth_method.rb b/lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate_token_endpoint_auth_method.rb new file mode 100644 index 0000000..071792f --- /dev/null +++ b/lib/open_api_sdk/models/shared/oauth2clientconfigurationupdate_token_endpoint_auth_method.rb @@ -0,0 +1,21 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod < T::Enum + enums do + CLIENT_SECRET_BASIC = new('client_secret_basic') + CLIENT_SECRET_POST = new('client_secret_post') + NONE = new('none') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/oauth2clientpublic.rb b/lib/open_api_sdk/models/shared/oauth2clientpublic.rb new file mode 100644 index 0000000..6bd80f2 --- /dev/null +++ b/lib/open_api_sdk/models/shared/oauth2clientpublic.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OAuth2ClientPublic + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_id') } } + + field :client_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_name') } } + + field :client_uri, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('client_uri') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :logo_uri, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('logo_uri') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :policy_uri, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('policy_uri') } } + + field :tos_uri, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tos_uri') } } + + + sig { params(client_id: ::String, client_name: ::String, client_uri: ::String, created_at: ::DateTime, logo_uri: ::String, modified_at: ::DateTime, policy_uri: ::String, tos_uri: ::String).void } + def initialize(client_id: nil, client_name: nil, client_uri: nil, created_at: nil, logo_uri: nil, modified_at: nil, policy_uri: nil, tos_uri: nil) + @client_id = client_id + @client_name = client_name + @client_uri = client_uri + @created_at = created_at + @logo_uri = logo_uri + @modified_at = modified_at + @policy_uri = policy_uri + @tos_uri = tos_uri + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + return false unless @client_name == other.client_name + return false unless @client_uri == other.client_uri + return false unless @created_at == other.created_at + return false unless @logo_uri == other.logo_uri + return false unless @modified_at == other.modified_at + return false unless @policy_uri == other.policy_uri + return false unless @tos_uri == other.tos_uri + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/order.rb b/lib/open_api_sdk/models/shared/order.rb new file mode 100644 index 0000000..10018aa --- /dev/null +++ b/lib/open_api_sdk/models/shared/order.rb @@ -0,0 +1,147 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Order + extend T::Sig + include Crystalline::MetadataFields + + # Amount in cents, after discounts but before taxes. + # + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + + field :billing_reason, Models::Shared::OrderBillingReason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_reason'), 'decoder': Utils.enum_from_string(Models::Shared::OrderBillingReason, false) } } + + field :checkout_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checkout_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :customer, Models::Shared::OrderCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :discount, T.any(Models::Shared::DiscountFixedOnceForeverDurationBase, Models::Shared::DiscountFixedRepeatDurationBase, Models::Shared::DiscountPercentageOnceForeverDurationBase, Models::Shared::DiscountPercentageRepeatDurationBase), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount') } } + # Discount amount in cents. + field :discount_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_amount') } } + + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Line items composing the order. + field :items, T::Array[Models::Shared::OrderItemSchema], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('items') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Amount in cents, after discounts but before taxes. + field :net_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('net_amount') } } + # Whether the order has been paid for. + field :paid, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('paid') } } + + field :product, Models::Shared::OrderProduct, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product') } } + + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # Amount refunded in cents. + field :refunded_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('refunded_amount') } } + # Sales tax refunded in cents. + field :refunded_tax_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('refunded_tax_amount') } } + + field :status, Models::Shared::OrderStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::OrderStatus, false) } } + + field :subscription, Models::Shared::OrderSubscription, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription') } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + # Amount in cents, before discounts and taxes. + field :subtotal_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subtotal_amount') } } + # Sales tax amount in cents. + field :tax_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_amount') } } + # Amount in cents, after discounts and taxes. + field :total_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('total_amount') } } + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :user_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('user_id') } } + # Key-value object storing custom field values. + field :custom_field_data, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('custom_field_data') } } + + + sig { params(amount: ::Integer, billing_address: Models::Shared::Address, billing_reason: Models::Shared::OrderBillingReason, checkout_id: ::String, created_at: ::DateTime, currency: ::String, customer: Models::Shared::OrderCustomer, customer_id: ::String, discount: T.any(Models::Shared::DiscountFixedOnceForeverDurationBase, Models::Shared::DiscountFixedRepeatDurationBase, Models::Shared::DiscountPercentageOnceForeverDurationBase, Models::Shared::DiscountPercentageRepeatDurationBase), discount_amount: ::Integer, discount_id: ::String, id: ::String, items: T::Array[Models::Shared::OrderItemSchema], metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, net_amount: ::Integer, paid: T::Boolean, product: Models::Shared::OrderProduct, product_id: ::String, refunded_amount: ::Integer, refunded_tax_amount: ::Integer, status: Models::Shared::OrderStatus, subscription: Models::Shared::OrderSubscription, subscription_id: ::String, subtotal_amount: ::Integer, tax_amount: ::Integer, total_amount: ::Integer, user_id: ::String, custom_field_data: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)])).void } + def initialize(amount: nil, billing_address: nil, billing_reason: nil, checkout_id: nil, created_at: nil, currency: nil, customer: nil, customer_id: nil, discount: nil, discount_amount: nil, discount_id: nil, id: nil, items: nil, metadata: nil, modified_at: nil, net_amount: nil, paid: nil, product: nil, product_id: nil, refunded_amount: nil, refunded_tax_amount: nil, status: nil, subscription: nil, subscription_id: nil, subtotal_amount: nil, tax_amount: nil, total_amount: nil, user_id: nil, custom_field_data: nil) + @amount = amount + @billing_address = billing_address + @billing_reason = billing_reason + @checkout_id = checkout_id + @created_at = created_at + @currency = currency + @customer = customer + @customer_id = customer_id + @discount = discount + @discount_amount = discount_amount + @discount_id = discount_id + @id = id + @items = items + @metadata = metadata + @modified_at = modified_at + @net_amount = net_amount + @paid = paid + @product = product + @product_id = product_id + @refunded_amount = refunded_amount + @refunded_tax_amount = refunded_tax_amount + @status = status + @subscription = subscription + @subscription_id = subscription_id + @subtotal_amount = subtotal_amount + @tax_amount = tax_amount + @total_amount = total_amount + @user_id = user_id + @custom_field_data = custom_field_data + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @billing_address == other.billing_address + return false unless @billing_reason == other.billing_reason + return false unless @checkout_id == other.checkout_id + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @discount == other.discount + return false unless @discount_amount == other.discount_amount + return false unless @discount_id == other.discount_id + return false unless @id == other.id + return false unless @items == other.items + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @net_amount == other.net_amount + return false unless @paid == other.paid + return false unless @product == other.product + return false unless @product_id == other.product_id + return false unless @refunded_amount == other.refunded_amount + return false unless @refunded_tax_amount == other.refunded_tax_amount + return false unless @status == other.status + return false unless @subscription == other.subscription + return false unless @subscription_id == other.subscription_id + return false unless @subtotal_amount == other.subtotal_amount + return false unless @tax_amount == other.tax_amount + return false unless @total_amount == other.total_amount + return false unless @user_id == other.user_id + return false unless @custom_field_data == other.custom_field_data + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/order_custom_field_data.rb b/lib/open_api_sdk/models/shared/order_custom_field_data.rb new file mode 100644 index 0000000..402ce72 --- /dev/null +++ b/lib/open_api_sdk/models/shared/order_custom_field_data.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderCustomFieldData + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/order_metadata.rb b/lib/open_api_sdk/models/shared/order_metadata.rb new file mode 100644 index 0000000..6768672 --- /dev/null +++ b/lib/open_api_sdk/models/shared/order_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/orderbillingreason.rb b/lib/open_api_sdk/models/shared/orderbillingreason.rb new file mode 100644 index 0000000..d78356c --- /dev/null +++ b/lib/open_api_sdk/models/shared/orderbillingreason.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderBillingReason < T::Enum + enums do + PURCHASE = new('purchase') + SUBSCRIPTION_CREATE = new('subscription_create') + SUBSCRIPTION_CYCLE = new('subscription_cycle') + SUBSCRIPTION_UPDATE = new('subscription_update') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/ordercustomer.rb b/lib/open_api_sdk/models/shared/ordercustomer.rb new file mode 100644 index 0000000..177b881 --- /dev/null +++ b/lib/open_api_sdk/models/shared/ordercustomer.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderCustomer + extend T::Sig + include Crystalline::MetadataFields + + + field :avatar_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + + field :billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Timestamp for when the customer was soft deleted. + field :deleted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deleted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The email address of the customer. This must be unique within the organization. + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. + field :email_verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } + # The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('external_id') } } + # The ID of the customer. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the customer. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the customer. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :tax_id, T::Array[T.any(::String, Models::Shared::TaxIDFormat)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(avatar_url: ::String, billing_address: Models::Shared::Address, created_at: ::DateTime, deleted_at: ::DateTime, email: ::String, email_verified: T::Boolean, external_id: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, tax_id: T::Array[T.any(::String, Models::Shared::TaxIDFormat)]).void } + def initialize(avatar_url: nil, billing_address: nil, created_at: nil, deleted_at: nil, email: nil, email_verified: nil, external_id: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, tax_id: nil) + @avatar_url = avatar_url + @billing_address = billing_address + @created_at = created_at + @deleted_at = deleted_at + @email = email + @email_verified = email_verified + @external_id = external_id + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @avatar_url == other.avatar_url + return false unless @billing_address == other.billing_address + return false unless @created_at == other.created_at + return false unless @deleted_at == other.deleted_at + return false unless @email == other.email + return false unless @email_verified == other.email_verified + return false unless @external_id == other.external_id + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/ordercustomer_metadata.rb b/lib/open_api_sdk/models/shared/ordercustomer_metadata.rb new file mode 100644 index 0000000..925bea5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/ordercustomer_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderCustomerMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/ordercustomer_tax_id.rb b/lib/open_api_sdk/models/shared/ordercustomer_tax_id.rb new file mode 100644 index 0000000..f1ac283 --- /dev/null +++ b/lib/open_api_sdk/models/shared/ordercustomer_tax_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderCustomerTaxId + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/orderdiscount.rb b/lib/open_api_sdk/models/shared/orderdiscount.rb new file mode 100644 index 0000000..e63ec81 --- /dev/null +++ b/lib/open_api_sdk/models/shared/orderdiscount.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderDiscount + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/orderinvoice.rb b/lib/open_api_sdk/models/shared/orderinvoice.rb new file mode 100644 index 0000000..c73201a --- /dev/null +++ b/lib/open_api_sdk/models/shared/orderinvoice.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Order's invoice data. + class OrderInvoice + extend T::Sig + include Crystalline::MetadataFields + + # The URL to the invoice. + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + + + sig { params(url: ::String).void } + def initialize(url: nil) + @url = url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @url == other.url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/orderitemschema.rb b/lib/open_api_sdk/models/shared/orderitemschema.rb new file mode 100644 index 0000000..51bf243 --- /dev/null +++ b/lib/open_api_sdk/models/shared/orderitemschema.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # An order line item. + class OrderItemSchema + extend T::Sig + include Crystalline::MetadataFields + + # Amount in cents, before discounts and taxes. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Description of the line item charge. + field :label, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('label') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Associated price ID, if any. + field :product_price_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_price_id') } } + # Whether this charge is due to a proration. + field :proration, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('proration') } } + # Sales tax amount in cents. + field :tax_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_amount') } } + + + sig { params(amount: ::Integer, created_at: ::DateTime, id: ::String, label: ::String, modified_at: ::DateTime, product_price_id: ::String, proration: T::Boolean, tax_amount: ::Integer).void } + def initialize(amount: nil, created_at: nil, id: nil, label: nil, modified_at: nil, product_price_id: nil, proration: nil, tax_amount: nil) + @amount = amount + @created_at = created_at + @id = id + @label = label + @modified_at = modified_at + @product_price_id = product_price_id + @proration = proration + @tax_amount = tax_amount + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @label == other.label + return false unless @modified_at == other.modified_at + return false unless @product_price_id == other.product_price_id + return false unless @proration == other.proration + return false unless @tax_amount == other.tax_amount + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/orderproduct.rb b/lib/open_api_sdk/models/shared/orderproduct.rb new file mode 100644 index 0000000..1776a6b --- /dev/null +++ b/lib/open_api_sdk/models/shared/orderproduct.rb @@ -0,0 +1,69 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderProduct + extend T::Sig + include Crystalline::MetadataFields + + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The description of the product. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the product. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the product is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Whether the product is a subscription. + field :is_recurring, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_recurring') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the product. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the product. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + + sig { params(created_at: ::DateTime, description: ::String, id: ::String, is_archived: T::Boolean, is_recurring: T::Boolean, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval).void } + def initialize(created_at: nil, description: nil, id: nil, is_archived: nil, is_recurring: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, recurring_interval: nil) + @created_at = created_at + @description = description + @id = id + @is_archived = is_archived + @is_recurring = is_recurring + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @recurring_interval = recurring_interval + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @is_recurring == other.is_recurring + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @recurring_interval == other.recurring_interval + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/orderproduct_metadata.rb b/lib/open_api_sdk/models/shared/orderproduct_metadata.rb new file mode 100644 index 0000000..2fc44bd --- /dev/null +++ b/lib/open_api_sdk/models/shared/orderproduct_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderProductMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/ordersortproperty.rb b/lib/open_api_sdk/models/shared/ordersortproperty.rb new file mode 100644 index 0000000..2fa6dea --- /dev/null +++ b/lib/open_api_sdk/models/shared/ordersortproperty.rb @@ -0,0 +1,32 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + AMOUNT = new('amount') + MINUS_AMOUNT = new('-amount') + NET_AMOUNT = new('net_amount') + MINUS_NET_AMOUNT = new('-net_amount') + CUSTOMER = new('customer') + MINUS_CUSTOMER = new('-customer') + PRODUCT = new('product') + MINUS_PRODUCT = new('-product') + DISCOUNT = new('discount') + MINUS_DISCOUNT = new('-discount') + SUBSCRIPTION = new('subscription') + MINUS_SUBSCRIPTION = new('-subscription') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/orderstatus.rb b/lib/open_api_sdk/models/shared/orderstatus.rb new file mode 100644 index 0000000..836675a --- /dev/null +++ b/lib/open_api_sdk/models/shared/orderstatus.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderStatus < T::Enum + enums do + PENDING = new('pending') + PAID = new('paid') + REFUNDED = new('refunded') + PARTIALLY_REFUNDED = new('partially_refunded') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/ordersubscription.rb b/lib/open_api_sdk/models/shared/ordersubscription.rb new file mode 100644 index 0000000..be2cd84 --- /dev/null +++ b/lib/open_api_sdk/models/shared/ordersubscription.rb @@ -0,0 +1,113 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderSubscription + extend T::Sig + include Crystalline::MetadataFields + + # The amount of the subscription. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Whether the subscription will be canceled at the end of the current period. + field :cancel_at_period_end, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cancel_at_period_end') } } + # The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. + field :canceled_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('canceled_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :checkout_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checkout_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The currency of the subscription. + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + # The end timestamp of the current billing period. + field :current_period_end, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_end'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The start timestamp of the current billing period. + field :current_period_start, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_start'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer_cancellation_comment, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_comment') } } + + field :customer_cancellation_reason, Models::Shared::CustomerCancellationReason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_reason'), 'decoder': Utils.enum_from_string(Models::Shared::CustomerCancellationReason, false) } } + # The ID of the subscribed customer. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # The ID of the applied discount, if any. + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # The timestamp when the subscription ended. + field :ended_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ended_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The timestamp when the subscription will end. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the subscribed product. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + # The timestamp when the subscription started. + field :started_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('started_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :status, Models::Shared::SubscriptionStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionStatus, false) } } + + + sig { params(amount: ::Integer, cancel_at_period_end: T::Boolean, canceled_at: ::DateTime, checkout_id: ::String, created_at: ::DateTime, currency: ::String, current_period_end: ::DateTime, current_period_start: ::DateTime, customer_cancellation_comment: ::String, customer_cancellation_reason: Models::Shared::CustomerCancellationReason, customer_id: ::String, discount_id: ::String, ended_at: ::DateTime, ends_at: ::DateTime, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, started_at: ::DateTime, status: Models::Shared::SubscriptionStatus).void } + def initialize(amount: nil, cancel_at_period_end: nil, canceled_at: nil, checkout_id: nil, created_at: nil, currency: nil, current_period_end: nil, current_period_start: nil, customer_cancellation_comment: nil, customer_cancellation_reason: nil, customer_id: nil, discount_id: nil, ended_at: nil, ends_at: nil, id: nil, metadata: nil, modified_at: nil, product_id: nil, recurring_interval: nil, started_at: nil, status: nil) + @amount = amount + @cancel_at_period_end = cancel_at_period_end + @canceled_at = canceled_at + @checkout_id = checkout_id + @created_at = created_at + @currency = currency + @current_period_end = current_period_end + @current_period_start = current_period_start + @customer_cancellation_comment = customer_cancellation_comment + @customer_cancellation_reason = customer_cancellation_reason + @customer_id = customer_id + @discount_id = discount_id + @ended_at = ended_at + @ends_at = ends_at + @id = id + @metadata = metadata + @modified_at = modified_at + @product_id = product_id + @recurring_interval = recurring_interval + @started_at = started_at + @status = status + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @cancel_at_period_end == other.cancel_at_period_end + return false unless @canceled_at == other.canceled_at + return false unless @checkout_id == other.checkout_id + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @current_period_end == other.current_period_end + return false unless @current_period_start == other.current_period_start + return false unless @customer_cancellation_comment == other.customer_cancellation_comment + return false unless @customer_cancellation_reason == other.customer_cancellation_reason + return false unless @customer_id == other.customer_id + return false unless @discount_id == other.discount_id + return false unless @ended_at == other.ended_at + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @started_at == other.started_at + return false unless @status == other.status + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/ordersubscription_metadata.rb b/lib/open_api_sdk/models/shared/ordersubscription_metadata.rb new file mode 100644 index 0000000..c72db08 --- /dev/null +++ b/lib/open_api_sdk/models/shared/ordersubscription_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrderSubscriptionMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organization.rb b/lib/open_api_sdk/models/shared/organization.rb new file mode 100644 index 0000000..dfb68a5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/organization.rb @@ -0,0 +1,77 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Organization + extend T::Sig + include Crystalline::MetadataFields + + # Avatar URL shown in checkout, customer portal, emails etc. + field :avatar_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # When the business details were submitted. + field :details_submitted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('details_submitted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Public support email. + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Organization feature settings + field :feature_settings, Models::Shared::OrganizationFeatureSettings, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_settings') } } + # The organization ID. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Organization name shown in checkout, customer portal, emails etc. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Unique organization slug in checkout, customer portal and credit card statements. + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + # Links to social profiles. + field :socials, T::Array[Models::Shared::OrganizationSocialLink], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('socials') } } + + field :subscription_settings, Models::Shared::OrganizationSubscriptionSettings, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_settings') } } + # Official website of the organization. + field :website, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('website') } } + + + sig { params(avatar_url: ::String, created_at: ::DateTime, details_submitted_at: ::DateTime, email: ::String, feature_settings: Models::Shared::OrganizationFeatureSettings, id: ::String, modified_at: ::DateTime, name: ::String, slug: ::String, socials: T::Array[Models::Shared::OrganizationSocialLink], subscription_settings: Models::Shared::OrganizationSubscriptionSettings, website: ::String).void } + def initialize(avatar_url: nil, created_at: nil, details_submitted_at: nil, email: nil, feature_settings: nil, id: nil, modified_at: nil, name: nil, slug: nil, socials: nil, subscription_settings: nil, website: nil) + @avatar_url = avatar_url + @created_at = created_at + @details_submitted_at = details_submitted_at + @email = email + @feature_settings = feature_settings + @id = id + @modified_at = modified_at + @name = name + @slug = slug + @socials = socials + @subscription_settings = subscription_settings + @website = website + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @avatar_url == other.avatar_url + return false unless @created_at == other.created_at + return false unless @details_submitted_at == other.details_submitted_at + return false unless @email == other.email + return false unless @feature_settings == other.feature_settings + return false unless @id == other.id + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @slug == other.slug + return false unless @socials == other.socials + return false unless @subscription_settings == other.subscription_settings + return false unless @website == other.website + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationavatarfilecreate.rb b/lib/open_api_sdk/models/shared/organizationavatarfilecreate.rb new file mode 100644 index 0000000..d6f81ab --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationavatarfilecreate.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a file to be used as an organization avatar. + class OrganizationAvatarFileCreate + extend T::Sig + include Crystalline::MetadataFields + + # MIME type of the file. Only images are supported for this type of file. + field :mime_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mime_type') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :service, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('service') } } + # Size of the file. A maximum of 1 MB is allowed for this type of file. + field :size, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + + field :upload, Models::Shared::S3FileCreateMultipart, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('upload') } } + + field :checksum_sha256_base64, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + + + sig { params(mime_type: ::String, name: ::String, service: ::String, size: ::Integer, upload: Models::Shared::S3FileCreateMultipart, checksum_sha256_base64: T.nilable(::String), organization_id: T.nilable(::String), version: T.nilable(::String)).void } + def initialize(mime_type: nil, name: nil, service: nil, size: nil, upload: nil, checksum_sha256_base64: nil, organization_id: nil, version: nil) + @mime_type = mime_type + @name = name + @service = service + @size = size + @upload = upload + @checksum_sha256_base64 = checksum_sha256_base64 + @organization_id = organization_id + @version = version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @mime_type == other.mime_type + return false unless @name == other.name + return false unless @service == other.service + return false unless @size == other.size + return false unless @upload == other.upload + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @organization_id == other.organization_id + return false unless @version == other.version + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationavatarfileread.rb b/lib/open_api_sdk/models/shared/organizationavatarfileread.rb new file mode 100644 index 0000000..4f953ff --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationavatarfileread.rb @@ -0,0 +1,97 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # File to be used as an organization avatar. + class OrganizationAvatarFileRead + extend T::Sig + include Crystalline::MetadataFields + + + field :checksum_etag, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_etag') } } + + field :checksum_sha256_base64, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :checksum_sha256_hex, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_hex') } } + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_uploaded, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_uploaded') } } + + field :last_modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :mime_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mime_type') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + + field :public_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('public_url') } } + + field :service, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('service') } } + + field :size, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + + field :size_readable, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size_readable') } } + + field :storage_version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('storage_version') } } + + field :version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + + + sig { params(checksum_etag: ::String, checksum_sha256_base64: ::String, checksum_sha256_hex: ::String, created_at: ::DateTime, id: ::String, is_uploaded: T::Boolean, last_modified_at: ::DateTime, mime_type: ::String, name: ::String, organization_id: ::String, path: ::String, public_url: ::String, service: ::String, size: ::Integer, size_readable: ::String, storage_version: ::String, version: ::String).void } + def initialize(checksum_etag: nil, checksum_sha256_base64: nil, checksum_sha256_hex: nil, created_at: nil, id: nil, is_uploaded: nil, last_modified_at: nil, mime_type: nil, name: nil, organization_id: nil, path: nil, public_url: nil, service: nil, size: nil, size_readable: nil, storage_version: nil, version: nil) + @checksum_etag = checksum_etag + @checksum_sha256_base64 = checksum_sha256_base64 + @checksum_sha256_hex = checksum_sha256_hex + @created_at = created_at + @id = id + @is_uploaded = is_uploaded + @last_modified_at = last_modified_at + @mime_type = mime_type + @name = name + @organization_id = organization_id + @path = path + @public_url = public_url + @service = service + @size = size + @size_readable = size_readable + @storage_version = storage_version + @version = version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @checksum_etag == other.checksum_etag + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @checksum_sha256_hex == other.checksum_sha256_hex + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_uploaded == other.is_uploaded + return false unless @last_modified_at == other.last_modified_at + return false unless @mime_type == other.mime_type + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @path == other.path + return false unless @public_url == other.public_url + return false unless @service == other.service + return false unless @size == other.size + return false unless @size_readable == other.size_readable + return false unless @storage_version == other.storage_version + return false unless @version == other.version + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationcreate.rb b/lib/open_api_sdk/models/shared/organizationcreate.rb new file mode 100644 index 0000000..ec27980 --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationcreate.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrganizationCreate + extend T::Sig + include Crystalline::MetadataFields + + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } + + field :avatar_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + # Additional, private, business details Polar needs about active organizations for compliance (KYC). + field :details, T.nilable(Models::Shared::OrganizationDetails), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('details') } } + # Public support email. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + field :feature_settings, T.nilable(Models::Shared::OrganizationFeatureSettings), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_settings') } } + # Link to social profiles. + field :socials, T.nilable(T::Array[Models::Shared::OrganizationSocialLink]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('socials') } } + + field :subscription_settings, T.nilable(Models::Shared::OrganizationSubscriptionSettings), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_settings') } } + # Official website of the organization. + field :website, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('website') } } + + + sig { params(name: ::String, slug: ::String, avatar_url: T.nilable(::String), details: T.nilable(Models::Shared::OrganizationDetails), email: T.nilable(::String), feature_settings: T.nilable(Models::Shared::OrganizationFeatureSettings), socials: T.nilable(T::Array[Models::Shared::OrganizationSocialLink]), subscription_settings: T.nilable(Models::Shared::OrganizationSubscriptionSettings), website: T.nilable(::String)).void } + def initialize(name: nil, slug: nil, avatar_url: nil, details: nil, email: nil, feature_settings: nil, socials: nil, subscription_settings: nil, website: nil) + @name = name + @slug = slug + @avatar_url = avatar_url + @details = details + @email = email + @feature_settings = feature_settings + @socials = socials + @subscription_settings = subscription_settings + @website = website + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @name == other.name + return false unless @slug == other.slug + return false unless @avatar_url == other.avatar_url + return false unless @details == other.details + return false unless @email == other.email + return false unless @feature_settings == other.feature_settings + return false unless @socials == other.socials + return false unless @subscription_settings == other.subscription_settings + return false unless @website == other.website + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationdetails.rb b/lib/open_api_sdk/models/shared/organizationdetails.rb new file mode 100644 index 0000000..f09f8c2 --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationdetails.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrganizationDetails + extend T::Sig + include Crystalline::MetadataFields + + # Brief information about you and your business. + field :about, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('about') } } + # Main customer acquisition channels. + field :customer_acquisition, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_acquisition') } } + # Estimated revenue in the next 12 months + field :future_annual_revenue, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('future_annual_revenue') } } + # How the organization will integrate and use Polar. + field :intended_use, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('intended_use') } } + # Description of digital products being sold. + field :product_description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_description') } } + # Revenue from last year if applicable. + field :previous_annual_revenue, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('previous_annual_revenue') } } + # Switching from another platform? + field :switching, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('switching') } } + # Which platform the organization is migrating from. + field :switching_from, T.nilable(Models::Shared::SwitchingFrom), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('switching_from'), 'decoder': Utils.enum_from_string(Models::Shared::SwitchingFrom, true) } } + + + sig { params(about: ::String, customer_acquisition: T::Array[::String], future_annual_revenue: ::Integer, intended_use: ::String, product_description: ::String, previous_annual_revenue: T.nilable(::Integer), switching: T.nilable(T::Boolean), switching_from: T.nilable(Models::Shared::SwitchingFrom)).void } + def initialize(about: nil, customer_acquisition: nil, future_annual_revenue: nil, intended_use: nil, product_description: nil, previous_annual_revenue: nil, switching: nil, switching_from: nil) + @about = about + @customer_acquisition = customer_acquisition + @future_annual_revenue = future_annual_revenue + @intended_use = intended_use + @product_description = product_description + @previous_annual_revenue = previous_annual_revenue + @switching = switching + @switching_from = switching_from + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @about == other.about + return false unless @customer_acquisition == other.customer_acquisition + return false unless @future_annual_revenue == other.future_annual_revenue + return false unless @intended_use == other.intended_use + return false unless @product_description == other.product_description + return false unless @previous_annual_revenue == other.previous_annual_revenue + return false unless @switching == other.switching + return false unless @switching_from == other.switching_from + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationfeaturesettings.rb b/lib/open_api_sdk/models/shared/organizationfeaturesettings.rb new file mode 100644 index 0000000..fc911ec --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationfeaturesettings.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrganizationFeatureSettings + extend T::Sig + include Crystalline::MetadataFields + + # If this organization has issue funding enabled + field :issue_funding_enabled, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('issue_funding_enabled') } } + # If this organization has usage-based billing enabled + field :usage_based_billing_enabled, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('usage_based_billing_enabled') } } + + + sig { params(issue_funding_enabled: T.nilable(T::Boolean), usage_based_billing_enabled: T.nilable(T::Boolean)).void } + def initialize(issue_funding_enabled: nil, usage_based_billing_enabled: nil) + @issue_funding_enabled = issue_funding_enabled + @usage_based_billing_enabled = usage_based_billing_enabled + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @issue_funding_enabled == other.issue_funding_enabled + return false unless @usage_based_billing_enabled == other.usage_based_billing_enabled + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationsociallink.rb b/lib/open_api_sdk/models/shared/organizationsociallink.rb new file mode 100644 index 0000000..8e58355 --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationsociallink.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrganizationSocialLink + extend T::Sig + include Crystalline::MetadataFields + + + field :platform, Models::Shared::OrganizationSocialPlatforms, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('platform'), 'decoder': Utils.enum_from_string(Models::Shared::OrganizationSocialPlatforms, false) } } + # The URL to the organization profile + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + + + sig { params(platform: Models::Shared::OrganizationSocialPlatforms, url: ::String).void } + def initialize(platform: nil, url: nil) + @platform = platform + @url = url + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @platform == other.platform + return false unless @url == other.url + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationsocialplatforms.rb b/lib/open_api_sdk/models/shared/organizationsocialplatforms.rb new file mode 100644 index 0000000..67224a5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationsocialplatforms.rb @@ -0,0 +1,26 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrganizationSocialPlatforms < T::Enum + enums do + X = new('x') + GITHUB = new('github') + FACEBOOK = new('facebook') + INSTAGRAM = new('instagram') + YOUTUBE = new('youtube') + TIKTOK = new('tiktok') + LINKEDIN = new('linkedin') + OTHER = new('other') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationsortproperty.rb b/lib/open_api_sdk/models/shared/organizationsortproperty.rb new file mode 100644 index 0000000..6d7f956 --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationsortproperty.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrganizationSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + SLUG = new('slug') + MINUS_SLUG = new('-slug') + NAME = new('name') + MINUS_NAME = new('-name') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationsubscriptionsettings.rb b/lib/open_api_sdk/models/shared/organizationsubscriptionsettings.rb new file mode 100644 index 0000000..787d596 --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationsubscriptionsettings.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrganizationSubscriptionSettings + extend T::Sig + include Crystalline::MetadataFields + + + field :allow_customer_updates, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_customer_updates') } } + + field :allow_multiple_subscriptions, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allow_multiple_subscriptions') } } + + field :proration_behavior, Models::Shared::SubscriptionProrationBehavior, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('proration_behavior'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionProrationBehavior, false) } } + + + sig { params(allow_customer_updates: T::Boolean, allow_multiple_subscriptions: T::Boolean, proration_behavior: Models::Shared::SubscriptionProrationBehavior).void } + def initialize(allow_customer_updates: nil, allow_multiple_subscriptions: nil, proration_behavior: nil) + @allow_customer_updates = allow_customer_updates + @allow_multiple_subscriptions = allow_multiple_subscriptions + @proration_behavior = proration_behavior + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @allow_customer_updates == other.allow_customer_updates + return false unless @allow_multiple_subscriptions == other.allow_multiple_subscriptions + return false unless @proration_behavior == other.proration_behavior + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/organizationupdate.rb b/lib/open_api_sdk/models/shared/organizationupdate.rb new file mode 100644 index 0000000..9f93a58 --- /dev/null +++ b/lib/open_api_sdk/models/shared/organizationupdate.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class OrganizationUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :avatar_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + # Additional, private, business details Polar needs about active organizations for compliance (KYC). + field :details, T.nilable(Models::Shared::OrganizationDetails), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('details') } } + # Public support email. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + field :feature_settings, T.nilable(Models::Shared::OrganizationFeatureSettings), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('feature_settings') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Links to social profiles. + field :socials, T.nilable(T::Array[Models::Shared::OrganizationSocialLink]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('socials') } } + + field :subscription_settings, T.nilable(Models::Shared::OrganizationSubscriptionSettings), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_settings') } } + # Official website of the organization. + field :website, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('website') } } + + + sig { params(avatar_url: T.nilable(::String), details: T.nilable(Models::Shared::OrganizationDetails), email: T.nilable(::String), feature_settings: T.nilable(Models::Shared::OrganizationFeatureSettings), name: T.nilable(::String), socials: T.nilable(T::Array[Models::Shared::OrganizationSocialLink]), subscription_settings: T.nilable(Models::Shared::OrganizationSubscriptionSettings), website: T.nilable(::String)).void } + def initialize(avatar_url: nil, details: nil, email: nil, feature_settings: nil, name: nil, socials: nil, subscription_settings: nil, website: nil) + @avatar_url = avatar_url + @details = details + @email = email + @feature_settings = feature_settings + @name = name + @socials = socials + @subscription_settings = subscription_settings + @website = website + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @avatar_url == other.avatar_url + return false unless @details == other.details + return false unless @email == other.email + return false unless @feature_settings == other.feature_settings + return false unless @name == other.name + return false unless @socials == other.socials + return false unless @subscription_settings == other.subscription_settings + return false unless @website == other.website + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/pagination.rb b/lib/open_api_sdk/models/shared/pagination.rb new file mode 100644 index 0000000..01e9d92 --- /dev/null +++ b/lib/open_api_sdk/models/shared/pagination.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Pagination + extend T::Sig + include Crystalline::MetadataFields + + + field :max_page, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('max_page') } } + + field :total_count, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('total_count') } } + + + sig { params(max_page: ::Integer, total_count: ::Integer).void } + def initialize(max_page: nil, total_count: nil) + @max_page = max_page + @total_count = total_count + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @max_page == other.max_page + return false unless @total_count == other.total_count + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/paymentmethodcard.rb b/lib/open_api_sdk/models/shared/paymentmethodcard.rb new file mode 100644 index 0000000..7a4b7a1 --- /dev/null +++ b/lib/open_api_sdk/models/shared/paymentmethodcard.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class PaymentMethodCard + extend T::Sig + include Crystalline::MetadataFields + + + field :card, Models::Shared::PaymentMethodCardData, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('card') } } + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :default, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('default') } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(card: Models::Shared::PaymentMethodCardData, created_at: ::DateTime, default: T::Boolean, id: ::String, type: ::String).void } + def initialize(card: nil, created_at: nil, default: nil, id: nil, type: nil) + @card = card + @created_at = created_at + @default = default + @id = id + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @card == other.card + return false unless @created_at == other.created_at + return false unless @default == other.default + return false unless @id == other.id + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/paymentmethodcarddata.rb b/lib/open_api_sdk/models/shared/paymentmethodcarddata.rb new file mode 100644 index 0000000..37eb087 --- /dev/null +++ b/lib/open_api_sdk/models/shared/paymentmethodcarddata.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class PaymentMethodCardData + extend T::Sig + include Crystalline::MetadataFields + + + field :brand, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('brand') } } + + field :exp_month, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('exp_month') } } + + field :exp_year, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('exp_year') } } + + field :last4, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last4') } } + + field :wallet, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('wallet') } } + + + sig { params(brand: ::String, exp_month: ::Integer, exp_year: ::Integer, last4: ::String, wallet: T.nilable(::String)).void } + def initialize(brand: nil, exp_month: nil, exp_year: nil, last4: nil, wallet: nil) + @brand = brand + @exp_month = exp_month + @exp_year = exp_year + @last4 = last4 + @wallet = wallet + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @brand == other.brand + return false unless @exp_month == other.exp_month + return false unless @exp_year == other.exp_year + return false unless @last4 == other.last4 + return false unless @wallet == other.wallet + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/paymentmethodgeneric.rb b/lib/open_api_sdk/models/shared/paymentmethodgeneric.rb new file mode 100644 index 0000000..17350b1 --- /dev/null +++ b/lib/open_api_sdk/models/shared/paymentmethodgeneric.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class PaymentMethodGeneric + extend T::Sig + include Crystalline::MetadataFields + + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :default, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('default') } } + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(created_at: ::DateTime, default: T::Boolean, id: ::String, type: ::String).void } + def initialize(created_at: nil, default: nil, id: nil, type: nil) + @created_at = created_at + @default = default + @id = id + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @created_at == other.created_at + return false unless @default == other.default + return false unless @id == other.id + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/paymentprocessor.rb b/lib/open_api_sdk/models/shared/paymentprocessor.rb new file mode 100644 index 0000000..ff98239 --- /dev/null +++ b/lib/open_api_sdk/models/shared/paymentprocessor.rb @@ -0,0 +1,19 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class PaymentProcessor < T::Enum + enums do + STRIPE = new('stripe') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/permission.rb b/lib/open_api_sdk/models/shared/permission.rb new file mode 100644 index 0000000..1b33e5e --- /dev/null +++ b/lib/open_api_sdk/models/shared/permission.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Permission - The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role). + class Permission < T::Enum + enums do + PULL = new('pull') + TRIAGE = new('triage') + PUSH = new('push') + MAINTAIN = new('maintain') + ADMIN = new('admin') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/previous_properties.rb b/lib/open_api_sdk/models/shared/previous_properties.rb new file mode 100644 index 0000000..2250ee7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/previous_properties.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class PreviousProperties + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/prices.rb b/lib/open_api_sdk/models/shared/prices.rb new file mode 100644 index 0000000..f0cca77 --- /dev/null +++ b/lib/open_api_sdk/models/shared/prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Prices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/product.rb b/lib/open_api_sdk/models/shared/product.rb new file mode 100644 index 0000000..9d48c7e --- /dev/null +++ b/lib/open_api_sdk/models/shared/product.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A product. + class Product + extend T::Sig + include Crystalline::MetadataFields + + # List of custom fields attached to the product. + field :attached_custom_fields, T::Array[Models::Shared::AttachedCustomField], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('attached_custom_fields') } } + # List of benefits granted by the product. + field :benefits, T::Array[T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefits') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The description of the product. + field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # The ID of the product. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the product is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Whether the product is a subscription. + field :is_recurring, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_recurring') } } + # List of medias associated to the product. + field :medias, T::Array[Models::Shared::ProductMediaFileRead], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('medias') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the product. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the product. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + # List of prices for this product. + field :prices, T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + + sig { params(attached_custom_fields: T::Array[Models::Shared::AttachedCustomField], benefits: T::Array[T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit)], created_at: ::DateTime, description: ::String, id: ::String, is_archived: T::Boolean, is_recurring: T::Boolean, medias: T::Array[Models::Shared::ProductMediaFileRead], metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, prices: T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], recurring_interval: Models::Shared::SubscriptionRecurringInterval).void } + def initialize(attached_custom_fields: nil, benefits: nil, created_at: nil, description: nil, id: nil, is_archived: nil, is_recurring: nil, medias: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, prices: nil, recurring_interval: nil) + @attached_custom_fields = attached_custom_fields + @benefits = benefits + @created_at = created_at + @description = description + @id = id + @is_archived = is_archived + @is_recurring = is_recurring + @medias = medias + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @prices = prices + @recurring_interval = recurring_interval + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @attached_custom_fields == other.attached_custom_fields + return false unless @benefits == other.benefits + return false unless @created_at == other.created_at + return false unless @description == other.description + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @is_recurring == other.is_recurring + return false unless @medias == other.medias + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @prices == other.prices + return false unless @recurring_interval == other.recurring_interval + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/product_metadata.rb b/lib/open_api_sdk/models/shared/product_metadata.rb new file mode 100644 index 0000000..5cfb190 --- /dev/null +++ b/lib/open_api_sdk/models/shared/product_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ProductMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productbenefitsupdate.rb b/lib/open_api_sdk/models/shared/productbenefitsupdate.rb new file mode 100644 index 0000000..a3532d0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productbenefitsupdate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to update the benefits granted by a product. + class ProductBenefitsUpdate + extend T::Sig + include Crystalline::MetadataFields + + # List of benefit IDs. Each one must be on the same organization as the product. + field :benefits, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefits') } } + + + sig { params(benefits: T::Array[::String]).void } + def initialize(benefits: nil) + @benefits = benefits + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefits == other.benefits + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productbillingtype.rb b/lib/open_api_sdk/models/shared/productbillingtype.rb new file mode 100644 index 0000000..31cb9b3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productbillingtype.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ProductBillingType < T::Enum + enums do + ONE_TIME = new('one_time') + RECURRING = new('recurring') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productcreate.rb b/lib/open_api_sdk/models/shared/productcreate.rb new file mode 100644 index 0000000..ffc19d7 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productcreate.rb @@ -0,0 +1,71 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a product. + class ProductCreate + extend T::Sig + include Crystalline::MetadataFields + + # The name of the product. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # List of available prices for this product. It should contain at most one static price (fixed, custom or free), and any number of metered prices. Metered prices are not supported on one-time purchase products. + field :prices, T::Array[T.any(Models::Shared::ProductPriceFixedCreate, Models::Shared::ProductPriceCustomCreate, Models::Shared::ProductPriceFreeCreate, Models::Shared::ProductPriceMeteredUnitCreate)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + # List of custom fields to attach. + field :attached_custom_fields, T.nilable(T::Array[Models::Shared::AttachedCustomFieldCreate]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('attached_custom_fields') } } + # The description of the product. + field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. + field :medias, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('medias') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # The ID of the organization owning the product. **Required unless you use an organization token.** + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + + sig { params(name: ::String, prices: T::Array[T.any(Models::Shared::ProductPriceFixedCreate, Models::Shared::ProductPriceCustomCreate, Models::Shared::ProductPriceFreeCreate, Models::Shared::ProductPriceMeteredUnitCreate)], recurring_interval: Models::Shared::SubscriptionRecurringInterval, attached_custom_fields: T.nilable(T::Array[Models::Shared::AttachedCustomFieldCreate]), description: T.nilable(::String), medias: T.nilable(T::Array[::String]), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), organization_id: T.nilable(::String)).void } + def initialize(name: nil, prices: nil, recurring_interval: nil, attached_custom_fields: nil, description: nil, medias: nil, metadata: nil, organization_id: nil) + @name = name + @prices = prices + @recurring_interval = recurring_interval + @attached_custom_fields = attached_custom_fields + @description = description + @medias = medias + @metadata = metadata + @organization_id = organization_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @name == other.name + return false unless @prices == other.prices + return false unless @recurring_interval == other.recurring_interval + return false unless @attached_custom_fields == other.attached_custom_fields + return false unless @description == other.description + return false unless @medias == other.medias + return false unless @metadata == other.metadata + return false unless @organization_id == other.organization_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productcreate_metadata.rb b/lib/open_api_sdk/models/shared/productcreate_metadata.rb new file mode 100644 index 0000000..9f86b58 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ProductCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productcreate_prices.rb b/lib/open_api_sdk/models/shared/productcreate_prices.rb new file mode 100644 index 0000000..b4ff388 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productcreate_prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ProductCreatePrices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productmediafilecreate.rb b/lib/open_api_sdk/models/shared/productmediafilecreate.rb new file mode 100644 index 0000000..248fc55 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productmediafilecreate.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a file to be used as a product media file. + class ProductMediaFileCreate + extend T::Sig + include Crystalline::MetadataFields + + # MIME type of the file. Only images are supported for this type of file. + field :mime_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mime_type') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :service, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('service') } } + # Size of the file. A maximum of 10 MB is allowed for this type of file. + field :size, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + + field :upload, Models::Shared::S3FileCreateMultipart, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('upload') } } + + field :checksum_sha256_base64, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :organization_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :version, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + + + sig { params(mime_type: ::String, name: ::String, service: ::String, size: ::Integer, upload: Models::Shared::S3FileCreateMultipart, checksum_sha256_base64: T.nilable(::String), organization_id: T.nilable(::String), version: T.nilable(::String)).void } + def initialize(mime_type: nil, name: nil, service: nil, size: nil, upload: nil, checksum_sha256_base64: nil, organization_id: nil, version: nil) + @mime_type = mime_type + @name = name + @service = service + @size = size + @upload = upload + @checksum_sha256_base64 = checksum_sha256_base64 + @organization_id = organization_id + @version = version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @mime_type == other.mime_type + return false unless @name == other.name + return false unless @service == other.service + return false unless @size == other.size + return false unless @upload == other.upload + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @organization_id == other.organization_id + return false unless @version == other.version + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productmediafileread.rb b/lib/open_api_sdk/models/shared/productmediafileread.rb new file mode 100644 index 0000000..6c5bcd6 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productmediafileread.rb @@ -0,0 +1,97 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # File to be used as a product media file. + class ProductMediaFileRead + extend T::Sig + include Crystalline::MetadataFields + + + field :checksum_etag, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_etag') } } + + field :checksum_sha256_base64, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :checksum_sha256_hex, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_hex') } } + + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :is_uploaded, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_uploaded') } } + + field :last_modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :mime_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mime_type') } } + + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + + field :public_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('public_url') } } + + field :service, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('service') } } + + field :size, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size') } } + + field :size_readable, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('size_readable') } } + + field :storage_version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('storage_version') } } + + field :version, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('version') } } + + + sig { params(checksum_etag: ::String, checksum_sha256_base64: ::String, checksum_sha256_hex: ::String, created_at: ::DateTime, id: ::String, is_uploaded: T::Boolean, last_modified_at: ::DateTime, mime_type: ::String, name: ::String, organization_id: ::String, path: ::String, public_url: ::String, service: ::String, size: ::Integer, size_readable: ::String, storage_version: ::String, version: ::String).void } + def initialize(checksum_etag: nil, checksum_sha256_base64: nil, checksum_sha256_hex: nil, created_at: nil, id: nil, is_uploaded: nil, last_modified_at: nil, mime_type: nil, name: nil, organization_id: nil, path: nil, public_url: nil, service: nil, size: nil, size_readable: nil, storage_version: nil, version: nil) + @checksum_etag = checksum_etag + @checksum_sha256_base64 = checksum_sha256_base64 + @checksum_sha256_hex = checksum_sha256_hex + @created_at = created_at + @id = id + @is_uploaded = is_uploaded + @last_modified_at = last_modified_at + @mime_type = mime_type + @name = name + @organization_id = organization_id + @path = path + @public_url = public_url + @service = service + @size = size + @size_readable = size_readable + @storage_version = storage_version + @version = version + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @checksum_etag == other.checksum_etag + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @checksum_sha256_hex == other.checksum_sha256_hex + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_uploaded == other.is_uploaded + return false unless @last_modified_at == other.last_modified_at + return false unless @mime_type == other.mime_type + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @path == other.path + return false unless @public_url == other.public_url + return false unless @service == other.service + return false unless @size == other.size + return false unless @size_readable == other.size_readable + return false unless @storage_version == other.storage_version + return false unless @version == other.version + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productprice.rb b/lib/open_api_sdk/models/shared/productprice.rb new file mode 100644 index 0000000..bca6fd3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productprice.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ProductPrice + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricecustom.rb b/lib/open_api_sdk/models/shared/productpricecustom.rb new file mode 100644 index 0000000..6f408c4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricecustom.rb @@ -0,0 +1,77 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A pay-what-you-want price for a product. + class ProductPriceCustom + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the price. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the price is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # The maximum amount the customer can pay. + field :maximum_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('maximum_amount') } } + # The minimum amount the customer can pay. + field :minimum_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('minimum_amount') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The initial amount shown to the customer. + field :preset_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('preset_amount') } } + # The currency. + field :price_currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_currency') } } + # The ID of the product owning the price. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + field :type, Models::Shared::ProductPriceType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::ProductPriceType, false) } } + + + sig { params(amount_type: ::String, created_at: ::DateTime, id: ::String, is_archived: T::Boolean, maximum_amount: ::Integer, minimum_amount: ::Integer, modified_at: ::DateTime, preset_amount: ::Integer, price_currency: ::String, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, type: Models::Shared::ProductPriceType).void } + def initialize(amount_type: nil, created_at: nil, id: nil, is_archived: nil, maximum_amount: nil, minimum_amount: nil, modified_at: nil, preset_amount: nil, price_currency: nil, product_id: nil, recurring_interval: nil, type: nil) + @amount_type = amount_type + @created_at = created_at + @id = id + @is_archived = is_archived + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @modified_at = modified_at + @preset_amount = preset_amount + @price_currency = price_currency + @product_id = product_id + @recurring_interval = recurring_interval + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @maximum_amount == other.maximum_amount + return false unless @minimum_amount == other.minimum_amount + return false unless @modified_at == other.modified_at + return false unless @preset_amount == other.preset_amount + return false unless @price_currency == other.price_currency + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricecustomcreate.rb b/lib/open_api_sdk/models/shared/productpricecustomcreate.rb new file mode 100644 index 0000000..76a6bb5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricecustomcreate.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a pay-what-you-want price. + class ProductPriceCustomCreate + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # The maximum amount the customer can pay. + field :maximum_amount, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('maximum_amount') } } + # The minimum amount the customer can pay. + field :minimum_amount, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('minimum_amount') } } + # The initial amount shown to the customer. + field :preset_amount, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('preset_amount') } } + # The currency. Currently, only `usd` is supported. + field :price_currency, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_currency') } } + + + sig { params(amount_type: ::String, maximum_amount: T.nilable(::Integer), minimum_amount: T.nilable(::Integer), preset_amount: T.nilable(::Integer), price_currency: T.nilable(::String)).void } + def initialize(amount_type: nil, maximum_amount: nil, minimum_amount: nil, preset_amount: nil, price_currency: nil) + @amount_type = amount_type + @maximum_amount = maximum_amount + @minimum_amount = minimum_amount + @preset_amount = preset_amount + @price_currency = price_currency + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @maximum_amount == other.maximum_amount + return false unless @minimum_amount == other.minimum_amount + return false unless @preset_amount == other.preset_amount + return false unless @price_currency == other.price_currency + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricefixed.rb b/lib/open_api_sdk/models/shared/productpricefixed.rb new file mode 100644 index 0000000..8cc4a7b --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricefixed.rb @@ -0,0 +1,69 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A fixed price for a product. + class ProductPriceFixed + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the price. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the price is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The price in cents. + field :price_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_amount') } } + # The currency. + field :price_currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_currency') } } + # The ID of the product owning the price. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + field :type, Models::Shared::ProductPriceType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::ProductPriceType, false) } } + + + sig { params(amount_type: ::String, created_at: ::DateTime, id: ::String, is_archived: T::Boolean, modified_at: ::DateTime, price_amount: ::Integer, price_currency: ::String, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, type: Models::Shared::ProductPriceType).void } + def initialize(amount_type: nil, created_at: nil, id: nil, is_archived: nil, modified_at: nil, price_amount: nil, price_currency: nil, product_id: nil, recurring_interval: nil, type: nil) + @amount_type = amount_type + @created_at = created_at + @id = id + @is_archived = is_archived + @modified_at = modified_at + @price_amount = price_amount + @price_currency = price_currency + @product_id = product_id + @recurring_interval = recurring_interval + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @modified_at == other.modified_at + return false unless @price_amount == other.price_amount + return false unless @price_currency == other.price_currency + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricefixedcreate.rb b/lib/open_api_sdk/models/shared/productpricefixedcreate.rb new file mode 100644 index 0000000..5dee29f --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricefixedcreate.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a fixed price. + class ProductPriceFixedCreate + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # The price in cents. + field :price_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_amount') } } + # The currency. Currently, only `usd` is supported. + field :price_currency, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_currency') } } + + + sig { params(amount_type: ::String, price_amount: ::Integer, price_currency: T.nilable(::String)).void } + def initialize(amount_type: nil, price_amount: nil, price_currency: nil) + @amount_type = amount_type + @price_amount = price_amount + @price_currency = price_currency + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @price_amount == other.price_amount + return false unless @price_currency == other.price_currency + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricefree.rb b/lib/open_api_sdk/models/shared/productpricefree.rb new file mode 100644 index 0000000..696600d --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricefree.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A free price for a product. + class ProductPriceFree + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the price. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the price is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the product owning the price. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + field :type, Models::Shared::ProductPriceType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::ProductPriceType, false) } } + + + sig { params(amount_type: ::String, created_at: ::DateTime, id: ::String, is_archived: T::Boolean, modified_at: ::DateTime, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, type: Models::Shared::ProductPriceType).void } + def initialize(amount_type: nil, created_at: nil, id: nil, is_archived: nil, modified_at: nil, product_id: nil, recurring_interval: nil, type: nil) + @amount_type = amount_type + @created_at = created_at + @id = id + @is_archived = is_archived + @modified_at = modified_at + @product_id = product_id + @recurring_interval = recurring_interval + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @modified_at == other.modified_at + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricefreecreate.rb b/lib/open_api_sdk/models/shared/productpricefreecreate.rb new file mode 100644 index 0000000..2349c7b --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricefreecreate.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a free price. + class ProductPriceFreeCreate + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + + + sig { params(amount_type: ::String).void } + def initialize(amount_type: nil) + @amount_type = amount_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricemeter.rb b/lib/open_api_sdk/models/shared/productpricemeter.rb new file mode 100644 index 0000000..d24b34d --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricemeter.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A meter associated to a metered price. + class ProductPriceMeter + extend T::Sig + include Crystalline::MetadataFields + + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # The name of the meter. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + + sig { params(id: ::String, name: ::String).void } + def initialize(id: nil, name: nil) + @id = id + @name = name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @name == other.name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricemeteredunit.rb b/lib/open_api_sdk/models/shared/productpricemeteredunit.rb new file mode 100644 index 0000000..a3d80bf --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricemeteredunit.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # A metered, usage-based, price for a product, with a fixed unit price. + class ProductPriceMeteredUnit + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # The maximum amount in cents that can be charged, regardless of the number of units consumed. + field :cap_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cap_amount') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the price. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Whether the price is archived and no longer available. + field :is_archived, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # A meter associated to a metered price. + field :meter, Models::Shared::ProductPriceMeter, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter') } } + # The ID of the meter associated to the price. + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The currency. + field :price_currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_currency') } } + # The ID of the product owning the price. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + + field :type, Models::Shared::ProductPriceType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::ProductPriceType, false) } } + # The price per unit in cents. + field :unit_amount, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('unit_amount') } } + + + sig { params(amount_type: ::String, cap_amount: ::Integer, created_at: ::DateTime, id: ::String, is_archived: T::Boolean, meter: Models::Shared::ProductPriceMeter, meter_id: ::String, modified_at: ::DateTime, price_currency: ::String, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, type: Models::Shared::ProductPriceType, unit_amount: ::String).void } + def initialize(amount_type: nil, cap_amount: nil, created_at: nil, id: nil, is_archived: nil, meter: nil, meter_id: nil, modified_at: nil, price_currency: nil, product_id: nil, recurring_interval: nil, type: nil, unit_amount: nil) + @amount_type = amount_type + @cap_amount = cap_amount + @created_at = created_at + @id = id + @is_archived = is_archived + @meter = meter + @meter_id = meter_id + @modified_at = modified_at + @price_currency = price_currency + @product_id = product_id + @recurring_interval = recurring_interval + @type = type + @unit_amount = unit_amount + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @cap_amount == other.cap_amount + return false unless @created_at == other.created_at + return false unless @id == other.id + return false unless @is_archived == other.is_archived + return false unless @meter == other.meter + return false unless @meter_id == other.meter_id + return false unless @modified_at == other.modified_at + return false unless @price_currency == other.price_currency + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @type == other.type + return false unless @unit_amount == other.unit_amount + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricemeteredunitcreate.rb b/lib/open_api_sdk/models/shared/productpricemeteredunitcreate.rb new file mode 100644 index 0000000..65044af --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricemeteredunitcreate.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to create a metered price with a fixed unit price. + class ProductPriceMeteredUnitCreate + extend T::Sig + include Crystalline::MetadataFields + + + field :amount_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount_type') } } + # The ID of the meter associated to the price. + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + # The price per unit in cents. Supports up to 12 decimal places. + field :unit_amount, T.any(::Float, ::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('unit_amount') } } + # Optional maximum amount in cents that can be charged, regardless of the number of units consumed. + field :cap_amount, T.nilable(::Integer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cap_amount') } } + # The currency. Currently, only `usd` is supported. + field :price_currency, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('price_currency') } } + + + sig { params(amount_type: ::String, meter_id: ::String, unit_amount: T.any(::Float, ::String), cap_amount: T.nilable(::Integer), price_currency: T.nilable(::String)).void } + def initialize(amount_type: nil, meter_id: nil, unit_amount: nil, cap_amount: nil, price_currency: nil) + @amount_type = amount_type + @meter_id = meter_id + @unit_amount = unit_amount + @cap_amount = cap_amount + @price_currency = price_currency + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount_type == other.amount_type + return false unless @meter_id == other.meter_id + return false unless @unit_amount == other.unit_amount + return false unless @cap_amount == other.cap_amount + return false unless @price_currency == other.price_currency + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productpricetype.rb b/lib/open_api_sdk/models/shared/productpricetype.rb new file mode 100644 index 0000000..ecf6b4e --- /dev/null +++ b/lib/open_api_sdk/models/shared/productpricetype.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ProductPriceType < T::Enum + enums do + ONE_TIME = new('one_time') + RECURRING = new('recurring') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productsortproperty.rb b/lib/open_api_sdk/models/shared/productsortproperty.rb new file mode 100644 index 0000000..fd51692 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productsortproperty.rb @@ -0,0 +1,26 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ProductSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + NAME = new('name') + MINUS_NAME = new('-name') + PRICE_AMOUNT_TYPE = new('price_amount_type') + MINUS_PRICE_AMOUNT_TYPE = new('-price_amount_type') + PRICE_AMOUNT = new('price_amount') + MINUS_PRICE_AMOUNT = new('-price_amount') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productupdate.rb b/lib/open_api_sdk/models/shared/productupdate.rb new file mode 100644 index 0000000..1039570 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productupdate.rb @@ -0,0 +1,71 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Schema to update a product. + class ProductUpdate + extend T::Sig + include Crystalline::MetadataFields + + + field :attached_custom_fields, T.nilable(T::Array[Models::Shared::AttachedCustomFieldCreate]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('attached_custom_fields') } } + # The description of the product. + field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } } + # Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally. + field :is_archived, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('is_archived') } } + # List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. + field :medias, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('medias') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object. + field :prices, T.nilable(T::Array[T.any(Models::Shared::ExistingProductPrice, Models::Shared::ProductPriceFixedCreate, Models::Shared::ProductPriceCustomCreate, Models::Shared::ProductPriceFreeCreate, Models::Shared::ProductPriceMeteredUnitCreate)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + # The recurring interval of the product. If `None`, the product is a one-time purchase. **Can only be set on legacy recurring products. Once set, it can't be changed.** + field :recurring_interval, T.nilable(Models::Shared::SubscriptionRecurringInterval), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, true) } } + + + sig { params(attached_custom_fields: T.nilable(T::Array[Models::Shared::AttachedCustomFieldCreate]), description: T.nilable(::String), is_archived: T.nilable(T::Boolean), medias: T.nilable(T::Array[::String]), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), name: T.nilable(::String), prices: T.nilable(T::Array[T.any(Models::Shared::ExistingProductPrice, Models::Shared::ProductPriceFixedCreate, Models::Shared::ProductPriceCustomCreate, Models::Shared::ProductPriceFreeCreate, Models::Shared::ProductPriceMeteredUnitCreate)]), recurring_interval: T.nilable(Models::Shared::SubscriptionRecurringInterval)).void } + def initialize(attached_custom_fields: nil, description: nil, is_archived: nil, medias: nil, metadata: nil, name: nil, prices: nil, recurring_interval: nil) + @attached_custom_fields = attached_custom_fields + @description = description + @is_archived = is_archived + @medias = medias + @metadata = metadata + @name = name + @prices = prices + @recurring_interval = recurring_interval + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @attached_custom_fields == other.attached_custom_fields + return false unless @description == other.description + return false unless @is_archived == other.is_archived + return false unless @medias == other.medias + return false unless @metadata == other.metadata + return false unless @name == other.name + return false unless @prices == other.prices + return false unless @recurring_interval == other.recurring_interval + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productupdate_metadata.rb b/lib/open_api_sdk/models/shared/productupdate_metadata.rb new file mode 100644 index 0000000..4be7756 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productupdate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ProductUpdateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/productupdate_prices.rb b/lib/open_api_sdk/models/shared/productupdate_prices.rb new file mode 100644 index 0000000..2c93386 --- /dev/null +++ b/lib/open_api_sdk/models/shared/productupdate_prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ProductUpdatePrices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/properties.rb b/lib/open_api_sdk/models/shared/properties.rb new file mode 100644 index 0000000..0d8c540 --- /dev/null +++ b/lib/open_api_sdk/models/shared/properties.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Properties + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/propertyaggregation.rb b/lib/open_api_sdk/models/shared/propertyaggregation.rb new file mode 100644 index 0000000..a39aaa3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/propertyaggregation.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class PropertyAggregation + extend T::Sig + include Crystalline::MetadataFields + + + field :func, Models::Shared::Func, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('func'), 'decoder': Utils.enum_from_string(Models::Shared::Func, false) } } + + field :property, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('property') } } + + + sig { params(func: Models::Shared::Func, property: ::String).void } + def initialize(func: nil, property: nil) + @func = func + @property = property + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @func == other.func + return false unless @property == other.property + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/refreshtokenrequest.rb b/lib/open_api_sdk/models/shared/refreshtokenrequest.rb new file mode 100644 index 0000000..8de6e74 --- /dev/null +++ b/lib/open_api_sdk/models/shared/refreshtokenrequest.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RefreshTokenRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'form': { 'field_name': 'client_id' } } + + field :client_secret, ::String, { 'form': { 'field_name': 'client_secret' } } + + field :grant_type, ::String, { 'form': { 'field_name': 'grant_type' } } + + field :refresh_token, ::String, { 'form': { 'field_name': 'refresh_token' } } + + + sig { params(client_id: ::String, client_secret: ::String, grant_type: ::String, refresh_token: ::String).void } + def initialize(client_id: nil, client_secret: nil, grant_type: nil, refresh_token: nil) + @client_id = client_id + @client_secret = client_secret + @grant_type = grant_type + @refresh_token = refresh_token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + return false unless @client_secret == other.client_secret + return false unless @grant_type == other.grant_type + return false unless @refresh_token == other.refresh_token + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/refund.rb b/lib/open_api_sdk/models/shared/refund.rb new file mode 100644 index 0000000..f22591f --- /dev/null +++ b/lib/open_api_sdk/models/shared/refund.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Refund + extend T::Sig + include Crystalline::MetadataFields + + + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :reason, Models::Shared::RefundReason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('reason'), 'decoder': Utils.enum_from_string(Models::Shared::RefundReason, false) } } + + field :revoke_benefits, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoke_benefits') } } + + field :status, Models::Shared::RefundStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::RefundStatus, false) } } + + field :subscription_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('subscription_id') } } + + field :tax_amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_amount') } } + + + sig { params(amount: ::Integer, created_at: ::DateTime, currency: ::String, customer_id: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, order_id: ::String, organization_id: ::String, reason: Models::Shared::RefundReason, revoke_benefits: T::Boolean, status: Models::Shared::RefundStatus, subscription_id: ::String, tax_amount: ::Integer).void } + def initialize(amount: nil, created_at: nil, currency: nil, customer_id: nil, id: nil, metadata: nil, modified_at: nil, order_id: nil, organization_id: nil, reason: nil, revoke_benefits: nil, status: nil, subscription_id: nil, tax_amount: nil) + @amount = amount + @created_at = created_at + @currency = currency + @customer_id = customer_id + @id = id + @metadata = metadata + @modified_at = modified_at + @order_id = order_id + @organization_id = organization_id + @reason = reason + @revoke_benefits = revoke_benefits + @status = status + @subscription_id = subscription_id + @tax_amount = tax_amount + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @customer_id == other.customer_id + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @order_id == other.order_id + return false unless @organization_id == other.organization_id + return false unless @reason == other.reason + return false unless @revoke_benefits == other.revoke_benefits + return false unless @status == other.status + return false unless @subscription_id == other.subscription_id + return false unless @tax_amount == other.tax_amount + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/refund_metadata.rb b/lib/open_api_sdk/models/shared/refund_metadata.rb new file mode 100644 index 0000000..aaa8f1a --- /dev/null +++ b/lib/open_api_sdk/models/shared/refund_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RefundMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/refundcreate.rb b/lib/open_api_sdk/models/shared/refundcreate.rb new file mode 100644 index 0000000..7db5e71 --- /dev/null +++ b/lib/open_api_sdk/models/shared/refundcreate.rb @@ -0,0 +1,68 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RefundCreate + extend T::Sig + include Crystalline::MetadataFields + + # Amount to refund in cents. Minimum is 1. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + + field :order_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('order_id') } } + + field :reason, Models::Shared::RefundReason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('reason'), 'decoder': Utils.enum_from_string(Models::Shared::RefundReason, false) } } + # An internal comment about the refund. + field :comment, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('comment') } } + # Key-value object allowing you to store additional information. + # + # The key must be a string with a maximum length of **40 characters**. + # The value must be either: + # + # * A string with a maximum length of **500 characters** + # * An integer + # * A floating-point number + # * A boolean + # + # You can store up to **50 key-value pairs**. + field :metadata, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Should this refund trigger the associated customer benefits to be revoked? + # + # **Note:** + # Only allowed in case the `order` is a one-time purchase. + # Subscriptions automatically revoke customer benefits once the + # subscription itself is revoked, i.e fully canceled. + field :revoke_benefits, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoke_benefits') } } + + + sig { params(amount: ::Integer, order_id: ::String, reason: Models::Shared::RefundReason, comment: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)]), revoke_benefits: T.nilable(T::Boolean)).void } + def initialize(amount: nil, order_id: nil, reason: nil, comment: nil, metadata: nil, revoke_benefits: nil) + @amount = amount + @order_id = order_id + @reason = reason + @comment = comment + @metadata = metadata + @revoke_benefits = revoke_benefits + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @order_id == other.order_id + return false unless @reason == other.reason + return false unless @comment == other.comment + return false unless @metadata == other.metadata + return false unless @revoke_benefits == other.revoke_benefits + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/refundcreate_metadata.rb b/lib/open_api_sdk/models/shared/refundcreate_metadata.rb new file mode 100644 index 0000000..160df43 --- /dev/null +++ b/lib/open_api_sdk/models/shared/refundcreate_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RefundCreateMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/refundreason.rb b/lib/open_api_sdk/models/shared/refundreason.rb new file mode 100644 index 0000000..0bc7967 --- /dev/null +++ b/lib/open_api_sdk/models/shared/refundreason.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RefundReason < T::Enum + enums do + DUPLICATE = new('duplicate') + FRAUDULENT = new('fraudulent') + CUSTOMER_REQUEST = new('customer_request') + SERVICE_DISRUPTION = new('service_disruption') + SATISFACTION_GUARANTEE = new('satisfaction_guarantee') + OTHER = new('other') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/refundsortproperty.rb b/lib/open_api_sdk/models/shared/refundsortproperty.rb new file mode 100644 index 0000000..a2ab54e --- /dev/null +++ b/lib/open_api_sdk/models/shared/refundsortproperty.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RefundSortProperty < T::Enum + enums do + CREATED_AT = new('created_at') + MINUS_CREATED_AT = new('-created_at') + AMOUNT = new('amount') + MINUS_AMOUNT = new('-amount') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/refundstatus.rb b/lib/open_api_sdk/models/shared/refundstatus.rb new file mode 100644 index 0000000..842c908 --- /dev/null +++ b/lib/open_api_sdk/models/shared/refundstatus.rb @@ -0,0 +1,22 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RefundStatus < T::Enum + enums do + PENDING = new('pending') + SUCCEEDED = new('succeeded') + FAILED = new('failed') + CANCELED = new('canceled') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/revoketokenrequest.rb b/lib/open_api_sdk/models/shared/revoketokenrequest.rb new file mode 100644 index 0000000..781e182 --- /dev/null +++ b/lib/open_api_sdk/models/shared/revoketokenrequest.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RevokeTokenRequest + extend T::Sig + include Crystalline::MetadataFields + + + field :client_id, ::String, { 'form': { 'field_name': 'client_id' } } + + field :client_secret, ::String, { 'form': { 'field_name': 'client_secret' } } + + field :token, ::String, { 'form': { 'field_name': 'token' } } + + field :token_type_hint, T.nilable(Models::Shared::TokenTypeHint), { 'form': { 'field_name': 'token_type_hint' } } + + + sig { params(client_id: ::String, client_secret: ::String, token: ::String, token_type_hint: T.nilable(Models::Shared::TokenTypeHint)).void } + def initialize(client_id: nil, client_secret: nil, token: nil, token_type_hint: nil) + @client_id = client_id + @client_secret = client_secret + @token = token + @token_type_hint = token_type_hint + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @client_id == other.client_id + return false unless @client_secret == other.client_secret + return false unless @token == other.token + return false unless @token_type_hint == other.token_type_hint + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/revoketokenresponse.rb b/lib/open_api_sdk/models/shared/revoketokenresponse.rb new file mode 100644 index 0000000..13c51d6 --- /dev/null +++ b/lib/open_api_sdk/models/shared/revoketokenresponse.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class RevokeTokenResponse + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/s3downloadurl.rb b/lib/open_api_sdk/models/shared/s3downloadurl.rb new file mode 100644 index 0000000..4793911 --- /dev/null +++ b/lib/open_api_sdk/models/shared/s3downloadurl.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class S3DownloadURL + extend T::Sig + include Crystalline::MetadataFields + + + field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + + field :headers, T.nilable(T::Hash[Symbol, ::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('headers') } } + + + sig { params(expires_at: ::DateTime, url: ::String, headers: T.nilable(T::Hash[Symbol, ::String])).void } + def initialize(expires_at: nil, url: nil, headers: nil) + @expires_at = expires_at + @url = url + @headers = headers + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @expires_at == other.expires_at + return false unless @url == other.url + return false unless @headers == other.headers + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/s3filecreatemultipart.rb b/lib/open_api_sdk/models/shared/s3filecreatemultipart.rb new file mode 100644 index 0000000..b9ca2b3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/s3filecreatemultipart.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class S3FileCreateMultipart + extend T::Sig + include Crystalline::MetadataFields + + + field :parts, T::Array[Models::Shared::S3FileCreatePart], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('parts') } } + + + sig { params(parts: T::Array[Models::Shared::S3FileCreatePart]).void } + def initialize(parts: nil) + @parts = parts + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @parts == other.parts + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/s3filecreatepart.rb b/lib/open_api_sdk/models/shared/s3filecreatepart.rb new file mode 100644 index 0000000..8f45031 --- /dev/null +++ b/lib/open_api_sdk/models/shared/s3filecreatepart.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class S3FileCreatePart + extend T::Sig + include Crystalline::MetadataFields + + + field :chunk_end, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('chunk_end') } } + + field :chunk_start, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('chunk_start') } } + + field :number, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('number') } } + + field :checksum_sha256_base64, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + + sig { params(chunk_end: ::Integer, chunk_start: ::Integer, number: ::Integer, checksum_sha256_base64: T.nilable(::String)).void } + def initialize(chunk_end: nil, chunk_start: nil, number: nil, checksum_sha256_base64: nil) + @chunk_end = chunk_end + @chunk_start = chunk_start + @number = number + @checksum_sha256_base64 = checksum_sha256_base64 + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @chunk_end == other.chunk_end + return false unless @chunk_start == other.chunk_start + return false unless @number == other.number + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/s3fileuploadcompletedpart.rb b/lib/open_api_sdk/models/shared/s3fileuploadcompletedpart.rb new file mode 100644 index 0000000..2d2fd67 --- /dev/null +++ b/lib/open_api_sdk/models/shared/s3fileuploadcompletedpart.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class S3FileUploadCompletedPart + extend T::Sig + include Crystalline::MetadataFields + + + field :checksum_etag, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_etag') } } + + field :checksum_sha256_base64, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :number, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('number') } } + + + sig { params(checksum_etag: ::String, checksum_sha256_base64: ::String, number: ::Integer).void } + def initialize(checksum_etag: nil, checksum_sha256_base64: nil, number: nil) + @checksum_etag = checksum_etag + @checksum_sha256_base64 = checksum_sha256_base64 + @number = number + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @checksum_etag == other.checksum_etag + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @number == other.number + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/s3fileuploadmultipart.rb b/lib/open_api_sdk/models/shared/s3fileuploadmultipart.rb new file mode 100644 index 0000000..cc12003 --- /dev/null +++ b/lib/open_api_sdk/models/shared/s3fileuploadmultipart.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class S3FileUploadMultipart + extend T::Sig + include Crystalline::MetadataFields + + + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :parts, T::Array[Models::Shared::S3FileUploadPart], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('parts') } } + + field :path, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('path') } } + + + sig { params(id: ::String, parts: T::Array[Models::Shared::S3FileUploadPart], path: ::String).void } + def initialize(id: nil, parts: nil, path: nil) + @id = id + @parts = parts + @path = path + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @id == other.id + return false unless @parts == other.parts + return false unless @path == other.path + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/s3fileuploadpart.rb b/lib/open_api_sdk/models/shared/s3fileuploadpart.rb new file mode 100644 index 0000000..2e32252 --- /dev/null +++ b/lib/open_api_sdk/models/shared/s3fileuploadpart.rb @@ -0,0 +1,57 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class S3FileUploadPart + extend T::Sig + include Crystalline::MetadataFields + + + field :chunk_end, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('chunk_end') } } + + field :chunk_start, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('chunk_start') } } + + field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :number, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('number') } } + + field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } } + + field :checksum_sha256_base64, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checksum_sha256_base64') } } + + field :headers, T.nilable(T::Hash[Symbol, ::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('headers') } } + + + sig { params(chunk_end: ::Integer, chunk_start: ::Integer, expires_at: ::DateTime, number: ::Integer, url: ::String, checksum_sha256_base64: T.nilable(::String), headers: T.nilable(T::Hash[Symbol, ::String])).void } + def initialize(chunk_end: nil, chunk_start: nil, expires_at: nil, number: nil, url: nil, checksum_sha256_base64: nil, headers: nil) + @chunk_end = chunk_end + @chunk_start = chunk_start + @expires_at = expires_at + @number = number + @url = url + @checksum_sha256_base64 = checksum_sha256_base64 + @headers = headers + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @chunk_end == other.chunk_end + return false unless @chunk_start == other.chunk_start + return false unless @expires_at == other.expires_at + return false unless @number == other.number + return false unless @url == other.url + return false unless @checksum_sha256_base64 == other.checksum_sha256_base64 + return false unless @headers == other.headers + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/scope.rb b/lib/open_api_sdk/models/shared/scope.rb new file mode 100644 index 0000000..658d5d9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/scope.rb @@ -0,0 +1,67 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Scope < T::Enum + enums do + OPENID = new('openid') + PROFILE = new('profile') + EMAIL = new('email') + USER_READ = new('user:read') + ADMIN = new('admin') + WEB_DEFAULT = new('web_default') + ORGANIZATIONS_READ = new('organizations:read') + ORGANIZATIONS_WRITE = new('organizations:write') + CUSTOM_FIELDS_READ = new('custom_fields:read') + CUSTOM_FIELDS_WRITE = new('custom_fields:write') + DISCOUNTS_READ = new('discounts:read') + DISCOUNTS_WRITE = new('discounts:write') + CHECKOUT_LINKS_READ = new('checkout_links:read') + CHECKOUT_LINKS_WRITE = new('checkout_links:write') + CHECKOUTS_READ = new('checkouts:read') + CHECKOUTS_WRITE = new('checkouts:write') + PRODUCTS_READ = new('products:read') + PRODUCTS_WRITE = new('products:write') + BENEFITS_READ = new('benefits:read') + BENEFITS_WRITE = new('benefits:write') + EVENTS_READ = new('events:read') + EVENTS_WRITE = new('events:write') + METERS_READ = new('meters:read') + METERS_WRITE = new('meters:write') + FILES_READ = new('files:read') + FILES_WRITE = new('files:write') + SUBSCRIPTIONS_READ = new('subscriptions:read') + SUBSCRIPTIONS_WRITE = new('subscriptions:write') + CUSTOMERS_READ = new('customers:read') + CUSTOMERS_WRITE = new('customers:write') + CUSTOMER_METERS_READ = new('customer_meters:read') + CUSTOMER_SESSIONS_WRITE = new('customer_sessions:write') + ORDERS_READ = new('orders:read') + REFUNDS_READ = new('refunds:read') + REFUNDS_WRITE = new('refunds:write') + METRICS_READ = new('metrics:read') + WEBHOOKS_READ = new('webhooks:read') + WEBHOOKS_WRITE = new('webhooks:write') + EXTERNAL_ORGANIZATIONS_READ = new('external_organizations:read') + LICENSE_KEYS_READ = new('license_keys:read') + LICENSE_KEYS_WRITE = new('license_keys:write') + REPOSITORIES_READ = new('repositories:read') + REPOSITORIES_WRITE = new('repositories:write') + ISSUES_READ = new('issues:read') + ISSUES_WRITE = new('issues:write') + CUSTOMER_PORTAL_READ = new('customer_portal:read') + CUSTOMER_PORTAL_WRITE = new('customer_portal:write') + NOTIFICATION_RECIPIENTS_READ = new('notification_recipients:read') + NOTIFICATION_RECIPIENTS_WRITE = new('notification_recipients:write') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/security.rb b/lib/open_api_sdk/models/shared/security.rb new file mode 100644 index 0000000..5afc25c --- /dev/null +++ b/lib/open_api_sdk/models/shared/security.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Security + extend T::Sig + include Crystalline::MetadataFields + + + field :access_token, T.nilable(::String), { 'security': { 'scheme': true, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' } } + + + sig { params(access_token: T.nilable(::String)).void } + def initialize(access_token: nil) + @access_token = access_token + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @access_token == other.access_token + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscription.rb b/lib/open_api_sdk/models/shared/subscription.rb new file mode 100644 index 0000000..8eb1e38 --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscription.rb @@ -0,0 +1,137 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Subscription + extend T::Sig + include Crystalline::MetadataFields + + # The amount of the subscription. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # Whether the subscription will be canceled at the end of the current period. + field :cancel_at_period_end, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cancel_at_period_end') } } + # The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. + field :canceled_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('canceled_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :checkout_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('checkout_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The currency of the subscription. + field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + # The end timestamp of the current billing period. + field :current_period_end, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_end'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The start timestamp of the current billing period. + field :current_period_start, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('current_period_start'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::SubscriptionCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_cancellation_comment, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_comment') } } + + field :customer_cancellation_reason, Models::Shared::CustomerCancellationReason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_reason'), 'decoder': Utils.enum_from_string(Models::Shared::CustomerCancellationReason, false) } } + # The ID of the subscribed customer. + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :discount, T.any(Models::Shared::DiscountFixedOnceForeverDurationBase, Models::Shared::DiscountFixedRepeatDurationBase, Models::Shared::DiscountPercentageOnceForeverDurationBase, Models::Shared::DiscountPercentageRepeatDurationBase), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount') } } + # The ID of the applied discount, if any. + field :discount_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount_id') } } + # The timestamp when the subscription ended. + field :ended_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ended_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The timestamp when the subscription will end. + field :ends_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ends_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # List of meters associated with the subscription. + field :meters, T::Array[Models::Shared::SubscriptionMeter], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meters') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # List of enabled prices for the subscription. + field :prices, T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prices') } } + # A product. + field :product, Models::Shared::Product, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product') } } + # The ID of the subscribed product. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + + field :recurring_interval, Models::Shared::SubscriptionRecurringInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('recurring_interval'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionRecurringInterval, false) } } + # The timestamp when the subscription started. + field :started_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('started_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :status, Models::Shared::SubscriptionStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionStatus, false) } } + # Key-value object storing custom field values. + field :custom_field_data, T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('custom_field_data') } } + + + sig { params(amount: ::Integer, cancel_at_period_end: T::Boolean, canceled_at: ::DateTime, checkout_id: ::String, created_at: ::DateTime, currency: ::String, current_period_end: ::DateTime, current_period_start: ::DateTime, customer: Models::Shared::SubscriptionCustomer, customer_cancellation_comment: ::String, customer_cancellation_reason: Models::Shared::CustomerCancellationReason, customer_id: ::String, discount: T.any(Models::Shared::DiscountFixedOnceForeverDurationBase, Models::Shared::DiscountFixedRepeatDurationBase, Models::Shared::DiscountPercentageOnceForeverDurationBase, Models::Shared::DiscountPercentageRepeatDurationBase), discount_id: ::String, ended_at: ::DateTime, ends_at: ::DateTime, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], meters: T::Array[Models::Shared::SubscriptionMeter], modified_at: ::DateTime, prices: T::Array[T.any(T.any(Models::Shared::LegacyRecurringProductPriceFixed, Models::Shared::LegacyRecurringProductPriceCustom, Models::Shared::LegacyRecurringProductPriceFree), T.any(Models::Shared::ProductPriceFixed, Models::Shared::ProductPriceCustom, Models::Shared::ProductPriceFree, Models::Shared::ProductPriceMeteredUnit))], product: Models::Shared::Product, product_id: ::String, recurring_interval: Models::Shared::SubscriptionRecurringInterval, started_at: ::DateTime, status: Models::Shared::SubscriptionStatus, custom_field_data: T.nilable(T::Hash[Symbol, T.any(::String, ::Integer, T::Boolean, ::DateTime)])).void } + def initialize(amount: nil, cancel_at_period_end: nil, canceled_at: nil, checkout_id: nil, created_at: nil, currency: nil, current_period_end: nil, current_period_start: nil, customer: nil, customer_cancellation_comment: nil, customer_cancellation_reason: nil, customer_id: nil, discount: nil, discount_id: nil, ended_at: nil, ends_at: nil, id: nil, metadata: nil, meters: nil, modified_at: nil, prices: nil, product: nil, product_id: nil, recurring_interval: nil, started_at: nil, status: nil, custom_field_data: nil) + @amount = amount + @cancel_at_period_end = cancel_at_period_end + @canceled_at = canceled_at + @checkout_id = checkout_id + @created_at = created_at + @currency = currency + @current_period_end = current_period_end + @current_period_start = current_period_start + @customer = customer + @customer_cancellation_comment = customer_cancellation_comment + @customer_cancellation_reason = customer_cancellation_reason + @customer_id = customer_id + @discount = discount + @discount_id = discount_id + @ended_at = ended_at + @ends_at = ends_at + @id = id + @metadata = metadata + @meters = meters + @modified_at = modified_at + @prices = prices + @product = product + @product_id = product_id + @recurring_interval = recurring_interval + @started_at = started_at + @status = status + @custom_field_data = custom_field_data + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @cancel_at_period_end == other.cancel_at_period_end + return false unless @canceled_at == other.canceled_at + return false unless @checkout_id == other.checkout_id + return false unless @created_at == other.created_at + return false unless @currency == other.currency + return false unless @current_period_end == other.current_period_end + return false unless @current_period_start == other.current_period_start + return false unless @customer == other.customer + return false unless @customer_cancellation_comment == other.customer_cancellation_comment + return false unless @customer_cancellation_reason == other.customer_cancellation_reason + return false unless @customer_id == other.customer_id + return false unless @discount == other.discount + return false unless @discount_id == other.discount_id + return false unless @ended_at == other.ended_at + return false unless @ends_at == other.ends_at + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @meters == other.meters + return false unless @modified_at == other.modified_at + return false unless @prices == other.prices + return false unless @product == other.product + return false unless @product_id == other.product_id + return false unless @recurring_interval == other.recurring_interval + return false unless @started_at == other.started_at + return false unless @status == other.status + return false unless @custom_field_data == other.custom_field_data + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscription_prices.rb b/lib/open_api_sdk/models/shared/subscription_prices.rb new file mode 100644 index 0000000..3259735 --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscription_prices.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionPrices + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptioncancel.rb b/lib/open_api_sdk/models/shared/subscriptioncancel.rb new file mode 100644 index 0000000..e65e6ac --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptioncancel.rb @@ -0,0 +1,67 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionCancel + extend T::Sig + include Crystalline::MetadataFields + + # Cancel an active subscription once the current period ends. + # + # Or uncancel a subscription currently set to be revoked at period end. + field :cancel_at_period_end, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('cancel_at_period_end') } } + # Customer feedback and why they decided to cancel. + # + # **IMPORTANT:** + # Do not use this to store internal notes! It's intended to be input + # from the customer and is therefore also available in their Polar + # purchases library. + # + # Only set this in case your own service is requesting the reason from the + # customer. Or you copy a message directly from a customer + # conversation, i.e support. + field :customer_cancellation_comment, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_comment') } } + # Customer reason for cancellation. + # + # Helpful to monitor reasons behind churn for future improvements. + # + # Only set this in case your own service is requesting the reason from the + # customer. Or you know based on direct conversations, i.e support, with + # the customer. + # + # * `too_expensive`: Too expensive for the customer. + # * `missing_features`: Customer is missing certain features. + # * `switched_service`: Customer switched to another service. + # * `unused`: Customer is not using it enough. + # * `customer_service`: Customer is not satisfied with the customer service. + # * `low_quality`: Customer is unhappy with the quality. + # * `too_complex`: Customer considers the service too complicated. + # * `other`: Other reason(s). + field :customer_cancellation_reason, T.nilable(Models::Shared::CustomerCancellationReason), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_reason'), 'decoder': Utils.enum_from_string(Models::Shared::CustomerCancellationReason, true) } } + + + sig { params(cancel_at_period_end: T::Boolean, customer_cancellation_comment: T.nilable(::String), customer_cancellation_reason: T.nilable(Models::Shared::CustomerCancellationReason)).void } + def initialize(cancel_at_period_end: nil, customer_cancellation_comment: nil, customer_cancellation_reason: nil) + @cancel_at_period_end = cancel_at_period_end + @customer_cancellation_comment = customer_cancellation_comment + @customer_cancellation_reason = customer_cancellation_reason + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @cancel_at_period_end == other.cancel_at_period_end + return false unless @customer_cancellation_comment == other.customer_cancellation_comment + return false unless @customer_cancellation_reason == other.customer_cancellation_reason + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptioncustomer.rb b/lib/open_api_sdk/models/shared/subscriptioncustomer.rb new file mode 100644 index 0000000..a7fe31f --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptioncustomer.rb @@ -0,0 +1,81 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionCustomer + extend T::Sig + include Crystalline::MetadataFields + + + field :avatar_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar_url') } } + + field :billing_address, Models::Shared::Address, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billing_address') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # Timestamp for when the customer was soft deleted. + field :deleted_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('deleted_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The email address of the customer. This must be unique within the organization. + field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address. + field :email_verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } + # The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('external_id') } } + # The ID of the customer. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :metadata, T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The name of the customer. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # The ID of the organization owning the customer. + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :tax_id, T::Array[T.any(::String, Models::Shared::TaxIDFormat)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tax_id') } } + + + sig { params(avatar_url: ::String, billing_address: Models::Shared::Address, created_at: ::DateTime, deleted_at: ::DateTime, email: ::String, email_verified: T::Boolean, external_id: ::String, id: ::String, metadata: T::Hash[Symbol, T.any(::String, ::Integer, ::Float, T::Boolean)], modified_at: ::DateTime, name: ::String, organization_id: ::String, tax_id: T::Array[T.any(::String, Models::Shared::TaxIDFormat)]).void } + def initialize(avatar_url: nil, billing_address: nil, created_at: nil, deleted_at: nil, email: nil, email_verified: nil, external_id: nil, id: nil, metadata: nil, modified_at: nil, name: nil, organization_id: nil, tax_id: nil) + @avatar_url = avatar_url + @billing_address = billing_address + @created_at = created_at + @deleted_at = deleted_at + @email = email + @email_verified = email_verified + @external_id = external_id + @id = id + @metadata = metadata + @modified_at = modified_at + @name = name + @organization_id = organization_id + @tax_id = tax_id + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @avatar_url == other.avatar_url + return false unless @billing_address == other.billing_address + return false unless @created_at == other.created_at + return false unless @deleted_at == other.deleted_at + return false unless @email == other.email + return false unless @email_verified == other.email_verified + return false unless @external_id == other.external_id + return false unless @id == other.id + return false unless @metadata == other.metadata + return false unless @modified_at == other.modified_at + return false unless @name == other.name + return false unless @organization_id == other.organization_id + return false unless @tax_id == other.tax_id + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptioncustomer_metadata.rb b/lib/open_api_sdk/models/shared/subscriptioncustomer_metadata.rb new file mode 100644 index 0000000..466a1cd --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptioncustomer_metadata.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionCustomerMetadata + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptiondiscount.rb b/lib/open_api_sdk/models/shared/subscriptiondiscount.rb new file mode 100644 index 0000000..27858c0 --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptiondiscount.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionDiscount + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptionmeter.rb b/lib/open_api_sdk/models/shared/subscriptionmeter.rb new file mode 100644 index 0000000..16fa17f --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptionmeter.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Current consumption and spending for a subscription meter. + class SubscriptionMeter + extend T::Sig + include Crystalline::MetadataFields + + # The amount due in cents so far in this billing period. + field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } + # The number of consumed units so far in this billing period. + field :consumed_units, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('consumed_units') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The number of credited units so far in this billing period. + field :credited_units, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('credited_units') } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :meter, Models::Shared::Meter, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter') } } + # The ID of the meter. + field :meter_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('meter_id') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + + sig { params(amount: ::Integer, consumed_units: ::Float, created_at: ::DateTime, credited_units: ::Integer, id: ::String, meter: Models::Shared::Meter, meter_id: ::String, modified_at: ::DateTime).void } + def initialize(amount: nil, consumed_units: nil, created_at: nil, credited_units: nil, id: nil, meter: nil, meter_id: nil, modified_at: nil) + @amount = amount + @consumed_units = consumed_units + @created_at = created_at + @credited_units = credited_units + @id = id + @meter = meter + @meter_id = meter_id + @modified_at = modified_at + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @amount == other.amount + return false unless @consumed_units == other.consumed_units + return false unless @created_at == other.created_at + return false unless @credited_units == other.credited_units + return false unless @id == other.id + return false unless @meter == other.meter + return false unless @meter_id == other.meter_id + return false unless @modified_at == other.modified_at + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptionprorationbehavior.rb b/lib/open_api_sdk/models/shared/subscriptionprorationbehavior.rb new file mode 100644 index 0000000..b60fc15 --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptionprorationbehavior.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionProrationBehavior < T::Enum + enums do + INVOICE = new('invoice') + PRORATE = new('prorate') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptionrecurringinterval.rb b/lib/open_api_sdk/models/shared/subscriptionrecurringinterval.rb new file mode 100644 index 0000000..fbae4b4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptionrecurringinterval.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionRecurringInterval < T::Enum + enums do + MONTH = new('month') + YEAR = new('year') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptionrevoke.rb b/lib/open_api_sdk/models/shared/subscriptionrevoke.rb new file mode 100644 index 0000000..4516db9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptionrevoke.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionRevoke + extend T::Sig + include Crystalline::MetadataFields + + # Cancel and revoke an active subscription immediately + field :revoke, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('revoke') } } + # Customer feedback and why they decided to cancel. + # + # **IMPORTANT:** + # Do not use this to store internal notes! It's intended to be input + # from the customer and is therefore also available in their Polar + # purchases library. + # + # Only set this in case your own service is requesting the reason from the + # customer. Or you copy a message directly from a customer + # conversation, i.e support. + field :customer_cancellation_comment, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_comment') } } + # Customer reason for cancellation. + # + # Helpful to monitor reasons behind churn for future improvements. + # + # Only set this in case your own service is requesting the reason from the + # customer. Or you know based on direct conversations, i.e support, with + # the customer. + # + # * `too_expensive`: Too expensive for the customer. + # * `missing_features`: Customer is missing certain features. + # * `switched_service`: Customer switched to another service. + # * `unused`: Customer is not using it enough. + # * `customer_service`: Customer is not satisfied with the customer service. + # * `low_quality`: Customer is unhappy with the quality. + # * `too_complex`: Customer considers the service too complicated. + # * `other`: Other reason(s). + field :customer_cancellation_reason, T.nilable(Models::Shared::CustomerCancellationReason), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_cancellation_reason'), 'decoder': Utils.enum_from_string(Models::Shared::CustomerCancellationReason, true) } } + + + sig { params(revoke: T::Boolean, customer_cancellation_comment: T.nilable(::String), customer_cancellation_reason: T.nilable(Models::Shared::CustomerCancellationReason)).void } + def initialize(revoke: nil, customer_cancellation_comment: nil, customer_cancellation_reason: nil) + @revoke = revoke + @customer_cancellation_comment = customer_cancellation_comment + @customer_cancellation_reason = customer_cancellation_reason + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @revoke == other.revoke + return false unless @customer_cancellation_comment == other.customer_cancellation_comment + return false unless @customer_cancellation_reason == other.customer_cancellation_reason + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptionsortproperty.rb b/lib/open_api_sdk/models/shared/subscriptionsortproperty.rb new file mode 100644 index 0000000..31ea177 --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptionsortproperty.rb @@ -0,0 +1,32 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionSortProperty < T::Enum + enums do + CUSTOMER = new('customer') + MINUS_CUSTOMER = new('-customer') + STATUS = new('status') + MINUS_STATUS = new('-status') + STARTED_AT = new('started_at') + MINUS_STARTED_AT = new('-started_at') + CURRENT_PERIOD_END = new('current_period_end') + MINUS_CURRENT_PERIOD_END = new('-current_period_end') + AMOUNT = new('amount') + MINUS_AMOUNT = new('-amount') + PRODUCT = new('product') + MINUS_PRODUCT = new('-product') + DISCOUNT = new('discount') + MINUS_DISCOUNT = new('-discount') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptionstatus.rb b/lib/open_api_sdk/models/shared/subscriptionstatus.rb new file mode 100644 index 0000000..16fd89c --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptionstatus.rb @@ -0,0 +1,25 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionStatus < T::Enum + enums do + INCOMPLETE = new('incomplete') + INCOMPLETE_EXPIRED = new('incomplete_expired') + TRIALING = new('trialing') + ACTIVE = new('active') + PAST_DUE = new('past_due') + CANCELED = new('canceled') + UNPAID = new('unpaid') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptionupdate.rb b/lib/open_api_sdk/models/shared/subscriptionupdate.rb new file mode 100644 index 0000000..73ca33f --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptionupdate.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionUpdate + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subscriptionupdateproduct.rb b/lib/open_api_sdk/models/shared/subscriptionupdateproduct.rb new file mode 100644 index 0000000..28c5f1e --- /dev/null +++ b/lib/open_api_sdk/models/shared/subscriptionupdateproduct.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubscriptionUpdateProduct + extend T::Sig + include Crystalline::MetadataFields + + # Update subscription to another product. + field :product_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('product_id') } } + # Determine how to handle the proration billing. If not provided, will use the default organization setting. + field :proration_behavior, T.nilable(Models::Shared::SubscriptionProrationBehavior), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('proration_behavior'), 'decoder': Utils.enum_from_string(Models::Shared::SubscriptionProrationBehavior, true) } } + + + sig { params(product_id: ::String, proration_behavior: T.nilable(Models::Shared::SubscriptionProrationBehavior)).void } + def initialize(product_id: nil, proration_behavior: nil) + @product_id = product_id + @proration_behavior = proration_behavior + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @product_id == other.product_id + return false unless @proration_behavior == other.proration_behavior + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/subtype.rb b/lib/open_api_sdk/models/shared/subtype.rb new file mode 100644 index 0000000..1744458 --- /dev/null +++ b/lib/open_api_sdk/models/shared/subtype.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SubType < T::Enum + enums do + USER = new('user') + ORGANIZATION = new('organization') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/switching_from.rb b/lib/open_api_sdk/models/shared/switching_from.rb new file mode 100644 index 0000000..93e9744 --- /dev/null +++ b/lib/open_api_sdk/models/shared/switching_from.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class SwitchingFrom < T::Enum + enums do + PADDLE = new('paddle') + LEMON_SQUEEZY = new('lemon_squeezy') + GUMROAD = new('gumroad') + STRIPE = new('stripe') + OTHER = new('other') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/tax_id.rb b/lib/open_api_sdk/models/shared/tax_id.rb new file mode 100644 index 0000000..067a703 --- /dev/null +++ b/lib/open_api_sdk/models/shared/tax_id.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class TaxId + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/taxidformat.rb b/lib/open_api_sdk/models/shared/taxidformat.rb new file mode 100644 index 0000000..4332758 --- /dev/null +++ b/lib/open_api_sdk/models/shared/taxidformat.rb @@ -0,0 +1,94 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # TaxIDFormat - List of supported tax ID formats. + # + # Ref: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id + class TaxIDFormat < T::Enum + enums do + AD_NRT = new('ad_nrt') + AE_TRN = new('ae_trn') + AR_CUIT = new('ar_cuit') + AU_ABN = new('au_abn') + AU_ARN = new('au_arn') + BG_UIC = new('bg_uic') + BH_VAT = new('bh_vat') + BO_TIN = new('bo_tin') + BR_CNPJ = new('br_cnpj') + BR_CPF = new('br_cpf') + CA_BN = new('ca_bn') + CA_GST_HST = new('ca_gst_hst') + CA_PST_BC = new('ca_pst_bc') + CA_PST_MB = new('ca_pst_mb') + CA_PST_SK = new('ca_pst_sk') + CA_QST = new('ca_qst') + CH_UID = new('ch_uid') + CH_VAT = new('ch_vat') + CL_TIN = new('cl_tin') + CN_TIN = new('cn_tin') + CO_NIT = new('co_nit') + CR_TIN = new('cr_tin') + DE_STN = new('de_stn') + DO_RCN = new('do_rcn') + EC_RUC = new('ec_ruc') + EG_TIN = new('eg_tin') + ES_CIF = new('es_cif') + EU_OSS_VAT = new('eu_oss_vat') + EU_VAT = new('eu_vat') + GB_VAT = new('gb_vat') + GE_VAT = new('ge_vat') + HK_BR = new('hk_br') + HR_OIB = new('hr_oib') + HU_TIN = new('hu_tin') + ID_NPWP = new('id_npwp') + IL_VAT = new('il_vat') + IN_GST = new('in_gst') + IS_VAT = new('is_vat') + JP_CN = new('jp_cn') + JP_RN = new('jp_rn') + JP_TRN = new('jp_trn') + KE_PIN = new('ke_pin') + KR_BRN = new('kr_brn') + KZ_BIN = new('kz_bin') + LI_UID = new('li_uid') + MX_RFC = new('mx_rfc') + MY_FRP = new('my_frp') + MY_ITN = new('my_itn') + MY_SST = new('my_sst') + NG_TIN = new('ng_tin') + NO_VAT = new('no_vat') + NO_VOEC = new('no_voec') + NZ_GST = new('nz_gst') + OM_VAT = new('om_vat') + PE_RUC = new('pe_ruc') + PH_TIN = new('ph_tin') + RO_TIN = new('ro_tin') + RS_PIB = new('rs_pib') + RU_INN = new('ru_inn') + RU_KPP = new('ru_kpp') + SA_VAT = new('sa_vat') + SG_GST = new('sg_gst') + SG_UEN = new('sg_uen') + SI_TIN = new('si_tin') + SV_NIT = new('sv_nit') + TH_VAT = new('th_vat') + TR_TIN = new('tr_tin') + TW_VAT = new('tw_vat') + UA_VAT = new('ua_vat') + US_EIN = new('us_ein') + UY_RUC = new('uy_ruc') + VE_RIF = new('ve_rif') + VN_TIN = new('vn_tin') + ZA_VAT = new('za_vat') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/timeframe.rb b/lib/open_api_sdk/models/shared/timeframe.rb new file mode 100644 index 0000000..6be7b75 --- /dev/null +++ b/lib/open_api_sdk/models/shared/timeframe.rb @@ -0,0 +1,21 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Timeframe < T::Enum + enums do + YEAR = new('year') + MONTH = new('month') + DAY = new('day') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/timeinterval.rb b/lib/open_api_sdk/models/shared/timeinterval.rb new file mode 100644 index 0000000..0e276e5 --- /dev/null +++ b/lib/open_api_sdk/models/shared/timeinterval.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class TimeInterval < T::Enum + enums do + YEAR = new('year') + MONTH = new('month') + WEEK = new('week') + DAY = new('day') + HOUR = new('hour') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/token_endpoint_auth_method.rb b/lib/open_api_sdk/models/shared/token_endpoint_auth_method.rb new file mode 100644 index 0000000..de57537 --- /dev/null +++ b/lib/open_api_sdk/models/shared/token_endpoint_auth_method.rb @@ -0,0 +1,21 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class TokenEndpointAuthMethod < T::Enum + enums do + CLIENT_SECRET_BASIC = new('client_secret_basic') + CLIENT_SECRET_POST = new('client_secret_post') + NONE = new('none') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/token_type.rb b/lib/open_api_sdk/models/shared/token_type.rb new file mode 100644 index 0000000..5986683 --- /dev/null +++ b/lib/open_api_sdk/models/shared/token_type.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class TokenType < T::Enum + enums do + ACCESS_TOKEN = new('access_token') + REFRESH_TOKEN = new('refresh_token') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/token_type_hint.rb b/lib/open_api_sdk/models/shared/token_type_hint.rb new file mode 100644 index 0000000..1b5335f --- /dev/null +++ b/lib/open_api_sdk/models/shared/token_type_hint.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class TokenTypeHint < T::Enum + enums do + ACCESS_TOKEN = new('access_token') + REFRESH_TOKEN = new('refresh_token') + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/tokenresponse.rb b/lib/open_api_sdk/models/shared/tokenresponse.rb new file mode 100644 index 0000000..665af04 --- /dev/null +++ b/lib/open_api_sdk/models/shared/tokenresponse.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class TokenResponse + extend T::Sig + include Crystalline::MetadataFields + + + field :access_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('access_token') } } + + field :expires_in, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_in') } } + + field :id_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id_token') } } + + field :refresh_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('refresh_token') } } + + field :scope, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('scope') } } + + field :token_type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('token_type') } } + + + sig { params(access_token: ::String, expires_in: ::Integer, id_token: ::String, refresh_token: ::String, scope: ::String, token_type: ::String).void } + def initialize(access_token: nil, expires_in: nil, id_token: nil, refresh_token: nil, scope: nil, token_type: nil) + @access_token = access_token + @expires_in = expires_in + @id_token = id_token + @refresh_token = refresh_token + @scope = scope + @token_type = token_type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @access_token == other.access_token + return false unless @expires_in == other.expires_in + return false unless @id_token == other.id_token + return false unless @refresh_token == other.refresh_token + return false unless @scope == other.scope + return false unless @token_type == other.token_type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/unit_amount.rb b/lib/open_api_sdk/models/shared/unit_amount.rb new file mode 100644 index 0000000..2cc56fd --- /dev/null +++ b/lib/open_api_sdk/models/shared/unit_amount.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # The price per unit in cents. Supports up to 12 decimal places. + class UnitAmount + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/userinfoorganization.rb b/lib/open_api_sdk/models/shared/userinfoorganization.rb new file mode 100644 index 0000000..9dfec64 --- /dev/null +++ b/lib/open_api_sdk/models/shared/userinfoorganization.rb @@ -0,0 +1,37 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class UserInfoOrganization + extend T::Sig + include Crystalline::MetadataFields + + + field :sub, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sub') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + + sig { params(sub: ::String, name: T.nilable(::String)).void } + def initialize(sub: nil, name: nil) + @sub = sub + @name = name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @sub == other.sub + return false unless @name == other.name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/userinfouser.rb b/lib/open_api_sdk/models/shared/userinfouser.rb new file mode 100644 index 0000000..5e24c85 --- /dev/null +++ b/lib/open_api_sdk/models/shared/userinfouser.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class UserInfoUser + extend T::Sig + include Crystalline::MetadataFields + + + field :sub, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sub') } } + + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + field :email_verified, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email_verified') } } + + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + + sig { params(sub: ::String, email: T.nilable(::String), email_verified: T.nilable(T::Boolean), name: T.nilable(::String)).void } + def initialize(sub: nil, email: nil, email_verified: nil, name: nil) + @sub = sub + @email = email + @email_verified = email_verified + @name = name + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @sub == other.sub + return false unless @email == other.email + return false unless @email_verified == other.email_verified + return false unless @name == other.name + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/validatedlicensekey.rb b/lib/open_api_sdk/models/shared/validatedlicensekey.rb new file mode 100644 index 0000000..3696f2c --- /dev/null +++ b/lib/open_api_sdk/models/shared/validatedlicensekey.rb @@ -0,0 +1,97 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ValidatedLicenseKey + extend T::Sig + include Crystalline::MetadataFields + + # The benefit ID. + field :benefit_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('benefit_id') } } + # Creation timestamp of the object. + field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :customer, Models::Shared::LicenseKeyCustomer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } } + + field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer_id') } } + + field :display_key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('display_key') } } + + field :expires_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + # The ID of the object. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } } + + field :last_validated_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('last_validated_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :limit_activations, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_activations') } } + + field :limit_usage, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('limit_usage') } } + # Last modification timestamp of the object. + field :modified_at, ::DateTime, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modified_at'), 'decoder': Utils.datetime_from_iso_format(false) } } + + field :organization_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('organization_id') } } + + field :status, Models::Shared::LicenseKeyStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::LicenseKeyStatus, false) } } + + field :usage, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('usage') } } + + field :validations, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('validations') } } + + field :activation, T.nilable(Models::Shared::LicenseKeyActivationBase), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('activation') } } + + + sig { params(benefit_id: ::String, created_at: ::DateTime, customer: Models::Shared::LicenseKeyCustomer, customer_id: ::String, display_key: ::String, expires_at: ::DateTime, id: ::String, key: ::String, last_validated_at: ::DateTime, limit_activations: ::Integer, limit_usage: ::Integer, modified_at: ::DateTime, organization_id: ::String, status: Models::Shared::LicenseKeyStatus, usage: ::Integer, validations: ::Integer, activation: T.nilable(Models::Shared::LicenseKeyActivationBase)).void } + def initialize(benefit_id: nil, created_at: nil, customer: nil, customer_id: nil, display_key: nil, expires_at: nil, id: nil, key: nil, last_validated_at: nil, limit_activations: nil, limit_usage: nil, modified_at: nil, organization_id: nil, status: nil, usage: nil, validations: nil, activation: nil) + @benefit_id = benefit_id + @created_at = created_at + @customer = customer + @customer_id = customer_id + @display_key = display_key + @expires_at = expires_at + @id = id + @key = key + @last_validated_at = last_validated_at + @limit_activations = limit_activations + @limit_usage = limit_usage + @modified_at = modified_at + @organization_id = organization_id + @status = status + @usage = usage + @validations = validations + @activation = activation + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @benefit_id == other.benefit_id + return false unless @created_at == other.created_at + return false unless @customer == other.customer + return false unless @customer_id == other.customer_id + return false unless @display_key == other.display_key + return false unless @expires_at == other.expires_at + return false unless @id == other.id + return false unless @key == other.key + return false unless @last_validated_at == other.last_validated_at + return false unless @limit_activations == other.limit_activations + return false unless @limit_usage == other.limit_usage + return false unless @modified_at == other.modified_at + return false unless @organization_id == other.organization_id + return false unless @status == other.status + return false unless @usage == other.usage + return false unless @validations == other.validations + return false unless @activation == other.activation + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/validationerror.rb b/lib/open_api_sdk/models/shared/validationerror.rb new file mode 100644 index 0000000..062b361 --- /dev/null +++ b/lib/open_api_sdk/models/shared/validationerror.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class ValidationError + extend T::Sig + include Crystalline::MetadataFields + + + field :loc, T::Array[T.any(::String, ::Integer)], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('loc') } } + + field :msg, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('msg') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(loc: T::Array[T.any(::String, ::Integer)], msg: ::String, type: ::String).void } + def initialize(loc: nil, msg: nil, type: nil) + @loc = loc + @msg = msg + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @loc == other.loc + return false unless @msg == other.msg + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/value.rb b/lib/open_api_sdk/models/shared/value.rb new file mode 100644 index 0000000..f0c9eda --- /dev/null +++ b/lib/open_api_sdk/models/shared/value.rb @@ -0,0 +1,28 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + + class Value + extend T::Sig + include Crystalline::MetadataFields + + + + + def initialize; end + + def ==(other) + return false unless other.is_a? self.class + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookbenefitcreatedpayload.rb b/lib/open_api_sdk/models/shared/webhookbenefitcreatedpayload.rb new file mode 100644 index 0000000..41cbb72 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookbenefitcreatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a new benefit is created. + # + # **Discord & Slack support:** Basic + class WebhookBenefitCreatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit), type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookbenefitgrantcreatedpayload.rb b/lib/open_api_sdk/models/shared/webhookbenefitgrantcreatedpayload.rb new file mode 100644 index 0000000..65602be --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookbenefitgrantcreatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a new benefit grant is created. + # + # **Discord & Slack support:** Basic + class WebhookBenefitGrantCreatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::BenefitGrantWebhook, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::BenefitGrantWebhook, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookbenefitgrantcycledpayload.rb b/lib/open_api_sdk/models/shared/webhookbenefitgrantcycledpayload.rb new file mode 100644 index 0000000..d47b515 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookbenefitgrantcycledpayload.rb @@ -0,0 +1,40 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a benefit grant is cycled, + # meaning the related subscription has been renewed for another period. + # + # **Discord & Slack support:** Basic + class WebhookBenefitGrantCycledPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::BenefitGrantWebhook, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::BenefitGrantWebhook, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookbenefitgrantrevokedpayload.rb b/lib/open_api_sdk/models/shared/webhookbenefitgrantrevokedpayload.rb new file mode 100644 index 0000000..b400894 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookbenefitgrantrevokedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a benefit grant is revoked. + # + # **Discord & Slack support:** Basic + class WebhookBenefitGrantRevokedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::BenefitGrantWebhook, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::BenefitGrantWebhook, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookbenefitgrantupdatedpayload.rb b/lib/open_api_sdk/models/shared/webhookbenefitgrantupdatedpayload.rb new file mode 100644 index 0000000..164e652 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookbenefitgrantupdatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a benefit grant is updated. + # + # **Discord & Slack support:** Basic + class WebhookBenefitGrantUpdatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::BenefitGrantWebhook, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::BenefitGrantWebhook, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookbenefitupdatedpayload.rb b/lib/open_api_sdk/models/shared/webhookbenefitupdatedpayload.rb new file mode 100644 index 0000000..f5a82b4 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookbenefitupdatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a benefit is updated. + # + # **Discord & Slack support:** Basic + class WebhookBenefitUpdatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: T.any(Models::Shared::BenefitCustom, Models::Shared::BenefitDiscord, Models::Shared::BenefitGitHubRepository, Models::Shared::BenefitDownloadables, Models::Shared::BenefitLicenseKeys, Models::Shared::BenefitMeterCredit), type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookcheckoutcreatedpayload.rb b/lib/open_api_sdk/models/shared/webhookcheckoutcreatedpayload.rb new file mode 100644 index 0000000..057c49d --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookcheckoutcreatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a new checkout is created. + # + # **Discord & Slack support:** Basic + class WebhookCheckoutCreatedPayload + extend T::Sig + include Crystalline::MetadataFields + + # Checkout session data retrieved using an access token. + field :data, Models::Shared::Checkout, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Checkout, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookcheckoutupdatedpayload.rb b/lib/open_api_sdk/models/shared/webhookcheckoutupdatedpayload.rb new file mode 100644 index 0000000..1df1f57 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookcheckoutupdatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a checkout is updated. + # + # **Discord & Slack support:** Basic + class WebhookCheckoutUpdatedPayload + extend T::Sig + include Crystalline::MetadataFields + + # Checkout session data retrieved using an access token. + field :data, Models::Shared::Checkout, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Checkout, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookcustomercreatedpayload.rb b/lib/open_api_sdk/models/shared/webhookcustomercreatedpayload.rb new file mode 100644 index 0000000..66dd9dc --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookcustomercreatedpayload.rb @@ -0,0 +1,44 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a new customer is created. + # + # A customer can be created: + # + # * After a successful checkout. + # * Programmatically via the API. + # + # **Discord & Slack support:** Basic + class WebhookCustomerCreatedPayload + extend T::Sig + include Crystalline::MetadataFields + + # A customer in an organization. + field :data, Models::Shared::Customer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Customer, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookcustomerdeletedpayload.rb b/lib/open_api_sdk/models/shared/webhookcustomerdeletedpayload.rb new file mode 100644 index 0000000..dad2f51 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookcustomerdeletedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a customer is deleted. + # + # **Discord & Slack support:** Basic + class WebhookCustomerDeletedPayload + extend T::Sig + include Crystalline::MetadataFields + + # A customer in an organization. + field :data, Models::Shared::Customer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Customer, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookcustomerstatechangedpayload.rb b/lib/open_api_sdk/models/shared/webhookcustomerstatechangedpayload.rb new file mode 100644 index 0000000..7659bfa --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookcustomerstatechangedpayload.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a customer state has changed. + # + # It's triggered when: + # + # * Customer is created, updated or deleted. + # * A subscription is created or updated. + # * A benefit is granted or revoked. + # + # **Discord & Slack support:** Basic + class WebhookCustomerStateChangedPayload + extend T::Sig + include Crystalline::MetadataFields + + # A customer along with additional state information: + # + # * Active subscriptions + # * Granted benefits + # * Active meters + field :data, Models::Shared::CustomerState, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::CustomerState, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookcustomerupdatedpayload.rb b/lib/open_api_sdk/models/shared/webhookcustomerupdatedpayload.rb new file mode 100644 index 0000000..3ae7653 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookcustomerupdatedpayload.rb @@ -0,0 +1,43 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a customer is updated. + # + # This event is fired when the customer details are updated. + # + # If you want to be notified when a customer subscription or benefit state changes, you should listen to the `customer_state_changed` event. + # + # **Discord & Slack support:** Basic + class WebhookCustomerUpdatedPayload + extend T::Sig + include Crystalline::MetadataFields + + # A customer in an organization. + field :data, Models::Shared::Customer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Customer, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookordercreatedpayload.rb b/lib/open_api_sdk/models/shared/webhookordercreatedpayload.rb new file mode 100644 index 0000000..14fe7f9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookordercreatedpayload.rb @@ -0,0 +1,48 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a new order is created. + # + # A new order is created when: + # + # * A customer purchases a one-time product. In this case, `billing_reason` is set to `purchase`. + # * A customer starts a subscription. In this case, `billing_reason` is set to `subscription_create`. + # * A subscription is renewed. In this case, `billing_reason` is set to `subscription_cycle`. + # * A subscription is upgraded or downgraded with an immediate proration invoice. In this case, `billing_reason` is set to `subscription_update`. + # + # The order might not be paid yet, so the `status` field might be `pending`. + # + # **Discord & Slack support:** Full + class WebhookOrderCreatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Order, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Order, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookorderpaidpayload.rb b/lib/open_api_sdk/models/shared/webhookorderpaidpayload.rb new file mode 100644 index 0000000..2edf8cf --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookorderpaidpayload.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when an order is paid. + # + # When you receive this event, the order is fully processed and payment has been received. + # + # **Discord & Slack support:** Full + class WebhookOrderPaidPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Order, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Order, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookorderrefundedpayload.rb b/lib/open_api_sdk/models/shared/webhookorderrefundedpayload.rb new file mode 100644 index 0000000..d13e801 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookorderrefundedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when an order is fully or partially refunded. + # + # **Discord & Slack support:** Full + class WebhookOrderRefundedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Order, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Order, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookorderupdatedpayload.rb b/lib/open_api_sdk/models/shared/webhookorderupdatedpayload.rb new file mode 100644 index 0000000..dbf2805 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookorderupdatedpayload.rb @@ -0,0 +1,44 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when an order is updated. + # + # An order is updated when: + # + # * Its status changes, e.g. from `pending` to `paid`. + # * It's refunded, partially or fully. + # + # **Discord & Slack support:** Full + class WebhookOrderUpdatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Order, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Order, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookorganizationupdatedpayload.rb b/lib/open_api_sdk/models/shared/webhookorganizationupdatedpayload.rb new file mode 100644 index 0000000..8521b1a --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookorganizationupdatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a organization is updated. + # + # **Discord & Slack support:** Basic + class WebhookOrganizationUpdatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Organization, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Organization, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookproductcreatedpayload.rb b/lib/open_api_sdk/models/shared/webhookproductcreatedpayload.rb new file mode 100644 index 0000000..78d5827 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookproductcreatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a new product is created. + # + # **Discord & Slack support:** Basic + class WebhookProductCreatedPayload + extend T::Sig + include Crystalline::MetadataFields + + # A product. + field :data, Models::Shared::Product, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Product, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookproductupdatedpayload.rb b/lib/open_api_sdk/models/shared/webhookproductupdatedpayload.rb new file mode 100644 index 0000000..5f6a408 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookproductupdatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a product is updated. + # + # **Discord & Slack support:** Basic + class WebhookProductUpdatedPayload + extend T::Sig + include Crystalline::MetadataFields + + # A product. + field :data, Models::Shared::Product, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Product, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookrefundcreatedpayload.rb b/lib/open_api_sdk/models/shared/webhookrefundcreatedpayload.rb new file mode 100644 index 0000000..cabf2c9 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookrefundcreatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a refund is created regardless of status. + # + # **Discord & Slack support:** Full + class WebhookRefundCreatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Refund, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Refund, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhookrefundupdatedpayload.rb b/lib/open_api_sdk/models/shared/webhookrefundupdatedpayload.rb new file mode 100644 index 0000000..15ce202 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhookrefundupdatedpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a refund is updated. + # + # **Discord & Slack support:** Full + class WebhookRefundUpdatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Refund, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Refund, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhooksubscriptionactivepayload.rb b/lib/open_api_sdk/models/shared/webhooksubscriptionactivepayload.rb new file mode 100644 index 0000000..bb7c8d3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhooksubscriptionactivepayload.rb @@ -0,0 +1,40 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a subscription becomes active, + # whether because it's a new paid subscription or because payment was recovered. + # + # **Discord & Slack support:** Full + class WebhookSubscriptionActivePayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Subscription, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Subscription, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhooksubscriptioncanceledpayload.rb b/lib/open_api_sdk/models/shared/webhooksubscriptioncanceledpayload.rb new file mode 100644 index 0000000..b929d6d --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhooksubscriptioncanceledpayload.rb @@ -0,0 +1,40 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a subscription is canceled. + # Customers might still have access until the end of the current period. + # + # **Discord & Slack support:** Full + class WebhookSubscriptionCanceledPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Subscription, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Subscription, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhooksubscriptioncreatedpayload.rb b/lib/open_api_sdk/models/shared/webhooksubscriptioncreatedpayload.rb new file mode 100644 index 0000000..874ff7e --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhooksubscriptioncreatedpayload.rb @@ -0,0 +1,41 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a new subscription is created. + # + # When this event occurs, the subscription `status` might not be `active` yet, as we can still have to wait for the first payment to be processed. + # + # **Discord & Slack support:** Full + class WebhookSubscriptionCreatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Subscription, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Subscription, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhooksubscriptionrevokedpayload.rb b/lib/open_api_sdk/models/shared/webhooksubscriptionrevokedpayload.rb new file mode 100644 index 0000000..8d11144 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhooksubscriptionrevokedpayload.rb @@ -0,0 +1,40 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a subscription is revoked, the user looses access immediately. + # Happens when the subscription is canceled, or payment is past due. + # + # **Discord & Slack support:** Full + class WebhookSubscriptionRevokedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Subscription, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Subscription, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhooksubscriptionuncanceledpayload.rb b/lib/open_api_sdk/models/shared/webhooksubscriptionuncanceledpayload.rb new file mode 100644 index 0000000..8173274 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhooksubscriptionuncanceledpayload.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a subscription is uncanceled. + # + # **Discord & Slack support:** Full + class WebhookSubscriptionUncanceledPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Subscription, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Subscription, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/shared/webhooksubscriptionupdatedpayload.rb b/lib/open_api_sdk/models/shared/webhooksubscriptionupdatedpayload.rb new file mode 100644 index 0000000..8f206d3 --- /dev/null +++ b/lib/open_api_sdk/models/shared/webhooksubscriptionupdatedpayload.rb @@ -0,0 +1,43 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Shared + + # Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals. + # + # If you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, and `subscription.revoked`. + # + # To listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field. + # + # **Discord & Slack support:** On cancellation and revocation. Renewals are skipped. + class WebhookSubscriptionUpdatedPayload + extend T::Sig + include Crystalline::MetadataFields + + + field :data, Models::Shared::Subscription, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } } + + field :type, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type') } } + + + sig { params(data: Models::Shared::Subscription, type: ::String).void } + def initialize(data: nil, type: nil) + @data = data + @type = type + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointbenefit_created_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointbenefit_created_post_response.rb new file mode 100644 index 0000000..0955098 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointbenefit_created_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointbenefitCreatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_created_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_created_post_response.rb new file mode 100644 index 0000000..5b32d64 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_created_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointbenefitGrantCreatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_cycled_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_cycled_post_response.rb new file mode 100644 index 0000000..3de7b99 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_cycled_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointbenefitGrantCycledPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_revoked_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_revoked_post_response.rb new file mode 100644 index 0000000..2b08508 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_revoked_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointbenefitGrantRevokedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_updated_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_updated_post_response.rb new file mode 100644 index 0000000..a6663bd --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointbenefit_grant_updated_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointbenefitGrantUpdatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointbenefit_updated_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointbenefit_updated_post_response.rb new file mode 100644 index 0000000..3aa1312 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointbenefit_updated_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointbenefitUpdatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointcheckout_created_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointcheckout_created_post_response.rb new file mode 100644 index 0000000..b8748f7 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointcheckout_created_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointcheckoutCreatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointcheckout_updated_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointcheckout_updated_post_response.rb new file mode 100644 index 0000000..58d156e --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointcheckout_updated_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointcheckoutUpdatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointcustomer_created_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointcustomer_created_post_response.rb new file mode 100644 index 0000000..489e9bb --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointcustomer_created_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointcustomerCreatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointcustomer_deleted_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointcustomer_deleted_post_response.rb new file mode 100644 index 0000000..3296e61 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointcustomer_deleted_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointcustomerDeletedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointcustomer_state_changed_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointcustomer_state_changed_post_response.rb new file mode 100644 index 0000000..38eeec9 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointcustomer_state_changed_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointcustomerStateChangedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointcustomer_updated_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointcustomer_updated_post_response.rb new file mode 100644 index 0000000..c49e287 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointcustomer_updated_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointcustomerUpdatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointorder_created_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointorder_created_post_response.rb new file mode 100644 index 0000000..c934d9d --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointorder_created_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointorderCreatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointorder_paid_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointorder_paid_post_response.rb new file mode 100644 index 0000000..b0e7cd0 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointorder_paid_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointorderPaidPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointorder_refunded_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointorder_refunded_post_response.rb new file mode 100644 index 0000000..c975bc0 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointorder_refunded_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointorderRefundedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointorder_updated_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointorder_updated_post_response.rb new file mode 100644 index 0000000..9aba02c --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointorder_updated_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointorderUpdatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointorganization_updated_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointorganization_updated_post_response.rb new file mode 100644 index 0000000..fe814fb --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointorganization_updated_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointorganizationUpdatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointproduct_created_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointproduct_created_post_response.rb new file mode 100644 index 0000000..6bdc3d9 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointproduct_created_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointproductCreatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointproduct_updated_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointproduct_updated_post_response.rb new file mode 100644 index 0000000..77764b7 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointproduct_updated_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointproductUpdatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointrefund_created_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointrefund_created_post_response.rb new file mode 100644 index 0000000..7a77d96 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointrefund_created_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointrefundCreatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointrefund_updated_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointrefund_updated_post_response.rb new file mode 100644 index 0000000..6d36b26 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointrefund_updated_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointrefundUpdatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointsubscription_active_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointsubscription_active_post_response.rb new file mode 100644 index 0000000..48f072a --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointsubscription_active_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointsubscriptionActivePostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointsubscription_canceled_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointsubscription_canceled_post_response.rb new file mode 100644 index 0000000..1d1899e --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointsubscription_canceled_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointsubscriptionCanceledPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointsubscription_created_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointsubscription_created_post_response.rb new file mode 100644 index 0000000..39dc92d --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointsubscription_created_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointsubscriptionCreatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointsubscription_revoked_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointsubscription_revoked_post_response.rb new file mode 100644 index 0000000..d509c01 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointsubscription_revoked_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointsubscriptionRevokedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointsubscription_uncanceled_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointsubscription_uncanceled_post_response.rb new file mode 100644 index 0000000..fb874cf --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointsubscription_uncanceled_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointsubscriptionUncanceledPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/models/webhooks/_endpointsubscription_updated_post_response.rb b/lib/open_api_sdk/models/webhooks/_endpointsubscription_updated_post_response.rb new file mode 100644 index 0000000..c128209 --- /dev/null +++ b/lib/open_api_sdk/models/webhooks/_endpointsubscription_updated_post_response.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Models + module Webhooks + + + class EndpointsubscriptionUpdatedPostResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # Successful Response + field :any, T.nilable(::Object) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, any: T.nilable(::Object)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, any: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @any = any + end + + def ==(other) + return false unless other.is_a? self.class + return false unless @content_type == other.content_type + return false unless @raw_response == other.raw_response + return false unless @status_code == other.status_code + return false unless @any == other.any + true + end + end + end + end +end diff --git a/lib/open_api_sdk/oauth2.rb b/lib/open_api_sdk/oauth2.rb new file mode 100644 index 0000000..95104f0 --- /dev/null +++ b/lib/open_api_sdk/oauth2.rb @@ -0,0 +1,550 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Oauth2 + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2AuthorizeResponse) } + def authorize(timeout_ms: nil) + # authorize - Authorize + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/oauth2/authorize" + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:authorize', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::AuthorizeResponseUser, Models::Shared::AuthorizeResponseOrganization)) + response = Models::Operations::Oauth2AuthorizeResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + response_oauth2_authorize: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: T.any(Models::Shared::AuthorizationCodeTokenRequest, Models::Shared::RefreshTokenRequest), timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2RequestTokenResponse) } + def token(request:, timeout_ms: nil) + # token - Request Token + # Request an access token using a valid grant. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/oauth2/token" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :form) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:request_token', + security_source: nil + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TokenResponse) + response = Models::Operations::Oauth2RequestTokenResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + token_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::RevokeTokenRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2RevokeTokenResponse) } + def revoke(request:, timeout_ms: nil) + # revoke - Revoke Token + # Revoke an access token or a refresh token. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/oauth2/revoke" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :form) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:revoke_token', + security_source: nil + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::RevokeTokenResponse) + response = Models::Operations::Oauth2RevokeTokenResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + revoke_token_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::IntrospectTokenRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2IntrospectTokenResponse) } + def introspect(request:, timeout_ms: nil) + # introspect - Introspect Token + # Get information about an access token. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/oauth2/introspect" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :form) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:introspect_token', + security_source: nil + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::IntrospectTokenResponse) + response = Models::Operations::Oauth2IntrospectTokenResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + introspect_token_response: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2UserinfoResponse) } + def userinfo(timeout_ms: nil) + # userinfo - Get User Info + # Get information about the authenticated user. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/oauth2/userinfo" + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:userinfo', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), T.any(Models::Shared::UserInfoUser, Models::Shared::UserInfoOrganization)) + response = Models::Operations::Oauth2UserinfoResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + response_oauth2_userinfo: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/oauth2_clients.rb b/lib/open_api_sdk/oauth2_clients.rb new file mode 100644 index 0000000..4f84315 --- /dev/null +++ b/lib/open_api_sdk/oauth2_clients.rb @@ -0,0 +1,648 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Oauth2Clients + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(page: T.nilable(::Integer), limit: T.nilable(::Integer), timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2ClientsListResponse) } + def list(page: nil, limit: nil, timeout_ms: nil) + # list - List Clients + # List OAuth2 clients. + request = Models::Operations::Oauth2ClientsListRequest.new( + + page: page, + limit: limit + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/oauth2/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::Oauth2ClientsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:clients:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceOAuth2Client) + response = Models::Operations::Oauth2ClientsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_o_auth2_client: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::OAuth2ClientConfiguration, timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2ClientsOauth2CreateClientResponse) } + def create(request:, timeout_ms: nil) + # create - Create Client + # Create an OAuth2 client. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/oauth2/register" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:clients:oauth2:create_client', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), ::Object) + response = Models::Operations::Oauth2ClientsOauth2CreateClientResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + any: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(client_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2ClientsOauth2GetClientResponse) } + def get(client_id:, timeout_ms: nil) + # get - Get Client + # Get an OAuth2 client by Client ID. + request = Models::Operations::Oauth2ClientsOauth2GetClientRequest.new( + + client_id: client_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::Oauth2ClientsOauth2GetClientRequest, + base_url, + '/v1/oauth2/register/{client_id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:clients:oauth2:get_client', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), ::Object) + response = Models::Operations::Oauth2ClientsOauth2GetClientResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + any: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(o_auth2_client_configuration_update: Models::Shared::OAuth2ClientConfigurationUpdate, client_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2ClientsOauth2UpdateClientResponse) } + def update(o_auth2_client_configuration_update:, client_id:, timeout_ms: nil) + # update - Update Client + # Update an OAuth2 client. + request = Models::Operations::Oauth2ClientsOauth2UpdateClientRequest.new( + + client_id: client_id, + o_auth2_client_configuration_update: o_auth2_client_configuration_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::Oauth2ClientsOauth2UpdateClientRequest, + base_url, + '/v1/oauth2/register/{client_id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :o_auth2_client_configuration_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:clients:oauth2:update_client', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.put(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), ::Object) + response = Models::Operations::Oauth2ClientsOauth2UpdateClientResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + any: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(client_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::Oauth2ClientsOauth2DeleteClientResponse) } + def delete(client_id:, timeout_ms: nil) + # delete - Delete Client + # Delete an OAuth2 client. + request = Models::Operations::Oauth2ClientsOauth2DeleteClientRequest.new( + + client_id: client_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::Oauth2ClientsOauth2DeleteClientRequest, + base_url, + '/v1/oauth2/register/{client_id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'oauth2:clients:oauth2:delete_client', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), ::Object) + response = Models::Operations::Oauth2ClientsOauth2DeleteClientResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + any: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/orders.rb b/lib/open_api_sdk/orders.rb new file mode 100644 index 0000000..03934a8 --- /dev/null +++ b/lib/open_api_sdk/orders.rb @@ -0,0 +1,415 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Orders + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::OrdersListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::OrdersListResponse) } + def list(request:, timeout_ms: nil) + # list - List Orders + # List orders. + # + # **Scopes**: `orders:read` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/orders/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::OrdersListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'orders:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceOrder) + response = Models::Operations::OrdersListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_order: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::OrdersGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Order + # Get an order by ID. + # + # **Scopes**: `orders:read` + request = Models::Operations::OrdersGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::OrdersGetRequest, + base_url, + '/v1/orders/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'orders:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Order) + response = Models::Operations::OrdersGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + order: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::OrdersInvoiceResponse) } + def invoice(id:, timeout_ms: nil) + # invoice - Get Order Invoice + # Get an order's invoice data. + # + # **Scopes**: `orders:read` + request = Models::Operations::OrdersInvoiceRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::OrdersInvoiceRequest, + base_url, + '/v1/orders/{id}/invoice', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'orders:invoice', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::OrderInvoice) + response = Models::Operations::OrdersInvoiceResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + order_invoice: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/organizations.rb b/lib/open_api_sdk/organizations.rb new file mode 100644 index 0000000..0be9f03 --- /dev/null +++ b/lib/open_api_sdk/organizations.rb @@ -0,0 +1,575 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Organizations + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(slug: T.nilable(::String), page: T.nilable(::Integer), limit: T.nilable(::Integer), sorting: T.nilable(T::Array[Models::Shared::OrganizationSortProperty]), timeout_ms: T.nilable(Integer)).returns(Models::Operations::OrganizationsListResponse) } + def list(slug: nil, page: nil, limit: nil, sorting: nil, timeout_ms: nil) + # list - List Organizations + # List organizations. + # + # **Scopes**: `organizations:read` `organizations:write` + request = Models::Operations::OrganizationsListRequest.new( + + slug: slug, + page: page, + limit: limit, + sorting: sorting + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/organizations/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::OrganizationsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'organizations:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceOrganization) + response = Models::Operations::OrganizationsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_organization: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::OrganizationCreate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::OrganizationsCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Organization + # Create an organization. + # + # **Scopes**: `organizations:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/organizations/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'organizations:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Organization) + response = Models::Operations::OrganizationsCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + organization: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::OrganizationsGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Organization + # Get an organization by ID. + # + # **Scopes**: `organizations:read` `organizations:write` + request = Models::Operations::OrganizationsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::OrganizationsGetRequest, + base_url, + '/v1/organizations/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'organizations:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Organization) + response = Models::Operations::OrganizationsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + organization: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(organization_update: Models::Shared::OrganizationUpdate, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::OrganizationsUpdateResponse) } + def update(organization_update:, id:, timeout_ms: nil) + # update - Update Organization + # Update an organization. + # + # **Scopes**: `organizations:write` + request = Models::Operations::OrganizationsUpdateRequest.new( + + id: id, + organization_update: organization_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::OrganizationsUpdateRequest, + base_url, + '/v1/organizations/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :organization_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'organizations:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Organization) + response = Models::Operations::OrganizationsUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + organization: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotPermitted) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/polar.rb b/lib/open_api_sdk/polar.rb new file mode 100644 index 0000000..ff13df5 --- /dev/null +++ b/lib/open_api_sdk/polar.rb @@ -0,0 +1,114 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + + class Polar + extend T::Sig + + attr_accessor :organizations, :subscriptions, :oauth2_clients, :oauth2, :benefits, :products, :orders, :refunds, :checkouts, :files, :metrics, :license_keys, :checkout_links, :custom_fields, :discounts, :customers, :customer_portal_benefit_grants, :customer_portal_customers, :customer_portal_customer_meters, :customer_portal_downloadables, :customer_portal_license_keys, :customer_portal_orders, :customer_portal_organizations, :customer_portal_subscriptions, :customer_sessions, :events, :meters, :customer_meters + + sig do + params( + client: T.nilable(Faraday::Connection), + retry_config: T.nilable(::OpenApiSDK::Utils::RetryConfig), + timeout_ms: T.nilable(Integer), + access_token: T.nilable(::String), + security_source: T.nilable(T.proc.returns(Models::Shared::Security)), + server: T.nilable(Symbol), + server_url: T.nilable(String), + url_params: T.nilable(T::Hash[Symbol, String]) + ).void + end + def initialize(client: nil, retry_config: nil, timeout_ms: nil, access_token: nil, security_source: nil, server: nil, server_url: nil, url_params: nil) + ## Instantiates the SDK configuring it with the provided parameters. + # @param [T.nilable(Faraday::Connection)] client The faraday HTTP client to use for all operations + # @param [T.nilable(::OpenApiSDK::Utils::RetryConfig)] retry_config The retry configuration to use for all operations + # @param [T.nilable(Integer)] timeout_ms Request timeout in milliseconds for all operations + # @param [T.nilable(Models::Shared::Security)] security: The security details required for authentication + # @param [T.proc.returns(T.nilable(Models::Shared::Security))] security_source: A function that returns security details required for authentication + # @param [T.nilable(::Symbol)] server The server identifier to use for all operations + # @param [T.nilable(::String)] server_url The server URL to use for all operations + # @param [T.nilable(::Hash<::Symbol, ::String>)] url_params Parameters to optionally template the server URL with + + connection_options = { + request: { + params_encoder: Faraday::FlatParamsEncoder + } + } + connection_options[:request][:timeout] = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + + client ||= Faraday.new(**connection_options) do |f| + f.request :multipart, {} + # f.response :logger, nil, { headers: true, bodies: true, errors: true } + end + + if !server_url.nil? + if !url_params.nil? + server_url = Utils.template_url(server_url, url_params) + end + end + + raise StandardError, "Invalid server \"#{server}\"" if !server.nil? && !SERVERS.key?(server) + hooks = SDKHooks::Hooks.new + @sdk_configuration = SDKConfiguration.new( + client, + hooks, + retry_config, + timeout_ms, + access_token, + security_source, + server_url, + server + ) + + original_server_url = @sdk_configuration.get_server_details.first + new_server_url, @sdk_configuration.client = hooks.sdk_init(base_url: original_server_url, client: client) + @sdk_configuration.server_url = new_server_url if new_server_url != original_server_url + + init_sdks + end + + sig { void } + def init_sdks + @organizations = Organizations.new(@sdk_configuration) + @subscriptions = Subscriptions.new(@sdk_configuration) + @oauth2_clients = Oauth2Clients.new(@sdk_configuration) + @oauth2 = Oauth2.new(@sdk_configuration) + @benefits = Benefits.new(@sdk_configuration) + @products = Products.new(@sdk_configuration) + @orders = Orders.new(@sdk_configuration) + @refunds = Refunds.new(@sdk_configuration) + @checkouts = Checkouts.new(@sdk_configuration) + @files = Files.new(@sdk_configuration) + @metrics = Metrics.new(@sdk_configuration) + @license_keys = LicenseKeys.new(@sdk_configuration) + @checkout_links = CheckoutLinks.new(@sdk_configuration) + @custom_fields = CustomFields.new(@sdk_configuration) + @discounts = Discounts.new(@sdk_configuration) + @customers = Customers.new(@sdk_configuration) + @customer_portal_benefit_grants = CustomerPortalBenefitGrants.new(@sdk_configuration) + @customer_portal_customers = CustomerPortalCustomers.new(@sdk_configuration) + @customer_portal_customer_meters = CustomerPortalCustomerMeters.new(@sdk_configuration) + @customer_portal_downloadables = CustomerPortalDownloadables.new(@sdk_configuration) + @customer_portal_license_keys = CustomerPortalLicenseKeys.new(@sdk_configuration) + @customer_portal_orders = CustomerPortalOrders.new(@sdk_configuration) + @customer_portal_organizations = CustomerPortalOrganizations.new(@sdk_configuration) + @customer_portal_subscriptions = CustomerPortalSubscriptions.new(@sdk_configuration) + @customer_sessions = CustomerSessions.new(@sdk_configuration) + @events = Events.new(@sdk_configuration) + @meters = Meters.new(@sdk_configuration) + @customer_meters = CustomerMeters.new(@sdk_configuration) + end + end +end diff --git a/lib/open_api_sdk/products.rb b/lib/open_api_sdk/products.rb new file mode 100644 index 0000000..ef99e91 --- /dev/null +++ b/lib/open_api_sdk/products.rb @@ -0,0 +1,731 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Products + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::ProductsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ProductsListResponse) } + def list(request:, timeout_ms: nil) + # list - List Products + # List products. + # + # **Scopes**: `products:read` `products:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/products/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::ProductsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'products:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceProduct) + response = Models::Operations::ProductsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_product: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::ProductCreate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ProductsCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Product + # Create a product. + # + # **Scopes**: `products:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/products/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'products:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['201']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Product) + response = Models::Operations::ProductsCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + product: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ProductsGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Product + # Get a product by ID. + # + # **Scopes**: `products:read` `products:write` + request = Models::Operations::ProductsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::ProductsGetRequest, + base_url, + '/v1/products/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'products:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Product) + response = Models::Operations::ProductsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + product: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(product_update: Models::Shared::ProductUpdate, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ProductsUpdateResponse) } + def update(product_update:, id:, timeout_ms: nil) + # update - Update Product + # Update a product. + # + # **Scopes**: `products:write` + request = Models::Operations::ProductsUpdateRequest.new( + + id: id, + product_update: product_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::ProductsUpdateRequest, + base_url, + '/v1/products/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :product_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'products:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Product) + response = Models::Operations::ProductsUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + product: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotPermitted) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(product_benefits_update: Models::Shared::ProductBenefitsUpdate, id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ProductsUpdateBenefitsResponse) } + def update_benefits(product_benefits_update:, id:, timeout_ms: nil) + # update_benefits - Update Product Benefits + # Update benefits granted by a product. + # + # **Scopes**: `products:write` + request = Models::Operations::ProductsUpdateBenefitsRequest.new( + + id: id, + product_benefits_update: product_benefits_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::ProductsUpdateBenefitsRequest, + base_url, + '/v1/products/{id}/benefits', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :product_benefits_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'products:update_benefits', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Product) + response = Models::Operations::ProductsUpdateBenefitsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + product: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotPermitted) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/refunds.rb b/lib/open_api_sdk/refunds.rb new file mode 100644 index 0000000..cfe28b9 --- /dev/null +++ b/lib/open_api_sdk/refunds.rb @@ -0,0 +1,306 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Refunds + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::RefundsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::RefundsListResponse) } + def list(request:, timeout_ms: nil) + # list - List Refunds + # List products. + # + # **Scopes**: `refunds:read` `refunds:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/refunds/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::RefundsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'refunds:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceRefund) + response = Models::Operations::RefundsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_refund: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(request: Models::Shared::RefundCreate, timeout_ms: T.nilable(Integer)).returns(Models::Operations::RefundsCreateResponse) } + def create(request:, timeout_ms: nil) + # create - Create Refund + # Create a refund. + # + # **Scopes**: `refunds:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/refunds/" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'refunds:create', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Refund) + response = Models::Operations::RefundsCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + refund: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['201']) + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + return Models::Operations::RefundsCreateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response + ) + elsif Utils.match_status_code(http_response.status, ['400']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RefundAmountTooHigh) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RefundedAlready) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/sdk_hooks/hooks.rb b/lib/open_api_sdk/sdk_hooks/hooks.rb new file mode 100644 index 0000000..cc36c7d --- /dev/null +++ b/lib/open_api_sdk/sdk_hooks/hooks.rb @@ -0,0 +1,103 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require_relative './registration' +require_relative './types' + +require 'sorbet-runtime' + +module OpenApiSDK + module SDKHooks + class Hooks + extend T::Sig + + sig { void } + def initialize + @sdk_init_hooks = T.let([], T::Array[AbstractSDKInitHook]) + @before_request_hooks = T.let([], T::Array[AbstractBeforeRequestHook]) + @after_success_hooks = T.let([], T::Array[AbstractAfterSuccessHook]) + @after_error_hooks = T.let([], T::Array[AbstractAfterErrorHook]) + Registration.init_hooks self + end + + sig { params(hook: AbstractSDKInitHook).void } + def register_sdk_init_hook(hook) + @sdk_init_hooks << hook + end + + sig { params(hook: AbstractBeforeRequestHook).void } + def register_before_request_hook(hook) + @before_request_hooks << hook + end + + sig { params(hook: AbstractAfterSuccessHook).void } + def register_after_success_hook(hook) + @after_success_hooks << hook + end + + sig { params(hook: AbstractAfterErrorHook).void } + def register_after_error_hook(hook) + @after_error_hooks << hook + end + + sig do + params( + base_url: String, + client: Faraday::Connection + ).returns([String, Faraday::Connection]) + end + def sdk_init(base_url:, client:) + @sdk_init_hooks.each do |hook| + base_url, client = hook.sdk_init(base_url: base_url, client: client) + end + + return base_url, client + end + + sig do + params( + hook_ctx: BeforeRequestHookContext, + request: Faraday::Request + ).returns(Faraday::Request) + end + def before_request(hook_ctx:, request:) + @before_request_hooks.each do |hook| + request = hook.before_request(hook_ctx: hook_ctx, request: request) + end + + request + end + + sig do + params( + hook_ctx: AfterSuccessHookContext, + response: Faraday::Response + ).returns(Faraday::Response) + end + def after_success(hook_ctx:, response:) + @after_success_hooks.each do |hook| + response = hook.after_success(hook_ctx: hook_ctx, response: response) + end + + response + end + + sig do + params( + error: T.nilable(StandardError), + hook_ctx: AfterErrorHookContext, + response: T.nilable(Faraday::Response) + ).returns(T.nilable(Faraday::Response)) + end + def after_error(error:, hook_ctx:, response:) + @after_error_hooks.each do |hook| + response = hook.after_error(error: error, hook_ctx: hook_ctx, response: response) + end + + response + end + end + end +end diff --git a/lib/open_api_sdk/sdk_hooks/registration.rb b/lib/open_api_sdk/sdk_hooks/registration.rb new file mode 100644 index 0000000..5e6987e --- /dev/null +++ b/lib/open_api_sdk/sdk_hooks/registration.rb @@ -0,0 +1,35 @@ +# typed: true +# frozen_string_literal: true + +# +# This file is only ever generated once on the first generation and then is free to be modified. +# Any hooks you wish to add should be registered in the init_hooks method. +# +# Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance. +# + +require_relative './types' + +require 'sorbet-runtime' + +module OpenApiSDK + module SDKHooks + class Registration + extend T::Sig + + sig do + params( + hooks: Hooks + ).void + end + def self.init_hooks(hooks) + # example_hook = ExampleHook.new + + # hooks.register_sdk_init_hook example_hook + # hooks.register_before_request_hook example_hook + # hooks.register_after_error_hook example_hook + # hooks.register_after_success_hook example_hook + end + end + end +end diff --git a/lib/open_api_sdk/sdk_hooks/types.rb b/lib/open_api_sdk/sdk_hooks/types.rb new file mode 100644 index 0000000..f2f9710 --- /dev/null +++ b/lib/open_api_sdk/sdk_hooks/types.rb @@ -0,0 +1,152 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'sorbet-runtime' + +module OpenApiSDK + module SDKHooks + class HookContext + extend T::Sig + + sig { returns(String) } + attr_accessor :base_url + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :oauth2_scopes + + sig { returns(String) } + attr_accessor :operation_id + + sig { returns(T.nilable(T.proc.returns(T.untyped))) } + attr_accessor :security_source + + sig do + params( + base_url: String, + oauth2_scopes: T.nilable(T::Array[String]), + operation_id: String, + security_source: T.nilable(T.proc.returns(T.untyped)) + ).void + end + def initialize(base_url:, oauth2_scopes:, operation_id:, security_source:) + @base_url = T.let(base_url, String) + @oauth2_scopes = T.let(oauth2_scopes, T.nilable(T::Array[String])) + @operation_id = T.let(operation_id, String) + @security_source = T.let(security_source, T.nilable(T.proc.returns(T.untyped))) + end + end + + class BeforeRequestHookContext < HookContext + extend T::Sig + + sig do + params( + hook_ctx: HookContext + ).void + end + def initialize(hook_ctx:) + super( + base_url: hook_ctx.base_url, + operation_id: hook_ctx.operation_id, + oauth2_scopes: hook_ctx.oauth2_scopes, + security_source: hook_ctx.security_source + ) + end + end + + class AfterSuccessHookContext < HookContext + extend T::Sig + + sig do + params( + hook_ctx: HookContext + ).void + end + def initialize(hook_ctx:) + super( + base_url: hook_ctx.base_url, + operation_id: hook_ctx.operation_id, + oauth2_scopes: hook_ctx.oauth2_scopes, + security_source: hook_ctx.security_source + ) + end + end + + class AfterErrorHookContext < HookContext + extend T::Sig + + sig do + params( + hook_ctx: HookContext + ).void + end + def initialize(hook_ctx:) + super( + base_url: hook_ctx.base_url, + operation_id: hook_ctx.operation_id, + oauth2_scopes: hook_ctx.oauth2_scopes, + security_source: hook_ctx.security_source + ) + end + end + + module AbstractSDKInitHook + extend T::Sig + extend T::Helpers + abstract! + + sig do + abstract.params( + base_url: String, + client: Faraday::Connection + ).returns([String, Faraday::Connection]) + end + def sdk_init(base_url:, client:); end + end + + module AbstractBeforeRequestHook + extend T::Sig + extend T::Helpers + abstract! + + sig do + abstract.params( + hook_ctx: BeforeRequestHookContext, + request: Faraday::Request + ).returns(Faraday::Request) + end + def before_request(hook_ctx:, request:); end + end + + module AbstractAfterSuccessHook + extend T::Sig + extend T::Helpers + abstract! + + sig do + abstract.params( + hook_ctx: AfterSuccessHookContext, + response: Faraday::Response + ).returns(Faraday::Response) + end + def after_success(hook_ctx:, response:); end + end + + module AbstractAfterErrorHook + extend T::Sig + extend T::Helpers + abstract! + + sig do + abstract.params( + error: T.nilable(StandardError), + hook_ctx: AfterErrorHookContext, + response: T.nilable(Faraday::Response) + ).returns(T.nilable(Faraday::Response)) + end + def after_error(error:, hook_ctx:, response:); end + end + end +end diff --git a/lib/open_api_sdk/sdkconfiguration.rb b/lib/open_api_sdk/sdkconfiguration.rb new file mode 100644 index 0000000..affe957 --- /dev/null +++ b/lib/open_api_sdk/sdkconfiguration.rb @@ -0,0 +1,80 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + + SERVER_PRODUCTION = :production # Production environment + SERVER_SANDBOX = :sandbox # Sandbox environment + SERVERS = { + production: 'https://api.polar.sh', + sandbox: 'https://sandbox-api.polar.sh', + }.freeze + # Contains the list of servers available to the SDK + + class SDKConfiguration + extend T::Sig + include Crystalline::MetadataFields + + + field :client, T.nilable(Faraday::Connection) + field :hooks, ::OpenApiSDK::SDKHooks::Hooks + field :retry_config, T.nilable(::OpenApiSDK::Utils::RetryConfig) + field :timeout, T.nilable(Float) + field :security_source, T.nilable(T.proc.returns(T.nilable(Models::Shared::Security))) + field :server_url, T.nilable(String) + field :server, Symbol + field :language, String + field :openapi_doc_version, String + field :sdk_version, String + field :gen_version, String + field :user_agent, String + + sig do + params( + client: T.nilable(Faraday::Connection), + hooks: ::OpenApiSDK::SDKHooks::Hooks, + retry_config: T.nilable(::OpenApiSDK::Utils::RetryConfig), + timeout_ms: T.nilable(Integer), + access_token: T.nilable(::String), + security_source: T.nilable(T.proc.returns(Models::Shared::Security)), + server_url: T.nilable(String), + server: T.nilable(Symbol) + ).void + end + def initialize(client, hooks, retry_config, timeout_ms, access_token, security_source, server_url, server) + @client = client + @hooks = hooks + @retry_config = retry_config + @server_url = server_url + @timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + @server = server.nil? ? SERVER_PRODUCTION : server + raise StandardError, "Invalid server \"#{server}\"" if !SERVERS.key?(@server) + if !security_source.nil? + @security_source = security_source + elsif !access_token.nil? + @security_source = -> { Models::Shared::Security.new(access_token: access_token) } + end + @language = 'ruby' + @openapi_doc_version = '0.1.0' + @sdk_version = '0.0.1' + @gen_version = '2.595.4' + @user_agent = 'speakeasy-sdk/ruby 0.0.1 2.595.4 0.1.0 polar-sdk' + end + + sig { returns([String, T::Hash[Symbol, String]]) } + def get_server_details + return [@server_url.delete_suffix('/'), {}] if !@server_url.nil? + [SERVERS[@server], {}] + end + end +end diff --git a/lib/open_api_sdk/subscriptions.rb b/lib/open_api_sdk/subscriptions.rb new file mode 100644 index 0000000..457b896 --- /dev/null +++ b/lib/open_api_sdk/subscriptions.rb @@ -0,0 +1,712 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'faraday/retry' +require 'sorbet-runtime' +require_relative 'sdk_hooks/hooks' +require_relative 'utils/retries' + +module OpenApiSDK + extend T::Sig + class Subscriptions + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: Models::Operations::SubscriptionsListRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::SubscriptionsListResponse) } + def list(request:, timeout_ms: nil) + # list - List Subscriptions + # List subscriptions. + # + # **Scopes**: `subscriptions:read` `subscriptions:write` + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/subscriptions/" + headers = {} + query_params = Utils.get_query_params(Models::Operations::SubscriptionsListRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'subscriptions:list', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ListResourceSubscription) + response = Models::Operations::SubscriptionsListResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + list_resource_subscription: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(organization_id: T.nilable(T.any(::String, T::Array[::String])), timeout_ms: T.nilable(Integer)).returns(Models::Operations::SubscriptionsExportResponse) } + def export(organization_id: nil, timeout_ms: nil) + # export - Export Subscriptions + # Export subscriptions as a CSV file. + # + # **Scopes**: `subscriptions:read` `subscriptions:write` + request = Models::Operations::SubscriptionsExportRequest.new( + + organization_id: organization_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/v1/subscriptions/export" + headers = {} + query_params = Utils.get_query_params(Models::Operations::SubscriptionsExportRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'subscriptions:export', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), ::Object) + response = Models::Operations::SubscriptionsExportResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + any: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::SubscriptionsGetResponse) } + def get(id:, timeout_ms: nil) + # get - Get Subscription + # Get a subscription by ID. + # + # **Scopes**: `subscriptions:write` + request = Models::Operations::SubscriptionsGetRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::SubscriptionsGetRequest, + base_url, + '/v1/subscriptions/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'subscriptions:get', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Subscription) + response = Models::Operations::SubscriptionsGetResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + subscription: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(subscription_update: T.any(Models::Shared::SubscriptionUpdateProduct, Models::Shared::SubscriptionCancel, Models::Shared::SubscriptionRevoke), id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::SubscriptionsUpdateResponse) } + def update(subscription_update:, id:, timeout_ms: nil) + # update - Update Subscription + # Update a subscription. + # + # **Scopes**: `subscriptions:write` + request = Models::Operations::SubscriptionsUpdateRequest.new( + + id: id, + subscription_update: subscription_update + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::SubscriptionsUpdateRequest, + base_url, + '/v1/subscriptions/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :subscription_update, :json) + headers['content-type'] = req_content_type + raise StandardError, 'request body is required' if data.nil? && form.nil? + + if form + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + body = URI.encode_www_form(data) + else + body = data + end + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'subscriptions:update', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.patch(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Subscription) + response = Models::Operations::SubscriptionsUpdateResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + subscription: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::AlreadyCanceledSubscription) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + + + sig { params(id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::SubscriptionsRevokeResponse) } + def revoke(id:, timeout_ms: nil) + # revoke - Revoke Subscription + # Revoke a subscription, i.e cancel immediately. + # + # **Scopes**: `subscriptions:write` + request = Models::Operations::SubscriptionsRevokeRequest.new( + + id: id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::SubscriptionsRevokeRequest, + base_url, + '/v1/subscriptions/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + base_url: base_url, + oauth2_scopes: [], + operation_id: 'subscriptions:revoke', + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + + begin + http_response = connection.delete(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise 'no response' + end + end + + content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') + if Utils.match_status_code(http_response.status, ['200']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::Subscription) + response = Models::Operations::SubscriptionsRevokeResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + subscription: obj + ) + + return response + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['403']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::AlreadyCanceledSubscription) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['404']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ResourceNotFound) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['422']) + if Utils.match_content_type(content_type, 'application/json') + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::HTTPValidationError) + throw obj + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' + end + elsif Utils.match_status_code(http_response.status, ['4XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + elsif Utils.match_status_code(http_response.status, ['5XX']) + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred' + else + raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received' + + end + end + end +end diff --git a/lib/open_api_sdk/utils/retries.rb b/lib/open_api_sdk/utils/retries.rb new file mode 100644 index 0000000..3974262 --- /dev/null +++ b/lib/open_api_sdk/utils/retries.rb @@ -0,0 +1,95 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday/retry' +require 'sorbet-runtime' + +module OpenApiSDK + module Utils + class BackoffStrategy + extend T::Sig + + sig { returns(T.nilable(::Float)) } + attr_accessor :exponent + + sig { returns(T.nilable(::Integer)) } + attr_accessor :initial_interval + + sig { returns(T.nilable(::Integer)) } + attr_accessor :max_elapsed_time + + sig { returns(T.nilable(::Integer)) } + attr_accessor :max_interval + + sig do + params( + exponent: T.nilable(::Float), + initial_interval: T.nilable(::Integer), + max_elapsed_time: T.nilable(::Integer), + max_interval: T.nilable(::Integer) + ).void + end + def initialize(exponent: nil, initial_interval: nil, max_elapsed_time: nil, max_interval: nil) + @exponent = T.let(exponent, T.nilable(::Float)) + @initial_interval = T.let(initial_interval, T.nilable(::Integer)) + @max_elapsed_time = T.let(max_elapsed_time, T.nilable(::Integer)) + @max_interval = T.let(max_interval, T.nilable(::Integer)) + end + end + + class RetryConfig + extend T::Sig + + sig { returns(T.nilable(BackoffStrategy)) } + attr_accessor :backoff + + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :retry_connection_errors + + sig { returns(T.nilable(::String)) } + attr_accessor :strategy + + sig do + params( + backoff: T.nilable(BackoffStrategy), + retry_connection_errors: T.nilable(T::Boolean), + strategy: T.nilable(::String) + ).void + end + def initialize(backoff: nil, retry_connection_errors: nil, strategy: nil) + @backoff = T.let(backoff, T.nilable(BackoffStrategy)) + @retry_connection_errors = T.let(retry_connection_errors, T.nilable(T::Boolean)) + @strategy = T.let(strategy, T.nilable(::String)) + end + + sig { params(initial_time: ::Time).returns(::Hash) } + def to_faraday_retry_options(initial_time:) + retry_options = { + # must overwrite default max of 2 retries and it must be positive + max: 1_000_000_000, + # ensure all HTTP methods are retried, especially via retry_if + methods: [], + } + + if @retry_connection_errors + retry_options[:exceptions] = Faraday::Retry::Middleware::DEFAULT_EXCEPTIONS + [Faraday::ConnectionFailed] + end + + if @strategy == 'backoff' && @backoff + retry_options[:backoff_factor] = @backoff.exponent unless @backoff.exponent.nil? + retry_options[:interval] = (@backoff.initial_interval.to_f / 1000) unless @backoff.initial_interval.nil? + retry_options[:max_interval] = @backoff.max_interval unless @backoff.max_interval.nil? + + unless @backoff.max_elapsed_time.nil? + stop_time = initial_time + (@backoff.max_elapsed_time.to_f / 1000) + retry_options[:retry_if] = ->(_env, _exc) { Time.now < stop_time } + end + end + + retry_options + end + end + end +end diff --git a/lib/open_api_sdk/utils/utils.rb b/lib/open_api_sdk/utils/utils.rb new file mode 100644 index 0000000..f94b561 --- /dev/null +++ b/lib/open_api_sdk/utils/utils.rb @@ -0,0 +1,749 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'date' +require 'sorbet-runtime' +require 'base64' + +module OpenApiSDK + module Utils + extend T::Sig + + sig { params(val: Object, primitives: T::Boolean).returns(Object) } + def self.val_to_string(val, primitives: true) + if val.is_a? T::Enum + val.serialize + elsif val.is_a? DateTime + val.strftime('%Y-%m-%dT%H:%M:%S.%NZ') + elsif primitives + val.to_s + else + val + end + end + + sig { params(headers_params: Object, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(T::Hash[Symbol, String]) } + def self.get_headers(headers_params, gbls = nil) + return {} if headers_params.nil? + + headers = {} + param_fields = headers_params.fields + param_fields.each do |f| + metadata = f.metadata[:header] + next if metadata.nil? + + value = _populate_from_globals(f.name, headers_params&.send(f.name), 'header', gbls) + value = _serialize_header(metadata.fetch(:explode, false), value) + headers[metadata.fetch(:field_name, f.name)] = value if !value.empty? + end + headers + end + + sig { params(explode: T::Boolean, obj: Object).returns(String) } + def self._serialize_header(explode, obj) + return '' if obj.nil? + + if obj.respond_to? :fields + items = [] + obj_fields = obj.fields + obj_fields.each do |obj_field| + obj_param_metadata = obj_field.metadata[:header] + next if obj_param_metadata.nil? + + obj_field_name = obj_param_metadata.fetch(:field_name, obj_field.name) + next if obj_field_name == '' + + val = obj.send(obj_field.name) + next if val.nil? + + if explode + items.append("#{obj_field_name}=#{val_to_string(val)}") + else + items.append(obj_field_name) + items.append(val_to_string(val)) + end + end + + items.join(',') if !items.empty? + elsif obj.is_a? Hash + items = [] + obj.each do |key, value| + next if value.nil? + + if explode + items.append("#{key}=#{val_to_string(value)}") + else + items.append(key) + items.append(val_to_string(value)) + end + end + + items.join(',') if !items.empty? + elsif obj.is_a? Array + items = obj.filter { |v| !v.nil? }.map { |v| val_to_string(v) }.join(',') + else + val_to_string(obj) + end + end + + sig do + params(field_name: String, explode: T::Boolean, obj: Object, delimiter: String, + get_field_name_lambda: T.proc.params(obj_field: ::Crystalline::MetadataFields::Field).returns(String)) + .returns(T::Hash[Symbol, T::Array[String]]) + end + def self._populate_form(field_name, explode, obj, delimiter, &get_field_name_lambda) + params = {} + + return params if obj.nil? + + if obj.respond_to? :fields + items = [] + obj_fields = obj.fields + obj_fields.each do |obj_field| + obj_field_name = get_field_name_lambda.call(obj_field) + next if obj_field_name == '' + + val = obj.send(obj_field.name.to_sym) + next if val.nil? + + if explode + params[obj_field_name] = [val_to_string(val)] + else + items.append("#{obj_field_name}#{delimiter}#{val_to_string(val)}") + end + end + + params[field_name] = [items.join(delimiter)] if !items.empty? + elsif obj.is_a? Hash + items = [] + obj.each do |key, value| + next if value.nil? + + if explode + params[key] = val_to_string(value) + else + items.append("#{key}#{delimiter}#{val_to_string(value)}") + end + end + params[field_name] = [items.join(delimiter)] if !items.empty? + + elsif obj.is_a? Array + items = [] + obj.each do |value| + next if value.nil? + + if explode + params[field_name] = [] if !params.key? field_name + + params[field_name].append(val_to_string(value)) + else + items.append(val_to_string(value)) + end + end + params[field_name] = items.map(&:to_s).join(delimiter) if !items.empty? + + else + params[field_name] = val_to_string(obj) + end + params + end + + sig do + params(metadata: T::Hash[Symbol, String], field_name: String, obj: Object) + .returns(T::Hash[Symbol, T::Array[String]]) + end + def self._get_deep_object_query_params(metadata, field_name, obj) + params = {} + + return params if obj.nil? + + if obj.respond_to? :fields + obj_fields = obj.fields + obj_fields.each do |obj_field| + obj_param_metadata = obj_field.metadata[:query_param] + next if obj_param_metadata.nil? + + val = obj.send(obj_field.name) + next if val.nil? + + key = "#{metadata.fetch(:field_name, field_name)}[#{obj_param_metadata.fetch(:field_name, obj_field.name)}]" + if val.is_a? Array + val.each do |v| + next if v.nil? + + params[key] = [] if !params.include? key + + params[key] << val_to_string(v) + end + else + params[key] = [val_to_string(val)] + end + end + elsif obj.is_a? Hash + obj.each do |key, value| + next if value.nil? + + param_key = "#{metadata.fetch(:field_name, field_name)}[#{key}]" + if value.is_a? Array + value.each do |val| + next if val.nil? + + params[param_key] = [] if !params.include? param_key + + params[param_key].append(val_to_string(val)) + end + else + params[param_key] = [val_to_string(value)] + end + end + end + params + end + + sig do + params(metadata: T::Hash[Symbol, String], field_name: String, obj: Object) + .returns(T::Hash[Symbol, T::Array[String]]) + end + def self._get_serialized_params(metadata, field_name, obj) + params = {} + + serialization = metadata.fetch(:serialization, '') + params[metadata.fetch(:field_name, field_name)] = obj.to_json if serialization == 'json' + + params + end + + sig do + params(metadata: T::Hash[Symbol, String], field_name: String, obj: Object, delimiter: String) + .returns(T::Hash[Symbol, T::Array[String]]) + end + def self._get_delimited_query_params(metadata, field_name, obj, delimiter) + get_query_param_field_name = lambda do |obj_field| + obj_param_metadata = obj_field.metadata[:query_param] + + return '' if obj_param_metadata.nil? + + return obj_param_metadata.fetch(:field_name, obj_field.name) + end + + _populate_form(field_name, metadata.fetch(:explode, true), obj, delimiter, &get_query_param_field_name) + end + + sig { params(clazz: Class, query_params: Object, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(T::Hash[Symbol, T::Array[String]]) } + def self.get_query_params(clazz, query_params, gbls = nil) + params = {} + param_fields = clazz.fields + param_fields.each do |f| + request_metadata = f.metadata[:request] + next if !request_metadata.nil? + + metadata = f.metadata[:query_param] + next if metadata.nil? + + param_name = f.name + value = query_params&.send(param_name.to_sym) + value = _populate_from_globals(param_name, value, 'queryParam', gbls) + + f_name = metadata[:field_name] + serialization = metadata.fetch(:serialization, '') + if serialization != '' + params = params.merge _get_serialized_params( + metadata, f_name, value + ) + else + style = metadata.fetch(:style, 'form') + case style + when 'deepObject' + params = params.merge _get_deep_object_query_params( + metadata, f_name, value + ) + when 'form' + params = params.merge _get_delimited_query_params( + metadata, f_name, value, ',' + ) + when 'pipeDelimited' + params = params.merge _get_delimited_query_params( + metadata, f_name, value, '|' + ) + else + raise StandardError, 'not yet implemented' + end + end + end + params + end + + sig { params(clazz: Class, server_url: String, path: String, path_params: Object, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(String) } + def self.generate_url(clazz, server_url, path, path_params, gbls = nil) + clazz.fields.each do |f| + param_metadata = f.metadata[:path_param] + next if param_metadata.nil? + + if param_metadata.fetch(:style, 'simple') == 'simple' + param = path_params.send(f.name) if !path_params.nil? + param = _populate_from_globals(f.name, param, 'pathParam', gbls) + end + + f_name = param_metadata.fetch(:field_name, f.name) + serialization = param_metadata.fetch(:serialization, '') + if serialization != '' + serialized_params = _get_serialized_params(param_metadata, f_name, param) + serialized_params.each do |k, v| + path = path.sub("{#{k}}", v) + end + else + if param.is_a? Array + pp_vals = [] + param.each do |pp_val| + pp_vals.append(pp_val.to_s) + end + path = path.sub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(',')) + elsif param.is_a? Hash + pp_vals = [] + param.each do |pp_key, pp_val| + value = val_to_string(pp_val) + + if param_metadata.fetch(:explode, false) + pp_vals.append("#{pp_key}=#{value}") + else + pp_vals.append("#{pp_key},#{value}") + end + end + path = path.sub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(',')) + elsif !(param.is_a?(String) || param.is_a?(Integer) || + param.is_a?(Float) || param.is_a?(Complex) || param.is_a?(TrueClass) || + param.is_a?(FalseClass)) + pp_vals = [] + attrs = param.fields.filter { |field| field.name && param.respond_to?(field.name.to_sym) }.map(&:name) + attrs.each do |attr| + field = param.field(attr) + + param_value_metadata = field.metadata[:path_param] + + next if param_value_metadata.nil? + + parm_name = param_value_metadata.fetch(:field_name, f.name) + + param_field_val = param.send(attr) + + if param_field_val.is_a? T::Enum + param_field_val = param_field_val.serialize + elsif param_field_val.is_a? DateTime + param_field_val = param_field_val.strftime('%Y-%m-%dT%H:%M:%S.%NZ') + end + if !field.nil? && T::Utils::Nilable.is_union_with_nilclass(field.type) && param_field_val.nil? + next + elsif param_metadata.fetch(:explode, false) + pp_vals.append("#{parm_name}=#{param_field_val}") + else + pp_vals.append("#{parm_name},#{param_field_val}") + end + end + path = path.sub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(',')) + else + path = path.sub("{#{param_metadata.fetch(:field_name, f.name)}}", param.to_s) + end + end + end + + server_url.delete_suffix('/') + path + end + + sig { params(status: Integer).returns(T::Boolean) } + def self.error_status?(status) + status_major = status / 100 + return true if status_major == 4 + return true if status_major == 5 + + false + end + + sig { params(content_type: String, pattern: String).returns(T::Boolean) } + def self.match_content_type(content_type, pattern) + return true if content_type == pattern || ['*', '*/*'].include?(pattern) + + pieces = content_type.split(';') + pieces.each do |piece| + return true if pattern == piece.strip + end + + false + end + + sig { params(status_code: Integer, status_codes: T::Array[String]).returns(T::Boolean) } + def self.match_status_code(status_code, status_codes) + return true if status_codes.include? 'default' + status_code = status_code.to_s + status_codes.each do |code| + return true if code == status_code + return true if code.end_with?('xx') && status_code[0..1] == code[0..1] + end + false + end + + sig { params(req: Faraday::Request, security: Object).void } + def self.configure_request_security(req, security) + return if security.nil? + sec_fields = security.fields + sec_fields.each do |sec_field| + value = security.send(sec_field.name) + next if value.nil? + + metadata = sec_field.metadata[:security] + next if metadata.nil? + + _parse_security_option(req, value) if metadata[:option] + + if metadata[:scheme] + # Special case for basic auth which could be a flattened struct + if metadata[:sub_type] == 'basic' && !value.respond_to?(:fields) + _parse_security_scheme(req, metadata, security) + else + _parse_security_scheme(req, metadata, value) + end + end + end + end + + sig { params(req: Faraday::Request, option: Object).void } + def self._parse_security_option(req, option) + opt_fields = option.fields + opt_fields.each do |opt_field| + metadata = opt_field.metadata[:security] + next if metadata.nil? || !metadata.include?(:scheme) + + _parse_security_scheme(req, metadata, option.send(opt_field.name)) + end + end + + sig { params(req: Faraday::Request, scheme_metadata: T::Hash[Symbol, String], scheme: Object).void } + def self._parse_security_scheme(req, scheme_metadata, scheme) + scheme_type = scheme_metadata[:type] + sub_type = scheme_metadata[:sub_type] + + if scheme.respond_to? :fields + if scheme_type == 'http' && sub_type == 'basic' + _parse_basic_auth_scheme(req, scheme) + return + end + + scheme_fields = scheme.fields + scheme_fields.each do |field| + metadata = field.metadata[:security] + next if metadata.nil? || metadata[:field_name].nil? + + value = scheme.send(field.name) + _parse_security_scheme_value(req, scheme_metadata, metadata, value) + end + else + _parse_security_scheme_value(req, scheme_metadata, scheme_metadata, scheme) + end + end + + sig do + params(req: Faraday::Request, scheme_metadata: T::Hash[Symbol, String], + security_metadata: T::Hash[Symbol, String], value: Object).void + end + def self._parse_security_scheme_value(req, scheme_metadata, security_metadata, value) + scheme_type = scheme_metadata[:type] + sub_type = scheme_metadata[:sub_type] + + header_name = security_metadata[:field_name] + + case scheme_type + when 'apiKey' + case sub_type + when 'header' + req.headers[header_name] = value + when 'query' + req.params[header_name] = value + when 'cookie' + req.cookies[header_name] = value + else + raise StandardError, 'not supported' + end + when 'openIdConnect' + req.headers[header_name] = value.downcase.start_with?('bearer ') ? value : "Bearer #{value}" + when 'oauth2' + req.headers[header_name] = value.downcase.start_with?('bearer ') ? value : "Bearer #{value}" + when 'http' + if sub_type == 'bearer' + req.headers[header_name] = value.downcase.start_with?('bearer ') ? value : "Bearer #{value}" + elsif sub_type != 'custom' + raise StandardError, 'not supported' + end + else + raise StandardError, 'not supported' + end + end + + sig { params(req: Faraday::Request, scheme: Object).void } + def self._parse_basic_auth_scheme(req, scheme) + username, password = '' + + scheme_fields = scheme.fields + scheme_fields.each do |scheme_field| + metadata = scheme_field.metadata[:security] + next if metadata.nil? || !metadata.include?(:field_name) + + field_name = metadata[:field_name] + value = scheme.send(scheme_field.name) + + username = value if field_name == 'username' + password = value if field_name == 'password' + end + + data = "#{username}:#{password}".encode + # Use strict_encode, because encode adds newlines after 60 chars + # https://docs.ruby-lang.org/en/3.0/Base64.html#method-i-encode64 + req.headers['Authorization'] = "Basic #{Base64.strict_encode64(data)}" + end + + sig { params(optional: T::Boolean).returns(T.proc.params(s: String).returns(DateTime)) } + def self.datetime_from_iso_format(optional) + lambda do |s| + return nil if optional && s.nil? + + return DateTime.strptime(s, '%Y-%m-%dT%H:%M:%S.%NZ') + end + end + + sig { params(optional: T::Boolean).returns(T.proc.params(s: String).returns(Date)) } + def self.date_from_iso_format(optional) + lambda do |s| + return nil if optional && s.nil? + + return Date.iso8601(s) + end + end + + sig do + params(enum_type: T.class_of(T::Enum), optional: T::Boolean) + .returns(T.proc.params(s: String).returns(T::Enum)) + end + def self.enum_from_string(enum_type, optional) + lambda do |s| + return nil if optional && s.nil? + + return enum_type.deserialize(s) + end + end + + sig { params(name: String).returns(T.proc.returns(String)) } + def self.field_name(name) + proc { |_, field_name = name| field_name } + end + + SERIALIZATION_METHOD_TO_CONTENT_TYPE = { + 'json': 'application/json', + 'form': 'application/x-www-form-urlencoded', + 'multipart': 'multipart/form-data', + 'raw': 'application/octet-stream', + 'string': 'text/plain' + }.freeze + + sig do + params(request: Object, request_field_name: Symbol, serialization_method: Symbol) + .returns([String, Object, Object]) + end + def self.serialize_request_body(request, request_field_name, serialization_method) + return ['', nil, nil] if request.nil? + + return serialize_content_type(request_field_name, SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], request) if !request.respond_to?(:fields) || !request.respond_to?(request_field_name) + + request_val = request.send(request_field_name) + + request_fields = request.fields + request_metadata = nil + request_fields.each do |f| + if f.name == request_field_name + request_metadata = f.metadata[:request] + break + end + end + raise StandardError, 'invalid request type' if request_metadata.nil? + + serialize_content_type( + :request, request_metadata.fetch(:media_type, 'application/octet-stream'), request_val + ) + end + + sig do + params(field_name: Symbol, media_type: String, request: Object) + .returns([String, Object, T.nilable(T::Array[T::Array[Object]])]) + end + def self.serialize_content_type(field_name, media_type, request) + return media_type, ::Crystalline.to_json(request), nil if media_type.match('(application|text)\/.*?\+*json.*') + return serialize_multipart_form(media_type, request) if media_type.match('multipart\/.*') + return media_type, serialize_form_data(field_name, request), nil if media_type.match('application\/x-www-form-urlencoded.*') + return media_type, request, nil if request.is_a?(String) || request.is_a?(Array) + + raise StandardError, "invalid request body type #{type(request)} for mediaType {metadata['media_type']}" + end + + sig { params(field: ::Crystalline::MetadataFields::Field, data_class: Object).returns(Object) } + def self.parse_field(field, data_class) + field_metadata = field.metadata[:metadata_string] + return nil if field_metadata.nil? + + field_value = data_class.send(field.name) + return nil if field_value.nil? + + field_value + end + + sig { params(media_type: String, request: Object).returns([String, Object, T::Array[T::Array[Object]]]) } + def self.serialize_multipart_form(media_type, request) + form = [] + request_fields = request.fields + request_fields.each do |field| + val = request.send(field.name) + next if val.nil? + + field_metadata = field.metadata[:multipart_form] + next if field_metadata.nil? + + if field_metadata[:file] == true + file_fields = val.fields + + file_name = '' + field_name = field_metadata[:field_name] + content = nil + + file_fields.each do |file_field| + file_metadata = file_field.metadata[:multipart_form] + next if file_metadata.nil? + + if file_metadata[:content] == true + content = val.send(file_field.name) + else + file_name = val.send(file_field.name) + end + end + raise StandardError, 'invalid multipart/form-data file' if file_name == '' || content == nil? + + form.append([field_name, [file_name, content]]) + elsif field_metadata[:json] == true + to_append = [ + field_metadata.fetch(:field_name, field.name), [ + nil, ::Crystalline.to_json(val), 'application/json' + ] + ] + form.append(to_append) + else + field_name = field_metadata.fetch( + :field_name, field.name + ) + if val.is_a? Array + val.each do |value| + next if value.nil? + + form.append( + ["#{field_name}[]", [nil, val_to_string(value)]] + ) + end + else + form.append([field_name, [nil, val_to_string(val)]]) + end + end + end + [media_type, nil, form] + end + + sig do + params(form: T::Array[T::Array[T.any(String, T::Array[T.nilable(String)])]]) + .returns(T::Hash[Symbol, Object]) + end + def self.encode_form(form) + payload = {} + form.each do |field_name, field| + if field.length == 2 + if field[0].nil? + payload[field_name] = field[1] + else + payload[field_name] = Faraday::Multipart::FilePart.new(field[0], '', field[1]) + end + elsif field.length == 3 + payload[field_name] = Faraday::Multipart::ParamPart.new(field[1].to_json, field[2]) + end + end + payload + end + + sig do + params(field_name: Symbol, data: T.any(Object, T::Hash[Symbol, String])) + .returns(T::Hash[Symbol, Object]) + end + def self.serialize_form_data(field_name, data) + get_form_field_name = lambda do |obj_field| + obj_param_metadata = obj_field.metadata[:form] + + return '' if obj_param_metadata.nil? + + return obj_param_metadata.fetch(:field_name, obj_field.name) + end + + form = {} + if data.respond_to? :fields + data.fields.each do |field| + val = data.send(field.name) + next if val.nil? + + metadata = field.metadata[:form] + + next if metadata.nil? + + field_name = metadata.fetch(:field_name, field.name) + + if metadata[:json] + form[field_name] = ::Crystalline.to_json(val) + else + if metadata.fetch(:style, 'form') == 'form' + form = form.merge( + _populate_form( + field_name, metadata.fetch(:explode, true), val, ',', &get_form_field_name + ) + ) + else + raise StandardError, "Invalid form style for field #{field.name}" + end + end + end + elsif data.is_a? Hash + data.each do |key, value| + form[key] = [val_to_string(value)] + end + else + raise StandardError, "Invalid request body type for field #{field_name}" + end + + form + end + + sig { params(url_with_params: String, params: T::Hash[Symbol, String]).returns(String) } + def self.template_url(url_with_params, params) + params.each do |key, value| + if value.respond_to? :serialize + val_str = value.serialize + else + val_str = value + end + url_with_params = url_with_params.gsub("{#{key}}", val_str) + end + + url_with_params + end + + sig { params(param_name: Symbol, value: Object, param_type: String, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(Object) } + def self._populate_from_globals(param_name, value, param_type, gbls) + if value.nil? && !gbls.nil? + global_value = gbls.dig(:parameters, param_type.to_sym, param_name.to_sym) + value = global_value if !global_value.nil? + end + value + end + + end +end diff --git a/lib/polar-sdk.rb b/lib/polar-sdk.rb new file mode 100644 index 0000000..8b99892 --- /dev/null +++ b/lib/polar-sdk.rb @@ -0,0 +1,45 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module OpenApiSDK + autoload :Polar, 'open_api_sdk/polar' + autoload :Organizations, 'open_api_sdk/organizations' + autoload :Subscriptions, 'open_api_sdk/subscriptions' + autoload :Oauth2Clients, 'open_api_sdk/oauth2_clients' + autoload :Oauth2, 'open_api_sdk/oauth2' + autoload :Benefits, 'open_api_sdk/benefits' + autoload :Products, 'open_api_sdk/products' + autoload :Orders, 'open_api_sdk/orders' + autoload :Refunds, 'open_api_sdk/refunds' + autoload :Checkouts, 'open_api_sdk/checkouts' + autoload :Files, 'open_api_sdk/files' + autoload :Metrics, 'open_api_sdk/metrics' + autoload :LicenseKeys, 'open_api_sdk/license_keys' + autoload :CheckoutLinks, 'open_api_sdk/checkout_links' + autoload :CustomFields, 'open_api_sdk/custom_fields' + autoload :Discounts, 'open_api_sdk/discounts' + autoload :Customers, 'open_api_sdk/customers' + autoload :CustomerPortalBenefitGrants, 'open_api_sdk/customer_portal_benefit_grants' + autoload :CustomerPortalCustomers, 'open_api_sdk/customer_portal_customers' + autoload :CustomerPortalCustomerMeters, 'open_api_sdk/customer_portal_customer_meters' + autoload :CustomerPortalDownloadables, 'open_api_sdk/customer_portal_downloadables' + autoload :CustomerPortalLicenseKeys, 'open_api_sdk/customer_portal_license_keys' + autoload :CustomerPortalOrders, 'open_api_sdk/customer_portal_orders' + autoload :CustomerPortalOrganizations, 'open_api_sdk/customer_portal_organizations' + autoload :CustomerPortalSubscriptions, 'open_api_sdk/customer_portal_subscriptions' + autoload :CustomerSessions, 'open_api_sdk/customer_sessions' + autoload :Events, 'open_api_sdk/events' + autoload :Meters, 'open_api_sdk/meters' + autoload :CustomerMeters, 'open_api_sdk/customer_meters' + module Models + autoload :Shared, 'open_api_sdk/models/shared' + autoload :Operations, 'open_api_sdk/models/operations' + autoload :Errors, 'open_api_sdk/models/errors' + end +end + +require_relative 'open_api_sdk/utils/utils' +require_relative 'crystalline' +require_relative 'open_api_sdk/sdkconfiguration' diff --git a/polar-sdk.gemspec b/polar-sdk.gemspec new file mode 100644 index 0000000..2990842 --- /dev/null +++ b/polar-sdk.gemspec @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +$LOAD_PATH.push File.expand_path('lib', __dir__) + +Gem::Specification.new do |s| + s.name = 'polar-sdk' + s.version = '0.0.1' + s.platform = Gem::Platform::RUBY + s.licenses = ['Apache-2.0'] + s.summary = '' + s.description = 'Ruby Client SDK Generated by Speakeasy' + s.authors = ['Polar'] + + s.files = Dir['{lib,test}/**/*'] + s.require_paths = ['lib'] + s.required_ruby_version = '>= 3.2' + + s.add_dependency('base64', '~> 0.2.0') + s.add_dependency('faraday') + s.add_dependency('faraday-multipart') + s.add_dependency('faraday-retry', '~> 2.2.1') + s.add_dependency('rack') + s.add_dependency('rake') + s.add_dependency('sorbet-runtime') + s.add_development_dependency('minitest') + s.add_development_dependency('minitest-focus') + s.add_development_dependency('rubocop', '~> 1.73.2') + s.add_development_dependency('rubocop-minitest', '~> 0.37.1') + s.add_development_dependency('sorbet') + s.add_development_dependency('tapioca', '~> 0.16.11') +end diff --git a/sorbet/config b/sorbet/config new file mode 100644 index 0000000..983d2f1 --- /dev/null +++ b/sorbet/config @@ -0,0 +1,4 @@ +--dir +. +--ignore=tmp/ +--ignore=vendor/ diff --git a/sorbet/rbi/annotations/.gitattributes b/sorbet/rbi/annotations/.gitattributes new file mode 100644 index 0000000..d2eacd2 --- /dev/null +++ b/sorbet/rbi/annotations/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-vendored=true diff --git a/sorbet/rbi/gems/.gitattributes b/sorbet/rbi/gems/.gitattributes new file mode 100644 index 0000000..d9bb82a --- /dev/null +++ b/sorbet/rbi/gems/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/sorbet/tapioca/config.yml b/sorbet/tapioca/config.yml new file mode 100644 index 0000000..886ae58 --- /dev/null +++ b/sorbet/tapioca/config.yml @@ -0,0 +1,13 @@ +gem: + # Add your `gem` command parameters here: + # + # exclude: + # - gem_name + # doc: true + # workers: 5 +dsl: + # Add your `dsl` command parameters here: + # + # exclude: + # - SomeGeneratorName + # workers: 5 diff --git a/sorbet/tapioca/require.rb b/sorbet/tapioca/require.rb new file mode 100644 index 0000000..50000a5 --- /dev/null +++ b/sorbet/tapioca/require.rb @@ -0,0 +1,6 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +# Add your extra requires here (`bin/tapioca require` can be used to bootstrap this list)