payi 0.1.0a94__py3-none-any.whl → 0.1.0a95__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/_client.py +0 -9
- payi/_version.py +1 -1
- payi/lib/AnthropicInstrumentor.py +1 -2
- payi/lib/BedrockInstrumentor.py +3 -3
- payi/lib/instrument.py +2 -2
- payi/resources/__init__.py +0 -14
- payi/resources/ingest.py +14 -28
- payi/resources/limits/limits.py +8 -0
- payi/resources/use_cases/kpis.py +1 -177
- payi/resources/use_cases/properties.py +5 -5
- payi/resources/use_cases/use_cases.py +15 -13
- payi/types/__init__.py +3 -2
- payi/types/ingest_units_params.py +2 -4
- payi/types/limit_create_params.py +2 -2
- payi/types/{use_case_instance_response.py → use_case_create_response.py} +2 -2
- payi/types/{experience_instance_response.py → use_case_delete_response.py} +3 -3
- payi/types/use_case_retrieve_response.py +15 -0
- payi/types/use_cases/__init__.py +1 -1
- payi/types/use_cases/property_create_response.py +15 -0
- {payi-0.1.0a94.dist-info → payi-0.1.0a95.dist-info}/METADATA +1 -1
- {payi-0.1.0a94.dist-info → payi-0.1.0a95.dist-info}/RECORD +23 -36
- payi/resources/experiences/__init__.py +0 -47
- payi/resources/experiences/experiences.py +0 -383
- payi/resources/experiences/properties.py +0 -171
- payi/resources/experiences/types/__init__.py +0 -33
- payi/resources/experiences/types/limit_config.py +0 -272
- payi/resources/experiences/types/types.py +0 -581
- payi/types/experiences/__init__.py +0 -9
- payi/types/experiences/experience_type.py +0 -24
- payi/types/experiences/property_create_params.py +0 -12
- payi/types/experiences/type_create_params.py +0 -22
- payi/types/experiences/type_list_params.py +0 -17
- payi/types/experiences/type_update_params.py +0 -14
- payi/types/experiences/types/__init__.py +0 -5
- payi/types/experiences/types/limit_config_create_params.py +0 -18
- payi/types/use_cases/kpi_create_params.py +0 -13
- {payi-0.1.0a94.dist-info → payi-0.1.0a95.dist-info}/WHEEL +0 -0
- {payi-0.1.0a94.dist-info → payi-0.1.0a95.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,383 +0,0 @@
|
|
|
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 .properties import (
|
|
10
|
-
PropertiesResource,
|
|
11
|
-
AsyncPropertiesResource,
|
|
12
|
-
PropertiesResourceWithRawResponse,
|
|
13
|
-
AsyncPropertiesResourceWithRawResponse,
|
|
14
|
-
PropertiesResourceWithStreamingResponse,
|
|
15
|
-
AsyncPropertiesResourceWithStreamingResponse,
|
|
16
|
-
)
|
|
17
|
-
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
18
|
-
from ..._response import (
|
|
19
|
-
to_raw_response_wrapper,
|
|
20
|
-
to_streamed_response_wrapper,
|
|
21
|
-
async_to_raw_response_wrapper,
|
|
22
|
-
async_to_streamed_response_wrapper,
|
|
23
|
-
)
|
|
24
|
-
from .types.types import (
|
|
25
|
-
TypesResource,
|
|
26
|
-
AsyncTypesResource,
|
|
27
|
-
TypesResourceWithRawResponse,
|
|
28
|
-
AsyncTypesResourceWithRawResponse,
|
|
29
|
-
TypesResourceWithStreamingResponse,
|
|
30
|
-
AsyncTypesResourceWithStreamingResponse,
|
|
31
|
-
)
|
|
32
|
-
from ..._base_client import make_request_options
|
|
33
|
-
from ...types.experience_instance_response import ExperienceInstanceResponse
|
|
34
|
-
|
|
35
|
-
__all__ = ["ExperiencesResource", "AsyncExperiencesResource"]
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class ExperiencesResource(SyncAPIResource):
|
|
39
|
-
@cached_property
|
|
40
|
-
def types(self) -> TypesResource:
|
|
41
|
-
return TypesResource(self._client)
|
|
42
|
-
|
|
43
|
-
@cached_property
|
|
44
|
-
def properties(self) -> PropertiesResource:
|
|
45
|
-
return PropertiesResource(self._client)
|
|
46
|
-
|
|
47
|
-
@cached_property
|
|
48
|
-
def with_raw_response(self) -> ExperiencesResourceWithRawResponse:
|
|
49
|
-
"""
|
|
50
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
51
|
-
the raw response object instead of the parsed content.
|
|
52
|
-
|
|
53
|
-
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
54
|
-
"""
|
|
55
|
-
return ExperiencesResourceWithRawResponse(self)
|
|
56
|
-
|
|
57
|
-
@cached_property
|
|
58
|
-
def with_streaming_response(self) -> ExperiencesResourceWithStreamingResponse:
|
|
59
|
-
"""
|
|
60
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
61
|
-
|
|
62
|
-
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
63
|
-
"""
|
|
64
|
-
return ExperiencesResourceWithStreamingResponse(self)
|
|
65
|
-
|
|
66
|
-
def create(
|
|
67
|
-
self,
|
|
68
|
-
experience_name: str,
|
|
69
|
-
*,
|
|
70
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
71
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
72
|
-
extra_headers: Headers | None = None,
|
|
73
|
-
extra_query: Query | None = None,
|
|
74
|
-
extra_body: Body | None = None,
|
|
75
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
76
|
-
) -> ExperienceInstanceResponse:
|
|
77
|
-
"""
|
|
78
|
-
Create an Experience
|
|
79
|
-
|
|
80
|
-
Args:
|
|
81
|
-
extra_headers: Send extra headers
|
|
82
|
-
|
|
83
|
-
extra_query: Add additional query parameters to the request
|
|
84
|
-
|
|
85
|
-
extra_body: Add additional JSON properties to the request
|
|
86
|
-
|
|
87
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
88
|
-
"""
|
|
89
|
-
if not experience_name:
|
|
90
|
-
raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
|
|
91
|
-
return self._post(
|
|
92
|
-
f"/api/v1/experiences/instances/{experience_name}",
|
|
93
|
-
options=make_request_options(
|
|
94
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
95
|
-
),
|
|
96
|
-
cast_to=ExperienceInstanceResponse,
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
def retrieve(
|
|
100
|
-
self,
|
|
101
|
-
experience_id: str,
|
|
102
|
-
*,
|
|
103
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
104
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
105
|
-
extra_headers: Headers | None = None,
|
|
106
|
-
extra_query: Query | None = None,
|
|
107
|
-
extra_body: Body | None = None,
|
|
108
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
109
|
-
) -> ExperienceInstanceResponse:
|
|
110
|
-
"""
|
|
111
|
-
Get an Experience details
|
|
112
|
-
|
|
113
|
-
Args:
|
|
114
|
-
extra_headers: Send extra headers
|
|
115
|
-
|
|
116
|
-
extra_query: Add additional query parameters to the request
|
|
117
|
-
|
|
118
|
-
extra_body: Add additional JSON properties to the request
|
|
119
|
-
|
|
120
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
121
|
-
"""
|
|
122
|
-
if not experience_id:
|
|
123
|
-
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
124
|
-
return self._get(
|
|
125
|
-
f"/api/v1/experiences/instances/{experience_id}",
|
|
126
|
-
options=make_request_options(
|
|
127
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
128
|
-
),
|
|
129
|
-
cast_to=ExperienceInstanceResponse,
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
def delete(
|
|
133
|
-
self,
|
|
134
|
-
experience_id: str,
|
|
135
|
-
*,
|
|
136
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
137
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
138
|
-
extra_headers: Headers | None = None,
|
|
139
|
-
extra_query: Query | None = None,
|
|
140
|
-
extra_body: Body | None = None,
|
|
141
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
142
|
-
) -> ExperienceInstanceResponse:
|
|
143
|
-
"""
|
|
144
|
-
Delete an Experience
|
|
145
|
-
|
|
146
|
-
Args:
|
|
147
|
-
extra_headers: Send extra headers
|
|
148
|
-
|
|
149
|
-
extra_query: Add additional query parameters to the request
|
|
150
|
-
|
|
151
|
-
extra_body: Add additional JSON properties to the request
|
|
152
|
-
|
|
153
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
154
|
-
"""
|
|
155
|
-
if not experience_id:
|
|
156
|
-
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
157
|
-
return self._delete(
|
|
158
|
-
f"/api/v1/experiences/instances/{experience_id}",
|
|
159
|
-
options=make_request_options(
|
|
160
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
161
|
-
),
|
|
162
|
-
cast_to=ExperienceInstanceResponse,
|
|
163
|
-
)
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
class AsyncExperiencesResource(AsyncAPIResource):
|
|
167
|
-
@cached_property
|
|
168
|
-
def types(self) -> AsyncTypesResource:
|
|
169
|
-
return AsyncTypesResource(self._client)
|
|
170
|
-
|
|
171
|
-
@cached_property
|
|
172
|
-
def properties(self) -> AsyncPropertiesResource:
|
|
173
|
-
return AsyncPropertiesResource(self._client)
|
|
174
|
-
|
|
175
|
-
@cached_property
|
|
176
|
-
def with_raw_response(self) -> AsyncExperiencesResourceWithRawResponse:
|
|
177
|
-
"""
|
|
178
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
179
|
-
the raw response object instead of the parsed content.
|
|
180
|
-
|
|
181
|
-
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
182
|
-
"""
|
|
183
|
-
return AsyncExperiencesResourceWithRawResponse(self)
|
|
184
|
-
|
|
185
|
-
@cached_property
|
|
186
|
-
def with_streaming_response(self) -> AsyncExperiencesResourceWithStreamingResponse:
|
|
187
|
-
"""
|
|
188
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
189
|
-
|
|
190
|
-
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
191
|
-
"""
|
|
192
|
-
return AsyncExperiencesResourceWithStreamingResponse(self)
|
|
193
|
-
|
|
194
|
-
async def create(
|
|
195
|
-
self,
|
|
196
|
-
experience_name: str,
|
|
197
|
-
*,
|
|
198
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
199
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
200
|
-
extra_headers: Headers | None = None,
|
|
201
|
-
extra_query: Query | None = None,
|
|
202
|
-
extra_body: Body | None = None,
|
|
203
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
204
|
-
) -> ExperienceInstanceResponse:
|
|
205
|
-
"""
|
|
206
|
-
Create an Experience
|
|
207
|
-
|
|
208
|
-
Args:
|
|
209
|
-
extra_headers: Send extra headers
|
|
210
|
-
|
|
211
|
-
extra_query: Add additional query parameters to the request
|
|
212
|
-
|
|
213
|
-
extra_body: Add additional JSON properties to the request
|
|
214
|
-
|
|
215
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
216
|
-
"""
|
|
217
|
-
if not experience_name:
|
|
218
|
-
raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
|
|
219
|
-
return await self._post(
|
|
220
|
-
f"/api/v1/experiences/instances/{experience_name}",
|
|
221
|
-
options=make_request_options(
|
|
222
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
223
|
-
),
|
|
224
|
-
cast_to=ExperienceInstanceResponse,
|
|
225
|
-
)
|
|
226
|
-
|
|
227
|
-
async def retrieve(
|
|
228
|
-
self,
|
|
229
|
-
experience_id: str,
|
|
230
|
-
*,
|
|
231
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
232
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
233
|
-
extra_headers: Headers | None = None,
|
|
234
|
-
extra_query: Query | None = None,
|
|
235
|
-
extra_body: Body | None = None,
|
|
236
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
237
|
-
) -> ExperienceInstanceResponse:
|
|
238
|
-
"""
|
|
239
|
-
Get an Experience details
|
|
240
|
-
|
|
241
|
-
Args:
|
|
242
|
-
extra_headers: Send extra headers
|
|
243
|
-
|
|
244
|
-
extra_query: Add additional query parameters to the request
|
|
245
|
-
|
|
246
|
-
extra_body: Add additional JSON properties to the request
|
|
247
|
-
|
|
248
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
249
|
-
"""
|
|
250
|
-
if not experience_id:
|
|
251
|
-
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
252
|
-
return await self._get(
|
|
253
|
-
f"/api/v1/experiences/instances/{experience_id}",
|
|
254
|
-
options=make_request_options(
|
|
255
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
256
|
-
),
|
|
257
|
-
cast_to=ExperienceInstanceResponse,
|
|
258
|
-
)
|
|
259
|
-
|
|
260
|
-
async def delete(
|
|
261
|
-
self,
|
|
262
|
-
experience_id: str,
|
|
263
|
-
*,
|
|
264
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
265
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
266
|
-
extra_headers: Headers | None = None,
|
|
267
|
-
extra_query: Query | None = None,
|
|
268
|
-
extra_body: Body | None = None,
|
|
269
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
270
|
-
) -> ExperienceInstanceResponse:
|
|
271
|
-
"""
|
|
272
|
-
Delete an Experience
|
|
273
|
-
|
|
274
|
-
Args:
|
|
275
|
-
extra_headers: Send extra headers
|
|
276
|
-
|
|
277
|
-
extra_query: Add additional query parameters to the request
|
|
278
|
-
|
|
279
|
-
extra_body: Add additional JSON properties to the request
|
|
280
|
-
|
|
281
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
282
|
-
"""
|
|
283
|
-
if not experience_id:
|
|
284
|
-
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
285
|
-
return await self._delete(
|
|
286
|
-
f"/api/v1/experiences/instances/{experience_id}",
|
|
287
|
-
options=make_request_options(
|
|
288
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
289
|
-
),
|
|
290
|
-
cast_to=ExperienceInstanceResponse,
|
|
291
|
-
)
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
class ExperiencesResourceWithRawResponse:
|
|
295
|
-
def __init__(self, experiences: ExperiencesResource) -> None:
|
|
296
|
-
self._experiences = experiences
|
|
297
|
-
|
|
298
|
-
self.create = to_raw_response_wrapper(
|
|
299
|
-
experiences.create,
|
|
300
|
-
)
|
|
301
|
-
self.retrieve = to_raw_response_wrapper(
|
|
302
|
-
experiences.retrieve,
|
|
303
|
-
)
|
|
304
|
-
self.delete = to_raw_response_wrapper(
|
|
305
|
-
experiences.delete,
|
|
306
|
-
)
|
|
307
|
-
|
|
308
|
-
@cached_property
|
|
309
|
-
def types(self) -> TypesResourceWithRawResponse:
|
|
310
|
-
return TypesResourceWithRawResponse(self._experiences.types)
|
|
311
|
-
|
|
312
|
-
@cached_property
|
|
313
|
-
def properties(self) -> PropertiesResourceWithRawResponse:
|
|
314
|
-
return PropertiesResourceWithRawResponse(self._experiences.properties)
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
class AsyncExperiencesResourceWithRawResponse:
|
|
318
|
-
def __init__(self, experiences: AsyncExperiencesResource) -> None:
|
|
319
|
-
self._experiences = experiences
|
|
320
|
-
|
|
321
|
-
self.create = async_to_raw_response_wrapper(
|
|
322
|
-
experiences.create,
|
|
323
|
-
)
|
|
324
|
-
self.retrieve = async_to_raw_response_wrapper(
|
|
325
|
-
experiences.retrieve,
|
|
326
|
-
)
|
|
327
|
-
self.delete = async_to_raw_response_wrapper(
|
|
328
|
-
experiences.delete,
|
|
329
|
-
)
|
|
330
|
-
|
|
331
|
-
@cached_property
|
|
332
|
-
def types(self) -> AsyncTypesResourceWithRawResponse:
|
|
333
|
-
return AsyncTypesResourceWithRawResponse(self._experiences.types)
|
|
334
|
-
|
|
335
|
-
@cached_property
|
|
336
|
-
def properties(self) -> AsyncPropertiesResourceWithRawResponse:
|
|
337
|
-
return AsyncPropertiesResourceWithRawResponse(self._experiences.properties)
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
class ExperiencesResourceWithStreamingResponse:
|
|
341
|
-
def __init__(self, experiences: ExperiencesResource) -> None:
|
|
342
|
-
self._experiences = experiences
|
|
343
|
-
|
|
344
|
-
self.create = to_streamed_response_wrapper(
|
|
345
|
-
experiences.create,
|
|
346
|
-
)
|
|
347
|
-
self.retrieve = to_streamed_response_wrapper(
|
|
348
|
-
experiences.retrieve,
|
|
349
|
-
)
|
|
350
|
-
self.delete = to_streamed_response_wrapper(
|
|
351
|
-
experiences.delete,
|
|
352
|
-
)
|
|
353
|
-
|
|
354
|
-
@cached_property
|
|
355
|
-
def types(self) -> TypesResourceWithStreamingResponse:
|
|
356
|
-
return TypesResourceWithStreamingResponse(self._experiences.types)
|
|
357
|
-
|
|
358
|
-
@cached_property
|
|
359
|
-
def properties(self) -> PropertiesResourceWithStreamingResponse:
|
|
360
|
-
return PropertiesResourceWithStreamingResponse(self._experiences.properties)
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
class AsyncExperiencesResourceWithStreamingResponse:
|
|
364
|
-
def __init__(self, experiences: AsyncExperiencesResource) -> None:
|
|
365
|
-
self._experiences = experiences
|
|
366
|
-
|
|
367
|
-
self.create = async_to_streamed_response_wrapper(
|
|
368
|
-
experiences.create,
|
|
369
|
-
)
|
|
370
|
-
self.retrieve = async_to_streamed_response_wrapper(
|
|
371
|
-
experiences.retrieve,
|
|
372
|
-
)
|
|
373
|
-
self.delete = async_to_streamed_response_wrapper(
|
|
374
|
-
experiences.delete,
|
|
375
|
-
)
|
|
376
|
-
|
|
377
|
-
@cached_property
|
|
378
|
-
def types(self) -> AsyncTypesResourceWithStreamingResponse:
|
|
379
|
-
return AsyncTypesResourceWithStreamingResponse(self._experiences.types)
|
|
380
|
-
|
|
381
|
-
@cached_property
|
|
382
|
-
def properties(self) -> AsyncPropertiesResourceWithStreamingResponse:
|
|
383
|
-
return AsyncPropertiesResourceWithStreamingResponse(self._experiences.properties)
|
|
@@ -1,171 +0,0 @@
|
|
|
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
|
|
6
|
-
|
|
7
|
-
import httpx
|
|
8
|
-
|
|
9
|
-
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
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.experiences import property_create_params
|
|
21
|
-
from ...types.experience_instance_response import ExperienceInstanceResponse
|
|
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 create(
|
|
47
|
-
self,
|
|
48
|
-
experience_id: str,
|
|
49
|
-
*,
|
|
50
|
-
properties: Dict[str, 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
|
-
) -> ExperienceInstanceResponse:
|
|
58
|
-
"""
|
|
59
|
-
Update Experience 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 experience_id:
|
|
71
|
-
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
72
|
-
return self._post(
|
|
73
|
-
f"/api/v1/experiences/instances/{experience_id}/properties",
|
|
74
|
-
body=maybe_transform({"properties": properties}, property_create_params.PropertyCreateParams),
|
|
75
|
-
options=make_request_options(
|
|
76
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
77
|
-
),
|
|
78
|
-
cast_to=ExperienceInstanceResponse,
|
|
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 create(
|
|
103
|
-
self,
|
|
104
|
-
experience_id: str,
|
|
105
|
-
*,
|
|
106
|
-
properties: Dict[str, 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
|
-
) -> ExperienceInstanceResponse:
|
|
114
|
-
"""
|
|
115
|
-
Update Experience 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 experience_id:
|
|
127
|
-
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
128
|
-
return await self._post(
|
|
129
|
-
f"/api/v1/experiences/instances/{experience_id}/properties",
|
|
130
|
-
body=await async_maybe_transform({"properties": properties}, property_create_params.PropertyCreateParams),
|
|
131
|
-
options=make_request_options(
|
|
132
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
133
|
-
),
|
|
134
|
-
cast_to=ExperienceInstanceResponse,
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
class PropertiesResourceWithRawResponse:
|
|
139
|
-
def __init__(self, properties: PropertiesResource) -> None:
|
|
140
|
-
self._properties = properties
|
|
141
|
-
|
|
142
|
-
self.create = to_raw_response_wrapper(
|
|
143
|
-
properties.create,
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
class AsyncPropertiesResourceWithRawResponse:
|
|
148
|
-
def __init__(self, properties: AsyncPropertiesResource) -> None:
|
|
149
|
-
self._properties = properties
|
|
150
|
-
|
|
151
|
-
self.create = async_to_raw_response_wrapper(
|
|
152
|
-
properties.create,
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
class PropertiesResourceWithStreamingResponse:
|
|
157
|
-
def __init__(self, properties: PropertiesResource) -> None:
|
|
158
|
-
self._properties = properties
|
|
159
|
-
|
|
160
|
-
self.create = to_streamed_response_wrapper(
|
|
161
|
-
properties.create,
|
|
162
|
-
)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
class AsyncPropertiesResourceWithStreamingResponse:
|
|
166
|
-
def __init__(self, properties: AsyncPropertiesResource) -> None:
|
|
167
|
-
self._properties = properties
|
|
168
|
-
|
|
169
|
-
self.create = async_to_streamed_response_wrapper(
|
|
170
|
-
properties.create,
|
|
171
|
-
)
|
|
@@ -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
|
-
]
|