payi 0.1.0a57__py3-none-any.whl → 0.1.0a59__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/use_cases/__init__.py +14 -14
- payi/resources/use_cases/definitions/__init__.py +47 -0
- payi/resources/use_cases/{types/types.py → definitions/definitions.py} +122 -88
- payi/resources/use_cases/{types → definitions}/limit_config.py +14 -14
- payi/resources/use_cases/definitions/version.py +163 -0
- payi/resources/use_cases/properties.py +2 -2
- payi/resources/use_cases/use_cases.py +20 -20
- payi/types/use_cases/__init__.py +5 -5
- payi/types/use_cases/{type_create_params.py → definition_create_params.py} +2 -2
- payi/types/use_cases/{type_list_params.py → definition_list_params.py} +2 -2
- payi/types/use_cases/{type_list_response.py → definition_list_response.py} +3 -3
- payi/types/use_cases/{type_update_params.py → definition_update_params.py} +2 -2
- payi/types/use_cases/{use_case_type.py → use_case_definition.py} +2 -2
- {payi-0.1.0a57.dist-info → payi-0.1.0a59.dist-info}/METADATA +1 -1
- {payi-0.1.0a57.dist-info → payi-0.1.0a59.dist-info}/RECORD +20 -19
- payi/resources/use_cases/types/__init__.py +0 -33
- /payi/types/use_cases/{types → definitions}/__init__.py +0 -0
- /payi/types/use_cases/{types → definitions}/limit_config_create_params.py +0 -0
- {payi-0.1.0a57.dist-info → payi-0.1.0a59.dist-info}/WHEEL +0 -0
- {payi-0.1.0a57.dist-info → payi-0.1.0a59.dist-info}/licenses/LICENSE +0 -0
payi/_version.py
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from .types import (
|
|
4
|
-
TypesResource,
|
|
5
|
-
AsyncTypesResource,
|
|
6
|
-
TypesResourceWithRawResponse,
|
|
7
|
-
AsyncTypesResourceWithRawResponse,
|
|
8
|
-
TypesResourceWithStreamingResponse,
|
|
9
|
-
AsyncTypesResourceWithStreamingResponse,
|
|
10
|
-
)
|
|
11
3
|
from .use_cases import (
|
|
12
4
|
UseCasesResource,
|
|
13
5
|
AsyncUseCasesResource,
|
|
@@ -24,14 +16,22 @@ from .properties import (
|
|
|
24
16
|
PropertiesResourceWithStreamingResponse,
|
|
25
17
|
AsyncPropertiesResourceWithStreamingResponse,
|
|
26
18
|
)
|
|
19
|
+
from .definitions import (
|
|
20
|
+
DefinitionsResource,
|
|
21
|
+
AsyncDefinitionsResource,
|
|
22
|
+
DefinitionsResourceWithRawResponse,
|
|
23
|
+
AsyncDefinitionsResourceWithRawResponse,
|
|
24
|
+
DefinitionsResourceWithStreamingResponse,
|
|
25
|
+
AsyncDefinitionsResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
27
|
|
|
28
28
|
__all__ = [
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
29
|
+
"DefinitionsResource",
|
|
30
|
+
"AsyncDefinitionsResource",
|
|
31
|
+
"DefinitionsResourceWithRawResponse",
|
|
32
|
+
"AsyncDefinitionsResourceWithRawResponse",
|
|
33
|
+
"DefinitionsResourceWithStreamingResponse",
|
|
34
|
+
"AsyncDefinitionsResourceWithStreamingResponse",
|
|
35
35
|
"PropertiesResource",
|
|
36
36
|
"AsyncPropertiesResource",
|
|
37
37
|
"PropertiesResourceWithRawResponse",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .version import (
|
|
4
|
+
VersionResource,
|
|
5
|
+
AsyncVersionResource,
|
|
6
|
+
VersionResourceWithRawResponse,
|
|
7
|
+
AsyncVersionResourceWithRawResponse,
|
|
8
|
+
VersionResourceWithStreamingResponse,
|
|
9
|
+
AsyncVersionResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .definitions import (
|
|
12
|
+
DefinitionsResource,
|
|
13
|
+
AsyncDefinitionsResource,
|
|
14
|
+
DefinitionsResourceWithRawResponse,
|
|
15
|
+
AsyncDefinitionsResourceWithRawResponse,
|
|
16
|
+
DefinitionsResourceWithStreamingResponse,
|
|
17
|
+
AsyncDefinitionsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .limit_config import (
|
|
20
|
+
LimitConfigResource,
|
|
21
|
+
AsyncLimitConfigResource,
|
|
22
|
+
LimitConfigResourceWithRawResponse,
|
|
23
|
+
AsyncLimitConfigResourceWithRawResponse,
|
|
24
|
+
LimitConfigResourceWithStreamingResponse,
|
|
25
|
+
AsyncLimitConfigResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"LimitConfigResource",
|
|
30
|
+
"AsyncLimitConfigResource",
|
|
31
|
+
"LimitConfigResourceWithRawResponse",
|
|
32
|
+
"AsyncLimitConfigResourceWithRawResponse",
|
|
33
|
+
"LimitConfigResourceWithStreamingResponse",
|
|
34
|
+
"AsyncLimitConfigResourceWithStreamingResponse",
|
|
35
|
+
"VersionResource",
|
|
36
|
+
"AsyncVersionResource",
|
|
37
|
+
"VersionResourceWithRawResponse",
|
|
38
|
+
"AsyncVersionResourceWithRawResponse",
|
|
39
|
+
"VersionResourceWithStreamingResponse",
|
|
40
|
+
"AsyncVersionResourceWithStreamingResponse",
|
|
41
|
+
"DefinitionsResource",
|
|
42
|
+
"AsyncDefinitionsResource",
|
|
43
|
+
"DefinitionsResourceWithRawResponse",
|
|
44
|
+
"AsyncDefinitionsResourceWithRawResponse",
|
|
45
|
+
"DefinitionsResourceWithStreamingResponse",
|
|
46
|
+
"AsyncDefinitionsResourceWithStreamingResponse",
|
|
47
|
+
]
|
|
@@ -6,6 +6,14 @@ from typing import Optional
|
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
+
from .version import (
|
|
10
|
+
VersionResource,
|
|
11
|
+
AsyncVersionResource,
|
|
12
|
+
VersionResourceWithRawResponse,
|
|
13
|
+
AsyncVersionResourceWithRawResponse,
|
|
14
|
+
VersionResourceWithStreamingResponse,
|
|
15
|
+
AsyncVersionResourceWithStreamingResponse,
|
|
16
|
+
)
|
|
9
17
|
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
10
18
|
from ...._utils import (
|
|
11
19
|
maybe_transform,
|
|
@@ -28,39 +36,43 @@ from .limit_config import (
|
|
|
28
36
|
AsyncLimitConfigResourceWithStreamingResponse,
|
|
29
37
|
)
|
|
30
38
|
from ...._base_client import make_request_options
|
|
31
|
-
from ....types.use_cases import
|
|
32
|
-
from ....types.use_cases.
|
|
33
|
-
from ....types.use_cases.
|
|
39
|
+
from ....types.use_cases import definition_list_params, definition_create_params, definition_update_params
|
|
40
|
+
from ....types.use_cases.use_case_definition import UseCaseDefinition
|
|
41
|
+
from ....types.use_cases.definition_list_response import DefinitionListResponse
|
|
34
42
|
from ....types.shared_params.pay_i_common_models_budget_management_create_limit_base import (
|
|
35
43
|
PayICommonModelsBudgetManagementCreateLimitBase,
|
|
36
44
|
)
|
|
37
45
|
|
|
38
|
-
__all__ = ["
|
|
46
|
+
__all__ = ["DefinitionsResource", "AsyncDefinitionsResource"]
|
|
39
47
|
|
|
40
48
|
|
|
41
|
-
class
|
|
49
|
+
class DefinitionsResource(SyncAPIResource):
|
|
42
50
|
@cached_property
|
|
43
51
|
def limit_config(self) -> LimitConfigResource:
|
|
44
52
|
return LimitConfigResource(self._client)
|
|
45
53
|
|
|
46
54
|
@cached_property
|
|
47
|
-
def
|
|
55
|
+
def version(self) -> VersionResource:
|
|
56
|
+
return VersionResource(self._client)
|
|
57
|
+
|
|
58
|
+
@cached_property
|
|
59
|
+
def with_raw_response(self) -> DefinitionsResourceWithRawResponse:
|
|
48
60
|
"""
|
|
49
61
|
This property can be used as a prefix for any HTTP method call to return
|
|
50
62
|
the raw response object instead of the parsed content.
|
|
51
63
|
|
|
52
64
|
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
53
65
|
"""
|
|
54
|
-
return
|
|
66
|
+
return DefinitionsResourceWithRawResponse(self)
|
|
55
67
|
|
|
56
68
|
@cached_property
|
|
57
|
-
def with_streaming_response(self) ->
|
|
69
|
+
def with_streaming_response(self) -> DefinitionsResourceWithStreamingResponse:
|
|
58
70
|
"""
|
|
59
71
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
60
72
|
|
|
61
73
|
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
62
74
|
"""
|
|
63
|
-
return
|
|
75
|
+
return DefinitionsResourceWithStreamingResponse(self)
|
|
64
76
|
|
|
65
77
|
def create(
|
|
66
78
|
self,
|
|
@@ -75,7 +87,7 @@ class TypesResource(SyncAPIResource):
|
|
|
75
87
|
extra_query: Query | None = None,
|
|
76
88
|
extra_body: Body | None = None,
|
|
77
89
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
78
|
-
) ->
|
|
90
|
+
) -> UseCaseDefinition:
|
|
79
91
|
"""
|
|
80
92
|
Create a new Use Case
|
|
81
93
|
|
|
@@ -89,7 +101,7 @@ class TypesResource(SyncAPIResource):
|
|
|
89
101
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
90
102
|
"""
|
|
91
103
|
return self._post(
|
|
92
|
-
"/api/v1/use_cases/
|
|
104
|
+
"/api/v1/use_cases/definitions",
|
|
93
105
|
body=maybe_transform(
|
|
94
106
|
{
|
|
95
107
|
"description": description,
|
|
@@ -97,12 +109,12 @@ class TypesResource(SyncAPIResource):
|
|
|
97
109
|
"limit_config": limit_config,
|
|
98
110
|
"logging_enabled": logging_enabled,
|
|
99
111
|
},
|
|
100
|
-
|
|
112
|
+
definition_create_params.DefinitionCreateParams,
|
|
101
113
|
),
|
|
102
114
|
options=make_request_options(
|
|
103
115
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
104
116
|
),
|
|
105
|
-
cast_to=
|
|
117
|
+
cast_to=UseCaseDefinition,
|
|
106
118
|
)
|
|
107
119
|
|
|
108
120
|
def retrieve(
|
|
@@ -115,7 +127,7 @@ class TypesResource(SyncAPIResource):
|
|
|
115
127
|
extra_query: Query | None = None,
|
|
116
128
|
extra_body: Body | None = None,
|
|
117
129
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
118
|
-
) ->
|
|
130
|
+
) -> UseCaseDefinition:
|
|
119
131
|
"""
|
|
120
132
|
Get Use Case details
|
|
121
133
|
|
|
@@ -131,11 +143,11 @@ class TypesResource(SyncAPIResource):
|
|
|
131
143
|
if not use_case_name:
|
|
132
144
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
133
145
|
return self._get(
|
|
134
|
-
f"/api/v1/use_cases/
|
|
146
|
+
f"/api/v1/use_cases/definitions/{use_case_name}",
|
|
135
147
|
options=make_request_options(
|
|
136
148
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
137
149
|
),
|
|
138
|
-
cast_to=
|
|
150
|
+
cast_to=UseCaseDefinition,
|
|
139
151
|
)
|
|
140
152
|
|
|
141
153
|
def update(
|
|
@@ -150,9 +162,9 @@ class TypesResource(SyncAPIResource):
|
|
|
150
162
|
extra_query: Query | None = None,
|
|
151
163
|
extra_body: Body | None = None,
|
|
152
164
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
153
|
-
) ->
|
|
165
|
+
) -> UseCaseDefinition:
|
|
154
166
|
"""
|
|
155
|
-
Update a Use Case
|
|
167
|
+
Update a Use Case definition
|
|
156
168
|
|
|
157
169
|
Args:
|
|
158
170
|
extra_headers: Send extra headers
|
|
@@ -166,18 +178,18 @@ class TypesResource(SyncAPIResource):
|
|
|
166
178
|
if not use_case_name:
|
|
167
179
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
168
180
|
return self._patch(
|
|
169
|
-
f"/api/v1/use_cases/
|
|
181
|
+
f"/api/v1/use_cases/definitions/{use_case_name}",
|
|
170
182
|
body=maybe_transform(
|
|
171
183
|
{
|
|
172
184
|
"description": description,
|
|
173
185
|
"logging_enabled": logging_enabled,
|
|
174
186
|
},
|
|
175
|
-
|
|
187
|
+
definition_update_params.DefinitionUpdateParams,
|
|
176
188
|
),
|
|
177
189
|
options=make_request_options(
|
|
178
190
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
179
191
|
),
|
|
180
|
-
cast_to=
|
|
192
|
+
cast_to=UseCaseDefinition,
|
|
181
193
|
)
|
|
182
194
|
|
|
183
195
|
def list(
|
|
@@ -190,7 +202,7 @@ class TypesResource(SyncAPIResource):
|
|
|
190
202
|
extra_query: Query | None = None,
|
|
191
203
|
extra_body: Body | None = None,
|
|
192
204
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
193
|
-
) ->
|
|
205
|
+
) -> DefinitionListResponse:
|
|
194
206
|
"""
|
|
195
207
|
Get all Use Cases
|
|
196
208
|
|
|
@@ -206,15 +218,15 @@ class TypesResource(SyncAPIResource):
|
|
|
206
218
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
207
219
|
"""
|
|
208
220
|
return self._get(
|
|
209
|
-
"/api/v1/use_cases/
|
|
221
|
+
"/api/v1/use_cases/definitions",
|
|
210
222
|
options=make_request_options(
|
|
211
223
|
extra_headers=extra_headers,
|
|
212
224
|
extra_query=extra_query,
|
|
213
225
|
extra_body=extra_body,
|
|
214
226
|
timeout=timeout,
|
|
215
|
-
query=maybe_transform({"use_case_name": use_case_name},
|
|
227
|
+
query=maybe_transform({"use_case_name": use_case_name}, definition_list_params.DefinitionListParams),
|
|
216
228
|
),
|
|
217
|
-
cast_to=
|
|
229
|
+
cast_to=DefinitionListResponse,
|
|
218
230
|
)
|
|
219
231
|
|
|
220
232
|
def delete(
|
|
@@ -227,7 +239,7 @@ class TypesResource(SyncAPIResource):
|
|
|
227
239
|
extra_query: Query | None = None,
|
|
228
240
|
extra_body: Body | None = None,
|
|
229
241
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
230
|
-
) ->
|
|
242
|
+
) -> UseCaseDefinition:
|
|
231
243
|
"""
|
|
232
244
|
Delete a Use Case
|
|
233
245
|
|
|
@@ -243,37 +255,41 @@ class TypesResource(SyncAPIResource):
|
|
|
243
255
|
if not use_case_name:
|
|
244
256
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
245
257
|
return self._delete(
|
|
246
|
-
f"/api/v1/use_cases/
|
|
258
|
+
f"/api/v1/use_cases/definitions/{use_case_name}",
|
|
247
259
|
options=make_request_options(
|
|
248
260
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
249
261
|
),
|
|
250
|
-
cast_to=
|
|
262
|
+
cast_to=UseCaseDefinition,
|
|
251
263
|
)
|
|
252
264
|
|
|
253
265
|
|
|
254
|
-
class
|
|
266
|
+
class AsyncDefinitionsResource(AsyncAPIResource):
|
|
255
267
|
@cached_property
|
|
256
268
|
def limit_config(self) -> AsyncLimitConfigResource:
|
|
257
269
|
return AsyncLimitConfigResource(self._client)
|
|
258
270
|
|
|
259
271
|
@cached_property
|
|
260
|
-
def
|
|
272
|
+
def version(self) -> AsyncVersionResource:
|
|
273
|
+
return AsyncVersionResource(self._client)
|
|
274
|
+
|
|
275
|
+
@cached_property
|
|
276
|
+
def with_raw_response(self) -> AsyncDefinitionsResourceWithRawResponse:
|
|
261
277
|
"""
|
|
262
278
|
This property can be used as a prefix for any HTTP method call to return
|
|
263
279
|
the raw response object instead of the parsed content.
|
|
264
280
|
|
|
265
281
|
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
266
282
|
"""
|
|
267
|
-
return
|
|
283
|
+
return AsyncDefinitionsResourceWithRawResponse(self)
|
|
268
284
|
|
|
269
285
|
@cached_property
|
|
270
|
-
def with_streaming_response(self) ->
|
|
286
|
+
def with_streaming_response(self) -> AsyncDefinitionsResourceWithStreamingResponse:
|
|
271
287
|
"""
|
|
272
288
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
273
289
|
|
|
274
290
|
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
275
291
|
"""
|
|
276
|
-
return
|
|
292
|
+
return AsyncDefinitionsResourceWithStreamingResponse(self)
|
|
277
293
|
|
|
278
294
|
async def create(
|
|
279
295
|
self,
|
|
@@ -288,7 +304,7 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
288
304
|
extra_query: Query | None = None,
|
|
289
305
|
extra_body: Body | None = None,
|
|
290
306
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
291
|
-
) ->
|
|
307
|
+
) -> UseCaseDefinition:
|
|
292
308
|
"""
|
|
293
309
|
Create a new Use Case
|
|
294
310
|
|
|
@@ -302,7 +318,7 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
302
318
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
303
319
|
"""
|
|
304
320
|
return await self._post(
|
|
305
|
-
"/api/v1/use_cases/
|
|
321
|
+
"/api/v1/use_cases/definitions",
|
|
306
322
|
body=await async_maybe_transform(
|
|
307
323
|
{
|
|
308
324
|
"description": description,
|
|
@@ -310,12 +326,12 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
310
326
|
"limit_config": limit_config,
|
|
311
327
|
"logging_enabled": logging_enabled,
|
|
312
328
|
},
|
|
313
|
-
|
|
329
|
+
definition_create_params.DefinitionCreateParams,
|
|
314
330
|
),
|
|
315
331
|
options=make_request_options(
|
|
316
332
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
317
333
|
),
|
|
318
|
-
cast_to=
|
|
334
|
+
cast_to=UseCaseDefinition,
|
|
319
335
|
)
|
|
320
336
|
|
|
321
337
|
async def retrieve(
|
|
@@ -328,7 +344,7 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
328
344
|
extra_query: Query | None = None,
|
|
329
345
|
extra_body: Body | None = None,
|
|
330
346
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
331
|
-
) ->
|
|
347
|
+
) -> UseCaseDefinition:
|
|
332
348
|
"""
|
|
333
349
|
Get Use Case details
|
|
334
350
|
|
|
@@ -344,11 +360,11 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
344
360
|
if not use_case_name:
|
|
345
361
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
346
362
|
return await self._get(
|
|
347
|
-
f"/api/v1/use_cases/
|
|
363
|
+
f"/api/v1/use_cases/definitions/{use_case_name}",
|
|
348
364
|
options=make_request_options(
|
|
349
365
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
350
366
|
),
|
|
351
|
-
cast_to=
|
|
367
|
+
cast_to=UseCaseDefinition,
|
|
352
368
|
)
|
|
353
369
|
|
|
354
370
|
async def update(
|
|
@@ -363,9 +379,9 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
363
379
|
extra_query: Query | None = None,
|
|
364
380
|
extra_body: Body | None = None,
|
|
365
381
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
366
|
-
) ->
|
|
382
|
+
) -> UseCaseDefinition:
|
|
367
383
|
"""
|
|
368
|
-
Update a Use Case
|
|
384
|
+
Update a Use Case definition
|
|
369
385
|
|
|
370
386
|
Args:
|
|
371
387
|
extra_headers: Send extra headers
|
|
@@ -379,18 +395,18 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
379
395
|
if not use_case_name:
|
|
380
396
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
381
397
|
return await self._patch(
|
|
382
|
-
f"/api/v1/use_cases/
|
|
398
|
+
f"/api/v1/use_cases/definitions/{use_case_name}",
|
|
383
399
|
body=await async_maybe_transform(
|
|
384
400
|
{
|
|
385
401
|
"description": description,
|
|
386
402
|
"logging_enabled": logging_enabled,
|
|
387
403
|
},
|
|
388
|
-
|
|
404
|
+
definition_update_params.DefinitionUpdateParams,
|
|
389
405
|
),
|
|
390
406
|
options=make_request_options(
|
|
391
407
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
392
408
|
),
|
|
393
|
-
cast_to=
|
|
409
|
+
cast_to=UseCaseDefinition,
|
|
394
410
|
)
|
|
395
411
|
|
|
396
412
|
async def list(
|
|
@@ -403,7 +419,7 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
403
419
|
extra_query: Query | None = None,
|
|
404
420
|
extra_body: Body | None = None,
|
|
405
421
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
406
|
-
) ->
|
|
422
|
+
) -> DefinitionListResponse:
|
|
407
423
|
"""
|
|
408
424
|
Get all Use Cases
|
|
409
425
|
|
|
@@ -419,15 +435,17 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
419
435
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
420
436
|
"""
|
|
421
437
|
return await self._get(
|
|
422
|
-
"/api/v1/use_cases/
|
|
438
|
+
"/api/v1/use_cases/definitions",
|
|
423
439
|
options=make_request_options(
|
|
424
440
|
extra_headers=extra_headers,
|
|
425
441
|
extra_query=extra_query,
|
|
426
442
|
extra_body=extra_body,
|
|
427
443
|
timeout=timeout,
|
|
428
|
-
query=await async_maybe_transform(
|
|
444
|
+
query=await async_maybe_transform(
|
|
445
|
+
{"use_case_name": use_case_name}, definition_list_params.DefinitionListParams
|
|
446
|
+
),
|
|
429
447
|
),
|
|
430
|
-
cast_to=
|
|
448
|
+
cast_to=DefinitionListResponse,
|
|
431
449
|
)
|
|
432
450
|
|
|
433
451
|
async def delete(
|
|
@@ -440,7 +458,7 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
440
458
|
extra_query: Query | None = None,
|
|
441
459
|
extra_body: Body | None = None,
|
|
442
460
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
443
|
-
) ->
|
|
461
|
+
) -> UseCaseDefinition:
|
|
444
462
|
"""
|
|
445
463
|
Delete a Use Case
|
|
446
464
|
|
|
@@ -456,109 +474,125 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
456
474
|
if not use_case_name:
|
|
457
475
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
458
476
|
return await self._delete(
|
|
459
|
-
f"/api/v1/use_cases/
|
|
477
|
+
f"/api/v1/use_cases/definitions/{use_case_name}",
|
|
460
478
|
options=make_request_options(
|
|
461
479
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
462
480
|
),
|
|
463
|
-
cast_to=
|
|
481
|
+
cast_to=UseCaseDefinition,
|
|
464
482
|
)
|
|
465
483
|
|
|
466
484
|
|
|
467
|
-
class
|
|
468
|
-
def __init__(self,
|
|
469
|
-
self.
|
|
485
|
+
class DefinitionsResourceWithRawResponse:
|
|
486
|
+
def __init__(self, definitions: DefinitionsResource) -> None:
|
|
487
|
+
self._definitions = definitions
|
|
470
488
|
|
|
471
489
|
self.create = to_raw_response_wrapper(
|
|
472
|
-
|
|
490
|
+
definitions.create,
|
|
473
491
|
)
|
|
474
492
|
self.retrieve = to_raw_response_wrapper(
|
|
475
|
-
|
|
493
|
+
definitions.retrieve,
|
|
476
494
|
)
|
|
477
495
|
self.update = to_raw_response_wrapper(
|
|
478
|
-
|
|
496
|
+
definitions.update,
|
|
479
497
|
)
|
|
480
498
|
self.list = to_raw_response_wrapper(
|
|
481
|
-
|
|
499
|
+
definitions.list,
|
|
482
500
|
)
|
|
483
501
|
self.delete = to_raw_response_wrapper(
|
|
484
|
-
|
|
502
|
+
definitions.delete,
|
|
485
503
|
)
|
|
486
504
|
|
|
487
505
|
@cached_property
|
|
488
506
|
def limit_config(self) -> LimitConfigResourceWithRawResponse:
|
|
489
|
-
return LimitConfigResourceWithRawResponse(self.
|
|
507
|
+
return LimitConfigResourceWithRawResponse(self._definitions.limit_config)
|
|
508
|
+
|
|
509
|
+
@cached_property
|
|
510
|
+
def version(self) -> VersionResourceWithRawResponse:
|
|
511
|
+
return VersionResourceWithRawResponse(self._definitions.version)
|
|
490
512
|
|
|
491
513
|
|
|
492
|
-
class
|
|
493
|
-
def __init__(self,
|
|
494
|
-
self.
|
|
514
|
+
class AsyncDefinitionsResourceWithRawResponse:
|
|
515
|
+
def __init__(self, definitions: AsyncDefinitionsResource) -> None:
|
|
516
|
+
self._definitions = definitions
|
|
495
517
|
|
|
496
518
|
self.create = async_to_raw_response_wrapper(
|
|
497
|
-
|
|
519
|
+
definitions.create,
|
|
498
520
|
)
|
|
499
521
|
self.retrieve = async_to_raw_response_wrapper(
|
|
500
|
-
|
|
522
|
+
definitions.retrieve,
|
|
501
523
|
)
|
|
502
524
|
self.update = async_to_raw_response_wrapper(
|
|
503
|
-
|
|
525
|
+
definitions.update,
|
|
504
526
|
)
|
|
505
527
|
self.list = async_to_raw_response_wrapper(
|
|
506
|
-
|
|
528
|
+
definitions.list,
|
|
507
529
|
)
|
|
508
530
|
self.delete = async_to_raw_response_wrapper(
|
|
509
|
-
|
|
531
|
+
definitions.delete,
|
|
510
532
|
)
|
|
511
533
|
|
|
512
534
|
@cached_property
|
|
513
535
|
def limit_config(self) -> AsyncLimitConfigResourceWithRawResponse:
|
|
514
|
-
return AsyncLimitConfigResourceWithRawResponse(self.
|
|
536
|
+
return AsyncLimitConfigResourceWithRawResponse(self._definitions.limit_config)
|
|
537
|
+
|
|
538
|
+
@cached_property
|
|
539
|
+
def version(self) -> AsyncVersionResourceWithRawResponse:
|
|
540
|
+
return AsyncVersionResourceWithRawResponse(self._definitions.version)
|
|
515
541
|
|
|
516
542
|
|
|
517
|
-
class
|
|
518
|
-
def __init__(self,
|
|
519
|
-
self.
|
|
543
|
+
class DefinitionsResourceWithStreamingResponse:
|
|
544
|
+
def __init__(self, definitions: DefinitionsResource) -> None:
|
|
545
|
+
self._definitions = definitions
|
|
520
546
|
|
|
521
547
|
self.create = to_streamed_response_wrapper(
|
|
522
|
-
|
|
548
|
+
definitions.create,
|
|
523
549
|
)
|
|
524
550
|
self.retrieve = to_streamed_response_wrapper(
|
|
525
|
-
|
|
551
|
+
definitions.retrieve,
|
|
526
552
|
)
|
|
527
553
|
self.update = to_streamed_response_wrapper(
|
|
528
|
-
|
|
554
|
+
definitions.update,
|
|
529
555
|
)
|
|
530
556
|
self.list = to_streamed_response_wrapper(
|
|
531
|
-
|
|
557
|
+
definitions.list,
|
|
532
558
|
)
|
|
533
559
|
self.delete = to_streamed_response_wrapper(
|
|
534
|
-
|
|
560
|
+
definitions.delete,
|
|
535
561
|
)
|
|
536
562
|
|
|
537
563
|
@cached_property
|
|
538
564
|
def limit_config(self) -> LimitConfigResourceWithStreamingResponse:
|
|
539
|
-
return LimitConfigResourceWithStreamingResponse(self.
|
|
565
|
+
return LimitConfigResourceWithStreamingResponse(self._definitions.limit_config)
|
|
566
|
+
|
|
567
|
+
@cached_property
|
|
568
|
+
def version(self) -> VersionResourceWithStreamingResponse:
|
|
569
|
+
return VersionResourceWithStreamingResponse(self._definitions.version)
|
|
540
570
|
|
|
541
571
|
|
|
542
|
-
class
|
|
543
|
-
def __init__(self,
|
|
544
|
-
self.
|
|
572
|
+
class AsyncDefinitionsResourceWithStreamingResponse:
|
|
573
|
+
def __init__(self, definitions: AsyncDefinitionsResource) -> None:
|
|
574
|
+
self._definitions = definitions
|
|
545
575
|
|
|
546
576
|
self.create = async_to_streamed_response_wrapper(
|
|
547
|
-
|
|
577
|
+
definitions.create,
|
|
548
578
|
)
|
|
549
579
|
self.retrieve = async_to_streamed_response_wrapper(
|
|
550
|
-
|
|
580
|
+
definitions.retrieve,
|
|
551
581
|
)
|
|
552
582
|
self.update = async_to_streamed_response_wrapper(
|
|
553
|
-
|
|
583
|
+
definitions.update,
|
|
554
584
|
)
|
|
555
585
|
self.list = async_to_streamed_response_wrapper(
|
|
556
|
-
|
|
586
|
+
definitions.list,
|
|
557
587
|
)
|
|
558
588
|
self.delete = async_to_streamed_response_wrapper(
|
|
559
|
-
|
|
589
|
+
definitions.delete,
|
|
560
590
|
)
|
|
561
591
|
|
|
562
592
|
@cached_property
|
|
563
593
|
def limit_config(self) -> AsyncLimitConfigResourceWithStreamingResponse:
|
|
564
|
-
return AsyncLimitConfigResourceWithStreamingResponse(self.
|
|
594
|
+
return AsyncLimitConfigResourceWithStreamingResponse(self._definitions.limit_config)
|
|
595
|
+
|
|
596
|
+
@cached_property
|
|
597
|
+
def version(self) -> AsyncVersionResourceWithStreamingResponse:
|
|
598
|
+
return AsyncVersionResourceWithStreamingResponse(self._definitions.version)
|
|
@@ -21,8 +21,8 @@ from ...._response import (
|
|
|
21
21
|
async_to_streamed_response_wrapper,
|
|
22
22
|
)
|
|
23
23
|
from ...._base_client import make_request_options
|
|
24
|
-
from ....types.use_cases.
|
|
25
|
-
from ....types.use_cases.
|
|
24
|
+
from ....types.use_cases.definitions import limit_config_create_params
|
|
25
|
+
from ....types.use_cases.use_case_definition import UseCaseDefinition
|
|
26
26
|
|
|
27
27
|
__all__ = ["LimitConfigResource", "AsyncLimitConfigResource"]
|
|
28
28
|
|
|
@@ -61,7 +61,7 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
61
61
|
extra_query: Query | None = None,
|
|
62
62
|
extra_body: Body | None = None,
|
|
63
63
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
64
|
-
) ->
|
|
64
|
+
) -> UseCaseDefinition:
|
|
65
65
|
"""
|
|
66
66
|
Create a new Use Case default limit configuration
|
|
67
67
|
|
|
@@ -77,7 +77,7 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
77
77
|
if not use_case_name:
|
|
78
78
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
79
79
|
return self._post(
|
|
80
|
-
f"/api/v1/use_cases/
|
|
80
|
+
f"/api/v1/use_cases/definitions/{use_case_name}/limit_config",
|
|
81
81
|
body=maybe_transform(
|
|
82
82
|
{
|
|
83
83
|
"max": max,
|
|
@@ -90,7 +90,7 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
90
90
|
options=make_request_options(
|
|
91
91
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
92
92
|
),
|
|
93
|
-
cast_to=
|
|
93
|
+
cast_to=UseCaseDefinition,
|
|
94
94
|
)
|
|
95
95
|
|
|
96
96
|
def delete(
|
|
@@ -103,7 +103,7 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
103
103
|
extra_query: Query | None = None,
|
|
104
104
|
extra_body: Body | None = None,
|
|
105
105
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
106
|
-
) ->
|
|
106
|
+
) -> UseCaseDefinition:
|
|
107
107
|
"""
|
|
108
108
|
Delete a Use Case default limit configuration
|
|
109
109
|
|
|
@@ -119,11 +119,11 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
119
119
|
if not use_case_name:
|
|
120
120
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
121
121
|
return self._delete(
|
|
122
|
-
f"/api/v1/use_cases/
|
|
122
|
+
f"/api/v1/use_cases/definitions/{use_case_name}/limit_config",
|
|
123
123
|
options=make_request_options(
|
|
124
124
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
125
125
|
),
|
|
126
|
-
cast_to=
|
|
126
|
+
cast_to=UseCaseDefinition,
|
|
127
127
|
)
|
|
128
128
|
|
|
129
129
|
|
|
@@ -161,7 +161,7 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
161
161
|
extra_query: Query | None = None,
|
|
162
162
|
extra_body: Body | None = None,
|
|
163
163
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
164
|
-
) ->
|
|
164
|
+
) -> UseCaseDefinition:
|
|
165
165
|
"""
|
|
166
166
|
Create a new Use Case default limit configuration
|
|
167
167
|
|
|
@@ -177,7 +177,7 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
177
177
|
if not use_case_name:
|
|
178
178
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
179
179
|
return await self._post(
|
|
180
|
-
f"/api/v1/use_cases/
|
|
180
|
+
f"/api/v1/use_cases/definitions/{use_case_name}/limit_config",
|
|
181
181
|
body=await async_maybe_transform(
|
|
182
182
|
{
|
|
183
183
|
"max": max,
|
|
@@ -190,7 +190,7 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
190
190
|
options=make_request_options(
|
|
191
191
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
192
192
|
),
|
|
193
|
-
cast_to=
|
|
193
|
+
cast_to=UseCaseDefinition,
|
|
194
194
|
)
|
|
195
195
|
|
|
196
196
|
async def delete(
|
|
@@ -203,7 +203,7 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
203
203
|
extra_query: Query | None = None,
|
|
204
204
|
extra_body: Body | None = None,
|
|
205
205
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
206
|
-
) ->
|
|
206
|
+
) -> UseCaseDefinition:
|
|
207
207
|
"""
|
|
208
208
|
Delete a Use Case default limit configuration
|
|
209
209
|
|
|
@@ -219,11 +219,11 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
219
219
|
if not use_case_name:
|
|
220
220
|
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
221
221
|
return await self._delete(
|
|
222
|
-
f"/api/v1/use_cases/
|
|
222
|
+
f"/api/v1/use_cases/definitions/{use_case_name}/limit_config",
|
|
223
223
|
options=make_request_options(
|
|
224
224
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
225
225
|
),
|
|
226
|
-
cast_to=
|
|
226
|
+
cast_to=UseCaseDefinition,
|
|
227
227
|
)
|
|
228
228
|
|
|
229
229
|
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ...._compat import cached_property
|
|
9
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ...._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from ...._base_client import make_request_options
|
|
17
|
+
from ....types.use_cases.use_case_definition import UseCaseDefinition
|
|
18
|
+
|
|
19
|
+
__all__ = ["VersionResource", "AsyncVersionResource"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class VersionResource(SyncAPIResource):
|
|
23
|
+
@cached_property
|
|
24
|
+
def with_raw_response(self) -> VersionResourceWithRawResponse:
|
|
25
|
+
"""
|
|
26
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
27
|
+
the raw response object instead of the parsed content.
|
|
28
|
+
|
|
29
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
30
|
+
"""
|
|
31
|
+
return VersionResourceWithRawResponse(self)
|
|
32
|
+
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_streaming_response(self) -> VersionResourceWithStreamingResponse:
|
|
35
|
+
"""
|
|
36
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
37
|
+
|
|
38
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
39
|
+
"""
|
|
40
|
+
return VersionResourceWithStreamingResponse(self)
|
|
41
|
+
|
|
42
|
+
def increment(
|
|
43
|
+
self,
|
|
44
|
+
use_case_name: str,
|
|
45
|
+
*,
|
|
46
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
47
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
48
|
+
extra_headers: Headers | None = None,
|
|
49
|
+
extra_query: Query | None = None,
|
|
50
|
+
extra_body: Body | None = None,
|
|
51
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
52
|
+
) -> UseCaseDefinition:
|
|
53
|
+
"""
|
|
54
|
+
Increment a Use Case version
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
extra_headers: Send extra headers
|
|
58
|
+
|
|
59
|
+
extra_query: Add additional query parameters to the request
|
|
60
|
+
|
|
61
|
+
extra_body: Add additional JSON properties to the request
|
|
62
|
+
|
|
63
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
64
|
+
"""
|
|
65
|
+
if not use_case_name:
|
|
66
|
+
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
67
|
+
return self._post(
|
|
68
|
+
f"/api/v1/use_cases/definitions/{use_case_name}/increment_version",
|
|
69
|
+
options=make_request_options(
|
|
70
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
71
|
+
),
|
|
72
|
+
cast_to=UseCaseDefinition,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class AsyncVersionResource(AsyncAPIResource):
|
|
77
|
+
@cached_property
|
|
78
|
+
def with_raw_response(self) -> AsyncVersionResourceWithRawResponse:
|
|
79
|
+
"""
|
|
80
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
81
|
+
the raw response object instead of the parsed content.
|
|
82
|
+
|
|
83
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
84
|
+
"""
|
|
85
|
+
return AsyncVersionResourceWithRawResponse(self)
|
|
86
|
+
|
|
87
|
+
@cached_property
|
|
88
|
+
def with_streaming_response(self) -> AsyncVersionResourceWithStreamingResponse:
|
|
89
|
+
"""
|
|
90
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
91
|
+
|
|
92
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
93
|
+
"""
|
|
94
|
+
return AsyncVersionResourceWithStreamingResponse(self)
|
|
95
|
+
|
|
96
|
+
async def increment(
|
|
97
|
+
self,
|
|
98
|
+
use_case_name: str,
|
|
99
|
+
*,
|
|
100
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
101
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
102
|
+
extra_headers: Headers | None = None,
|
|
103
|
+
extra_query: Query | None = None,
|
|
104
|
+
extra_body: Body | None = None,
|
|
105
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
106
|
+
) -> UseCaseDefinition:
|
|
107
|
+
"""
|
|
108
|
+
Increment a Use Case version
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
extra_headers: Send extra headers
|
|
112
|
+
|
|
113
|
+
extra_query: Add additional query parameters to the request
|
|
114
|
+
|
|
115
|
+
extra_body: Add additional JSON properties to the request
|
|
116
|
+
|
|
117
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
118
|
+
"""
|
|
119
|
+
if not use_case_name:
|
|
120
|
+
raise ValueError(f"Expected a non-empty value for `use_case_name` but received {use_case_name!r}")
|
|
121
|
+
return await self._post(
|
|
122
|
+
f"/api/v1/use_cases/definitions/{use_case_name}/increment_version",
|
|
123
|
+
options=make_request_options(
|
|
124
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
125
|
+
),
|
|
126
|
+
cast_to=UseCaseDefinition,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class VersionResourceWithRawResponse:
|
|
131
|
+
def __init__(self, version: VersionResource) -> None:
|
|
132
|
+
self._version = version
|
|
133
|
+
|
|
134
|
+
self.increment = to_raw_response_wrapper(
|
|
135
|
+
version.increment,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class AsyncVersionResourceWithRawResponse:
|
|
140
|
+
def __init__(self, version: AsyncVersionResource) -> None:
|
|
141
|
+
self._version = version
|
|
142
|
+
|
|
143
|
+
self.increment = async_to_raw_response_wrapper(
|
|
144
|
+
version.increment,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class VersionResourceWithStreamingResponse:
|
|
149
|
+
def __init__(self, version: VersionResource) -> None:
|
|
150
|
+
self._version = version
|
|
151
|
+
|
|
152
|
+
self.increment = to_streamed_response_wrapper(
|
|
153
|
+
version.increment,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class AsyncVersionResourceWithStreamingResponse:
|
|
158
|
+
def __init__(self, version: AsyncVersionResource) -> None:
|
|
159
|
+
self._version = version
|
|
160
|
+
|
|
161
|
+
self.increment = async_to_streamed_response_wrapper(
|
|
162
|
+
version.increment,
|
|
163
|
+
)
|
|
@@ -59,7 +59,7 @@ class PropertiesResource(SyncAPIResource):
|
|
|
59
59
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
60
60
|
) -> UseCaseInstanceResponse:
|
|
61
61
|
"""
|
|
62
|
-
Update Use Case instance properties
|
|
62
|
+
Update a Use Case instance properties
|
|
63
63
|
|
|
64
64
|
Args:
|
|
65
65
|
extra_headers: Send extra headers
|
|
@@ -115,7 +115,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
|
|
|
115
115
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
116
116
|
) -> UseCaseInstanceResponse:
|
|
117
117
|
"""
|
|
118
|
-
Update Use Case instance properties
|
|
118
|
+
Update a Use Case instance properties
|
|
119
119
|
|
|
120
120
|
Args:
|
|
121
121
|
extra_headers: Send extra headers
|
|
@@ -21,15 +21,15 @@ from ..._response import (
|
|
|
21
21
|
async_to_raw_response_wrapper,
|
|
22
22
|
async_to_streamed_response_wrapper,
|
|
23
23
|
)
|
|
24
|
-
from .types.types import (
|
|
25
|
-
TypesResource,
|
|
26
|
-
AsyncTypesResource,
|
|
27
|
-
TypesResourceWithRawResponse,
|
|
28
|
-
AsyncTypesResourceWithRawResponse,
|
|
29
|
-
TypesResourceWithStreamingResponse,
|
|
30
|
-
AsyncTypesResourceWithStreamingResponse,
|
|
31
|
-
)
|
|
32
24
|
from ..._base_client import make_request_options
|
|
25
|
+
from .definitions.definitions import (
|
|
26
|
+
DefinitionsResource,
|
|
27
|
+
AsyncDefinitionsResource,
|
|
28
|
+
DefinitionsResourceWithRawResponse,
|
|
29
|
+
AsyncDefinitionsResourceWithRawResponse,
|
|
30
|
+
DefinitionsResourceWithStreamingResponse,
|
|
31
|
+
AsyncDefinitionsResourceWithStreamingResponse,
|
|
32
|
+
)
|
|
33
33
|
from ...types.use_case_instance_response import UseCaseInstanceResponse
|
|
34
34
|
|
|
35
35
|
__all__ = ["UseCasesResource", "AsyncUseCasesResource"]
|
|
@@ -37,8 +37,8 @@ __all__ = ["UseCasesResource", "AsyncUseCasesResource"]
|
|
|
37
37
|
|
|
38
38
|
class UseCasesResource(SyncAPIResource):
|
|
39
39
|
@cached_property
|
|
40
|
-
def
|
|
41
|
-
return
|
|
40
|
+
def definitions(self) -> DefinitionsResource:
|
|
41
|
+
return DefinitionsResource(self._client)
|
|
42
42
|
|
|
43
43
|
@cached_property
|
|
44
44
|
def properties(self) -> PropertiesResource:
|
|
@@ -165,8 +165,8 @@ class UseCasesResource(SyncAPIResource):
|
|
|
165
165
|
|
|
166
166
|
class AsyncUseCasesResource(AsyncAPIResource):
|
|
167
167
|
@cached_property
|
|
168
|
-
def
|
|
169
|
-
return
|
|
168
|
+
def definitions(self) -> AsyncDefinitionsResource:
|
|
169
|
+
return AsyncDefinitionsResource(self._client)
|
|
170
170
|
|
|
171
171
|
@cached_property
|
|
172
172
|
def properties(self) -> AsyncPropertiesResource:
|
|
@@ -306,8 +306,8 @@ class UseCasesResourceWithRawResponse:
|
|
|
306
306
|
)
|
|
307
307
|
|
|
308
308
|
@cached_property
|
|
309
|
-
def
|
|
310
|
-
return
|
|
309
|
+
def definitions(self) -> DefinitionsResourceWithRawResponse:
|
|
310
|
+
return DefinitionsResourceWithRawResponse(self._use_cases.definitions)
|
|
311
311
|
|
|
312
312
|
@cached_property
|
|
313
313
|
def properties(self) -> PropertiesResourceWithRawResponse:
|
|
@@ -329,8 +329,8 @@ class AsyncUseCasesResourceWithRawResponse:
|
|
|
329
329
|
)
|
|
330
330
|
|
|
331
331
|
@cached_property
|
|
332
|
-
def
|
|
333
|
-
return
|
|
332
|
+
def definitions(self) -> AsyncDefinitionsResourceWithRawResponse:
|
|
333
|
+
return AsyncDefinitionsResourceWithRawResponse(self._use_cases.definitions)
|
|
334
334
|
|
|
335
335
|
@cached_property
|
|
336
336
|
def properties(self) -> AsyncPropertiesResourceWithRawResponse:
|
|
@@ -352,8 +352,8 @@ class UseCasesResourceWithStreamingResponse:
|
|
|
352
352
|
)
|
|
353
353
|
|
|
354
354
|
@cached_property
|
|
355
|
-
def
|
|
356
|
-
return
|
|
355
|
+
def definitions(self) -> DefinitionsResourceWithStreamingResponse:
|
|
356
|
+
return DefinitionsResourceWithStreamingResponse(self._use_cases.definitions)
|
|
357
357
|
|
|
358
358
|
@cached_property
|
|
359
359
|
def properties(self) -> PropertiesResourceWithStreamingResponse:
|
|
@@ -375,8 +375,8 @@ class AsyncUseCasesResourceWithStreamingResponse:
|
|
|
375
375
|
)
|
|
376
376
|
|
|
377
377
|
@cached_property
|
|
378
|
-
def
|
|
379
|
-
return
|
|
378
|
+
def definitions(self) -> AsyncDefinitionsResourceWithStreamingResponse:
|
|
379
|
+
return AsyncDefinitionsResourceWithStreamingResponse(self._use_cases.definitions)
|
|
380
380
|
|
|
381
381
|
@cached_property
|
|
382
382
|
def properties(self) -> AsyncPropertiesResourceWithStreamingResponse:
|
payi/types/use_cases/__init__.py
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from .
|
|
6
|
-
from .
|
|
7
|
-
from .type_create_params import TypeCreateParams as TypeCreateParams
|
|
8
|
-
from .type_list_response import TypeListResponse as TypeListResponse
|
|
9
|
-
from .type_update_params import TypeUpdateParams as TypeUpdateParams
|
|
5
|
+
from .use_case_definition import UseCaseDefinition as UseCaseDefinition
|
|
6
|
+
from .definition_list_params import DefinitionListParams as DefinitionListParams
|
|
10
7
|
from .property_create_params import PropertyCreateParams as PropertyCreateParams
|
|
8
|
+
from .definition_create_params import DefinitionCreateParams as DefinitionCreateParams
|
|
9
|
+
from .definition_list_response import DefinitionListResponse as DefinitionListResponse
|
|
10
|
+
from .definition_update_params import DefinitionUpdateParams as DefinitionUpdateParams
|
|
@@ -9,10 +9,10 @@ from ..shared_params.pay_i_common_models_budget_management_create_limit_base imp
|
|
|
9
9
|
PayICommonModelsBudgetManagementCreateLimitBase,
|
|
10
10
|
)
|
|
11
11
|
|
|
12
|
-
__all__ = ["
|
|
12
|
+
__all__ = ["DefinitionCreateParams"]
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class DefinitionCreateParams(TypedDict, total=False):
|
|
16
16
|
description: Required[str]
|
|
17
17
|
|
|
18
18
|
name: Required[str]
|
|
@@ -4,9 +4,9 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import TypedDict
|
|
6
6
|
|
|
7
|
-
__all__ = ["
|
|
7
|
+
__all__ = ["DefinitionListParams"]
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class DefinitionListParams(TypedDict, total=False):
|
|
11
11
|
use_case_name: str
|
|
12
12
|
"""Use Case name"""
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
from typing import List
|
|
4
4
|
from typing_extensions import TypeAlias
|
|
5
5
|
|
|
6
|
-
from .
|
|
6
|
+
from .use_case_definition import UseCaseDefinition
|
|
7
7
|
|
|
8
|
-
__all__ = ["
|
|
8
|
+
__all__ = ["DefinitionListResponse"]
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
DefinitionListResponse: TypeAlias = List[UseCaseDefinition]
|
|
@@ -5,10 +5,10 @@ from __future__ import annotations
|
|
|
5
5
|
from typing import Optional
|
|
6
6
|
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
|
-
__all__ = ["
|
|
8
|
+
__all__ = ["DefinitionUpdateParams"]
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class DefinitionUpdateParams(TypedDict, total=False):
|
|
12
12
|
description: Optional[str]
|
|
13
13
|
|
|
14
14
|
logging_enabled: Optional[bool]
|
|
@@ -7,10 +7,10 @@ from ..shared.pay_i_common_models_budget_management_create_limit_base import (
|
|
|
7
7
|
PayICommonModelsBudgetManagementCreateLimitBase,
|
|
8
8
|
)
|
|
9
9
|
|
|
10
|
-
__all__ = ["
|
|
10
|
+
__all__ = ["UseCaseDefinition"]
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
13
|
+
class UseCaseDefinition(BaseModel):
|
|
14
14
|
description: str
|
|
15
15
|
|
|
16
16
|
name: str
|
|
@@ -11,7 +11,7 @@ payi/_resource.py,sha256=j2jIkTr8OIC8sU6-05nxSaCyj4MaFlbZrwlyg4_xJos,1088
|
|
|
11
11
|
payi/_response.py,sha256=CfrNS_3wbL8o9dRyRVfZQ5E1GUlA4CUIUEK8olmfGqE,28777
|
|
12
12
|
payi/_streaming.py,sha256=Z_wIyo206T6Jqh2rolFg2VXZgX24PahLmpURp0-NssU,10092
|
|
13
13
|
payi/_types.py,sha256=2mbMK86K3W1aMTW7sOGQ-VND6-A2IuXKm8p4sYFztBU,6141
|
|
14
|
-
payi/_version.py,sha256=
|
|
14
|
+
payi/_version.py,sha256=oLaiqv94TB0s88YgFy74TVkYxNiJ_Wj5lrKhBDmImz0,165
|
|
15
15
|
payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
payi/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
|
17
17
|
payi/_utils/_logs.py,sha256=fmnf5D9TOgkgZKfgYmSa3PiUc3SZgkchn6CzJUeo0SQ,768
|
|
@@ -47,12 +47,13 @@ payi/resources/requests/__init__.py,sha256=k7ipgDb5QXAv7WYhgQq0-6Zn9INJikMzRGexu
|
|
|
47
47
|
payi/resources/requests/properties.py,sha256=yxl6dLVc7NYIG2ZrVOwdhQC1Ucg5vnKAFk_mkJuWNsM,6461
|
|
48
48
|
payi/resources/requests/requests.py,sha256=uxfdUe_mNmG5kzHTa4YcS5m2wwIc5h__YSx54LfiLWQ,4840
|
|
49
49
|
payi/resources/requests/result.py,sha256=dEIwYEi_p36t_hErr_V1E2hmBLLgopcLnIReAWT8ygk,6161
|
|
50
|
-
payi/resources/use_cases/__init__.py,sha256=
|
|
51
|
-
payi/resources/use_cases/properties.py,sha256=
|
|
52
|
-
payi/resources/use_cases/use_cases.py,sha256=
|
|
53
|
-
payi/resources/use_cases/
|
|
54
|
-
payi/resources/use_cases/
|
|
55
|
-
payi/resources/use_cases/
|
|
50
|
+
payi/resources/use_cases/__init__.py,sha256=qGdaypH68jQEEY9MxqqeDD80GBDMfFSGYBbHoPCKvhM,1596
|
|
51
|
+
payi/resources/use_cases/properties.py,sha256=xikZgFqsTV6xM_I2jvCR5Ue9S4ga3K7pdcyDOnEHAGo,6543
|
|
52
|
+
payi/resources/use_cases/use_cases.py,sha256=Zgw74RseSJxPaOcx3cXdbd7dDesnn1JB3kA4meubISU,14559
|
|
53
|
+
payi/resources/use_cases/definitions/__init__.py,sha256=M_ZAJii9Odc-v4YyOipE_IAe5IVeYTJRU3AfJe6IcqQ,1596
|
|
54
|
+
payi/resources/use_cases/definitions/definitions.py,sha256=-10mlhrtesXyMyjyY2OuNa0nypogI_npkNoOyTfpLIY,22736
|
|
55
|
+
payi/resources/use_cases/definitions/limit_config.py,sha256=nDnMfoiMiiaKQel9whlnBJGW-azFuzaUUXZW2YgV5_o,10596
|
|
56
|
+
payi/resources/use_cases/definitions/version.py,sha256=I1mrP_OEyEytMaQJeb06SS5GCJ6JO9K58nVIVdOgZiY,6013
|
|
56
57
|
payi/types/__init__.py,sha256=pGir27BGWIlNv2dReYgKsdkEqiee8xJkIjobv6507yA,2404
|
|
57
58
|
payi/types/bulk_ingest_response.py,sha256=78J3vlL7muZx9Z20H--UkvM8P19g0cDL9SZoHy7XM68,1330
|
|
58
59
|
payi/types/category_delete_resource_response.py,sha256=PLz4wZA1XMpS9SUYB_j4hEw5EoZ0VVE9Ll-MQ26SAfc,339
|
|
@@ -112,16 +113,16 @@ payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py,sha
|
|
|
112
113
|
payi/types/shared/properties_response.py,sha256=HpFNtxl_OjoMCs24xPVZLKe3FwCVcNkcRs0LsQKLrHM,259
|
|
113
114
|
payi/types/shared_params/__init__.py,sha256=zuMEcTUd0E-CVh7LdU2R5mPgBUOwiOpL85M0Ub8ikbQ,264
|
|
114
115
|
payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py,sha256=8UXPHFrNDZfF5tgEeV0mIqevksNGEWayv2NJV5DY_Rg,497
|
|
115
|
-
payi/types/use_cases/__init__.py,sha256=
|
|
116
|
+
payi/types/use_cases/__init__.py,sha256=wwGbwfGCADObbm5tZ0KxonweWAW3yysHUO_p04VGX3A,618
|
|
117
|
+
payi/types/use_cases/definition_create_params.py,sha256=8Z48UFbJq0nohT0rG64-3Js9nadWNDMoeVUTXn4PLp4,597
|
|
118
|
+
payi/types/use_cases/definition_list_params.py,sha256=LnLTJdj0qWl_evzBw-ipVZTPgbd8MApJ15AurUFtqw8,300
|
|
119
|
+
payi/types/use_cases/definition_list_response.py,sha256=38aRmvqqjYIkSZ_-1GHiHwVBoidWMucRzQRTkNIJbm4,302
|
|
120
|
+
payi/types/use_cases/definition_update_params.py,sha256=nRhHHVUvEFYr_dtAESZcyxZNU7qpKLF7VajgNZ9FIx8,353
|
|
116
121
|
payi/types/use_cases/property_create_params.py,sha256=6v1L_4pj5N5k386cbtjSAWr2QJw---WUJ5lyshRnMwc,328
|
|
117
|
-
payi/types/use_cases/
|
|
118
|
-
payi/types/use_cases/
|
|
119
|
-
payi/types/use_cases/
|
|
120
|
-
payi/
|
|
121
|
-
payi/
|
|
122
|
-
payi/
|
|
123
|
-
payi/
|
|
124
|
-
payi-0.1.0a57.dist-info/METADATA,sha256=_hkdQFKQ0fgDCphivTcq5EyKWv5dwQ9ZSacFOANMY1k,13035
|
|
125
|
-
payi-0.1.0a57.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
126
|
-
payi-0.1.0a57.dist-info/licenses/LICENSE,sha256=CQt03aM-P4a3Yg5qBg3JSLVoQS3smMyvx7tYg_6V7Gk,11334
|
|
127
|
-
payi-0.1.0a57.dist-info/RECORD,,
|
|
122
|
+
payi/types/use_cases/use_case_definition.py,sha256=R2DMV9t1EZ4pStQhZSul8SFCyfqqQuAUoevlkFOg2Mc,579
|
|
123
|
+
payi/types/use_cases/definitions/__init__.py,sha256=Uo_hbPae_AJi8UitkztBOl80AMRv7m-wH1eJlFC3Qnc,214
|
|
124
|
+
payi/types/use_cases/definitions/limit_config_create_params.py,sha256=pzQza_16N3z8cFNEKr6gPbFvuGFrwNuGxAYb--Kbo2M,449
|
|
125
|
+
payi-0.1.0a59.dist-info/METADATA,sha256=95KpIGBeh6Difv1PC3Vso7_PodDN2zAotcY_IqYCVTk,13035
|
|
126
|
+
payi-0.1.0a59.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
127
|
+
payi-0.1.0a59.dist-info/licenses/LICENSE,sha256=CQt03aM-P4a3Yg5qBg3JSLVoQS3smMyvx7tYg_6V7Gk,11334
|
|
128
|
+
payi-0.1.0a59.dist-info/RECORD,,
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from .types import (
|
|
4
|
-
TypesResource,
|
|
5
|
-
AsyncTypesResource,
|
|
6
|
-
TypesResourceWithRawResponse,
|
|
7
|
-
AsyncTypesResourceWithRawResponse,
|
|
8
|
-
TypesResourceWithStreamingResponse,
|
|
9
|
-
AsyncTypesResourceWithStreamingResponse,
|
|
10
|
-
)
|
|
11
|
-
from .limit_config import (
|
|
12
|
-
LimitConfigResource,
|
|
13
|
-
AsyncLimitConfigResource,
|
|
14
|
-
LimitConfigResourceWithRawResponse,
|
|
15
|
-
AsyncLimitConfigResourceWithRawResponse,
|
|
16
|
-
LimitConfigResourceWithStreamingResponse,
|
|
17
|
-
AsyncLimitConfigResourceWithStreamingResponse,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
__all__ = [
|
|
21
|
-
"LimitConfigResource",
|
|
22
|
-
"AsyncLimitConfigResource",
|
|
23
|
-
"LimitConfigResourceWithRawResponse",
|
|
24
|
-
"AsyncLimitConfigResourceWithRawResponse",
|
|
25
|
-
"LimitConfigResourceWithStreamingResponse",
|
|
26
|
-
"AsyncLimitConfigResourceWithStreamingResponse",
|
|
27
|
-
"TypesResource",
|
|
28
|
-
"AsyncTypesResource",
|
|
29
|
-
"TypesResourceWithRawResponse",
|
|
30
|
-
"AsyncTypesResourceWithRawResponse",
|
|
31
|
-
"TypesResourceWithStreamingResponse",
|
|
32
|
-
"AsyncTypesResourceWithStreamingResponse",
|
|
33
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|