payi 0.1.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of payi might be problematic. Click here for more details.
- payi/__init__.py +83 -0
- payi/_base_client.py +2006 -0
- payi/_client.py +414 -0
- payi/_compat.py +222 -0
- payi/_constants.py +14 -0
- payi/_exceptions.py +108 -0
- payi/_files.py +127 -0
- payi/_models.py +739 -0
- payi/_qs.py +150 -0
- payi/_resource.py +43 -0
- payi/_response.py +820 -0
- payi/_streaming.py +333 -0
- payi/_types.py +220 -0
- payi/_utils/__init__.py +52 -0
- payi/_utils/_logs.py +25 -0
- payi/_utils/_proxy.py +63 -0
- payi/_utils/_reflection.py +8 -0
- payi/_utils/_streams.py +12 -0
- payi/_utils/_sync.py +81 -0
- payi/_utils/_transform.py +382 -0
- payi/_utils/_typing.py +120 -0
- payi/_utils/_utils.py +402 -0
- payi/_version.py +4 -0
- payi/lib/.keep +4 -0
- payi/py.typed +0 -0
- payi/resources/__init__.py +33 -0
- payi/resources/budgets/__init__.py +33 -0
- payi/resources/budgets/budgets.py +717 -0
- payi/resources/budgets/tags.py +529 -0
- payi/resources/ingest_requests.py +187 -0
- payi/types/__init__.py +13 -0
- payi/types/budget_create_params.py +26 -0
- payi/types/budget_history_response.py +110 -0
- payi/types/budget_list_params.py +25 -0
- payi/types/budget_response.py +98 -0
- payi/types/budget_update_params.py +17 -0
- payi/types/budgets/__init__.py +13 -0
- payi/types/budgets/budget_tags_response.py +18 -0
- payi/types/budgets/tag_create_params.py +16 -0
- payi/types/budgets/tag_create_response.py +9 -0
- payi/types/budgets/tag_delete_response.py +9 -0
- payi/types/budgets/tag_list_response.py +9 -0
- payi/types/budgets/tag_remove_params.py +16 -0
- payi/types/budgets/tag_remove_response.py +9 -0
- payi/types/budgets/tag_update_params.py +16 -0
- payi/types/budgets/tag_update_response.py +9 -0
- payi/types/default_response.py +13 -0
- payi/types/ingest_request_create_params.py +27 -0
- payi/types/paged_budget_list.py +110 -0
- payi/types/successful_proxy_result.py +43 -0
- payi-0.1.0a1.dist-info/METADATA +355 -0
- payi-0.1.0a1.dist-info/RECORD +54 -0
- payi-0.1.0a1.dist-info/WHEEL +4 -0
- payi-0.1.0a1.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
10
|
+
from ..._utils import (
|
|
11
|
+
maybe_transform,
|
|
12
|
+
strip_not_given,
|
|
13
|
+
async_maybe_transform,
|
|
14
|
+
)
|
|
15
|
+
from ..._compat import cached_property
|
|
16
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
17
|
+
from ..._response import (
|
|
18
|
+
to_raw_response_wrapper,
|
|
19
|
+
to_streamed_response_wrapper,
|
|
20
|
+
async_to_raw_response_wrapper,
|
|
21
|
+
async_to_streamed_response_wrapper,
|
|
22
|
+
)
|
|
23
|
+
from ..._base_client import (
|
|
24
|
+
make_request_options,
|
|
25
|
+
)
|
|
26
|
+
from ...types.budgets import tag_create_params, tag_remove_params, tag_update_params
|
|
27
|
+
from ...types.budgets.tag_list_response import TagListResponse
|
|
28
|
+
from ...types.budgets.tag_create_response import TagCreateResponse
|
|
29
|
+
from ...types.budgets.tag_delete_response import TagDeleteResponse
|
|
30
|
+
from ...types.budgets.tag_remove_response import TagRemoveResponse
|
|
31
|
+
from ...types.budgets.tag_update_response import TagUpdateResponse
|
|
32
|
+
|
|
33
|
+
__all__ = ["TagsResource", "AsyncTagsResource"]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class TagsResource(SyncAPIResource):
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_raw_response(self) -> TagsResourceWithRawResponse:
|
|
39
|
+
return TagsResourceWithRawResponse(self)
|
|
40
|
+
|
|
41
|
+
@cached_property
|
|
42
|
+
def with_streaming_response(self) -> TagsResourceWithStreamingResponse:
|
|
43
|
+
return TagsResourceWithStreamingResponse(self)
|
|
44
|
+
|
|
45
|
+
def create(
|
|
46
|
+
self,
|
|
47
|
+
budget_id: str,
|
|
48
|
+
*,
|
|
49
|
+
budget_tags: List[str],
|
|
50
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
51
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
52
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
53
|
+
extra_headers: Headers | None = None,
|
|
54
|
+
extra_query: Query | None = None,
|
|
55
|
+
extra_body: Body | None = None,
|
|
56
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
57
|
+
) -> TagCreateResponse:
|
|
58
|
+
"""
|
|
59
|
+
Add Tags to a Budget
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
extra_headers: Send extra headers
|
|
63
|
+
|
|
64
|
+
extra_query: Add additional query parameters to the request
|
|
65
|
+
|
|
66
|
+
extra_body: Add additional JSON properties to the request
|
|
67
|
+
|
|
68
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
69
|
+
"""
|
|
70
|
+
if not budget_id:
|
|
71
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
72
|
+
extra_headers = {
|
|
73
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
74
|
+
**(extra_headers or {}),
|
|
75
|
+
}
|
|
76
|
+
return self._post(
|
|
77
|
+
f"/api/v1/budgets/{budget_id}/tags",
|
|
78
|
+
body=maybe_transform({"budget_tags": budget_tags}, tag_create_params.TagCreateParams),
|
|
79
|
+
options=make_request_options(
|
|
80
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
81
|
+
),
|
|
82
|
+
cast_to=TagCreateResponse,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
def update(
|
|
86
|
+
self,
|
|
87
|
+
budget_id: str,
|
|
88
|
+
*,
|
|
89
|
+
budget_tags: List[str],
|
|
90
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
91
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
92
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
93
|
+
extra_headers: Headers | None = None,
|
|
94
|
+
extra_query: Query | None = None,
|
|
95
|
+
extra_body: Body | None = None,
|
|
96
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
97
|
+
) -> TagUpdateResponse:
|
|
98
|
+
"""
|
|
99
|
+
Update the Budget's Tags
|
|
100
|
+
|
|
101
|
+
Args:
|
|
102
|
+
extra_headers: Send extra headers
|
|
103
|
+
|
|
104
|
+
extra_query: Add additional query parameters to the request
|
|
105
|
+
|
|
106
|
+
extra_body: Add additional JSON properties to the request
|
|
107
|
+
|
|
108
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
109
|
+
"""
|
|
110
|
+
if not budget_id:
|
|
111
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
112
|
+
extra_headers = {
|
|
113
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
114
|
+
**(extra_headers or {}),
|
|
115
|
+
}
|
|
116
|
+
return self._put(
|
|
117
|
+
f"/api/v1/budgets/{budget_id}/tags",
|
|
118
|
+
body=maybe_transform({"budget_tags": budget_tags}, tag_update_params.TagUpdateParams),
|
|
119
|
+
options=make_request_options(
|
|
120
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
121
|
+
),
|
|
122
|
+
cast_to=TagUpdateResponse,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
def list(
|
|
126
|
+
self,
|
|
127
|
+
budget_id: str,
|
|
128
|
+
*,
|
|
129
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
130
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
131
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
132
|
+
extra_headers: Headers | None = None,
|
|
133
|
+
extra_query: Query | None = None,
|
|
134
|
+
extra_body: Body | None = None,
|
|
135
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
136
|
+
) -> TagListResponse:
|
|
137
|
+
"""
|
|
138
|
+
Get a Budget's Tags
|
|
139
|
+
|
|
140
|
+
Args:
|
|
141
|
+
extra_headers: Send extra headers
|
|
142
|
+
|
|
143
|
+
extra_query: Add additional query parameters to the request
|
|
144
|
+
|
|
145
|
+
extra_body: Add additional JSON properties to the request
|
|
146
|
+
|
|
147
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
148
|
+
"""
|
|
149
|
+
if not budget_id:
|
|
150
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
151
|
+
extra_headers = {
|
|
152
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
153
|
+
**(extra_headers or {}),
|
|
154
|
+
}
|
|
155
|
+
return self._get(
|
|
156
|
+
f"/api/v1/budgets/{budget_id}/tags",
|
|
157
|
+
options=make_request_options(
|
|
158
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
159
|
+
),
|
|
160
|
+
cast_to=TagListResponse,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
def delete(
|
|
164
|
+
self,
|
|
165
|
+
budget_id: str,
|
|
166
|
+
*,
|
|
167
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
168
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
169
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
170
|
+
extra_headers: Headers | None = None,
|
|
171
|
+
extra_query: Query | None = None,
|
|
172
|
+
extra_body: Body | None = None,
|
|
173
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
174
|
+
) -> TagDeleteResponse:
|
|
175
|
+
"""
|
|
176
|
+
Delete the Budget's Tags
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
extra_headers: Send extra headers
|
|
180
|
+
|
|
181
|
+
extra_query: Add additional query parameters to the request
|
|
182
|
+
|
|
183
|
+
extra_body: Add additional JSON properties to the request
|
|
184
|
+
|
|
185
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
186
|
+
"""
|
|
187
|
+
if not budget_id:
|
|
188
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
189
|
+
extra_headers = {
|
|
190
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
191
|
+
**(extra_headers or {}),
|
|
192
|
+
}
|
|
193
|
+
return self._delete(
|
|
194
|
+
f"/api/v1/budgets/{budget_id}/tags",
|
|
195
|
+
options=make_request_options(
|
|
196
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
197
|
+
),
|
|
198
|
+
cast_to=TagDeleteResponse,
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
def remove(
|
|
202
|
+
self,
|
|
203
|
+
budget_id: str,
|
|
204
|
+
*,
|
|
205
|
+
budget_tags: List[str],
|
|
206
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
207
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
208
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
209
|
+
extra_headers: Headers | None = None,
|
|
210
|
+
extra_query: Query | None = None,
|
|
211
|
+
extra_body: Body | None = None,
|
|
212
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
213
|
+
) -> TagRemoveResponse:
|
|
214
|
+
"""
|
|
215
|
+
Remove Tags from the Budget
|
|
216
|
+
|
|
217
|
+
Args:
|
|
218
|
+
extra_headers: Send extra headers
|
|
219
|
+
|
|
220
|
+
extra_query: Add additional query parameters to the request
|
|
221
|
+
|
|
222
|
+
extra_body: Add additional JSON properties to the request
|
|
223
|
+
|
|
224
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
225
|
+
"""
|
|
226
|
+
if not budget_id:
|
|
227
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
228
|
+
extra_headers = {
|
|
229
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
230
|
+
**(extra_headers or {}),
|
|
231
|
+
}
|
|
232
|
+
return self._patch(
|
|
233
|
+
f"/api/v1/budgets/{budget_id}/tags/remove",
|
|
234
|
+
body=maybe_transform({"budget_tags": budget_tags}, tag_remove_params.TagRemoveParams),
|
|
235
|
+
options=make_request_options(
|
|
236
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
237
|
+
),
|
|
238
|
+
cast_to=TagRemoveResponse,
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class AsyncTagsResource(AsyncAPIResource):
|
|
243
|
+
@cached_property
|
|
244
|
+
def with_raw_response(self) -> AsyncTagsResourceWithRawResponse:
|
|
245
|
+
return AsyncTagsResourceWithRawResponse(self)
|
|
246
|
+
|
|
247
|
+
@cached_property
|
|
248
|
+
def with_streaming_response(self) -> AsyncTagsResourceWithStreamingResponse:
|
|
249
|
+
return AsyncTagsResourceWithStreamingResponse(self)
|
|
250
|
+
|
|
251
|
+
async def create(
|
|
252
|
+
self,
|
|
253
|
+
budget_id: str,
|
|
254
|
+
*,
|
|
255
|
+
budget_tags: List[str],
|
|
256
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
257
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
258
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
259
|
+
extra_headers: Headers | None = None,
|
|
260
|
+
extra_query: Query | None = None,
|
|
261
|
+
extra_body: Body | None = None,
|
|
262
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
263
|
+
) -> TagCreateResponse:
|
|
264
|
+
"""
|
|
265
|
+
Add Tags to a Budget
|
|
266
|
+
|
|
267
|
+
Args:
|
|
268
|
+
extra_headers: Send extra headers
|
|
269
|
+
|
|
270
|
+
extra_query: Add additional query parameters to the request
|
|
271
|
+
|
|
272
|
+
extra_body: Add additional JSON properties to the request
|
|
273
|
+
|
|
274
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
275
|
+
"""
|
|
276
|
+
if not budget_id:
|
|
277
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
278
|
+
extra_headers = {
|
|
279
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
280
|
+
**(extra_headers or {}),
|
|
281
|
+
}
|
|
282
|
+
return await self._post(
|
|
283
|
+
f"/api/v1/budgets/{budget_id}/tags",
|
|
284
|
+
body=await async_maybe_transform({"budget_tags": budget_tags}, tag_create_params.TagCreateParams),
|
|
285
|
+
options=make_request_options(
|
|
286
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
287
|
+
),
|
|
288
|
+
cast_to=TagCreateResponse,
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
async def update(
|
|
292
|
+
self,
|
|
293
|
+
budget_id: str,
|
|
294
|
+
*,
|
|
295
|
+
budget_tags: List[str],
|
|
296
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
297
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
298
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
299
|
+
extra_headers: Headers | None = None,
|
|
300
|
+
extra_query: Query | None = None,
|
|
301
|
+
extra_body: Body | None = None,
|
|
302
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
303
|
+
) -> TagUpdateResponse:
|
|
304
|
+
"""
|
|
305
|
+
Update the Budget's Tags
|
|
306
|
+
|
|
307
|
+
Args:
|
|
308
|
+
extra_headers: Send extra headers
|
|
309
|
+
|
|
310
|
+
extra_query: Add additional query parameters to the request
|
|
311
|
+
|
|
312
|
+
extra_body: Add additional JSON properties to the request
|
|
313
|
+
|
|
314
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
315
|
+
"""
|
|
316
|
+
if not budget_id:
|
|
317
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
318
|
+
extra_headers = {
|
|
319
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
320
|
+
**(extra_headers or {}),
|
|
321
|
+
}
|
|
322
|
+
return await self._put(
|
|
323
|
+
f"/api/v1/budgets/{budget_id}/tags",
|
|
324
|
+
body=await async_maybe_transform({"budget_tags": budget_tags}, tag_update_params.TagUpdateParams),
|
|
325
|
+
options=make_request_options(
|
|
326
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
327
|
+
),
|
|
328
|
+
cast_to=TagUpdateResponse,
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
async def list(
|
|
332
|
+
self,
|
|
333
|
+
budget_id: str,
|
|
334
|
+
*,
|
|
335
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
336
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
337
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
338
|
+
extra_headers: Headers | None = None,
|
|
339
|
+
extra_query: Query | None = None,
|
|
340
|
+
extra_body: Body | None = None,
|
|
341
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
342
|
+
) -> TagListResponse:
|
|
343
|
+
"""
|
|
344
|
+
Get a Budget's Tags
|
|
345
|
+
|
|
346
|
+
Args:
|
|
347
|
+
extra_headers: Send extra headers
|
|
348
|
+
|
|
349
|
+
extra_query: Add additional query parameters to the request
|
|
350
|
+
|
|
351
|
+
extra_body: Add additional JSON properties to the request
|
|
352
|
+
|
|
353
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
354
|
+
"""
|
|
355
|
+
if not budget_id:
|
|
356
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
357
|
+
extra_headers = {
|
|
358
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
359
|
+
**(extra_headers or {}),
|
|
360
|
+
}
|
|
361
|
+
return await self._get(
|
|
362
|
+
f"/api/v1/budgets/{budget_id}/tags",
|
|
363
|
+
options=make_request_options(
|
|
364
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
365
|
+
),
|
|
366
|
+
cast_to=TagListResponse,
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
async def delete(
|
|
370
|
+
self,
|
|
371
|
+
budget_id: str,
|
|
372
|
+
*,
|
|
373
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
374
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
375
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
376
|
+
extra_headers: Headers | None = None,
|
|
377
|
+
extra_query: Query | None = None,
|
|
378
|
+
extra_body: Body | None = None,
|
|
379
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
380
|
+
) -> TagDeleteResponse:
|
|
381
|
+
"""
|
|
382
|
+
Delete the Budget's Tags
|
|
383
|
+
|
|
384
|
+
Args:
|
|
385
|
+
extra_headers: Send extra headers
|
|
386
|
+
|
|
387
|
+
extra_query: Add additional query parameters to the request
|
|
388
|
+
|
|
389
|
+
extra_body: Add additional JSON properties to the request
|
|
390
|
+
|
|
391
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
392
|
+
"""
|
|
393
|
+
if not budget_id:
|
|
394
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
395
|
+
extra_headers = {
|
|
396
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
397
|
+
**(extra_headers or {}),
|
|
398
|
+
}
|
|
399
|
+
return await self._delete(
|
|
400
|
+
f"/api/v1/budgets/{budget_id}/tags",
|
|
401
|
+
options=make_request_options(
|
|
402
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
403
|
+
),
|
|
404
|
+
cast_to=TagDeleteResponse,
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
async def remove(
|
|
408
|
+
self,
|
|
409
|
+
budget_id: str,
|
|
410
|
+
*,
|
|
411
|
+
budget_tags: List[str],
|
|
412
|
+
x_proxy_application_key: str | NotGiven = NOT_GIVEN,
|
|
413
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
414
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
415
|
+
extra_headers: Headers | None = None,
|
|
416
|
+
extra_query: Query | None = None,
|
|
417
|
+
extra_body: Body | None = None,
|
|
418
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
419
|
+
) -> TagRemoveResponse:
|
|
420
|
+
"""
|
|
421
|
+
Remove Tags from the Budget
|
|
422
|
+
|
|
423
|
+
Args:
|
|
424
|
+
extra_headers: Send extra headers
|
|
425
|
+
|
|
426
|
+
extra_query: Add additional query parameters to the request
|
|
427
|
+
|
|
428
|
+
extra_body: Add additional JSON properties to the request
|
|
429
|
+
|
|
430
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
431
|
+
"""
|
|
432
|
+
if not budget_id:
|
|
433
|
+
raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
|
|
434
|
+
extra_headers = {
|
|
435
|
+
**strip_not_given({"xProxy-Application-Key": x_proxy_application_key}),
|
|
436
|
+
**(extra_headers or {}),
|
|
437
|
+
}
|
|
438
|
+
return await self._patch(
|
|
439
|
+
f"/api/v1/budgets/{budget_id}/tags/remove",
|
|
440
|
+
body=await async_maybe_transform({"budget_tags": budget_tags}, tag_remove_params.TagRemoveParams),
|
|
441
|
+
options=make_request_options(
|
|
442
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
443
|
+
),
|
|
444
|
+
cast_to=TagRemoveResponse,
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
class TagsResourceWithRawResponse:
|
|
449
|
+
def __init__(self, tags: TagsResource) -> None:
|
|
450
|
+
self._tags = tags
|
|
451
|
+
|
|
452
|
+
self.create = to_raw_response_wrapper(
|
|
453
|
+
tags.create,
|
|
454
|
+
)
|
|
455
|
+
self.update = to_raw_response_wrapper(
|
|
456
|
+
tags.update,
|
|
457
|
+
)
|
|
458
|
+
self.list = to_raw_response_wrapper(
|
|
459
|
+
tags.list,
|
|
460
|
+
)
|
|
461
|
+
self.delete = to_raw_response_wrapper(
|
|
462
|
+
tags.delete,
|
|
463
|
+
)
|
|
464
|
+
self.remove = to_raw_response_wrapper(
|
|
465
|
+
tags.remove,
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
class AsyncTagsResourceWithRawResponse:
|
|
470
|
+
def __init__(self, tags: AsyncTagsResource) -> None:
|
|
471
|
+
self._tags = tags
|
|
472
|
+
|
|
473
|
+
self.create = async_to_raw_response_wrapper(
|
|
474
|
+
tags.create,
|
|
475
|
+
)
|
|
476
|
+
self.update = async_to_raw_response_wrapper(
|
|
477
|
+
tags.update,
|
|
478
|
+
)
|
|
479
|
+
self.list = async_to_raw_response_wrapper(
|
|
480
|
+
tags.list,
|
|
481
|
+
)
|
|
482
|
+
self.delete = async_to_raw_response_wrapper(
|
|
483
|
+
tags.delete,
|
|
484
|
+
)
|
|
485
|
+
self.remove = async_to_raw_response_wrapper(
|
|
486
|
+
tags.remove,
|
|
487
|
+
)
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
class TagsResourceWithStreamingResponse:
|
|
491
|
+
def __init__(self, tags: TagsResource) -> None:
|
|
492
|
+
self._tags = tags
|
|
493
|
+
|
|
494
|
+
self.create = to_streamed_response_wrapper(
|
|
495
|
+
tags.create,
|
|
496
|
+
)
|
|
497
|
+
self.update = to_streamed_response_wrapper(
|
|
498
|
+
tags.update,
|
|
499
|
+
)
|
|
500
|
+
self.list = to_streamed_response_wrapper(
|
|
501
|
+
tags.list,
|
|
502
|
+
)
|
|
503
|
+
self.delete = to_streamed_response_wrapper(
|
|
504
|
+
tags.delete,
|
|
505
|
+
)
|
|
506
|
+
self.remove = to_streamed_response_wrapper(
|
|
507
|
+
tags.remove,
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class AsyncTagsResourceWithStreamingResponse:
|
|
512
|
+
def __init__(self, tags: AsyncTagsResource) -> None:
|
|
513
|
+
self._tags = tags
|
|
514
|
+
|
|
515
|
+
self.create = async_to_streamed_response_wrapper(
|
|
516
|
+
tags.create,
|
|
517
|
+
)
|
|
518
|
+
self.update = async_to_streamed_response_wrapper(
|
|
519
|
+
tags.update,
|
|
520
|
+
)
|
|
521
|
+
self.list = async_to_streamed_response_wrapper(
|
|
522
|
+
tags.list,
|
|
523
|
+
)
|
|
524
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
525
|
+
tags.delete,
|
|
526
|
+
)
|
|
527
|
+
self.remove = async_to_streamed_response_wrapper(
|
|
528
|
+
tags.remove,
|
|
529
|
+
)
|