payi 0.1.0a36__py3-none-any.whl → 0.1.0a38__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/lib/instrument.py +41 -33
- payi/resources/experiences/experiences.py +8 -8
- payi/resources/experiences/types/__init__.py +33 -0
- payi/resources/experiences/types/limit_config.py +275 -0
- payi/resources/experiences/{types.py → types/types.py} +47 -11
- payi/resources/ingest.py +5 -6
- payi/resources/limits/limits.py +4 -8
- payi/resources/requests/__init__.py +14 -0
- payi/resources/requests/requests.py +32 -0
- payi/resources/requests/result.py +169 -0
- payi/types/__init__.py +4 -1
- payi/types/cost_data.py +5 -2
- payi/types/experience_instance_response.py +2 -4
- payi/types/experiences/experience_type.py +15 -2
- payi/types/experiences/type_create_params.py +15 -3
- payi/types/experiences/type_update_params.py +2 -2
- payi/types/experiences/types/__init__.py +5 -0
- payi/types/experiences/types/limit_config_create_params.py +18 -0
- payi/types/ingest_event_param.py +4 -15
- payi/types/ingest_response.py +7 -2
- payi/types/ingest_units_params.py +4 -15
- payi/types/limit_create_params.py +1 -3
- payi/types/limit_response.py +0 -2
- payi/types/paged_limit_list.py +0 -2
- payi/types/pay_i_common_models_api_router_header_info_param.py +14 -0
- payi/types/requests/__init__.py +1 -0
- payi/types/requests/request_result.py +48 -0
- payi/types/shared/__init__.py +3 -1
- payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +10 -0
- {payi-0.1.0a36.dist-info → payi-0.1.0a38.dist-info}/METADATA +1 -1
- {payi-0.1.0a36.dist-info → payi-0.1.0a38.dist-info}/RECORD +34 -26
- {payi-0.1.0a36.dist-info → payi-0.1.0a38.dist-info}/WHEEL +0 -0
- {payi-0.1.0a36.dist-info → payi-0.1.0a38.dist-info}/licenses/LICENSE +0 -0
payi/resources/limits/limits.py
CHANGED
|
@@ -69,8 +69,7 @@ class LimitsResource(SyncAPIResource):
|
|
|
69
69
|
limit_name: str,
|
|
70
70
|
max: float,
|
|
71
71
|
billing_model_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
72
|
-
|
|
73
|
-
currency: Literal["usd"] | NotGiven = NOT_GIVEN,
|
|
72
|
+
limit_basis: Literal["base", "billed"] | NotGiven = NOT_GIVEN,
|
|
74
73
|
limit_tags: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
75
74
|
limit_type: Literal["block", "allow"] | NotGiven = NOT_GIVEN,
|
|
76
75
|
threshold: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -100,8 +99,7 @@ class LimitsResource(SyncAPIResource):
|
|
|
100
99
|
"limit_name": limit_name,
|
|
101
100
|
"max": max,
|
|
102
101
|
"billing_model_id": billing_model_id,
|
|
103
|
-
"
|
|
104
|
-
"currency": currency,
|
|
102
|
+
"limit_basis": limit_basis,
|
|
105
103
|
"limit_tags": limit_tags,
|
|
106
104
|
"limit_type": limit_type,
|
|
107
105
|
"threshold": threshold,
|
|
@@ -343,8 +341,7 @@ class AsyncLimitsResource(AsyncAPIResource):
|
|
|
343
341
|
limit_name: str,
|
|
344
342
|
max: float,
|
|
345
343
|
billing_model_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
346
|
-
|
|
347
|
-
currency: Literal["usd"] | NotGiven = NOT_GIVEN,
|
|
344
|
+
limit_basis: Literal["base", "billed"] | NotGiven = NOT_GIVEN,
|
|
348
345
|
limit_tags: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
349
346
|
limit_type: Literal["block", "allow"] | NotGiven = NOT_GIVEN,
|
|
350
347
|
threshold: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -374,8 +371,7 @@ class AsyncLimitsResource(AsyncAPIResource):
|
|
|
374
371
|
"limit_name": limit_name,
|
|
375
372
|
"max": max,
|
|
376
373
|
"billing_model_id": billing_model_id,
|
|
377
|
-
"
|
|
378
|
-
"currency": currency,
|
|
374
|
+
"limit_basis": limit_basis,
|
|
379
375
|
"limit_tags": limit_tags,
|
|
380
376
|
"limit_type": limit_type,
|
|
381
377
|
"threshold": threshold,
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from .result import (
|
|
4
|
+
ResultResource,
|
|
5
|
+
AsyncResultResource,
|
|
6
|
+
ResultResourceWithRawResponse,
|
|
7
|
+
AsyncResultResourceWithRawResponse,
|
|
8
|
+
ResultResourceWithStreamingResponse,
|
|
9
|
+
AsyncResultResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
3
11
|
from .requests import (
|
|
4
12
|
RequestsResource,
|
|
5
13
|
AsyncRequestsResource,
|
|
@@ -24,6 +32,12 @@ __all__ = [
|
|
|
24
32
|
"AsyncPropertiesResourceWithRawResponse",
|
|
25
33
|
"PropertiesResourceWithStreamingResponse",
|
|
26
34
|
"AsyncPropertiesResourceWithStreamingResponse",
|
|
35
|
+
"ResultResource",
|
|
36
|
+
"AsyncResultResource",
|
|
37
|
+
"ResultResourceWithRawResponse",
|
|
38
|
+
"AsyncResultResourceWithRawResponse",
|
|
39
|
+
"ResultResourceWithStreamingResponse",
|
|
40
|
+
"AsyncResultResourceWithStreamingResponse",
|
|
27
41
|
"RequestsResource",
|
|
28
42
|
"AsyncRequestsResource",
|
|
29
43
|
"RequestsResourceWithRawResponse",
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from .result import (
|
|
6
|
+
ResultResource,
|
|
7
|
+
AsyncResultResource,
|
|
8
|
+
ResultResourceWithRawResponse,
|
|
9
|
+
AsyncResultResourceWithRawResponse,
|
|
10
|
+
ResultResourceWithStreamingResponse,
|
|
11
|
+
AsyncResultResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
5
13
|
from ..._compat import cached_property
|
|
6
14
|
from .properties import (
|
|
7
15
|
PropertiesResource,
|
|
@@ -21,6 +29,10 @@ class RequestsResource(SyncAPIResource):
|
|
|
21
29
|
def properties(self) -> PropertiesResource:
|
|
22
30
|
return PropertiesResource(self._client)
|
|
23
31
|
|
|
32
|
+
@cached_property
|
|
33
|
+
def result(self) -> ResultResource:
|
|
34
|
+
return ResultResource(self._client)
|
|
35
|
+
|
|
24
36
|
@cached_property
|
|
25
37
|
def with_raw_response(self) -> RequestsResourceWithRawResponse:
|
|
26
38
|
"""
|
|
@@ -46,6 +58,10 @@ class AsyncRequestsResource(AsyncAPIResource):
|
|
|
46
58
|
def properties(self) -> AsyncPropertiesResource:
|
|
47
59
|
return AsyncPropertiesResource(self._client)
|
|
48
60
|
|
|
61
|
+
@cached_property
|
|
62
|
+
def result(self) -> AsyncResultResource:
|
|
63
|
+
return AsyncResultResource(self._client)
|
|
64
|
+
|
|
49
65
|
@cached_property
|
|
50
66
|
def with_raw_response(self) -> AsyncRequestsResourceWithRawResponse:
|
|
51
67
|
"""
|
|
@@ -74,6 +90,10 @@ class RequestsResourceWithRawResponse:
|
|
|
74
90
|
def properties(self) -> PropertiesResourceWithRawResponse:
|
|
75
91
|
return PropertiesResourceWithRawResponse(self._requests.properties)
|
|
76
92
|
|
|
93
|
+
@cached_property
|
|
94
|
+
def result(self) -> ResultResourceWithRawResponse:
|
|
95
|
+
return ResultResourceWithRawResponse(self._requests.result)
|
|
96
|
+
|
|
77
97
|
|
|
78
98
|
class AsyncRequestsResourceWithRawResponse:
|
|
79
99
|
def __init__(self, requests: AsyncRequestsResource) -> None:
|
|
@@ -83,6 +103,10 @@ class AsyncRequestsResourceWithRawResponse:
|
|
|
83
103
|
def properties(self) -> AsyncPropertiesResourceWithRawResponse:
|
|
84
104
|
return AsyncPropertiesResourceWithRawResponse(self._requests.properties)
|
|
85
105
|
|
|
106
|
+
@cached_property
|
|
107
|
+
def result(self) -> AsyncResultResourceWithRawResponse:
|
|
108
|
+
return AsyncResultResourceWithRawResponse(self._requests.result)
|
|
109
|
+
|
|
86
110
|
|
|
87
111
|
class RequestsResourceWithStreamingResponse:
|
|
88
112
|
def __init__(self, requests: RequestsResource) -> None:
|
|
@@ -92,6 +116,10 @@ class RequestsResourceWithStreamingResponse:
|
|
|
92
116
|
def properties(self) -> PropertiesResourceWithStreamingResponse:
|
|
93
117
|
return PropertiesResourceWithStreamingResponse(self._requests.properties)
|
|
94
118
|
|
|
119
|
+
@cached_property
|
|
120
|
+
def result(self) -> ResultResourceWithStreamingResponse:
|
|
121
|
+
return ResultResourceWithStreamingResponse(self._requests.result)
|
|
122
|
+
|
|
95
123
|
|
|
96
124
|
class AsyncRequestsResourceWithStreamingResponse:
|
|
97
125
|
def __init__(self, requests: AsyncRequestsResource) -> None:
|
|
@@ -100,3 +128,7 @@ class AsyncRequestsResourceWithStreamingResponse:
|
|
|
100
128
|
@cached_property
|
|
101
129
|
def properties(self) -> AsyncPropertiesResourceWithStreamingResponse:
|
|
102
130
|
return AsyncPropertiesResourceWithStreamingResponse(self._requests.properties)
|
|
131
|
+
|
|
132
|
+
@cached_property
|
|
133
|
+
def result(self) -> AsyncResultResourceWithStreamingResponse:
|
|
134
|
+
return AsyncResultResourceWithStreamingResponse(self._requests.result)
|
|
@@ -0,0 +1,169 @@
|
|
|
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.requests.request_result import RequestResult
|
|
18
|
+
|
|
19
|
+
__all__ = ["ResultResource", "AsyncResultResource"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ResultResource(SyncAPIResource):
|
|
23
|
+
@cached_property
|
|
24
|
+
def with_raw_response(self) -> ResultResourceWithRawResponse:
|
|
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 ResultResourceWithRawResponse(self)
|
|
32
|
+
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_streaming_response(self) -> ResultResourceWithStreamingResponse:
|
|
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 ResultResourceWithStreamingResponse(self)
|
|
41
|
+
|
|
42
|
+
def retrieve(
|
|
43
|
+
self,
|
|
44
|
+
request_id: str,
|
|
45
|
+
*,
|
|
46
|
+
category: str,
|
|
47
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
|
+
extra_headers: Headers | None = None,
|
|
50
|
+
extra_query: Query | None = None,
|
|
51
|
+
extra_body: Body | None = None,
|
|
52
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
53
|
+
) -> RequestResult:
|
|
54
|
+
"""
|
|
55
|
+
Get a Request results
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
extra_headers: Send extra headers
|
|
59
|
+
|
|
60
|
+
extra_query: Add additional query parameters to the request
|
|
61
|
+
|
|
62
|
+
extra_body: Add additional JSON properties to the request
|
|
63
|
+
|
|
64
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
65
|
+
"""
|
|
66
|
+
if not category:
|
|
67
|
+
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
68
|
+
if not request_id:
|
|
69
|
+
raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
|
|
70
|
+
return self._get(
|
|
71
|
+
f"/api/v1/requests/result/{category}/{request_id}",
|
|
72
|
+
options=make_request_options(
|
|
73
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
74
|
+
),
|
|
75
|
+
cast_to=RequestResult,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class AsyncResultResource(AsyncAPIResource):
|
|
80
|
+
@cached_property
|
|
81
|
+
def with_raw_response(self) -> AsyncResultResourceWithRawResponse:
|
|
82
|
+
"""
|
|
83
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
84
|
+
the raw response object instead of the parsed content.
|
|
85
|
+
|
|
86
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
87
|
+
"""
|
|
88
|
+
return AsyncResultResourceWithRawResponse(self)
|
|
89
|
+
|
|
90
|
+
@cached_property
|
|
91
|
+
def with_streaming_response(self) -> AsyncResultResourceWithStreamingResponse:
|
|
92
|
+
"""
|
|
93
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
94
|
+
|
|
95
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
96
|
+
"""
|
|
97
|
+
return AsyncResultResourceWithStreamingResponse(self)
|
|
98
|
+
|
|
99
|
+
async def retrieve(
|
|
100
|
+
self,
|
|
101
|
+
request_id: str,
|
|
102
|
+
*,
|
|
103
|
+
category: str,
|
|
104
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
105
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
106
|
+
extra_headers: Headers | None = None,
|
|
107
|
+
extra_query: Query | None = None,
|
|
108
|
+
extra_body: Body | None = None,
|
|
109
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
110
|
+
) -> RequestResult:
|
|
111
|
+
"""
|
|
112
|
+
Get a Request results
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
extra_headers: Send extra headers
|
|
116
|
+
|
|
117
|
+
extra_query: Add additional query parameters to the request
|
|
118
|
+
|
|
119
|
+
extra_body: Add additional JSON properties to the request
|
|
120
|
+
|
|
121
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
122
|
+
"""
|
|
123
|
+
if not category:
|
|
124
|
+
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
125
|
+
if not request_id:
|
|
126
|
+
raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
|
|
127
|
+
return await self._get(
|
|
128
|
+
f"/api/v1/requests/result/{category}/{request_id}",
|
|
129
|
+
options=make_request_options(
|
|
130
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
131
|
+
),
|
|
132
|
+
cast_to=RequestResult,
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class ResultResourceWithRawResponse:
|
|
137
|
+
def __init__(self, result: ResultResource) -> None:
|
|
138
|
+
self._result = result
|
|
139
|
+
|
|
140
|
+
self.retrieve = to_raw_response_wrapper(
|
|
141
|
+
result.retrieve,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class AsyncResultResourceWithRawResponse:
|
|
146
|
+
def __init__(self, result: AsyncResultResource) -> None:
|
|
147
|
+
self._result = result
|
|
148
|
+
|
|
149
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
150
|
+
result.retrieve,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class ResultResourceWithStreamingResponse:
|
|
155
|
+
def __init__(self, result: ResultResource) -> None:
|
|
156
|
+
self._result = result
|
|
157
|
+
|
|
158
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
159
|
+
result.retrieve,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class AsyncResultResourceWithStreamingResponse:
|
|
164
|
+
def __init__(self, result: AsyncResultResource) -> None:
|
|
165
|
+
self._result = result
|
|
166
|
+
|
|
167
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
168
|
+
result.retrieve,
|
|
169
|
+
)
|
payi/types/__init__.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from .shared import
|
|
5
|
+
from .shared import PayICommonModelsBudgetManagementCostDetailsBase as PayICommonModelsBudgetManagementCostDetailsBase
|
|
6
6
|
from .cost_data import CostData as CostData
|
|
7
7
|
from .cost_details import CostDetails as CostDetails
|
|
8
8
|
from .billing_model import BillingModel as BillingModel
|
|
@@ -35,3 +35,6 @@ from .price_modifier_update_params import PriceModifierUpdateParams as PriceModi
|
|
|
35
35
|
from .category_list_resources_response import CategoryListResourcesResponse as CategoryListResourcesResponse
|
|
36
36
|
from .price_modifier_retrieve_response import PriceModifierRetrieveResponse as PriceModifierRetrieveResponse
|
|
37
37
|
from .category_delete_resource_response import CategoryDeleteResourceResponse as CategoryDeleteResourceResponse
|
|
38
|
+
from .pay_i_common_models_api_router_header_info_param import (
|
|
39
|
+
PayICommonModelsAPIRouterHeaderInfoParam as PayICommonModelsAPIRouterHeaderInfoParam,
|
|
40
|
+
)
|
payi/types/cost_data.py
CHANGED
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
from .._models import BaseModel
|
|
5
5
|
from .cost_details import CostDetails
|
|
6
|
+
from .shared.pay_i_common_models_budget_management_cost_details_base import (
|
|
7
|
+
PayICommonModelsBudgetManagementCostDetailsBase,
|
|
8
|
+
)
|
|
6
9
|
|
|
7
10
|
__all__ = ["CostData"]
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
class CostData(BaseModel):
|
|
11
|
-
input:
|
|
14
|
+
input: PayICommonModelsBudgetManagementCostDetailsBase
|
|
12
15
|
|
|
13
|
-
output:
|
|
16
|
+
output: PayICommonModelsBudgetManagementCostDetailsBase
|
|
14
17
|
|
|
15
18
|
total: CostDetails
|
|
@@ -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
|
|
|
5
5
|
from .._models import BaseModel
|
|
6
6
|
|
|
@@ -10,6 +10,4 @@ __all__ = ["ExperienceInstanceResponse"]
|
|
|
10
10
|
class ExperienceInstanceResponse(BaseModel):
|
|
11
11
|
experience_id: str
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
request_id: str
|
|
13
|
+
limit_id: Optional[str] = None
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import Optional
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
4
5
|
|
|
5
6
|
from ..._models import BaseModel
|
|
6
7
|
|
|
7
|
-
__all__ = ["ExperienceType"]
|
|
8
|
+
__all__ = ["ExperienceType", "LimitConfig"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class LimitConfig(BaseModel):
|
|
12
|
+
max: float
|
|
13
|
+
|
|
14
|
+
limit_tags: Optional[List[str]] = None
|
|
15
|
+
|
|
16
|
+
limit_type: Optional[Literal["block", "allow"]] = None
|
|
17
|
+
|
|
18
|
+
threshold: Optional[float] = None
|
|
8
19
|
|
|
9
20
|
|
|
10
21
|
class ExperienceType(BaseModel):
|
|
@@ -14,4 +25,6 @@ class ExperienceType(BaseModel):
|
|
|
14
25
|
|
|
15
26
|
request_id: str
|
|
16
27
|
|
|
28
|
+
limit_config: Optional[LimitConfig] = None
|
|
29
|
+
|
|
17
30
|
logging_enabled: Optional[bool] = None
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
6
|
-
from typing_extensions import Required, TypedDict
|
|
5
|
+
from typing import List, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
7
|
|
|
8
|
-
__all__ = ["TypeCreateParams"]
|
|
8
|
+
__all__ = ["TypeCreateParams", "LimitConfig"]
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class TypeCreateParams(TypedDict, total=False):
|
|
@@ -13,4 +13,16 @@ class TypeCreateParams(TypedDict, total=False):
|
|
|
13
13
|
|
|
14
14
|
name: Required[str]
|
|
15
15
|
|
|
16
|
+
limit_config: LimitConfig
|
|
17
|
+
|
|
16
18
|
logging_enabled: Optional[bool]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class LimitConfig(TypedDict, total=False):
|
|
22
|
+
max: Required[float]
|
|
23
|
+
|
|
24
|
+
limit_tags: Optional[List[str]]
|
|
25
|
+
|
|
26
|
+
limit_type: Literal["block", "allow"]
|
|
27
|
+
|
|
28
|
+
threshold: Optional[float]
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Optional
|
|
6
|
-
from typing_extensions import
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
8
|
__all__ = ["TypeUpdateParams"]
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class TypeUpdateParams(TypedDict, total=False):
|
|
12
|
-
description:
|
|
12
|
+
description: Optional[str]
|
|
13
13
|
|
|
14
14
|
logging_enabled: Optional[bool]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["LimitConfigCreateParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class LimitConfigCreateParams(TypedDict, total=False):
|
|
12
|
+
max: Required[float]
|
|
13
|
+
|
|
14
|
+
limit_tags: Optional[List[str]]
|
|
15
|
+
|
|
16
|
+
limit_type: Literal["block", "allow"]
|
|
17
|
+
|
|
18
|
+
threshold: Optional[float]
|
payi/types/ingest_event_param.py
CHANGED
|
@@ -7,8 +7,9 @@ from datetime import datetime
|
|
|
7
7
|
from typing_extensions import Required, Annotated, TypedDict
|
|
8
8
|
|
|
9
9
|
from .._utils import PropertyInfo
|
|
10
|
+
from .pay_i_common_models_api_router_header_info_param import PayICommonModelsAPIRouterHeaderInfoParam
|
|
10
11
|
|
|
11
|
-
__all__ = ["IngestEventParam", "Units"
|
|
12
|
+
__all__ = ["IngestEventParam", "Units"]
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class Units(TypedDict, total=False):
|
|
@@ -17,18 +18,6 @@ class Units(TypedDict, total=False):
|
|
|
17
18
|
output: int
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
class ProviderRequestHeader(TypedDict, total=False):
|
|
21
|
-
name: Required[str]
|
|
22
|
-
|
|
23
|
-
value: Optional[str]
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class ProviderResponseHeader(TypedDict, total=False):
|
|
27
|
-
name: Required[str]
|
|
28
|
-
|
|
29
|
-
value: Optional[str]
|
|
30
|
-
|
|
31
|
-
|
|
32
21
|
class IngestEventParam(TypedDict, total=False):
|
|
33
22
|
category: Required[str]
|
|
34
23
|
|
|
@@ -54,11 +43,11 @@ class IngestEventParam(TypedDict, total=False):
|
|
|
54
43
|
|
|
55
44
|
properties: Optional[Dict[str, str]]
|
|
56
45
|
|
|
57
|
-
provider_request_headers: Optional[Iterable[
|
|
46
|
+
provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
|
|
58
47
|
|
|
59
48
|
provider_request_json: Optional[str]
|
|
60
49
|
|
|
61
|
-
provider_response_headers: Optional[Iterable[
|
|
50
|
+
provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
|
|
62
51
|
|
|
63
52
|
provider_response_json: Union[str, List[str], None]
|
|
64
53
|
|
payi/types/ingest_response.py
CHANGED
|
@@ -6,6 +6,9 @@ from typing_extensions import Literal
|
|
|
6
6
|
|
|
7
7
|
from .._models import BaseModel
|
|
8
8
|
from .cost_details import CostDetails
|
|
9
|
+
from .shared.pay_i_common_models_budget_management_cost_details_base import (
|
|
10
|
+
PayICommonModelsBudgetManagementCostDetailsBase,
|
|
11
|
+
)
|
|
9
12
|
|
|
10
13
|
__all__ = ["IngestResponse", "XproxyResult", "XproxyResultCost", "XproxyResultLimits"]
|
|
11
14
|
|
|
@@ -13,9 +16,9 @@ __all__ = ["IngestResponse", "XproxyResult", "XproxyResultCost", "XproxyResultLi
|
|
|
13
16
|
class XproxyResultCost(BaseModel):
|
|
14
17
|
currency: Optional[Literal["usd"]] = None
|
|
15
18
|
|
|
16
|
-
input: Optional[
|
|
19
|
+
input: Optional[PayICommonModelsBudgetManagementCostDetailsBase] = None
|
|
17
20
|
|
|
18
|
-
output: Optional[
|
|
21
|
+
output: Optional[PayICommonModelsBudgetManagementCostDetailsBase] = None
|
|
19
22
|
|
|
20
23
|
total: Optional[CostDetails] = None
|
|
21
24
|
|
|
@@ -25,6 +28,8 @@ class XproxyResultLimits(BaseModel):
|
|
|
25
28
|
|
|
26
29
|
|
|
27
30
|
class XproxyResult(BaseModel):
|
|
31
|
+
blocked_limit_ids: Optional[List[str]] = None
|
|
32
|
+
|
|
28
33
|
cost: Optional[XproxyResultCost] = None
|
|
29
34
|
|
|
30
35
|
experience_id: Optional[str] = None
|
|
@@ -7,8 +7,9 @@ from datetime import datetime
|
|
|
7
7
|
from typing_extensions import Required, Annotated, TypedDict
|
|
8
8
|
|
|
9
9
|
from .._utils import PropertyInfo
|
|
10
|
+
from .pay_i_common_models_api_router_header_info_param import PayICommonModelsAPIRouterHeaderInfoParam
|
|
10
11
|
|
|
11
|
-
__all__ = ["IngestUnitsParams", "Units"
|
|
12
|
+
__all__ = ["IngestUnitsParams", "Units"]
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class IngestUnitsParams(TypedDict, total=False):
|
|
@@ -28,11 +29,11 @@ class IngestUnitsParams(TypedDict, total=False):
|
|
|
28
29
|
|
|
29
30
|
properties: Optional[Dict[str, str]]
|
|
30
31
|
|
|
31
|
-
provider_request_headers: Optional[Iterable[
|
|
32
|
+
provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
|
|
32
33
|
|
|
33
34
|
provider_request_json: Optional[str]
|
|
34
35
|
|
|
35
|
-
provider_response_headers: Optional[Iterable[
|
|
36
|
+
provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]]
|
|
36
37
|
|
|
37
38
|
provider_response_json: Union[str, List[str], None]
|
|
38
39
|
|
|
@@ -55,15 +56,3 @@ class Units(TypedDict, total=False):
|
|
|
55
56
|
input: int
|
|
56
57
|
|
|
57
58
|
output: int
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
class ProviderRequestHeader(TypedDict, total=False):
|
|
61
|
-
name: Required[str]
|
|
62
|
-
|
|
63
|
-
value: Optional[str]
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class ProviderResponseHeader(TypedDict, total=False):
|
|
67
|
-
name: Required[str]
|
|
68
|
-
|
|
69
|
-
value: Optional[str]
|
payi/types/limit_response.py
CHANGED
payi/types/paged_limit_list.py
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
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 Optional
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["PayICommonModelsAPIRouterHeaderInfoParam"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PayICommonModelsAPIRouterHeaderInfoParam(TypedDict, total=False):
|
|
12
|
+
name: Required[str]
|
|
13
|
+
|
|
14
|
+
value: Optional[str]
|