Skip to content

Commit 5c408d7

Browse files
Update api spec (#163)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 0de8c35 commit 5c408d7

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

examples_test.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kittycad.go.patch.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,15 +489,15 @@
489489
},
490490
{
491491
"value": {
492-
"example": "// CreateOrgSubscription: Create the subscription for an org.\n// \n// This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.\n// \n// \n// Parameters\n// \n// \t- `body`: A struct of Zoo product subscriptions an organization can request.\n// \n// CreateOrgSubscription: Create the subscription for an org.\n// This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.\n//\n// Parameters\n//\n// - `body`: A struct of Zoo product subscriptions an organization can request.\nfunc ExamplePaymentService_CreateOrgSubscription() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: \"\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
492+
"example": "// CreateOrgSubscription: Create the subscription for an org.\n// \n// This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.\n// \n// \n// Parameters\n// \n// \t- `body`: A struct of Zoo product subscriptions an organization can request.\n// \n// CreateOrgSubscription: Create the subscription for an org.\n// This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.\n//\n// Parameters\n//\n// - `body`: A struct of Zoo product subscriptions an organization can request.\nfunc ExamplePaymentService_CreateOrgSubscription() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: \"\", PayAnnually: true})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
493493
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateOrgSubscription"
494494
},
495495
"op": "add",
496496
"path": "/paths/~1org~1payment~1subscriptions/post/x-go"
497497
},
498498
{
499499
"value": {
500-
"example": "// UpdateOrgSubscription: Update the subscription for an org.\n// \n// This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.\n// \n// \n// Parameters\n// \n// \t- `body`: A struct of Zoo product subscriptions an organization can request.\n// \n// UpdateOrgSubscription: Update the subscription for an org.\n// This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.\n//\n// Parameters\n//\n// - `body`: A struct of Zoo product subscriptions an organization can request.\nfunc ExamplePaymentService_UpdateOrgSubscription() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.UpdateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: \"\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
500+
"example": "// UpdateOrgSubscription: Update the subscription for an org.\n// \n// This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.\n// \n// \n// Parameters\n// \n// \t- `body`: A struct of Zoo product subscriptions an organization can request.\n// \n// UpdateOrgSubscription: Update the subscription for an org.\n// This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.\n//\n// Parameters\n//\n// - `body`: A struct of Zoo product subscriptions an organization can request.\nfunc ExamplePaymentService_UpdateOrgSubscription() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.UpdateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: \"\", PayAnnually: true})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
501501
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateOrgSubscription"
502502
},
503503
"op": "add",
@@ -953,15 +953,15 @@
953953
},
954954
{
955955
"value": {
956-
"example": "// CreateUserSubscription: Create the subscription for a user.\n// \n// This endpoint requires authentication by any Zoo user. It creates the subscription for the user.\n// \n// \n// Parameters\n// \n// \t- `body`: A struct of Zoo product subscriptions a user can request.\n// \n// CreateUserSubscription: Create the subscription for a user.\n// This endpoint requires authentication by any Zoo user. It creates the subscription for the user.\n//\n// Parameters\n//\n// - `body`: A struct of Zoo product subscriptions a user can request.\nfunc ExamplePaymentService_CreateUserSubscription() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: \"\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
956+
"example": "// CreateUserSubscription: Create the subscription for a user.\n// \n// This endpoint requires authentication by any Zoo user. It creates the subscription for the user.\n// \n// \n// Parameters\n// \n// \t- `body`: A struct of Zoo product subscriptions a user can request.\n// \n// CreateUserSubscription: Create the subscription for a user.\n// This endpoint requires authentication by any Zoo user. It creates the subscription for the user.\n//\n// Parameters\n//\n// - `body`: A struct of Zoo product subscriptions a user can request.\nfunc ExamplePaymentService_CreateUserSubscription() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: \"\", PayAnnually: true})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
957957
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateUserSubscription"
958958
},
959959
"op": "add",
960960
"path": "/paths/~1user~1payment~1subscriptions/post/x-go"
961961
},
962962
{
963963
"value": {
964-
"example": "// UpdateUserSubscription: Update the user's subscription.\n// \n// This endpoint requires authentication by any Zoo user. It updates the subscription for the user.\n// \n// \n// Parameters\n// \n// \t- `body`: A struct of Zoo product subscriptions a user can request.\n// \n// UpdateUserSubscription: Update the user's subscription.\n// This endpoint requires authentication by any Zoo user. It updates the subscription for the user.\n//\n// Parameters\n//\n// - `body`: A struct of Zoo product subscriptions a user can request.\nfunc ExamplePaymentService_UpdateUserSubscription() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.UpdateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: \"\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
964+
"example": "// UpdateUserSubscription: Update the user's subscription.\n// \n// This endpoint requires authentication by any Zoo user. It updates the subscription for the user.\n// \n// \n// Parameters\n// \n// \t- `body`: A struct of Zoo product subscriptions a user can request.\n// \n// UpdateUserSubscription: Update the user's subscription.\n// This endpoint requires authentication by any Zoo user. It updates the subscription for the user.\n//\n// Parameters\n//\n// - `body`: A struct of Zoo product subscriptions a user can request.\nfunc ExamplePaymentService_UpdateUserSubscription() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.UpdateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: \"\", PayAnnually: true})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
965965
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateUserSubscription"
966966
},
967967
"op": "add",

spec.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21161,6 +21161,13 @@
2116121161
"description": "A subscription tier we offer for the Modeling App.",
2116221162
"type": "object",
2116321163
"properties": {
21164+
"annual_discount": {
21165+
"nullable": true,
21166+
"description": "Annual discount. The percentage off the monthly price if the user pays annually.",
21167+
"type": "integer",
21168+
"format": "uint",
21169+
"minimum": 0
21170+
},
2116421171
"description": {
2116521172
"description": "A description of the tier.",
2116621173
"type": "string"
@@ -32281,6 +32288,13 @@
3228132288
"description": "A subscription to the modeling app.",
3228232289
"type": "object",
3228332290
"properties": {
32291+
"annual_discount": {
32292+
"nullable": true,
32293+
"description": "Annual discount. The percentage off the monthly price if the user pays annually.",
32294+
"type": "integer",
32295+
"format": "uint",
32296+
"minimum": 0
32297+
},
3228432298
"description": {
3228532299
"description": "A description of the tier.",
3228632300
"type": "string"
@@ -32396,6 +32410,11 @@
3239632410
"$ref": "#/components/schemas/ModelingAppOrganizationSubscriptionTier"
3239732411
}
3239832412
]
32413+
},
32414+
"pay_annually": {
32415+
"nullable": true,
32416+
"description": "If the customer chooses to pay annually or monthly, we can add that here. The annual discount will apply if there is a discount for the subscription.",
32417+
"type": "boolean"
3239932418
}
3240032419
}
3240132420
},
@@ -32411,6 +32430,11 @@
3241132430
"$ref": "#/components/schemas/ModelingAppIndividualSubscriptionTier"
3241232431
}
3241332432
]
32433+
},
32434+
"pay_annually": {
32435+
"nullable": true,
32436+
"description": "If the customer chooses to pay annually or monthly, we can add that here. The annual discount will apply if there is a discount for the subscription.",
32437+
"type": "boolean"
3241432438
}
3241532439
}
3241632440
},

types.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)