Skip to content

Commit 0b27a83

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

File tree

5 files changed

+16
-46
lines changed

5 files changed

+16
-46
lines changed

examples_test.go

Lines changed: 2 additions & 2 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@
689689
},
690690
{
691691
"value": {
692-
"example": "// UpdateBalanceForAnyOrg: Update balance for an org.\n// \n// This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.\n// \n// \n// Parameters\n// \n// \t- `id`: A UUID usually v4 or v7\n// \t- `includeTotalDue`\n// \t- `body`: The data for updating a balance.\n// \n// UpdateBalanceForAnyOrg: Update balance for an org.\n// This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.\n//\n// Parameters\n//\n// - `id`: A UUID usually v4 or v7\n// - `includeTotalDue`\n// - `body`: The data for updating a balance.\nfunc ExamplePaymentService_UpdateBalanceForAnyOrg() {\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.UpdateBalanceForAnyOrg(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"), true, kittycad.UpdatePaymentBalance{MonthlyAPICreditsRemainingMonetaryValue: 123.45, StableAPICreditsRemainingMonetaryValue: 123.45})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
692+
"example": "// UpdateBalanceForAnyOrg: Update balance for an org.\n// \n// This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.\n// \n// \n// Parameters\n// \n// \t- `id`: A UUID usually v4 or v7\n// \t- `includeTotalDue`\n// \t- `body`: Payload for updating a user's balance.\n// \n// UpdateBalanceForAnyOrg: Update balance for an org.\n// This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.\n//\n// Parameters\n//\n// - `id`: A UUID usually v4 or v7\n// - `includeTotalDue`\n// - `body`: Payload for updating a user's balance.\nfunc ExamplePaymentService_UpdateBalanceForAnyOrg() {\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.UpdateBalanceForAnyOrg(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"), true, kittycad.UpdatePaymentBalance{MonthlyAPICreditsRemainingMonetaryValue: 123.45, StableAPICreditsRemainingMonetaryValue: 123.45})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
693693
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateBalanceForAnyOrg"
694694
},
695695
"op": "add",
@@ -1185,7 +1185,7 @@
11851185
},
11861186
{
11871187
"value": {
1188-
"example": "// UpdateBalanceForAnyUser: Update balance for an user.\n// \n// This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.\n// \n// \n// Parameters\n// \n// \t- `id`\n// \t- `includeTotalDue`\n// \t- `body`: The data for updating a balance.\n// \n// UpdateBalanceForAnyUser: Update balance for an user.\n// This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.\n//\n// Parameters\n//\n// - `id`\n// - `includeTotalDue`\n// - `body`: The data for updating a balance.\nfunc ExamplePaymentService_UpdateBalanceForAnyUser() {\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.UpdateBalanceForAnyUser(\"some-string\", true, kittycad.UpdatePaymentBalance{MonthlyAPICreditsRemainingMonetaryValue: 123.45, StableAPICreditsRemainingMonetaryValue: 123.45})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
1188+
"example": "// UpdateBalanceForAnyUser: Update balance for an user.\n// \n// This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.\n// \n// \n// Parameters\n// \n// \t- `id`\n// \t- `includeTotalDue`\n// \t- `body`: Payload for updating a user's balance.\n// \n// UpdateBalanceForAnyUser: Update balance for an user.\n// This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.\n//\n// Parameters\n//\n// - `id`\n// - `includeTotalDue`\n// - `body`: Payload for updating a user's balance.\nfunc ExamplePaymentService_UpdateBalanceForAnyUser() {\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.UpdateBalanceForAnyUser(\"some-string\", true, kittycad.UpdatePaymentBalance{MonthlyAPICreditsRemainingMonetaryValue: 123.45, StableAPICreditsRemainingMonetaryValue: 123.45})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
11891189
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateBalanceForAnyUser"
11901190
},
11911191
"op": "add",

paths.go

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

spec.json

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24791,22 +24791,6 @@
2479124791
"type": "string",
2479224792
"format": "date-time"
2479324793
},
24794-
"id": {
24795-
"description": "The unique identifier for the balance.",
24796-
"allOf": [
24797-
{
24798-
"$ref": "#/components/schemas/Uuid"
24799-
}
24800-
]
24801-
},
24802-
"map_id": {
24803-
"description": "The mapping id of the user or org.",
24804-
"allOf": [
24805-
{
24806-
"$ref": "#/components/schemas/Uuid"
24807-
}
24808-
]
24809-
},
2481024794
"modeling_app_enterprise_price": {
2481124795
"nullable": true,
2481224796
"description": "The enterprise price for the Modeling App subscription, if they are on the enterprise plan.",
@@ -24817,26 +24801,26 @@
2481724801
]
2481824802
},
2481924803
"monthly_api_credits_remaining": {
24820-
"description": "The number of monthly API credits remaining in the balance. This is the number of credits remaining in the balance.\n\nBoth the monetary value and the number of credits are returned, but they reflect the same value in the database.",
24804+
"description": "The number of monthly API credits remaining in the balance.",
2482124805
"type": "integer",
2482224806
"format": "uint64",
2482324807
"minimum": 0
2482424808
},
2482524809
"monthly_api_credits_remaining_monetary_value": {
2482624810
"title": "double",
24827-
"description": "The monetary value of the monthly API credits remaining in the balance. This gets re-upped every month, but if the credits are not used for a month they do not carry over to the next month.\n\nBoth the monetary value and the number of credits are returned, but they reflect the same value in the database.",
24811+
"description": "The monetary value of the monthly API credits remaining in the balance.",
2482824812
"type": "number",
2482924813
"format": "money-usd"
2483024814
},
2483124815
"stable_api_credits_remaining": {
24832-
"description": "The number of stable API credits remaining in the balance. These do not get reset or re-upped every month. This is separate from the monthly credits. Credits will first pull from the monthly credits, then the stable credits. Stable just means that they do not get reset every month. A user will have stable credits if a Zoo employee granted them credits.\n\nBoth the monetary value and the number of credits are returned, but they reflect the same value in the database.",
24816+
"description": "The number of stable API credits remaining in the balance.",
2483324817
"type": "integer",
2483424818
"format": "uint64",
2483524819
"minimum": 0
2483624820
},
2483724821
"stable_api_credits_remaining_monetary_value": {
2483824822
"title": "double",
24839-
"description": "The monetary value of stable API credits remaining in the balance. These do not get reset or re-upped every month. This is separate from the monthly credits. Credits will first pull from the monthly credits, then the stable credits. Stable just means that they do not get reset every month. A user will have stable credits if a Zoo employee granted them credits.\n\nBoth the monetary value and the number of credits are returned, but they reflect the same value in the database.",
24823+
"description": "The monetary value of stable API credits remaining in the balance.",
2484024824
"type": "number",
2484124825
"format": "money-usd"
2484224826
},
@@ -24870,8 +24854,6 @@
2487024854
},
2487124855
"required": [
2487224856
"created_at",
24873-
"id",
24874-
"map_id",
2487524857
"monthly_api_credits_remaining",
2487624858
"monthly_api_credits_remaining_monetary_value",
2487724859
"stable_api_credits_remaining",
@@ -42968,7 +42950,7 @@
4296842950
]
4296942951
},
4297042952
"UpdatePaymentBalance": {
42971-
"description": "The data for updating a balance.",
42953+
"description": "Payload for updating a user's balance.",
4297242954
"type": "object",
4297342955
"properties": {
4297442956
"monthly_api_credits_remaining_monetary_value": {

types.go

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

0 commit comments

Comments
 (0)