payi 0.1.0a23__py3-none-any.whl → 0.1.0a25__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.

Files changed (34) hide show
  1. payi/_base_client.py +60 -48
  2. payi/_client.py +8 -0
  3. payi/_compat.py +2 -0
  4. payi/_utils/_utils.py +4 -3
  5. payi/_version.py +1 -1
  6. payi/resources/__init__.py +14 -0
  7. payi/resources/budgets/budgets.py +24 -2
  8. payi/resources/budgets/tags.py +22 -0
  9. payi/resources/categories/categories.py +22 -0
  10. payi/resources/categories/resources.py +22 -0
  11. payi/resources/evaluations/__init__.py +47 -0
  12. payi/resources/evaluations/evaluations.py +134 -0
  13. payi/resources/evaluations/experiences.py +188 -0
  14. payi/resources/evaluations/requests.py +200 -0
  15. payi/resources/experiences/experiences.py +32 -10
  16. payi/resources/experiences/types.py +93 -51
  17. payi/resources/ingest.py +22 -0
  18. payi/types/__init__.py +1 -0
  19. payi/types/category_delete_response.py +2 -2
  20. payi/types/evaluations/__init__.py +6 -0
  21. payi/types/evaluations/experience_create_params.py +14 -0
  22. payi/types/evaluations/request_create_params.py +14 -0
  23. payi/types/experiences/__init__.py +1 -0
  24. payi/types/experiences/experience_type.py +0 -2
  25. payi/types/experiences/type_list_params.py +12 -0
  26. payi/types/experiences/type_update_params.py +2 -5
  27. payi/types/requests_data.py +8 -4
  28. payi/types/shared/__init__.py +3 -0
  29. payi/types/shared/evaluation_response.py +11 -0
  30. payi/types/total_cost_data.py +2 -18
  31. {payi-0.1.0a23.dist-info → payi-0.1.0a25.dist-info}/METADATA +12 -1
  32. {payi-0.1.0a23.dist-info → payi-0.1.0a25.dist-info}/RECORD +34 -24
  33. {payi-0.1.0a23.dist-info → payi-0.1.0a25.dist-info}/WHEEL +0 -0
  34. {payi-0.1.0a23.dist-info → payi-0.1.0a25.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,47 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .requests import (
4
+ RequestsResource,
5
+ AsyncRequestsResource,
6
+ RequestsResourceWithRawResponse,
7
+ AsyncRequestsResourceWithRawResponse,
8
+ RequestsResourceWithStreamingResponse,
9
+ AsyncRequestsResourceWithStreamingResponse,
10
+ )
11
+ from .evaluations import (
12
+ EvaluationsResource,
13
+ AsyncEvaluationsResource,
14
+ EvaluationsResourceWithRawResponse,
15
+ AsyncEvaluationsResourceWithRawResponse,
16
+ EvaluationsResourceWithStreamingResponse,
17
+ AsyncEvaluationsResourceWithStreamingResponse,
18
+ )
19
+ from .experiences import (
20
+ ExperiencesResource,
21
+ AsyncExperiencesResource,
22
+ ExperiencesResourceWithRawResponse,
23
+ AsyncExperiencesResourceWithRawResponse,
24
+ ExperiencesResourceWithStreamingResponse,
25
+ AsyncExperiencesResourceWithStreamingResponse,
26
+ )
27
+
28
+ __all__ = [
29
+ "ExperiencesResource",
30
+ "AsyncExperiencesResource",
31
+ "ExperiencesResourceWithRawResponse",
32
+ "AsyncExperiencesResourceWithRawResponse",
33
+ "ExperiencesResourceWithStreamingResponse",
34
+ "AsyncExperiencesResourceWithStreamingResponse",
35
+ "RequestsResource",
36
+ "AsyncRequestsResource",
37
+ "RequestsResourceWithRawResponse",
38
+ "AsyncRequestsResourceWithRawResponse",
39
+ "RequestsResourceWithStreamingResponse",
40
+ "AsyncRequestsResourceWithStreamingResponse",
41
+ "EvaluationsResource",
42
+ "AsyncEvaluationsResource",
43
+ "EvaluationsResourceWithRawResponse",
44
+ "AsyncEvaluationsResourceWithRawResponse",
45
+ "EvaluationsResourceWithStreamingResponse",
46
+ "AsyncEvaluationsResourceWithStreamingResponse",
47
+ ]
@@ -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 .requests import (
6
+ RequestsResource,
7
+ AsyncRequestsResource,
8
+ RequestsResourceWithRawResponse,
9
+ AsyncRequestsResourceWithRawResponse,
10
+ RequestsResourceWithStreamingResponse,
11
+ AsyncRequestsResourceWithStreamingResponse,
12
+ )
13
+ from ..._compat import cached_property
14
+ from ..._resource import SyncAPIResource, AsyncAPIResource
15
+ from .experiences import (
16
+ ExperiencesResource,
17
+ AsyncExperiencesResource,
18
+ ExperiencesResourceWithRawResponse,
19
+ AsyncExperiencesResourceWithRawResponse,
20
+ ExperiencesResourceWithStreamingResponse,
21
+ AsyncExperiencesResourceWithStreamingResponse,
22
+ )
23
+
24
+ __all__ = ["EvaluationsResource", "AsyncEvaluationsResource"]
25
+
26
+
27
+ class EvaluationsResource(SyncAPIResource):
28
+ @cached_property
29
+ def experiences(self) -> ExperiencesResource:
30
+ return ExperiencesResource(self._client)
31
+
32
+ @cached_property
33
+ def requests(self) -> RequestsResource:
34
+ return RequestsResource(self._client)
35
+
36
+ @cached_property
37
+ def with_raw_response(self) -> EvaluationsResourceWithRawResponse:
38
+ """
39
+ This property can be used as a prefix for any HTTP method call to return the
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 EvaluationsResourceWithRawResponse(self)
45
+
46
+ @cached_property
47
+ def with_streaming_response(self) -> EvaluationsResourceWithStreamingResponse:
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 EvaluationsResourceWithStreamingResponse(self)
54
+
55
+
56
+ class AsyncEvaluationsResource(AsyncAPIResource):
57
+ @cached_property
58
+ def experiences(self) -> AsyncExperiencesResource:
59
+ return AsyncExperiencesResource(self._client)
60
+
61
+ @cached_property
62
+ def requests(self) -> AsyncRequestsResource:
63
+ return AsyncRequestsResource(self._client)
64
+
65
+ @cached_property
66
+ def with_raw_response(self) -> AsyncEvaluationsResourceWithRawResponse:
67
+ """
68
+ This property can be used as a prefix for any HTTP method call to return the
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 AsyncEvaluationsResourceWithRawResponse(self)
74
+
75
+ @cached_property
76
+ def with_streaming_response(self) -> AsyncEvaluationsResourceWithStreamingResponse:
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 AsyncEvaluationsResourceWithStreamingResponse(self)
83
+
84
+
85
+ class EvaluationsResourceWithRawResponse:
86
+ def __init__(self, evaluations: EvaluationsResource) -> None:
87
+ self._evaluations = evaluations
88
+
89
+ @cached_property
90
+ def experiences(self) -> ExperiencesResourceWithRawResponse:
91
+ return ExperiencesResourceWithRawResponse(self._evaluations.experiences)
92
+
93
+ @cached_property
94
+ def requests(self) -> RequestsResourceWithRawResponse:
95
+ return RequestsResourceWithRawResponse(self._evaluations.requests)
96
+
97
+
98
+ class AsyncEvaluationsResourceWithRawResponse:
99
+ def __init__(self, evaluations: AsyncEvaluationsResource) -> None:
100
+ self._evaluations = evaluations
101
+
102
+ @cached_property
103
+ def experiences(self) -> AsyncExperiencesResourceWithRawResponse:
104
+ return AsyncExperiencesResourceWithRawResponse(self._evaluations.experiences)
105
+
106
+ @cached_property
107
+ def requests(self) -> AsyncRequestsResourceWithRawResponse:
108
+ return AsyncRequestsResourceWithRawResponse(self._evaluations.requests)
109
+
110
+
111
+ class EvaluationsResourceWithStreamingResponse:
112
+ def __init__(self, evaluations: EvaluationsResource) -> None:
113
+ self._evaluations = evaluations
114
+
115
+ @cached_property
116
+ def experiences(self) -> ExperiencesResourceWithStreamingResponse:
117
+ return ExperiencesResourceWithStreamingResponse(self._evaluations.experiences)
118
+
119
+ @cached_property
120
+ def requests(self) -> RequestsResourceWithStreamingResponse:
121
+ return RequestsResourceWithStreamingResponse(self._evaluations.requests)
122
+
123
+
124
+ class AsyncEvaluationsResourceWithStreamingResponse:
125
+ def __init__(self, evaluations: AsyncEvaluationsResource) -> None:
126
+ self._evaluations = evaluations
127
+
128
+ @cached_property
129
+ def experiences(self) -> AsyncExperiencesResourceWithStreamingResponse:
130
+ return AsyncExperiencesResourceWithStreamingResponse(self._evaluations.experiences)
131
+
132
+ @cached_property
133
+ def requests(self) -> AsyncRequestsResourceWithStreamingResponse:
134
+ return AsyncRequestsResourceWithStreamingResponse(self._evaluations.requests)
@@ -0,0 +1,188 @@
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
+
7
+ import httpx
8
+
9
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from ..._utils import (
11
+ maybe_transform,
12
+ async_maybe_transform,
13
+ )
14
+ from ..._compat import cached_property
15
+ from ..._resource import SyncAPIResource, AsyncAPIResource
16
+ from ..._response import (
17
+ to_raw_response_wrapper,
18
+ to_streamed_response_wrapper,
19
+ async_to_raw_response_wrapper,
20
+ async_to_streamed_response_wrapper,
21
+ )
22
+ from ..._base_client import make_request_options
23
+ from ...types.evaluations import experience_create_params
24
+ from ...types.shared.evaluation_response import EvaluationResponse
25
+
26
+ __all__ = ["ExperiencesResource", "AsyncExperiencesResource"]
27
+
28
+
29
+ class ExperiencesResource(SyncAPIResource):
30
+ @cached_property
31
+ def with_raw_response(self) -> ExperiencesResourceWithRawResponse:
32
+ """
33
+ This property can be used as a prefix for any HTTP method call to return the
34
+ the raw response object instead of the parsed content.
35
+
36
+ For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
37
+ """
38
+ return ExperiencesResourceWithRawResponse(self)
39
+
40
+ @cached_property
41
+ def with_streaming_response(self) -> ExperiencesResourceWithStreamingResponse:
42
+ """
43
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
44
+
45
+ For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
46
+ """
47
+ return ExperiencesResourceWithStreamingResponse(self)
48
+
49
+ def create(
50
+ self,
51
+ experience_id: str,
52
+ *,
53
+ evaluation: int,
54
+ user_id: Optional[str] | NotGiven = NOT_GIVEN,
55
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
56
+ # The extra values given here take precedence over values defined on the client or passed to this method.
57
+ extra_headers: Headers | None = None,
58
+ extra_query: Query | None = None,
59
+ extra_body: Body | None = None,
60
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
61
+ ) -> EvaluationResponse:
62
+ """
63
+ Create an Evaluation for an Experience
64
+
65
+ Args:
66
+ extra_headers: Send extra headers
67
+
68
+ extra_query: Add additional query parameters to the request
69
+
70
+ extra_body: Add additional JSON properties to the request
71
+
72
+ timeout: Override the client-level default timeout for this request, in seconds
73
+ """
74
+ if not experience_id:
75
+ raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
76
+ return self._post(
77
+ f"/api/v1/evaluations/experiences/{experience_id}",
78
+ body=maybe_transform(
79
+ {
80
+ "evaluation": evaluation,
81
+ "user_id": user_id,
82
+ },
83
+ experience_create_params.ExperienceCreateParams,
84
+ ),
85
+ options=make_request_options(
86
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
87
+ ),
88
+ cast_to=EvaluationResponse,
89
+ )
90
+
91
+
92
+ class AsyncExperiencesResource(AsyncAPIResource):
93
+ @cached_property
94
+ def with_raw_response(self) -> AsyncExperiencesResourceWithRawResponse:
95
+ """
96
+ This property can be used as a prefix for any HTTP method call to return the
97
+ the raw response object instead of the parsed content.
98
+
99
+ For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
100
+ """
101
+ return AsyncExperiencesResourceWithRawResponse(self)
102
+
103
+ @cached_property
104
+ def with_streaming_response(self) -> AsyncExperiencesResourceWithStreamingResponse:
105
+ """
106
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
107
+
108
+ For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
109
+ """
110
+ return AsyncExperiencesResourceWithStreamingResponse(self)
111
+
112
+ async def create(
113
+ self,
114
+ experience_id: str,
115
+ *,
116
+ evaluation: int,
117
+ user_id: Optional[str] | NotGiven = NOT_GIVEN,
118
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
119
+ # The extra values given here take precedence over values defined on the client or passed to this method.
120
+ extra_headers: Headers | None = None,
121
+ extra_query: Query | None = None,
122
+ extra_body: Body | None = None,
123
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
124
+ ) -> EvaluationResponse:
125
+ """
126
+ Create an Evaluation for an Experience
127
+
128
+ Args:
129
+ extra_headers: Send extra headers
130
+
131
+ extra_query: Add additional query parameters to the request
132
+
133
+ extra_body: Add additional JSON properties to the request
134
+
135
+ timeout: Override the client-level default timeout for this request, in seconds
136
+ """
137
+ if not experience_id:
138
+ raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
139
+ return await self._post(
140
+ f"/api/v1/evaluations/experiences/{experience_id}",
141
+ body=await async_maybe_transform(
142
+ {
143
+ "evaluation": evaluation,
144
+ "user_id": user_id,
145
+ },
146
+ experience_create_params.ExperienceCreateParams,
147
+ ),
148
+ options=make_request_options(
149
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
150
+ ),
151
+ cast_to=EvaluationResponse,
152
+ )
153
+
154
+
155
+ class ExperiencesResourceWithRawResponse:
156
+ def __init__(self, experiences: ExperiencesResource) -> None:
157
+ self._experiences = experiences
158
+
159
+ self.create = to_raw_response_wrapper(
160
+ experiences.create,
161
+ )
162
+
163
+
164
+ class AsyncExperiencesResourceWithRawResponse:
165
+ def __init__(self, experiences: AsyncExperiencesResource) -> None:
166
+ self._experiences = experiences
167
+
168
+ self.create = async_to_raw_response_wrapper(
169
+ experiences.create,
170
+ )
171
+
172
+
173
+ class ExperiencesResourceWithStreamingResponse:
174
+ def __init__(self, experiences: ExperiencesResource) -> None:
175
+ self._experiences = experiences
176
+
177
+ self.create = to_streamed_response_wrapper(
178
+ experiences.create,
179
+ )
180
+
181
+
182
+ class AsyncExperiencesResourceWithStreamingResponse:
183
+ def __init__(self, experiences: AsyncExperiencesResource) -> None:
184
+ self._experiences = experiences
185
+
186
+ self.create = async_to_streamed_response_wrapper(
187
+ experiences.create,
188
+ )
@@ -0,0 +1,200 @@
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
+
7
+ import httpx
8
+
9
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from ..._utils import (
11
+ maybe_transform,
12
+ async_maybe_transform,
13
+ )
14
+ from ..._compat import cached_property
15
+ from ..._resource import SyncAPIResource, AsyncAPIResource
16
+ from ..._response import (
17
+ to_raw_response_wrapper,
18
+ to_streamed_response_wrapper,
19
+ async_to_raw_response_wrapper,
20
+ async_to_streamed_response_wrapper,
21
+ )
22
+ from ..._base_client import make_request_options
23
+ from ...types.evaluations import request_create_params
24
+ from ...types.shared.evaluation_response import EvaluationResponse
25
+
26
+ __all__ = ["RequestsResource", "AsyncRequestsResource"]
27
+
28
+
29
+ class RequestsResource(SyncAPIResource):
30
+ @cached_property
31
+ def with_raw_response(self) -> RequestsResourceWithRawResponse:
32
+ """
33
+ This property can be used as a prefix for any HTTP method call to return the
34
+ the raw response object instead of the parsed content.
35
+
36
+ For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
37
+ """
38
+ return RequestsResourceWithRawResponse(self)
39
+
40
+ @cached_property
41
+ def with_streaming_response(self) -> RequestsResourceWithStreamingResponse:
42
+ """
43
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
44
+
45
+ For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
46
+ """
47
+ return RequestsResourceWithStreamingResponse(self)
48
+
49
+ def create(
50
+ self,
51
+ request_id: str,
52
+ *,
53
+ evaluation: int,
54
+ user_id: Optional[str] | NotGiven = NOT_GIVEN,
55
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
56
+ # The extra values given here take precedence over values defined on the client or passed to this method.
57
+ extra_headers: Headers | None = None,
58
+ extra_query: Query | None = None,
59
+ extra_body: Body | None = None,
60
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
61
+ ) -> EvaluationResponse:
62
+ """
63
+ Create an Evaluation for a Request
64
+
65
+ Args:
66
+ evaluation: The evaluation value
67
+
68
+ request_id: The request ID being evaluated
69
+
70
+ user_id: The user ID creating the evaluation
71
+
72
+ extra_headers: Send extra headers
73
+
74
+ extra_query: Add additional query parameters to the request
75
+
76
+ extra_body: Add additional JSON properties to the request
77
+
78
+ timeout: Override the client-level default timeout for this request, in seconds
79
+ """
80
+ if not request_id:
81
+ raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
82
+ return self._post(
83
+ f"/api/v1/evaluations/requests/{request_id}",
84
+ body=maybe_transform(
85
+ {
86
+ "evaluation": evaluation,
87
+ "user_id": user_id,
88
+ },
89
+ request_create_params.RequestCreateParams,
90
+ ),
91
+ options=make_request_options(
92
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
93
+ ),
94
+ cast_to=EvaluationResponse,
95
+ )
96
+
97
+
98
+ class AsyncRequestsResource(AsyncAPIResource):
99
+ @cached_property
100
+ def with_raw_response(self) -> AsyncRequestsResourceWithRawResponse:
101
+ """
102
+ This property can be used as a prefix for any HTTP method call to return the
103
+ the raw response object instead of the parsed content.
104
+
105
+ For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
106
+ """
107
+ return AsyncRequestsResourceWithRawResponse(self)
108
+
109
+ @cached_property
110
+ def with_streaming_response(self) -> AsyncRequestsResourceWithStreamingResponse:
111
+ """
112
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
113
+
114
+ For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
115
+ """
116
+ return AsyncRequestsResourceWithStreamingResponse(self)
117
+
118
+ async def create(
119
+ self,
120
+ request_id: str,
121
+ *,
122
+ evaluation: int,
123
+ user_id: Optional[str] | NotGiven = NOT_GIVEN,
124
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
125
+ # The extra values given here take precedence over values defined on the client or passed to this method.
126
+ extra_headers: Headers | None = None,
127
+ extra_query: Query | None = None,
128
+ extra_body: Body | None = None,
129
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
130
+ ) -> EvaluationResponse:
131
+ """
132
+ Create an Evaluation for a Request
133
+
134
+ Args:
135
+ evaluation: The evaluation value
136
+
137
+ request_id: The request ID being evaluated
138
+
139
+ user_id: The user ID creating the evaluation
140
+
141
+ extra_headers: Send extra headers
142
+
143
+ extra_query: Add additional query parameters to the request
144
+
145
+ extra_body: Add additional JSON properties to the request
146
+
147
+ timeout: Override the client-level default timeout for this request, in seconds
148
+ """
149
+ if not request_id:
150
+ raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
151
+ return await self._post(
152
+ f"/api/v1/evaluations/requests/{request_id}",
153
+ body=await async_maybe_transform(
154
+ {
155
+ "evaluation": evaluation,
156
+ "user_id": user_id,
157
+ },
158
+ request_create_params.RequestCreateParams,
159
+ ),
160
+ options=make_request_options(
161
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
162
+ ),
163
+ cast_to=EvaluationResponse,
164
+ )
165
+
166
+
167
+ class RequestsResourceWithRawResponse:
168
+ def __init__(self, requests: RequestsResource) -> None:
169
+ self._requests = requests
170
+
171
+ self.create = to_raw_response_wrapper(
172
+ requests.create,
173
+ )
174
+
175
+
176
+ class AsyncRequestsResourceWithRawResponse:
177
+ def __init__(self, requests: AsyncRequestsResource) -> None:
178
+ self._requests = requests
179
+
180
+ self.create = async_to_raw_response_wrapper(
181
+ requests.create,
182
+ )
183
+
184
+
185
+ class RequestsResourceWithStreamingResponse:
186
+ def __init__(self, requests: RequestsResource) -> None:
187
+ self._requests = requests
188
+
189
+ self.create = to_streamed_response_wrapper(
190
+ requests.create,
191
+ )
192
+
193
+
194
+ class AsyncRequestsResourceWithStreamingResponse:
195
+ def __init__(self, requests: AsyncRequestsResource) -> None:
196
+ self._requests = requests
197
+
198
+ self.create = async_to_streamed_response_wrapper(
199
+ requests.create,
200
+ )
@@ -34,15 +34,26 @@ class ExperiencesResource(SyncAPIResource):
34
34
 
35
35
  @cached_property
36
36
  def with_raw_response(self) -> ExperiencesResourceWithRawResponse:
37
+ """
38
+ This property can be used as a prefix for any HTTP method call to return the
39
+ the raw response object instead of the parsed content.
40
+
41
+ For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
42
+ """
37
43
  return ExperiencesResourceWithRawResponse(self)
38
44
 
39
45
  @cached_property
40
46
  def with_streaming_response(self) -> ExperiencesResourceWithStreamingResponse:
47
+ """
48
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
49
+
50
+ For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
51
+ """
41
52
  return ExperiencesResourceWithStreamingResponse(self)
42
53
 
43
54
  def create(
44
55
  self,
45
- experience_type_id: str,
56
+ experience_name: str,
46
57
  *,
47
58
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
48
59
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -63,10 +74,10 @@ class ExperiencesResource(SyncAPIResource):
63
74
 
64
75
  timeout: Override the client-level default timeout for this request, in seconds
65
76
  """
66
- if not experience_type_id:
67
- raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
77
+ if not experience_name:
78
+ raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
68
79
  return self._post(
69
- f"/api/v1/experiences/instances/{experience_type_id}",
80
+ f"/api/v1/experiences/instances/{experience_name}",
70
81
  options=make_request_options(
71
82
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
72
83
  ),
@@ -85,7 +96,7 @@ class ExperiencesResource(SyncAPIResource):
85
96
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
86
97
  ) -> ExperienceInstance:
87
98
  """
88
- Get Experience details
99
+ Get an Experience details
89
100
 
90
101
  Args:
91
102
  extra_headers: Send extra headers
@@ -147,15 +158,26 @@ class AsyncExperiencesResource(AsyncAPIResource):
147
158
 
148
159
  @cached_property
149
160
  def with_raw_response(self) -> AsyncExperiencesResourceWithRawResponse:
161
+ """
162
+ This property can be used as a prefix for any HTTP method call to return the
163
+ the raw response object instead of the parsed content.
164
+
165
+ For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
166
+ """
150
167
  return AsyncExperiencesResourceWithRawResponse(self)
151
168
 
152
169
  @cached_property
153
170
  def with_streaming_response(self) -> AsyncExperiencesResourceWithStreamingResponse:
171
+ """
172
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
173
+
174
+ For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
175
+ """
154
176
  return AsyncExperiencesResourceWithStreamingResponse(self)
155
177
 
156
178
  async def create(
157
179
  self,
158
- experience_type_id: str,
180
+ experience_name: str,
159
181
  *,
160
182
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
161
183
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -176,10 +198,10 @@ class AsyncExperiencesResource(AsyncAPIResource):
176
198
 
177
199
  timeout: Override the client-level default timeout for this request, in seconds
178
200
  """
179
- if not experience_type_id:
180
- raise ValueError(f"Expected a non-empty value for `experience_type_id` but received {experience_type_id!r}")
201
+ if not experience_name:
202
+ raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
181
203
  return await self._post(
182
- f"/api/v1/experiences/instances/{experience_type_id}",
204
+ f"/api/v1/experiences/instances/{experience_name}",
183
205
  options=make_request_options(
184
206
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
185
207
  ),
@@ -198,7 +220,7 @@ class AsyncExperiencesResource(AsyncAPIResource):
198
220
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
199
221
  ) -> ExperienceInstance:
200
222
  """
201
- Get Experience details
223
+ Get an Experience details
202
224
 
203
225
  Args:
204
226
  extra_headers: Send extra headers