Skip to content

Commit 2fd4d31

Browse files
Update api spec (#432)
* 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 04efe52 commit 2fd4d31

10 files changed

+584
-421
lines changed

kittycad.py.patch.json

Lines changed: 412 additions & 412 deletions
Large diffs are not rendered by default.

kittycad/api/payments/get_payment_balance_for_any_org.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111

1212
def _get_kwargs(
13+
include_total_due: bool,
1314
id: Uuid,
1415
*,
1516
client: Client,
@@ -19,6 +20,12 @@ def _get_kwargs(
1920
id=id,
2021
) # noqa: E501
2122

23+
if include_total_due is not None:
24+
if "?" in url:
25+
url = url + "&include_total_due=" + str(include_total_due).lower()
26+
else:
27+
url = url + "?include_total_due=" + str(include_total_due).lower()
28+
2229
headers: Dict[str, Any] = client.get_headers()
2330
cookies: Dict[str, Any] = client.get_cookies()
2431

@@ -57,11 +64,13 @@ def _build_response(
5764

5865

5966
def sync_detailed(
67+
include_total_due: bool,
6068
id: Uuid,
6169
*,
6270
client: Client,
6371
) -> Response[Optional[Union[CustomerBalance, Error]]]:
6472
kwargs = _get_kwargs(
73+
include_total_due=include_total_due,
6574
id=id,
6675
client=client,
6776
)
@@ -75,24 +84,28 @@ def sync_detailed(
7584

7685

7786
def sync(
87+
include_total_due: bool,
7888
id: Uuid,
7989
*,
8090
client: Client,
8191
) -> Optional[Union[CustomerBalance, Error]]:
8292
"""This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.""" # noqa: E501
8393

8494
return sync_detailed(
95+
include_total_due=include_total_due,
8596
id=id,
8697
client=client,
8798
).parsed
8899

89100

90101
async def asyncio_detailed(
102+
include_total_due: bool,
91103
id: Uuid,
92104
*,
93105
client: Client,
94106
) -> Response[Optional[Union[CustomerBalance, Error]]]:
95107
kwargs = _get_kwargs(
108+
include_total_due=include_total_due,
96109
id=id,
97110
client=client,
98111
)
@@ -104,6 +117,7 @@ async def asyncio_detailed(
104117

105118

106119
async def asyncio(
120+
include_total_due: bool,
107121
id: Uuid,
108122
*,
109123
client: Client,
@@ -112,6 +126,7 @@ async def asyncio(
112126

113127
return (
114128
await asyncio_detailed(
129+
include_total_due=include_total_due,
115130
id=id,
116131
client=client,
117132
)

kittycad/api/payments/get_payment_balance_for_any_user.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
def _get_kwargs(
1313
id: UserIdentifier,
14+
include_total_due: bool,
1415
*,
1516
client: Client,
1617
) -> Dict[str, Any]:
@@ -19,6 +20,12 @@ def _get_kwargs(
1920
id=id,
2021
) # noqa: E501
2122

23+
if include_total_due is not None:
24+
if "?" in url:
25+
url = url + "&include_total_due=" + str(include_total_due).lower()
26+
else:
27+
url = url + "?include_total_due=" + str(include_total_due).lower()
28+
2229
headers: Dict[str, Any] = client.get_headers()
2330
cookies: Dict[str, Any] = client.get_cookies()
2431

@@ -58,11 +65,13 @@ def _build_response(
5865

5966
def sync_detailed(
6067
id: UserIdentifier,
68+
include_total_due: bool,
6169
*,
6270
client: Client,
6371
) -> Response[Optional[Union[CustomerBalance, Error]]]:
6472
kwargs = _get_kwargs(
6573
id=id,
74+
include_total_due=include_total_due,
6675
client=client,
6776
)
6877

@@ -76,24 +85,28 @@ def sync_detailed(
7685

7786
def sync(
7887
id: UserIdentifier,
88+
include_total_due: bool,
7989
*,
8090
client: Client,
8191
) -> Optional[Union[CustomerBalance, Error]]:
8292
"""This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified user.""" # noqa: E501
8393

8494
return sync_detailed(
8595
id=id,
96+
include_total_due=include_total_due,
8697
client=client,
8798
).parsed
8899

89100

90101
async def asyncio_detailed(
91102
id: UserIdentifier,
103+
include_total_due: bool,
92104
*,
93105
client: Client,
94106
) -> Response[Optional[Union[CustomerBalance, Error]]]:
95107
kwargs = _get_kwargs(
96108
id=id,
109+
include_total_due=include_total_due,
97110
client=client,
98111
)
99112

@@ -105,6 +118,7 @@ async def asyncio_detailed(
105118

106119
async def asyncio(
107120
id: UserIdentifier,
121+
include_total_due: bool,
108122
*,
109123
client: Client,
110124
) -> Optional[Union[CustomerBalance, Error]]:
@@ -113,6 +127,7 @@ async def asyncio(
113127
return (
114128
await asyncio_detailed(
115129
id=id,
130+
include_total_due=include_total_due,
116131
client=client,
117132
)
118133
).parsed

kittycad/api/payments/get_payment_balance_for_org.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99

1010

1111
def _get_kwargs(
12+
include_total_due: bool,
1213
*,
1314
client: Client,
1415
) -> Dict[str, Any]:
1516
url = "{}/org/payment/balance".format(
1617
client.base_url,
1718
) # noqa: E501
1819

20+
if include_total_due is not None:
21+
if "?" in url:
22+
url = url + "&include_total_due=" + str(include_total_due).lower()
23+
else:
24+
url = url + "?include_total_due=" + str(include_total_due).lower()
25+
1926
headers: Dict[str, Any] = client.get_headers()
2027
cookies: Dict[str, Any] = client.get_cookies()
2128

@@ -54,10 +61,12 @@ def _build_response(
5461

5562

5663
def sync_detailed(
64+
include_total_due: bool,
5765
*,
5866
client: Client,
5967
) -> Response[Optional[Union[CustomerBalance, Error]]]:
6068
kwargs = _get_kwargs(
69+
include_total_due=include_total_due,
6170
client=client,
6271
)
6372

@@ -70,21 +79,25 @@ def sync_detailed(
7079

7180

7281
def sync(
82+
include_total_due: bool,
7383
*,
7484
client: Client,
7585
) -> Optional[Union[CustomerBalance, Error]]:
7686
"""This endpoint requires authentication by an org admin. It gets the balance information for the authenticated user's org.""" # noqa: E501
7787

7888
return sync_detailed(
89+
include_total_due=include_total_due,
7990
client=client,
8091
).parsed
8192

8293

8394
async def asyncio_detailed(
95+
include_total_due: bool,
8496
*,
8597
client: Client,
8698
) -> Response[Optional[Union[CustomerBalance, Error]]]:
8799
kwargs = _get_kwargs(
100+
include_total_due=include_total_due,
88101
client=client,
89102
)
90103

@@ -95,13 +108,15 @@ async def asyncio_detailed(
95108

96109

97110
async def asyncio(
111+
include_total_due: bool,
98112
*,
99113
client: Client,
100114
) -> Optional[Union[CustomerBalance, Error]]:
101115
"""This endpoint requires authentication by an org admin. It gets the balance information for the authenticated user's org.""" # noqa: E501
102116

103117
return (
104118
await asyncio_detailed(
119+
include_total_due=include_total_due,
105120
client=client,
106121
)
107122
).parsed

kittycad/api/payments/get_payment_balance_for_user.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99

1010

1111
def _get_kwargs(
12+
include_total_due: bool,
1213
*,
1314
client: Client,
1415
) -> Dict[str, Any]:
1516
url = "{}/user/payment/balance".format(
1617
client.base_url,
1718
) # noqa: E501
1819

20+
if include_total_due is not None:
21+
if "?" in url:
22+
url = url + "&include_total_due=" + str(include_total_due).lower()
23+
else:
24+
url = url + "?include_total_due=" + str(include_total_due).lower()
25+
1926
headers: Dict[str, Any] = client.get_headers()
2027
cookies: Dict[str, Any] = client.get_cookies()
2128

@@ -54,10 +61,12 @@ def _build_response(
5461

5562

5663
def sync_detailed(
64+
include_total_due: bool,
5765
*,
5866
client: Client,
5967
) -> Response[Optional[Union[CustomerBalance, Error]]]:
6068
kwargs = _get_kwargs(
69+
include_total_due=include_total_due,
6170
client=client,
6271
)
6372

@@ -70,21 +79,25 @@ def sync_detailed(
7079

7180

7281
def sync(
82+
include_total_due: bool,
7383
*,
7484
client: Client,
7585
) -> Optional[Union[CustomerBalance, Error]]:
7686
"""This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.""" # noqa: E501
7787

7888
return sync_detailed(
89+
include_total_due=include_total_due,
7990
client=client,
8091
).parsed
8192

8293

8394
async def asyncio_detailed(
95+
include_total_due: bool,
8496
*,
8597
client: Client,
8698
) -> Response[Optional[Union[CustomerBalance, Error]]]:
8799
kwargs = _get_kwargs(
100+
include_total_due=include_total_due,
88101
client=client,
89102
)
90103

@@ -95,13 +108,15 @@ async def asyncio_detailed(
95108

96109

97110
async def asyncio(
111+
include_total_due: bool,
98112
*,
99113
client: Client,
100114
) -> Optional[Union[CustomerBalance, Error]]:
101115
"""This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.""" # noqa: E501
102116

103117
return (
104118
await asyncio_detailed(
119+
include_total_due=include_total_due,
105120
client=client,
106121
)
107122
).parsed

kittycad/api/payments/update_payment_balance_for_any_org.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
def _get_kwargs(
1414
id: Uuid,
15+
include_total_due: bool,
1516
body: UpdatePaymentBalance,
1617
*,
1718
client: Client,
@@ -21,6 +22,12 @@ def _get_kwargs(
2122
id=id,
2223
) # noqa: E501
2324

25+
if include_total_due is not None:
26+
if "?" in url:
27+
url = url + "&include_total_due=" + str(include_total_due).lower()
28+
else:
29+
url = url + "?include_total_due=" + str(include_total_due).lower()
30+
2431
headers: Dict[str, Any] = client.get_headers()
2532
cookies: Dict[str, Any] = client.get_cookies()
2633

@@ -61,12 +68,14 @@ def _build_response(
6168

6269
def sync_detailed(
6370
id: Uuid,
71+
include_total_due: bool,
6472
body: UpdatePaymentBalance,
6573
*,
6674
client: Client,
6775
) -> Response[Optional[Union[CustomerBalance, Error]]]:
6876
kwargs = _get_kwargs(
6977
id=id,
78+
include_total_due=include_total_due,
7079
body=body,
7180
client=client,
7281
)
@@ -81,6 +90,7 @@ def sync_detailed(
8190

8291
def sync(
8392
id: Uuid,
93+
include_total_due: bool,
8494
body: UpdatePaymentBalance,
8595
*,
8696
client: Client,
@@ -89,19 +99,22 @@ def sync(
8999

90100
return sync_detailed(
91101
id=id,
102+
include_total_due=include_total_due,
92103
body=body,
93104
client=client,
94105
).parsed
95106

96107

97108
async def asyncio_detailed(
98109
id: Uuid,
110+
include_total_due: bool,
99111
body: UpdatePaymentBalance,
100112
*,
101113
client: Client,
102114
) -> Response[Optional[Union[CustomerBalance, Error]]]:
103115
kwargs = _get_kwargs(
104116
id=id,
117+
include_total_due=include_total_due,
105118
body=body,
106119
client=client,
107120
)
@@ -114,6 +127,7 @@ async def asyncio_detailed(
114127

115128
async def asyncio(
116129
id: Uuid,
130+
include_total_due: bool,
117131
body: UpdatePaymentBalance,
118132
*,
119133
client: Client,
@@ -123,6 +137,7 @@ async def asyncio(
123137
return (
124138
await asyncio_detailed(
125139
id=id,
140+
include_total_due=include_total_due,
126141
body=body,
127142
client=client,
128143
)

0 commit comments

Comments
 (0)