payi 0.1.0a129__py3-none-any.whl → 0.1.0a131__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/_version.py +1 -1
- payi/resources/categories/categories.py +4 -0
- payi/resources/limits/__init__.py +14 -14
- payi/resources/limits/limits.py +26 -26
- payi/resources/limits/properties.py +171 -0
- payi/resources/requests/request_id/properties.py +2 -2
- payi/resources/requests/response_id/properties.py +2 -2
- payi/resources/use_cases/definitions/limit_config.py +6 -6
- payi/types/category_list_resources_params.py +5 -1
- payi/types/category_resource_response.py +1 -3
- payi/types/limit_create_params.py +3 -5
- payi/types/limit_list_response.py +1 -3
- payi/types/limit_response.py +1 -3
- payi/types/limits/__init__.py +2 -9
- payi/types/limits/property_update_params.py +12 -0
- payi/types/limits/{tag_remove_response.py → property_update_response.py} +3 -3
- payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +3 -3
- payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +3 -5
- payi/types/use_cases/definitions/limit_config_create_params.py +3 -5
- {payi-0.1.0a129.dist-info → payi-0.1.0a131.dist-info}/METADATA +2 -2
- {payi-0.1.0a129.dist-info → payi-0.1.0a131.dist-info}/RECORD +23 -30
- payi/resources/limits/tags.py +0 -505
- payi/types/limits/limit_tags.py +0 -16
- payi/types/limits/tag_create_params.py +0 -14
- payi/types/limits/tag_create_response.py +0 -10
- payi/types/limits/tag_delete_response.py +0 -10
- payi/types/limits/tag_list_response.py +0 -10
- payi/types/limits/tag_remove_params.py +0 -14
- payi/types/limits/tag_update_params.py +0 -14
- payi/types/limits/tag_update_response.py +0 -10
- {payi-0.1.0a129.dist-info → payi-0.1.0a131.dist-info}/WHEEL +0 -0
- {payi-0.1.0a129.dist-info → payi-0.1.0a131.dist-info}/licenses/LICENSE +0 -0
payi/_version.py
CHANGED
|
@@ -175,6 +175,7 @@ class CategoriesResource(SyncAPIResource):
|
|
|
175
175
|
self,
|
|
176
176
|
category: str,
|
|
177
177
|
*,
|
|
178
|
+
active: bool | Omit = omit,
|
|
178
179
|
cursor: str | Omit = omit,
|
|
179
180
|
limit: int | Omit = omit,
|
|
180
181
|
sort_ascending: bool | Omit = omit,
|
|
@@ -209,6 +210,7 @@ class CategoriesResource(SyncAPIResource):
|
|
|
209
210
|
timeout=timeout,
|
|
210
211
|
query=maybe_transform(
|
|
211
212
|
{
|
|
213
|
+
"active": active,
|
|
212
214
|
"cursor": cursor,
|
|
213
215
|
"limit": limit,
|
|
214
216
|
"sort_ascending": sort_ascending,
|
|
@@ -362,6 +364,7 @@ class AsyncCategoriesResource(AsyncAPIResource):
|
|
|
362
364
|
self,
|
|
363
365
|
category: str,
|
|
364
366
|
*,
|
|
367
|
+
active: bool | Omit = omit,
|
|
365
368
|
cursor: str | Omit = omit,
|
|
366
369
|
limit: int | Omit = omit,
|
|
367
370
|
sort_ascending: bool | Omit = omit,
|
|
@@ -396,6 +399,7 @@ class AsyncCategoriesResource(AsyncAPIResource):
|
|
|
396
399
|
timeout=timeout,
|
|
397
400
|
query=maybe_transform(
|
|
398
401
|
{
|
|
402
|
+
"active": active,
|
|
399
403
|
"cursor": cursor,
|
|
400
404
|
"limit": limit,
|
|
401
405
|
"sort_ascending": sort_ascending,
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from .tags import (
|
|
4
|
-
TagsResource,
|
|
5
|
-
AsyncTagsResource,
|
|
6
|
-
TagsResourceWithRawResponse,
|
|
7
|
-
AsyncTagsResourceWithRawResponse,
|
|
8
|
-
TagsResourceWithStreamingResponse,
|
|
9
|
-
AsyncTagsResourceWithStreamingResponse,
|
|
10
|
-
)
|
|
11
3
|
from .limits import (
|
|
12
4
|
LimitsResource,
|
|
13
5
|
AsyncLimitsResource,
|
|
@@ -16,14 +8,22 @@ from .limits import (
|
|
|
16
8
|
LimitsResourceWithStreamingResponse,
|
|
17
9
|
AsyncLimitsResourceWithStreamingResponse,
|
|
18
10
|
)
|
|
11
|
+
from .properties import (
|
|
12
|
+
PropertiesResource,
|
|
13
|
+
AsyncPropertiesResource,
|
|
14
|
+
PropertiesResourceWithRawResponse,
|
|
15
|
+
AsyncPropertiesResourceWithRawResponse,
|
|
16
|
+
PropertiesResourceWithStreamingResponse,
|
|
17
|
+
AsyncPropertiesResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
19
|
|
|
20
20
|
__all__ = [
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
21
|
+
"PropertiesResource",
|
|
22
|
+
"AsyncPropertiesResource",
|
|
23
|
+
"PropertiesResourceWithRawResponse",
|
|
24
|
+
"AsyncPropertiesResourceWithRawResponse",
|
|
25
|
+
"PropertiesResourceWithStreamingResponse",
|
|
26
|
+
"AsyncPropertiesResourceWithStreamingResponse",
|
|
27
27
|
"LimitsResource",
|
|
28
28
|
"AsyncLimitsResource",
|
|
29
29
|
"LimitsResourceWithRawResponse",
|
payi/resources/limits/limits.py
CHANGED
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Union, Optional
|
|
5
|
+
from typing import Dict, Union, Optional
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing_extensions import Literal
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
10
10
|
|
|
11
|
-
from .tags import (
|
|
12
|
-
TagsResource,
|
|
13
|
-
AsyncTagsResource,
|
|
14
|
-
TagsResourceWithRawResponse,
|
|
15
|
-
AsyncTagsResourceWithRawResponse,
|
|
16
|
-
TagsResourceWithStreamingResponse,
|
|
17
|
-
AsyncTagsResourceWithStreamingResponse,
|
|
18
|
-
)
|
|
19
11
|
from ...types import limit_list_params, limit_reset_params, limit_create_params, limit_update_params
|
|
20
|
-
from ..._types import Body, Omit, Query, Headers, NotGiven,
|
|
12
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
21
13
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
22
14
|
from ..._compat import cached_property
|
|
15
|
+
from .properties import (
|
|
16
|
+
PropertiesResource,
|
|
17
|
+
AsyncPropertiesResource,
|
|
18
|
+
PropertiesResourceWithRawResponse,
|
|
19
|
+
AsyncPropertiesResourceWithRawResponse,
|
|
20
|
+
PropertiesResourceWithStreamingResponse,
|
|
21
|
+
AsyncPropertiesResourceWithStreamingResponse,
|
|
22
|
+
)
|
|
23
23
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
24
24
|
from ..._response import (
|
|
25
25
|
to_raw_response_wrapper,
|
|
@@ -39,8 +39,8 @@ __all__ = ["LimitsResource", "AsyncLimitsResource"]
|
|
|
39
39
|
|
|
40
40
|
class LimitsResource(SyncAPIResource):
|
|
41
41
|
@cached_property
|
|
42
|
-
def
|
|
43
|
-
return
|
|
42
|
+
def properties(self) -> PropertiesResource:
|
|
43
|
+
return PropertiesResource(self._client)
|
|
44
44
|
|
|
45
45
|
@cached_property
|
|
46
46
|
def with_raw_response(self) -> LimitsResourceWithRawResponse:
|
|
@@ -67,8 +67,8 @@ class LimitsResource(SyncAPIResource):
|
|
|
67
67
|
limit_name: str,
|
|
68
68
|
max: float,
|
|
69
69
|
limit_id: Optional[str] | Omit = omit,
|
|
70
|
-
limit_tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
71
70
|
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
71
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
72
72
|
threshold: Optional[float] | Omit = omit,
|
|
73
73
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
74
74
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -96,8 +96,8 @@ class LimitsResource(SyncAPIResource):
|
|
|
96
96
|
"limit_name": limit_name,
|
|
97
97
|
"max": max,
|
|
98
98
|
"limit_id": limit_id,
|
|
99
|
-
"limit_tags": limit_tags,
|
|
100
99
|
"limit_type": limit_type,
|
|
100
|
+
"properties": properties,
|
|
101
101
|
"threshold": threshold,
|
|
102
102
|
},
|
|
103
103
|
limit_create_params.LimitCreateParams,
|
|
@@ -306,8 +306,8 @@ class LimitsResource(SyncAPIResource):
|
|
|
306
306
|
|
|
307
307
|
class AsyncLimitsResource(AsyncAPIResource):
|
|
308
308
|
@cached_property
|
|
309
|
-
def
|
|
310
|
-
return
|
|
309
|
+
def properties(self) -> AsyncPropertiesResource:
|
|
310
|
+
return AsyncPropertiesResource(self._client)
|
|
311
311
|
|
|
312
312
|
@cached_property
|
|
313
313
|
def with_raw_response(self) -> AsyncLimitsResourceWithRawResponse:
|
|
@@ -334,8 +334,8 @@ class AsyncLimitsResource(AsyncAPIResource):
|
|
|
334
334
|
limit_name: str,
|
|
335
335
|
max: float,
|
|
336
336
|
limit_id: Optional[str] | Omit = omit,
|
|
337
|
-
limit_tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
338
337
|
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
338
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
339
339
|
threshold: Optional[float] | Omit = omit,
|
|
340
340
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
341
341
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -363,8 +363,8 @@ class AsyncLimitsResource(AsyncAPIResource):
|
|
|
363
363
|
"limit_name": limit_name,
|
|
364
364
|
"max": max,
|
|
365
365
|
"limit_id": limit_id,
|
|
366
|
-
"limit_tags": limit_tags,
|
|
367
366
|
"limit_type": limit_type,
|
|
367
|
+
"properties": properties,
|
|
368
368
|
"threshold": threshold,
|
|
369
369
|
},
|
|
370
370
|
limit_create_params.LimitCreateParams,
|
|
@@ -595,8 +595,8 @@ class LimitsResourceWithRawResponse:
|
|
|
595
595
|
)
|
|
596
596
|
|
|
597
597
|
@cached_property
|
|
598
|
-
def
|
|
599
|
-
return
|
|
598
|
+
def properties(self) -> PropertiesResourceWithRawResponse:
|
|
599
|
+
return PropertiesResourceWithRawResponse(self._limits.properties)
|
|
600
600
|
|
|
601
601
|
|
|
602
602
|
class AsyncLimitsResourceWithRawResponse:
|
|
@@ -623,8 +623,8 @@ class AsyncLimitsResourceWithRawResponse:
|
|
|
623
623
|
)
|
|
624
624
|
|
|
625
625
|
@cached_property
|
|
626
|
-
def
|
|
627
|
-
return
|
|
626
|
+
def properties(self) -> AsyncPropertiesResourceWithRawResponse:
|
|
627
|
+
return AsyncPropertiesResourceWithRawResponse(self._limits.properties)
|
|
628
628
|
|
|
629
629
|
|
|
630
630
|
class LimitsResourceWithStreamingResponse:
|
|
@@ -651,8 +651,8 @@ class LimitsResourceWithStreamingResponse:
|
|
|
651
651
|
)
|
|
652
652
|
|
|
653
653
|
@cached_property
|
|
654
|
-
def
|
|
655
|
-
return
|
|
654
|
+
def properties(self) -> PropertiesResourceWithStreamingResponse:
|
|
655
|
+
return PropertiesResourceWithStreamingResponse(self._limits.properties)
|
|
656
656
|
|
|
657
657
|
|
|
658
658
|
class AsyncLimitsResourceWithStreamingResponse:
|
|
@@ -679,5 +679,5 @@ class AsyncLimitsResourceWithStreamingResponse:
|
|
|
679
679
|
)
|
|
680
680
|
|
|
681
681
|
@cached_property
|
|
682
|
-
def
|
|
683
|
-
return
|
|
682
|
+
def properties(self) -> AsyncPropertiesResourceWithStreamingResponse:
|
|
683
|
+
return AsyncPropertiesResourceWithStreamingResponse(self._limits.properties)
|
|
@@ -0,0 +1,171 @@
|
|
|
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 Dict, Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
10
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ..._compat import cached_property
|
|
12
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ..._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ..._base_client import make_request_options
|
|
20
|
+
from ...types.limits import property_update_params
|
|
21
|
+
from ...types.limits.property_update_response import PropertyUpdateResponse
|
|
22
|
+
|
|
23
|
+
__all__ = ["PropertiesResource", "AsyncPropertiesResource"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class PropertiesResource(SyncAPIResource):
|
|
27
|
+
@cached_property
|
|
28
|
+
def with_raw_response(self) -> PropertiesResourceWithRawResponse:
|
|
29
|
+
"""
|
|
30
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
31
|
+
the raw response object instead of the parsed content.
|
|
32
|
+
|
|
33
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
34
|
+
"""
|
|
35
|
+
return PropertiesResourceWithRawResponse(self)
|
|
36
|
+
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_streaming_response(self) -> PropertiesResourceWithStreamingResponse:
|
|
39
|
+
"""
|
|
40
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
43
|
+
"""
|
|
44
|
+
return PropertiesResourceWithStreamingResponse(self)
|
|
45
|
+
|
|
46
|
+
def update(
|
|
47
|
+
self,
|
|
48
|
+
limit_id: str,
|
|
49
|
+
*,
|
|
50
|
+
properties: Dict[str, Optional[str]],
|
|
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
|
+
) -> PropertyUpdateResponse:
|
|
58
|
+
"""
|
|
59
|
+
Update a Limit Properties
|
|
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 limit_id:
|
|
71
|
+
raise ValueError(f"Expected a non-empty value for `limit_id` but received {limit_id!r}")
|
|
72
|
+
return self._put(
|
|
73
|
+
f"/api/v1/limits/{limit_id}/properties",
|
|
74
|
+
body=maybe_transform({"properties": properties}, property_update_params.PropertyUpdateParams),
|
|
75
|
+
options=make_request_options(
|
|
76
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
77
|
+
),
|
|
78
|
+
cast_to=PropertyUpdateResponse,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class AsyncPropertiesResource(AsyncAPIResource):
|
|
83
|
+
@cached_property
|
|
84
|
+
def with_raw_response(self) -> AsyncPropertiesResourceWithRawResponse:
|
|
85
|
+
"""
|
|
86
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
87
|
+
the raw response object instead of the parsed content.
|
|
88
|
+
|
|
89
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
90
|
+
"""
|
|
91
|
+
return AsyncPropertiesResourceWithRawResponse(self)
|
|
92
|
+
|
|
93
|
+
@cached_property
|
|
94
|
+
def with_streaming_response(self) -> AsyncPropertiesResourceWithStreamingResponse:
|
|
95
|
+
"""
|
|
96
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
97
|
+
|
|
98
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
99
|
+
"""
|
|
100
|
+
return AsyncPropertiesResourceWithStreamingResponse(self)
|
|
101
|
+
|
|
102
|
+
async def update(
|
|
103
|
+
self,
|
|
104
|
+
limit_id: str,
|
|
105
|
+
*,
|
|
106
|
+
properties: Dict[str, Optional[str]],
|
|
107
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
108
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
109
|
+
extra_headers: Headers | None = None,
|
|
110
|
+
extra_query: Query | None = None,
|
|
111
|
+
extra_body: Body | None = None,
|
|
112
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
113
|
+
) -> PropertyUpdateResponse:
|
|
114
|
+
"""
|
|
115
|
+
Update a Limit Properties
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
extra_headers: Send extra headers
|
|
119
|
+
|
|
120
|
+
extra_query: Add additional query parameters to the request
|
|
121
|
+
|
|
122
|
+
extra_body: Add additional JSON properties to the request
|
|
123
|
+
|
|
124
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
125
|
+
"""
|
|
126
|
+
if not limit_id:
|
|
127
|
+
raise ValueError(f"Expected a non-empty value for `limit_id` but received {limit_id!r}")
|
|
128
|
+
return await self._put(
|
|
129
|
+
f"/api/v1/limits/{limit_id}/properties",
|
|
130
|
+
body=await async_maybe_transform({"properties": properties}, property_update_params.PropertyUpdateParams),
|
|
131
|
+
options=make_request_options(
|
|
132
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
133
|
+
),
|
|
134
|
+
cast_to=PropertyUpdateResponse,
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
class PropertiesResourceWithRawResponse:
|
|
139
|
+
def __init__(self, properties: PropertiesResource) -> None:
|
|
140
|
+
self._properties = properties
|
|
141
|
+
|
|
142
|
+
self.update = to_raw_response_wrapper(
|
|
143
|
+
properties.update,
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class AsyncPropertiesResourceWithRawResponse:
|
|
148
|
+
def __init__(self, properties: AsyncPropertiesResource) -> None:
|
|
149
|
+
self._properties = properties
|
|
150
|
+
|
|
151
|
+
self.update = async_to_raw_response_wrapper(
|
|
152
|
+
properties.update,
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class PropertiesResourceWithStreamingResponse:
|
|
157
|
+
def __init__(self, properties: PropertiesResource) -> None:
|
|
158
|
+
self._properties = properties
|
|
159
|
+
|
|
160
|
+
self.update = to_streamed_response_wrapper(
|
|
161
|
+
properties.update,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class AsyncPropertiesResourceWithStreamingResponse:
|
|
166
|
+
def __init__(self, properties: AsyncPropertiesResource) -> None:
|
|
167
|
+
self._properties = properties
|
|
168
|
+
|
|
169
|
+
self.update = async_to_streamed_response_wrapper(
|
|
170
|
+
properties.update,
|
|
171
|
+
)
|
|
@@ -56,7 +56,7 @@ class PropertiesResource(SyncAPIResource):
|
|
|
56
56
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
57
57
|
) -> PropertiesResponse:
|
|
58
58
|
"""
|
|
59
|
-
Update Request properties
|
|
59
|
+
Update a Request properties
|
|
60
60
|
|
|
61
61
|
Args:
|
|
62
62
|
extra_headers: Send extra headers
|
|
@@ -112,7 +112,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
|
|
|
112
112
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
113
113
|
) -> PropertiesResponse:
|
|
114
114
|
"""
|
|
115
|
-
Update Request properties
|
|
115
|
+
Update a Request properties
|
|
116
116
|
|
|
117
117
|
Args:
|
|
118
118
|
extra_headers: Send extra headers
|
|
@@ -57,7 +57,7 @@ class PropertiesResource(SyncAPIResource):
|
|
|
57
57
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
58
58
|
) -> PropertiesResponse:
|
|
59
59
|
"""
|
|
60
|
-
Update Request properties
|
|
60
|
+
Update a Request properties
|
|
61
61
|
|
|
62
62
|
Args:
|
|
63
63
|
extra_headers: Send extra headers
|
|
@@ -118,7 +118,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
|
|
|
118
118
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
119
119
|
) -> PropertiesResponse:
|
|
120
120
|
"""
|
|
121
|
-
Update Request properties
|
|
121
|
+
Update a Request properties
|
|
122
122
|
|
|
123
123
|
Args:
|
|
124
124
|
extra_headers: Send extra headers
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
5
|
+
from typing import Dict, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ...._types import Body, Omit, Query, Headers, NotGiven,
|
|
10
|
+
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
11
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from ...._compat import cached_property
|
|
13
13
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -49,8 +49,8 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
49
49
|
use_case_name: str,
|
|
50
50
|
*,
|
|
51
51
|
max: float,
|
|
52
|
-
limit_tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
53
52
|
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
53
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
54
54
|
threshold: Optional[float] | Omit = omit,
|
|
55
55
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
56
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -78,8 +78,8 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
78
78
|
body=maybe_transform(
|
|
79
79
|
{
|
|
80
80
|
"max": max,
|
|
81
|
-
"limit_tags": limit_tags,
|
|
82
81
|
"limit_type": limit_type,
|
|
82
|
+
"properties": properties,
|
|
83
83
|
"threshold": threshold,
|
|
84
84
|
},
|
|
85
85
|
limit_config_create_params.LimitConfigCreateParams,
|
|
@@ -149,8 +149,8 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
149
149
|
use_case_name: str,
|
|
150
150
|
*,
|
|
151
151
|
max: float,
|
|
152
|
-
limit_tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
153
152
|
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
153
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
154
154
|
threshold: Optional[float] | Omit = omit,
|
|
155
155
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
156
156
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -178,8 +178,8 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
178
178
|
body=await async_maybe_transform(
|
|
179
179
|
{
|
|
180
180
|
"max": max,
|
|
181
|
-
"limit_tags": limit_tags,
|
|
182
181
|
"limit_type": limit_type,
|
|
182
|
+
"properties": properties,
|
|
183
183
|
"threshold": threshold,
|
|
184
184
|
},
|
|
185
185
|
limit_config_create_params.LimitConfigCreateParams,
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing_extensions import TypedDict
|
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
6
8
|
|
|
7
9
|
__all__ = ["CategoryListResourcesParams"]
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
class CategoryListResourcesParams(TypedDict, total=False):
|
|
13
|
+
active: Annotated[bool, PropertyInfo(alias="Active")]
|
|
14
|
+
|
|
11
15
|
cursor: str
|
|
12
16
|
|
|
13
17
|
limit: int
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
from typing import Dict, Optional
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
|
|
6
|
-
from pydantic import Field as FieldInfo
|
|
7
|
-
|
|
8
6
|
from .._models import BaseModel
|
|
9
7
|
|
|
10
8
|
__all__ = ["CategoryResourceResponse", "Units", "AwsBedrockResource", "AzureResource", "GoogleVertexResource"]
|
|
@@ -17,7 +15,7 @@ class Units(BaseModel):
|
|
|
17
15
|
|
|
18
16
|
|
|
19
17
|
class AwsBedrockResource(BaseModel):
|
|
20
|
-
|
|
18
|
+
aws_model_units: int
|
|
21
19
|
|
|
22
20
|
|
|
23
21
|
class AzureResource(BaseModel):
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
5
|
+
from typing import Dict, Optional
|
|
6
6
|
from typing_extensions import Literal, Required, TypedDict
|
|
7
7
|
|
|
8
|
-
from .._types import SequenceNotStr
|
|
9
|
-
|
|
10
8
|
__all__ = ["LimitCreateParams"]
|
|
11
9
|
|
|
12
10
|
|
|
@@ -17,8 +15,8 @@ class LimitCreateParams(TypedDict, total=False):
|
|
|
17
15
|
|
|
18
16
|
limit_id: Optional[str]
|
|
19
17
|
|
|
20
|
-
limit_tags: Optional[SequenceNotStr[str]]
|
|
21
|
-
|
|
22
18
|
limit_type: Literal["block", "allow"]
|
|
23
19
|
|
|
20
|
+
properties: Optional[Dict[str, Optional[str]]]
|
|
21
|
+
|
|
24
22
|
threshold: Optional[float]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import Optional
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
@@ -25,6 +25,4 @@ class LimitListResponse(BaseModel):
|
|
|
25
25
|
|
|
26
26
|
totals: TotalCostData
|
|
27
27
|
|
|
28
|
-
limit_tags: Optional[List[str]] = None
|
|
29
|
-
|
|
30
28
|
threshold: Optional[float] = None
|
payi/types/limit_response.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import Optional
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
@@ -25,8 +25,6 @@ class Limit(BaseModel):
|
|
|
25
25
|
|
|
26
26
|
totals: TotalCostData
|
|
27
27
|
|
|
28
|
-
limit_tags: Optional[List[str]] = None
|
|
29
|
-
|
|
30
28
|
threshold: Optional[float] = None
|
|
31
29
|
|
|
32
30
|
|
payi/types/limits/__init__.py
CHANGED
|
@@ -2,12 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from .
|
|
6
|
-
from .
|
|
7
|
-
from .tag_list_response import TagListResponse as TagListResponse
|
|
8
|
-
from .tag_remove_params import TagRemoveParams as TagRemoveParams
|
|
9
|
-
from .tag_update_params import TagUpdateParams as TagUpdateParams
|
|
10
|
-
from .tag_create_response import TagCreateResponse as TagCreateResponse
|
|
11
|
-
from .tag_delete_response import TagDeleteResponse as TagDeleteResponse
|
|
12
|
-
from .tag_remove_response import TagRemoveResponse as TagRemoveResponse
|
|
13
|
-
from .tag_update_response import TagUpdateResponse as TagUpdateResponse
|
|
5
|
+
from .property_update_params import PropertyUpdateParams as PropertyUpdateParams
|
|
6
|
+
from .property_update_response import PropertyUpdateResponse as PropertyUpdateResponse
|
|
@@ -0,0 +1,12 @@
|
|
|
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 Dict, Optional
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["PropertyUpdateParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PropertyUpdateParams(TypedDict, total=False):
|
|
12
|
+
properties: Required[Dict[str, Optional[str]]]
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
from typing import List
|
|
4
4
|
from typing_extensions import TypeAlias
|
|
5
5
|
|
|
6
|
-
from
|
|
6
|
+
from ..limit_response import LimitResponse
|
|
7
7
|
|
|
8
|
-
__all__ = ["
|
|
8
|
+
__all__ = ["PropertyUpdateResponse"]
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
PropertyUpdateResponse: TypeAlias = List[LimitResponse]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import Dict, Optional
|
|
4
4
|
from typing_extensions import Literal
|
|
5
5
|
|
|
6
6
|
from ..._models import BaseModel
|
|
@@ -11,8 +11,8 @@ __all__ = ["PayICommonModelsBudgetManagementCreateLimitBase"]
|
|
|
11
11
|
class PayICommonModelsBudgetManagementCreateLimitBase(BaseModel):
|
|
12
12
|
max: float
|
|
13
13
|
|
|
14
|
-
limit_tags: Optional[List[str]] = None
|
|
15
|
-
|
|
16
14
|
limit_type: Optional[Literal["block", "allow"]] = None
|
|
17
15
|
|
|
16
|
+
properties: Optional[Dict[str, Optional[str]]] = None
|
|
17
|
+
|
|
18
18
|
threshold: Optional[float] = None
|
|
@@ -2,19 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
5
|
+
from typing import Dict, Optional
|
|
6
6
|
from typing_extensions import Literal, Required, TypedDict
|
|
7
7
|
|
|
8
|
-
from ..._types import SequenceNotStr
|
|
9
|
-
|
|
10
8
|
__all__ = ["PayICommonModelsBudgetManagementCreateLimitBase"]
|
|
11
9
|
|
|
12
10
|
|
|
13
11
|
class PayICommonModelsBudgetManagementCreateLimitBase(TypedDict, total=False):
|
|
14
12
|
max: Required[float]
|
|
15
13
|
|
|
16
|
-
limit_tags: Optional[SequenceNotStr[str]]
|
|
17
|
-
|
|
18
14
|
limit_type: Literal["block", "allow"]
|
|
19
15
|
|
|
16
|
+
properties: Optional[Dict[str, Optional[str]]]
|
|
17
|
+
|
|
20
18
|
threshold: Optional[float]
|