payi 0.1.0a104__py3-none-any.whl → 0.1.0a105__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/requests/__init__.py +27 -27
- payi/resources/requests/request_id/__init__.py +47 -0
- payi/resources/requests/{properties.py → request_id/properties.py} +22 -22
- payi/resources/requests/request_id/request_id.py +134 -0
- payi/resources/requests/{result.py → request_id/result.py} +8 -14
- payi/resources/requests/requests.py +40 -40
- payi/resources/requests/response_id/__init__.py +47 -0
- payi/resources/requests/response_id/properties.py +181 -0
- payi/resources/requests/response_id/response_id.py +134 -0
- payi/resources/requests/response_id/result.py +173 -0
- payi/resources/use_cases/properties.py +15 -15
- payi/types/__init__.py +1 -0
- payi/types/{requests/request_result.py → request_result.py} +2 -2
- payi/types/requests/__init__.py +0 -3
- payi/types/requests/request_id/__init__.py +5 -0
- payi/types/requests/{property_create_params.py → request_id/property_update_params.py} +2 -2
- payi/types/requests/response_id/__init__.py +5 -0
- payi/types/requests/response_id/property_update_params.py +14 -0
- payi/types/shared/xproxy_result.py +2 -0
- payi/types/use_cases/__init__.py +1 -1
- payi/types/use_cases/{property_create_params.py → property_update_params.py} +2 -2
- {payi-0.1.0a104.dist-info → payi-0.1.0a105.dist-info}/METADATA +1 -1
- {payi-0.1.0a104.dist-info → payi-0.1.0a105.dist-info}/RECORD +26 -17
- {payi-0.1.0a104.dist-info → payi-0.1.0a105.dist-info}/WHEEL +0 -0
- {payi-0.1.0a104.dist-info → payi-0.1.0a105.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 .result import (
|
|
4
|
-
ResultResource,
|
|
5
|
-
AsyncResultResource,
|
|
6
|
-
ResultResourceWithRawResponse,
|
|
7
|
-
AsyncResultResourceWithRawResponse,
|
|
8
|
-
ResultResourceWithStreamingResponse,
|
|
9
|
-
AsyncResultResourceWithStreamingResponse,
|
|
10
|
-
)
|
|
11
3
|
from .requests import (
|
|
12
4
|
RequestsResource,
|
|
13
5
|
AsyncRequestsResource,
|
|
@@ -16,28 +8,36 @@ from .requests import (
|
|
|
16
8
|
RequestsResourceWithStreamingResponse,
|
|
17
9
|
AsyncRequestsResourceWithStreamingResponse,
|
|
18
10
|
)
|
|
19
|
-
from .
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
from .request_id import (
|
|
12
|
+
RequestIDResource,
|
|
13
|
+
AsyncRequestIDResource,
|
|
14
|
+
RequestIDResourceWithRawResponse,
|
|
15
|
+
AsyncRequestIDResourceWithRawResponse,
|
|
16
|
+
RequestIDResourceWithStreamingResponse,
|
|
17
|
+
AsyncRequestIDResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .response_id import (
|
|
20
|
+
ResponseIDResource,
|
|
21
|
+
AsyncResponseIDResource,
|
|
22
|
+
ResponseIDResourceWithRawResponse,
|
|
23
|
+
AsyncResponseIDResourceWithRawResponse,
|
|
24
|
+
ResponseIDResourceWithStreamingResponse,
|
|
25
|
+
AsyncResponseIDResourceWithStreamingResponse,
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
__all__ = [
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
29
|
+
"RequestIDResource",
|
|
30
|
+
"AsyncRequestIDResource",
|
|
31
|
+
"RequestIDResourceWithRawResponse",
|
|
32
|
+
"AsyncRequestIDResourceWithRawResponse",
|
|
33
|
+
"RequestIDResourceWithStreamingResponse",
|
|
34
|
+
"AsyncRequestIDResourceWithStreamingResponse",
|
|
35
|
+
"ResponseIDResource",
|
|
36
|
+
"AsyncResponseIDResource",
|
|
37
|
+
"ResponseIDResourceWithRawResponse",
|
|
38
|
+
"AsyncResponseIDResourceWithRawResponse",
|
|
39
|
+
"ResponseIDResourceWithStreamingResponse",
|
|
40
|
+
"AsyncResponseIDResourceWithStreamingResponse",
|
|
41
41
|
"RequestsResource",
|
|
42
42
|
"AsyncRequestsResource",
|
|
43
43
|
"RequestsResourceWithRawResponse",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .result import (
|
|
4
|
+
ResultResource,
|
|
5
|
+
AsyncResultResource,
|
|
6
|
+
ResultResourceWithRawResponse,
|
|
7
|
+
AsyncResultResourceWithRawResponse,
|
|
8
|
+
ResultResourceWithStreamingResponse,
|
|
9
|
+
AsyncResultResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .properties import (
|
|
12
|
+
PropertiesResource,
|
|
13
|
+
AsyncPropertiesResource,
|
|
14
|
+
PropertiesResourceWithRawResponse,
|
|
15
|
+
AsyncPropertiesResourceWithRawResponse,
|
|
16
|
+
PropertiesResourceWithStreamingResponse,
|
|
17
|
+
AsyncPropertiesResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .request_id import (
|
|
20
|
+
RequestIDResource,
|
|
21
|
+
AsyncRequestIDResource,
|
|
22
|
+
RequestIDResourceWithRawResponse,
|
|
23
|
+
AsyncRequestIDResourceWithRawResponse,
|
|
24
|
+
RequestIDResourceWithStreamingResponse,
|
|
25
|
+
AsyncRequestIDResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"ResultResource",
|
|
30
|
+
"AsyncResultResource",
|
|
31
|
+
"ResultResourceWithRawResponse",
|
|
32
|
+
"AsyncResultResourceWithRawResponse",
|
|
33
|
+
"ResultResourceWithStreamingResponse",
|
|
34
|
+
"AsyncResultResourceWithStreamingResponse",
|
|
35
|
+
"PropertiesResource",
|
|
36
|
+
"AsyncPropertiesResource",
|
|
37
|
+
"PropertiesResourceWithRawResponse",
|
|
38
|
+
"AsyncPropertiesResourceWithRawResponse",
|
|
39
|
+
"PropertiesResourceWithStreamingResponse",
|
|
40
|
+
"AsyncPropertiesResourceWithStreamingResponse",
|
|
41
|
+
"RequestIDResource",
|
|
42
|
+
"AsyncRequestIDResource",
|
|
43
|
+
"RequestIDResourceWithRawResponse",
|
|
44
|
+
"AsyncRequestIDResourceWithRawResponse",
|
|
45
|
+
"RequestIDResourceWithStreamingResponse",
|
|
46
|
+
"AsyncRequestIDResourceWithStreamingResponse",
|
|
47
|
+
]
|
|
@@ -6,19 +6,19 @@ from typing import Dict
|
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
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
14
|
to_raw_response_wrapper,
|
|
15
15
|
to_streamed_response_wrapper,
|
|
16
16
|
async_to_raw_response_wrapper,
|
|
17
17
|
async_to_streamed_response_wrapper,
|
|
18
18
|
)
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
19
|
+
from ...._base_client import make_request_options
|
|
20
|
+
from ....types.requests.request_id import property_update_params
|
|
21
|
+
from ....types.shared.properties_response import PropertiesResponse
|
|
22
22
|
|
|
23
23
|
__all__ = ["PropertiesResource", "AsyncPropertiesResource"]
|
|
24
24
|
|
|
@@ -43,7 +43,7 @@ class PropertiesResource(SyncAPIResource):
|
|
|
43
43
|
"""
|
|
44
44
|
return PropertiesResourceWithStreamingResponse(self)
|
|
45
45
|
|
|
46
|
-
def
|
|
46
|
+
def update(
|
|
47
47
|
self,
|
|
48
48
|
request_id: str,
|
|
49
49
|
*,
|
|
@@ -69,9 +69,9 @@ class PropertiesResource(SyncAPIResource):
|
|
|
69
69
|
"""
|
|
70
70
|
if not request_id:
|
|
71
71
|
raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
|
|
72
|
-
return self.
|
|
72
|
+
return self._put(
|
|
73
73
|
f"/api/v1/requests/{request_id}/properties",
|
|
74
|
-
body=maybe_transform({"properties": properties},
|
|
74
|
+
body=maybe_transform({"properties": properties}, property_update_params.PropertyUpdateParams),
|
|
75
75
|
options=make_request_options(
|
|
76
76
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
77
77
|
),
|
|
@@ -99,7 +99,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
|
|
|
99
99
|
"""
|
|
100
100
|
return AsyncPropertiesResourceWithStreamingResponse(self)
|
|
101
101
|
|
|
102
|
-
async def
|
|
102
|
+
async def update(
|
|
103
103
|
self,
|
|
104
104
|
request_id: str,
|
|
105
105
|
*,
|
|
@@ -125,9 +125,9 @@ class AsyncPropertiesResource(AsyncAPIResource):
|
|
|
125
125
|
"""
|
|
126
126
|
if not request_id:
|
|
127
127
|
raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
|
|
128
|
-
return await self.
|
|
128
|
+
return await self._put(
|
|
129
129
|
f"/api/v1/requests/{request_id}/properties",
|
|
130
|
-
body=await async_maybe_transform({"properties": properties},
|
|
130
|
+
body=await async_maybe_transform({"properties": properties}, property_update_params.PropertyUpdateParams),
|
|
131
131
|
options=make_request_options(
|
|
132
132
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
133
133
|
),
|
|
@@ -139,8 +139,8 @@ class PropertiesResourceWithRawResponse:
|
|
|
139
139
|
def __init__(self, properties: PropertiesResource) -> None:
|
|
140
140
|
self._properties = properties
|
|
141
141
|
|
|
142
|
-
self.
|
|
143
|
-
properties.
|
|
142
|
+
self.update = to_raw_response_wrapper(
|
|
143
|
+
properties.update,
|
|
144
144
|
)
|
|
145
145
|
|
|
146
146
|
|
|
@@ -148,8 +148,8 @@ class AsyncPropertiesResourceWithRawResponse:
|
|
|
148
148
|
def __init__(self, properties: AsyncPropertiesResource) -> None:
|
|
149
149
|
self._properties = properties
|
|
150
150
|
|
|
151
|
-
self.
|
|
152
|
-
properties.
|
|
151
|
+
self.update = async_to_raw_response_wrapper(
|
|
152
|
+
properties.update,
|
|
153
153
|
)
|
|
154
154
|
|
|
155
155
|
|
|
@@ -157,8 +157,8 @@ class PropertiesResourceWithStreamingResponse:
|
|
|
157
157
|
def __init__(self, properties: PropertiesResource) -> None:
|
|
158
158
|
self._properties = properties
|
|
159
159
|
|
|
160
|
-
self.
|
|
161
|
-
properties.
|
|
160
|
+
self.update = to_streamed_response_wrapper(
|
|
161
|
+
properties.update,
|
|
162
162
|
)
|
|
163
163
|
|
|
164
164
|
|
|
@@ -166,6 +166,6 @@ class AsyncPropertiesResourceWithStreamingResponse:
|
|
|
166
166
|
def __init__(self, properties: AsyncPropertiesResource) -> None:
|
|
167
167
|
self._properties = properties
|
|
168
168
|
|
|
169
|
-
self.
|
|
170
|
-
properties.
|
|
169
|
+
self.update = async_to_streamed_response_wrapper(
|
|
170
|
+
properties.update,
|
|
171
171
|
)
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .result import (
|
|
6
|
+
ResultResource,
|
|
7
|
+
AsyncResultResource,
|
|
8
|
+
ResultResourceWithRawResponse,
|
|
9
|
+
AsyncResultResourceWithRawResponse,
|
|
10
|
+
ResultResourceWithStreamingResponse,
|
|
11
|
+
AsyncResultResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from ...._compat import cached_property
|
|
14
|
+
from .properties import (
|
|
15
|
+
PropertiesResource,
|
|
16
|
+
AsyncPropertiesResource,
|
|
17
|
+
PropertiesResourceWithRawResponse,
|
|
18
|
+
AsyncPropertiesResourceWithRawResponse,
|
|
19
|
+
PropertiesResourceWithStreamingResponse,
|
|
20
|
+
AsyncPropertiesResourceWithStreamingResponse,
|
|
21
|
+
)
|
|
22
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
23
|
+
|
|
24
|
+
__all__ = ["RequestIDResource", "AsyncRequestIDResource"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class RequestIDResource(SyncAPIResource):
|
|
28
|
+
@cached_property
|
|
29
|
+
def result(self) -> ResultResource:
|
|
30
|
+
return ResultResource(self._client)
|
|
31
|
+
|
|
32
|
+
@cached_property
|
|
33
|
+
def properties(self) -> PropertiesResource:
|
|
34
|
+
return PropertiesResource(self._client)
|
|
35
|
+
|
|
36
|
+
@cached_property
|
|
37
|
+
def with_raw_response(self) -> RequestIDResourceWithRawResponse:
|
|
38
|
+
"""
|
|
39
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
40
|
+
the raw response object instead of the parsed content.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
43
|
+
"""
|
|
44
|
+
return RequestIDResourceWithRawResponse(self)
|
|
45
|
+
|
|
46
|
+
@cached_property
|
|
47
|
+
def with_streaming_response(self) -> RequestIDResourceWithStreamingResponse:
|
|
48
|
+
"""
|
|
49
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
50
|
+
|
|
51
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
52
|
+
"""
|
|
53
|
+
return RequestIDResourceWithStreamingResponse(self)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class AsyncRequestIDResource(AsyncAPIResource):
|
|
57
|
+
@cached_property
|
|
58
|
+
def result(self) -> AsyncResultResource:
|
|
59
|
+
return AsyncResultResource(self._client)
|
|
60
|
+
|
|
61
|
+
@cached_property
|
|
62
|
+
def properties(self) -> AsyncPropertiesResource:
|
|
63
|
+
return AsyncPropertiesResource(self._client)
|
|
64
|
+
|
|
65
|
+
@cached_property
|
|
66
|
+
def with_raw_response(self) -> AsyncRequestIDResourceWithRawResponse:
|
|
67
|
+
"""
|
|
68
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
69
|
+
the raw response object instead of the parsed content.
|
|
70
|
+
|
|
71
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
72
|
+
"""
|
|
73
|
+
return AsyncRequestIDResourceWithRawResponse(self)
|
|
74
|
+
|
|
75
|
+
@cached_property
|
|
76
|
+
def with_streaming_response(self) -> AsyncRequestIDResourceWithStreamingResponse:
|
|
77
|
+
"""
|
|
78
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
79
|
+
|
|
80
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
81
|
+
"""
|
|
82
|
+
return AsyncRequestIDResourceWithStreamingResponse(self)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class RequestIDResourceWithRawResponse:
|
|
86
|
+
def __init__(self, request_id: RequestIDResource) -> None:
|
|
87
|
+
self._request_id = request_id
|
|
88
|
+
|
|
89
|
+
@cached_property
|
|
90
|
+
def result(self) -> ResultResourceWithRawResponse:
|
|
91
|
+
return ResultResourceWithRawResponse(self._request_id.result)
|
|
92
|
+
|
|
93
|
+
@cached_property
|
|
94
|
+
def properties(self) -> PropertiesResourceWithRawResponse:
|
|
95
|
+
return PropertiesResourceWithRawResponse(self._request_id.properties)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class AsyncRequestIDResourceWithRawResponse:
|
|
99
|
+
def __init__(self, request_id: AsyncRequestIDResource) -> None:
|
|
100
|
+
self._request_id = request_id
|
|
101
|
+
|
|
102
|
+
@cached_property
|
|
103
|
+
def result(self) -> AsyncResultResourceWithRawResponse:
|
|
104
|
+
return AsyncResultResourceWithRawResponse(self._request_id.result)
|
|
105
|
+
|
|
106
|
+
@cached_property
|
|
107
|
+
def properties(self) -> AsyncPropertiesResourceWithRawResponse:
|
|
108
|
+
return AsyncPropertiesResourceWithRawResponse(self._request_id.properties)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class RequestIDResourceWithStreamingResponse:
|
|
112
|
+
def __init__(self, request_id: RequestIDResource) -> None:
|
|
113
|
+
self._request_id = request_id
|
|
114
|
+
|
|
115
|
+
@cached_property
|
|
116
|
+
def result(self) -> ResultResourceWithStreamingResponse:
|
|
117
|
+
return ResultResourceWithStreamingResponse(self._request_id.result)
|
|
118
|
+
|
|
119
|
+
@cached_property
|
|
120
|
+
def properties(self) -> PropertiesResourceWithStreamingResponse:
|
|
121
|
+
return PropertiesResourceWithStreamingResponse(self._request_id.properties)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class AsyncRequestIDResourceWithStreamingResponse:
|
|
125
|
+
def __init__(self, request_id: AsyncRequestIDResource) -> None:
|
|
126
|
+
self._request_id = request_id
|
|
127
|
+
|
|
128
|
+
@cached_property
|
|
129
|
+
def result(self) -> AsyncResultResourceWithStreamingResponse:
|
|
130
|
+
return AsyncResultResourceWithStreamingResponse(self._request_id.result)
|
|
131
|
+
|
|
132
|
+
@cached_property
|
|
133
|
+
def properties(self) -> AsyncPropertiesResourceWithStreamingResponse:
|
|
134
|
+
return AsyncPropertiesResourceWithStreamingResponse(self._request_id.properties)
|
|
@@ -4,17 +4,17 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
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
11
|
to_raw_response_wrapper,
|
|
12
12
|
to_streamed_response_wrapper,
|
|
13
13
|
async_to_raw_response_wrapper,
|
|
14
14
|
async_to_streamed_response_wrapper,
|
|
15
15
|
)
|
|
16
|
-
from
|
|
17
|
-
from
|
|
16
|
+
from ...._base_client import make_request_options
|
|
17
|
+
from ....types.request_result import RequestResult
|
|
18
18
|
|
|
19
19
|
__all__ = ["ResultResource", "AsyncResultResource"]
|
|
20
20
|
|
|
@@ -43,7 +43,6 @@ class ResultResource(SyncAPIResource):
|
|
|
43
43
|
self,
|
|
44
44
|
request_id: str,
|
|
45
45
|
*,
|
|
46
|
-
category: str,
|
|
47
46
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
47
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
48
|
extra_headers: Headers | None = None,
|
|
@@ -63,12 +62,10 @@ class ResultResource(SyncAPIResource):
|
|
|
63
62
|
|
|
64
63
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
65
64
|
"""
|
|
66
|
-
if not category:
|
|
67
|
-
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
68
65
|
if not request_id:
|
|
69
66
|
raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
|
|
70
67
|
return self._get(
|
|
71
|
-
f"/api/v1/requests/
|
|
68
|
+
f"/api/v1/requests/{request_id}/result",
|
|
72
69
|
options=make_request_options(
|
|
73
70
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
74
71
|
),
|
|
@@ -100,7 +97,6 @@ class AsyncResultResource(AsyncAPIResource):
|
|
|
100
97
|
self,
|
|
101
98
|
request_id: str,
|
|
102
99
|
*,
|
|
103
|
-
category: str,
|
|
104
100
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
105
101
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
106
102
|
extra_headers: Headers | None = None,
|
|
@@ -120,12 +116,10 @@ class AsyncResultResource(AsyncAPIResource):
|
|
|
120
116
|
|
|
121
117
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
122
118
|
"""
|
|
123
|
-
if not category:
|
|
124
|
-
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
125
119
|
if not request_id:
|
|
126
120
|
raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
|
|
127
121
|
return await self._get(
|
|
128
|
-
f"/api/v1/requests/
|
|
122
|
+
f"/api/v1/requests/{request_id}/result",
|
|
129
123
|
options=make_request_options(
|
|
130
124
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
131
125
|
),
|
|
@@ -2,36 +2,36 @@
|
|
|
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
|
-
)
|
|
13
5
|
from ..._compat import cached_property
|
|
14
|
-
from .properties import (
|
|
15
|
-
PropertiesResource,
|
|
16
|
-
AsyncPropertiesResource,
|
|
17
|
-
PropertiesResourceWithRawResponse,
|
|
18
|
-
AsyncPropertiesResourceWithRawResponse,
|
|
19
|
-
PropertiesResourceWithStreamingResponse,
|
|
20
|
-
AsyncPropertiesResourceWithStreamingResponse,
|
|
21
|
-
)
|
|
22
6
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
7
|
+
from .request_id.request_id import (
|
|
8
|
+
RequestIDResource,
|
|
9
|
+
AsyncRequestIDResource,
|
|
10
|
+
RequestIDResourceWithRawResponse,
|
|
11
|
+
AsyncRequestIDResourceWithRawResponse,
|
|
12
|
+
RequestIDResourceWithStreamingResponse,
|
|
13
|
+
AsyncRequestIDResourceWithStreamingResponse,
|
|
14
|
+
)
|
|
15
|
+
from .response_id.response_id import (
|
|
16
|
+
ResponseIDResource,
|
|
17
|
+
AsyncResponseIDResource,
|
|
18
|
+
ResponseIDResourceWithRawResponse,
|
|
19
|
+
AsyncResponseIDResourceWithRawResponse,
|
|
20
|
+
ResponseIDResourceWithStreamingResponse,
|
|
21
|
+
AsyncResponseIDResourceWithStreamingResponse,
|
|
22
|
+
)
|
|
23
23
|
|
|
24
24
|
__all__ = ["RequestsResource", "AsyncRequestsResource"]
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class RequestsResource(SyncAPIResource):
|
|
28
28
|
@cached_property
|
|
29
|
-
def
|
|
30
|
-
return
|
|
29
|
+
def request_id(self) -> RequestIDResource:
|
|
30
|
+
return RequestIDResource(self._client)
|
|
31
31
|
|
|
32
32
|
@cached_property
|
|
33
|
-
def
|
|
34
|
-
return
|
|
33
|
+
def response_id(self) -> ResponseIDResource:
|
|
34
|
+
return ResponseIDResource(self._client)
|
|
35
35
|
|
|
36
36
|
@cached_property
|
|
37
37
|
def with_raw_response(self) -> RequestsResourceWithRawResponse:
|
|
@@ -55,12 +55,12 @@ class RequestsResource(SyncAPIResource):
|
|
|
55
55
|
|
|
56
56
|
class AsyncRequestsResource(AsyncAPIResource):
|
|
57
57
|
@cached_property
|
|
58
|
-
def
|
|
59
|
-
return
|
|
58
|
+
def request_id(self) -> AsyncRequestIDResource:
|
|
59
|
+
return AsyncRequestIDResource(self._client)
|
|
60
60
|
|
|
61
61
|
@cached_property
|
|
62
|
-
def
|
|
63
|
-
return
|
|
62
|
+
def response_id(self) -> AsyncResponseIDResource:
|
|
63
|
+
return AsyncResponseIDResource(self._client)
|
|
64
64
|
|
|
65
65
|
@cached_property
|
|
66
66
|
def with_raw_response(self) -> AsyncRequestsResourceWithRawResponse:
|
|
@@ -87,12 +87,12 @@ class RequestsResourceWithRawResponse:
|
|
|
87
87
|
self._requests = requests
|
|
88
88
|
|
|
89
89
|
@cached_property
|
|
90
|
-
def
|
|
91
|
-
return
|
|
90
|
+
def request_id(self) -> RequestIDResourceWithRawResponse:
|
|
91
|
+
return RequestIDResourceWithRawResponse(self._requests.request_id)
|
|
92
92
|
|
|
93
93
|
@cached_property
|
|
94
|
-
def
|
|
95
|
-
return
|
|
94
|
+
def response_id(self) -> ResponseIDResourceWithRawResponse:
|
|
95
|
+
return ResponseIDResourceWithRawResponse(self._requests.response_id)
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
class AsyncRequestsResourceWithRawResponse:
|
|
@@ -100,12 +100,12 @@ class AsyncRequestsResourceWithRawResponse:
|
|
|
100
100
|
self._requests = requests
|
|
101
101
|
|
|
102
102
|
@cached_property
|
|
103
|
-
def
|
|
104
|
-
return
|
|
103
|
+
def request_id(self) -> AsyncRequestIDResourceWithRawResponse:
|
|
104
|
+
return AsyncRequestIDResourceWithRawResponse(self._requests.request_id)
|
|
105
105
|
|
|
106
106
|
@cached_property
|
|
107
|
-
def
|
|
108
|
-
return
|
|
107
|
+
def response_id(self) -> AsyncResponseIDResourceWithRawResponse:
|
|
108
|
+
return AsyncResponseIDResourceWithRawResponse(self._requests.response_id)
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
class RequestsResourceWithStreamingResponse:
|
|
@@ -113,12 +113,12 @@ class RequestsResourceWithStreamingResponse:
|
|
|
113
113
|
self._requests = requests
|
|
114
114
|
|
|
115
115
|
@cached_property
|
|
116
|
-
def
|
|
117
|
-
return
|
|
116
|
+
def request_id(self) -> RequestIDResourceWithStreamingResponse:
|
|
117
|
+
return RequestIDResourceWithStreamingResponse(self._requests.request_id)
|
|
118
118
|
|
|
119
119
|
@cached_property
|
|
120
|
-
def
|
|
121
|
-
return
|
|
120
|
+
def response_id(self) -> ResponseIDResourceWithStreamingResponse:
|
|
121
|
+
return ResponseIDResourceWithStreamingResponse(self._requests.response_id)
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
class AsyncRequestsResourceWithStreamingResponse:
|
|
@@ -126,9 +126,9 @@ class AsyncRequestsResourceWithStreamingResponse:
|
|
|
126
126
|
self._requests = requests
|
|
127
127
|
|
|
128
128
|
@cached_property
|
|
129
|
-
def
|
|
130
|
-
return
|
|
129
|
+
def request_id(self) -> AsyncRequestIDResourceWithStreamingResponse:
|
|
130
|
+
return AsyncRequestIDResourceWithStreamingResponse(self._requests.request_id)
|
|
131
131
|
|
|
132
132
|
@cached_property
|
|
133
|
-
def
|
|
134
|
-
return
|
|
133
|
+
def response_id(self) -> AsyncResponseIDResourceWithStreamingResponse:
|
|
134
|
+
return AsyncResponseIDResourceWithStreamingResponse(self._requests.response_id)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .result import (
|
|
4
|
+
ResultResource,
|
|
5
|
+
AsyncResultResource,
|
|
6
|
+
ResultResourceWithRawResponse,
|
|
7
|
+
AsyncResultResourceWithRawResponse,
|
|
8
|
+
ResultResourceWithStreamingResponse,
|
|
9
|
+
AsyncResultResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .properties import (
|
|
12
|
+
PropertiesResource,
|
|
13
|
+
AsyncPropertiesResource,
|
|
14
|
+
PropertiesResourceWithRawResponse,
|
|
15
|
+
AsyncPropertiesResourceWithRawResponse,
|
|
16
|
+
PropertiesResourceWithStreamingResponse,
|
|
17
|
+
AsyncPropertiesResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .response_id import (
|
|
20
|
+
ResponseIDResource,
|
|
21
|
+
AsyncResponseIDResource,
|
|
22
|
+
ResponseIDResourceWithRawResponse,
|
|
23
|
+
AsyncResponseIDResourceWithRawResponse,
|
|
24
|
+
ResponseIDResourceWithStreamingResponse,
|
|
25
|
+
AsyncResponseIDResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"ResultResource",
|
|
30
|
+
"AsyncResultResource",
|
|
31
|
+
"ResultResourceWithRawResponse",
|
|
32
|
+
"AsyncResultResourceWithRawResponse",
|
|
33
|
+
"ResultResourceWithStreamingResponse",
|
|
34
|
+
"AsyncResultResourceWithStreamingResponse",
|
|
35
|
+
"PropertiesResource",
|
|
36
|
+
"AsyncPropertiesResource",
|
|
37
|
+
"PropertiesResourceWithRawResponse",
|
|
38
|
+
"AsyncPropertiesResourceWithRawResponse",
|
|
39
|
+
"PropertiesResourceWithStreamingResponse",
|
|
40
|
+
"AsyncPropertiesResourceWithStreamingResponse",
|
|
41
|
+
"ResponseIDResource",
|
|
42
|
+
"AsyncResponseIDResource",
|
|
43
|
+
"ResponseIDResourceWithRawResponse",
|
|
44
|
+
"AsyncResponseIDResourceWithRawResponse",
|
|
45
|
+
"ResponseIDResourceWithStreamingResponse",
|
|
46
|
+
"AsyncResponseIDResourceWithStreamingResponse",
|
|
47
|
+
]
|