payi 0.1.0a19__py3-none-any.whl → 0.1.0a21__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/helpers.py +7 -1
- payi/resources/budgets/budgets.py +2 -2
- payi/resources/budgets/tags.py +10 -10
- payi/resources/categories/resources.py +2 -2
- payi/resources/experiences/experiences.py +26 -42
- payi/resources/experiences/types.py +12 -20
- payi/resources/ingest.py +14 -13
- payi/types/experience_instance.py +1 -1
- payi/types/ingest_event_param.py +1 -1
- payi/types/ingest_units_params.py +1 -1
- {payi-0.1.0a19.dist-info → payi-0.1.0a21.dist-info}/METADATA +1 -1
- {payi-0.1.0a19.dist-info → payi-0.1.0a21.dist-info}/RECORD +15 -15
- {payi-0.1.0a19.dist-info → payi-0.1.0a21.dist-info}/WHEEL +0 -0
- {payi-0.1.0a19.dist-info → payi-0.1.0a21.dist-info}/licenses/LICENSE +0 -0
payi/_version.py
CHANGED
payi/lib/helpers.py
CHANGED
|
@@ -20,7 +20,9 @@ def create_request_header_from_tags(request_tags: List[str]) -> Dict[str, str]:
|
|
|
20
20
|
|
|
21
21
|
def create_headers(
|
|
22
22
|
budget_ids: Union[List[str], None] = None,
|
|
23
|
-
request_tags: Union[List[str], None] = None
|
|
23
|
+
request_tags: Union[List[str], None] = None,
|
|
24
|
+
user_id: Union[str, None] = None,
|
|
25
|
+
experience_id: Union[str, None] = None,
|
|
24
26
|
) -> Dict[str, str]:
|
|
25
27
|
headers: Dict[str, str] = {}
|
|
26
28
|
|
|
@@ -28,5 +30,9 @@ def create_headers(
|
|
|
28
30
|
headers.update(create_budget_header_from_ids(budget_ids))
|
|
29
31
|
if request_tags:
|
|
30
32
|
headers.update(create_request_header_from_tags(request_tags))
|
|
33
|
+
if user_id:
|
|
34
|
+
headers.update({"xProxy-User-ID": user_id})
|
|
35
|
+
if experience_id:
|
|
36
|
+
headers.update({"xProxy-Experience-Id": experience_id})
|
|
31
37
|
|
|
32
38
|
return headers
|
|
@@ -119,7 +119,7 @@ class BudgetsResource(SyncAPIResource):
|
|
|
119
119
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
120
120
|
) -> BudgetResponse:
|
|
121
121
|
"""
|
|
122
|
-
Get
|
|
122
|
+
Get Budget details
|
|
123
123
|
|
|
124
124
|
Args:
|
|
125
125
|
budget_id (str): The ID of the budget.
|
|
@@ -368,7 +368,7 @@ class AsyncBudgetsResource(AsyncAPIResource):
|
|
|
368
368
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
369
369
|
) -> BudgetResponse:
|
|
370
370
|
"""
|
|
371
|
-
Get
|
|
371
|
+
Get Budget details
|
|
372
372
|
|
|
373
373
|
Args:
|
|
374
374
|
extra_headers: Send extra headers
|
payi/resources/budgets/tags.py
CHANGED
|
@@ -52,7 +52,7 @@ class TagsResource(SyncAPIResource):
|
|
|
52
52
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
53
53
|
) -> TagCreateResponse:
|
|
54
54
|
"""
|
|
55
|
-
Add Tags
|
|
55
|
+
Add Budget Tags
|
|
56
56
|
|
|
57
57
|
Args:
|
|
58
58
|
extra_headers: Send extra headers
|
|
@@ -87,7 +87,7 @@ class TagsResource(SyncAPIResource):
|
|
|
87
87
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
88
88
|
) -> TagUpdateResponse:
|
|
89
89
|
"""
|
|
90
|
-
Update the Budget
|
|
90
|
+
Update the Budget Tags
|
|
91
91
|
|
|
92
92
|
Args:
|
|
93
93
|
extra_headers: Send extra headers
|
|
@@ -121,7 +121,7 @@ class TagsResource(SyncAPIResource):
|
|
|
121
121
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
122
122
|
) -> TagListResponse:
|
|
123
123
|
"""
|
|
124
|
-
Get
|
|
124
|
+
Get Budget Tags
|
|
125
125
|
|
|
126
126
|
Args:
|
|
127
127
|
extra_headers: Send extra headers
|
|
@@ -154,7 +154,7 @@ class TagsResource(SyncAPIResource):
|
|
|
154
154
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
155
155
|
) -> TagDeleteResponse:
|
|
156
156
|
"""
|
|
157
|
-
Delete
|
|
157
|
+
Delete all Tags from Budget
|
|
158
158
|
|
|
159
159
|
Args:
|
|
160
160
|
extra_headers: Send extra headers
|
|
@@ -188,7 +188,7 @@ class TagsResource(SyncAPIResource):
|
|
|
188
188
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
189
189
|
) -> TagRemoveResponse:
|
|
190
190
|
"""
|
|
191
|
-
Remove Tags from
|
|
191
|
+
Remove Tags from Budget
|
|
192
192
|
|
|
193
193
|
Args:
|
|
194
194
|
extra_headers: Send extra headers
|
|
@@ -233,7 +233,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
233
233
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
234
234
|
) -> TagCreateResponse:
|
|
235
235
|
"""
|
|
236
|
-
Add Tags
|
|
236
|
+
Add Budget Tags
|
|
237
237
|
|
|
238
238
|
Args:
|
|
239
239
|
extra_headers: Send extra headers
|
|
@@ -268,7 +268,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
268
268
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
269
269
|
) -> TagUpdateResponse:
|
|
270
270
|
"""
|
|
271
|
-
Update the Budget
|
|
271
|
+
Update the Budget Tags
|
|
272
272
|
|
|
273
273
|
Args:
|
|
274
274
|
extra_headers: Send extra headers
|
|
@@ -302,7 +302,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
302
302
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
303
303
|
) -> TagListResponse:
|
|
304
304
|
"""
|
|
305
|
-
Get
|
|
305
|
+
Get Budget Tags
|
|
306
306
|
|
|
307
307
|
Args:
|
|
308
308
|
extra_headers: Send extra headers
|
|
@@ -335,7 +335,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
335
335
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
336
336
|
) -> TagDeleteResponse:
|
|
337
337
|
"""
|
|
338
|
-
Delete
|
|
338
|
+
Delete all Tags from Budget
|
|
339
339
|
|
|
340
340
|
Args:
|
|
341
341
|
extra_headers: Send extra headers
|
|
@@ -369,7 +369,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
369
369
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
370
370
|
) -> TagRemoveResponse:
|
|
371
371
|
"""
|
|
372
|
-
Remove Tags from
|
|
372
|
+
Remove Tags from Budget
|
|
373
373
|
|
|
374
374
|
Args:
|
|
375
375
|
extra_headers: Send extra headers
|
|
@@ -102,7 +102,7 @@ class ResourcesResource(SyncAPIResource):
|
|
|
102
102
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
103
103
|
) -> CategoryResourceResponse:
|
|
104
104
|
"""
|
|
105
|
-
Get a Resource
|
|
105
|
+
Get a Resource version details
|
|
106
106
|
|
|
107
107
|
Args:
|
|
108
108
|
extra_headers: Send extra headers
|
|
@@ -277,7 +277,7 @@ class AsyncResourcesResource(AsyncAPIResource):
|
|
|
277
277
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
278
278
|
) -> CategoryResourceResponse:
|
|
279
279
|
"""
|
|
280
|
-
Get a Resource
|
|
280
|
+
Get a Resource version details
|
|
281
281
|
|
|
282
282
|
Args:
|
|
283
283
|
extra_headers: Send extra headers
|
|
@@ -51,10 +51,8 @@ class ExperiencesResource(SyncAPIResource):
|
|
|
51
51
|
extra_body: Body | None = None,
|
|
52
52
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
53
53
|
) -> ExperienceInstance:
|
|
54
|
-
"""
|
|
55
|
-
|
|
56
|
-
This ID can then be passed into router calls
|
|
57
|
-
for a specific user experience.
|
|
54
|
+
"""
|
|
55
|
+
Create an Experience
|
|
58
56
|
|
|
59
57
|
Args:
|
|
60
58
|
extra_headers: Send extra headers
|
|
@@ -77,7 +75,7 @@ class ExperiencesResource(SyncAPIResource):
|
|
|
77
75
|
|
|
78
76
|
def retrieve(
|
|
79
77
|
self,
|
|
80
|
-
|
|
78
|
+
experience_id: str,
|
|
81
79
|
*,
|
|
82
80
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
83
81
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -87,7 +85,7 @@ class ExperiencesResource(SyncAPIResource):
|
|
|
87
85
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
88
86
|
) -> ExperienceInstance:
|
|
89
87
|
"""
|
|
90
|
-
Get details
|
|
88
|
+
Get Experience details
|
|
91
89
|
|
|
92
90
|
Args:
|
|
93
91
|
extra_headers: Send extra headers
|
|
@@ -98,12 +96,10 @@ class ExperiencesResource(SyncAPIResource):
|
|
|
98
96
|
|
|
99
97
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
100
98
|
"""
|
|
101
|
-
if not
|
|
102
|
-
raise ValueError(
|
|
103
|
-
f"Expected a non-empty value for `experience_instance_id` but received {experience_instance_id!r}"
|
|
104
|
-
)
|
|
99
|
+
if not experience_id:
|
|
100
|
+
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
105
101
|
return self._get(
|
|
106
|
-
f"/api/v1/experiences/instances/{
|
|
102
|
+
f"/api/v1/experiences/instances/{experience_id}",
|
|
107
103
|
options=make_request_options(
|
|
108
104
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
109
105
|
),
|
|
@@ -112,7 +108,7 @@ class ExperiencesResource(SyncAPIResource):
|
|
|
112
108
|
|
|
113
109
|
def delete(
|
|
114
110
|
self,
|
|
115
|
-
|
|
111
|
+
experience_id: str,
|
|
116
112
|
*,
|
|
117
113
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
118
114
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -121,10 +117,8 @@ class ExperiencesResource(SyncAPIResource):
|
|
|
121
117
|
extra_body: Body | None = None,
|
|
122
118
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
123
119
|
) -> ExperienceInstance:
|
|
124
|
-
"""
|
|
125
|
-
|
|
126
|
-
This will remove all costs associated with this
|
|
127
|
-
experience instance.
|
|
120
|
+
"""
|
|
121
|
+
Delete an Experience
|
|
128
122
|
|
|
129
123
|
Args:
|
|
130
124
|
extra_headers: Send extra headers
|
|
@@ -135,12 +129,10 @@ class ExperiencesResource(SyncAPIResource):
|
|
|
135
129
|
|
|
136
130
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
137
131
|
"""
|
|
138
|
-
if not
|
|
139
|
-
raise ValueError(
|
|
140
|
-
f"Expected a non-empty value for `experience_instance_id` but received {experience_instance_id!r}"
|
|
141
|
-
)
|
|
132
|
+
if not experience_id:
|
|
133
|
+
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
142
134
|
return self._delete(
|
|
143
|
-
f"/api/v1/experiences/instances/{
|
|
135
|
+
f"/api/v1/experiences/instances/{experience_id}",
|
|
144
136
|
options=make_request_options(
|
|
145
137
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
146
138
|
),
|
|
@@ -172,10 +164,8 @@ class AsyncExperiencesResource(AsyncAPIResource):
|
|
|
172
164
|
extra_body: Body | None = None,
|
|
173
165
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
174
166
|
) -> ExperienceInstance:
|
|
175
|
-
"""
|
|
176
|
-
|
|
177
|
-
This ID can then be passed into router calls
|
|
178
|
-
for a specific user experience.
|
|
167
|
+
"""
|
|
168
|
+
Create an Experience
|
|
179
169
|
|
|
180
170
|
Args:
|
|
181
171
|
extra_headers: Send extra headers
|
|
@@ -198,7 +188,7 @@ class AsyncExperiencesResource(AsyncAPIResource):
|
|
|
198
188
|
|
|
199
189
|
async def retrieve(
|
|
200
190
|
self,
|
|
201
|
-
|
|
191
|
+
experience_id: str,
|
|
202
192
|
*,
|
|
203
193
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
204
194
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -208,7 +198,7 @@ class AsyncExperiencesResource(AsyncAPIResource):
|
|
|
208
198
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
209
199
|
) -> ExperienceInstance:
|
|
210
200
|
"""
|
|
211
|
-
Get details
|
|
201
|
+
Get Experience details
|
|
212
202
|
|
|
213
203
|
Args:
|
|
214
204
|
extra_headers: Send extra headers
|
|
@@ -219,12 +209,10 @@ class AsyncExperiencesResource(AsyncAPIResource):
|
|
|
219
209
|
|
|
220
210
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
221
211
|
"""
|
|
222
|
-
if not
|
|
223
|
-
raise ValueError(
|
|
224
|
-
f"Expected a non-empty value for `experience_instance_id` but received {experience_instance_id!r}"
|
|
225
|
-
)
|
|
212
|
+
if not experience_id:
|
|
213
|
+
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
226
214
|
return await self._get(
|
|
227
|
-
f"/api/v1/experiences/instances/{
|
|
215
|
+
f"/api/v1/experiences/instances/{experience_id}",
|
|
228
216
|
options=make_request_options(
|
|
229
217
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
230
218
|
),
|
|
@@ -233,7 +221,7 @@ class AsyncExperiencesResource(AsyncAPIResource):
|
|
|
233
221
|
|
|
234
222
|
async def delete(
|
|
235
223
|
self,
|
|
236
|
-
|
|
224
|
+
experience_id: str,
|
|
237
225
|
*,
|
|
238
226
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
239
227
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -242,10 +230,8 @@ class AsyncExperiencesResource(AsyncAPIResource):
|
|
|
242
230
|
extra_body: Body | None = None,
|
|
243
231
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
244
232
|
) -> ExperienceInstance:
|
|
245
|
-
"""
|
|
246
|
-
|
|
247
|
-
This will remove all costs associated with this
|
|
248
|
-
experience instance.
|
|
233
|
+
"""
|
|
234
|
+
Delete an Experience
|
|
249
235
|
|
|
250
236
|
Args:
|
|
251
237
|
extra_headers: Send extra headers
|
|
@@ -256,12 +242,10 @@ class AsyncExperiencesResource(AsyncAPIResource):
|
|
|
256
242
|
|
|
257
243
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
258
244
|
"""
|
|
259
|
-
if not
|
|
260
|
-
raise ValueError(
|
|
261
|
-
f"Expected a non-empty value for `experience_instance_id` but received {experience_instance_id!r}"
|
|
262
|
-
)
|
|
245
|
+
if not experience_id:
|
|
246
|
+
raise ValueError(f"Expected a non-empty value for `experience_id` but received {experience_id!r}")
|
|
263
247
|
return await self._delete(
|
|
264
|
-
f"/api/v1/experiences/instances/{
|
|
248
|
+
f"/api/v1/experiences/instances/{experience_id}",
|
|
265
249
|
options=make_request_options(
|
|
266
250
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
267
251
|
),
|
|
@@ -48,10 +48,8 @@ class TypesResource(SyncAPIResource):
|
|
|
48
48
|
extra_body: Body | None = None,
|
|
49
49
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
50
50
|
) -> ExperienceType:
|
|
51
|
-
"""
|
|
52
|
-
|
|
53
|
-
Instances of this type can be created via
|
|
54
|
-
/experiences/instance.
|
|
51
|
+
"""
|
|
52
|
+
Create an Experience Type
|
|
55
53
|
|
|
56
54
|
Args:
|
|
57
55
|
extra_headers: Send extra headers
|
|
@@ -89,7 +87,7 @@ class TypesResource(SyncAPIResource):
|
|
|
89
87
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
90
88
|
) -> ExperienceType:
|
|
91
89
|
"""
|
|
92
|
-
Get
|
|
90
|
+
Get Experience Type details
|
|
93
91
|
|
|
94
92
|
Args:
|
|
95
93
|
extra_headers: Send extra headers
|
|
@@ -124,7 +122,7 @@ class TypesResource(SyncAPIResource):
|
|
|
124
122
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
125
123
|
) -> ExperienceType:
|
|
126
124
|
"""
|
|
127
|
-
|
|
125
|
+
Update an Experience Type
|
|
128
126
|
|
|
129
127
|
Args:
|
|
130
128
|
extra_headers: Send extra headers
|
|
@@ -182,10 +180,8 @@ class TypesResource(SyncAPIResource):
|
|
|
182
180
|
extra_body: Body | None = None,
|
|
183
181
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
184
182
|
) -> ExperienceType:
|
|
185
|
-
"""
|
|
186
|
-
|
|
187
|
-
This will remove visiblity of this type from all
|
|
188
|
-
dashboard stats.
|
|
183
|
+
"""
|
|
184
|
+
Delete an Experience Type
|
|
189
185
|
|
|
190
186
|
Args:
|
|
191
187
|
extra_headers: Send extra headers
|
|
@@ -228,10 +224,8 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
228
224
|
extra_body: Body | None = None,
|
|
229
225
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
230
226
|
) -> ExperienceType:
|
|
231
|
-
"""
|
|
232
|
-
|
|
233
|
-
Instances of this type can be created via
|
|
234
|
-
/experiences/instance.
|
|
227
|
+
"""
|
|
228
|
+
Create an Experience Type
|
|
235
229
|
|
|
236
230
|
Args:
|
|
237
231
|
extra_headers: Send extra headers
|
|
@@ -269,7 +263,7 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
269
263
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
270
264
|
) -> ExperienceType:
|
|
271
265
|
"""
|
|
272
|
-
Get
|
|
266
|
+
Get Experience Type details
|
|
273
267
|
|
|
274
268
|
Args:
|
|
275
269
|
extra_headers: Send extra headers
|
|
@@ -304,7 +298,7 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
304
298
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
305
299
|
) -> ExperienceType:
|
|
306
300
|
"""
|
|
307
|
-
|
|
301
|
+
Update an Experience Type
|
|
308
302
|
|
|
309
303
|
Args:
|
|
310
304
|
extra_headers: Send extra headers
|
|
@@ -362,10 +356,8 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
362
356
|
extra_body: Body | None = None,
|
|
363
357
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
364
358
|
) -> ExperienceType:
|
|
365
|
-
"""
|
|
366
|
-
|
|
367
|
-
This will remove visiblity of this type from all
|
|
368
|
-
dashboard stats.
|
|
359
|
+
"""
|
|
360
|
+
Delete an Experience Type
|
|
369
361
|
|
|
370
362
|
Args:
|
|
371
363
|
extra_headers: Send extra headers
|
payi/resources/ingest.py
CHANGED
|
@@ -84,7 +84,7 @@ class IngestResource(SyncAPIResource):
|
|
|
84
84
|
event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
85
85
|
budget_ids: Union[list[str], None] | NotGiven = NOT_GIVEN,
|
|
86
86
|
request_tags: Union[list[str], None] | NotGiven = NOT_GIVEN,
|
|
87
|
-
|
|
87
|
+
experience_id: Union[str, None] | NotGiven = NOT_GIVEN,
|
|
88
88
|
user_id: Union[str, None] | NotGiven = NOT_GIVEN,
|
|
89
89
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
90
90
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -94,7 +94,7 @@ class IngestResource(SyncAPIResource):
|
|
|
94
94
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
95
95
|
) -> IngestResponse:
|
|
96
96
|
"""
|
|
97
|
-
Ingest
|
|
97
|
+
Ingest an Event
|
|
98
98
|
|
|
99
99
|
Args:
|
|
100
100
|
category (str): The name of the category
|
|
@@ -111,7 +111,7 @@ class IngestResource(SyncAPIResource):
|
|
|
111
111
|
|
|
112
112
|
request_tags (list[str], optional): The request tags to associate with the request. Defaults to None.
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
experience_id (str, optional): The experience instance id
|
|
115
115
|
|
|
116
116
|
user_id (str, optional): The user id
|
|
117
117
|
|
|
@@ -144,8 +144,8 @@ class IngestResource(SyncAPIResource):
|
|
|
144
144
|
valid_tags = [tag.strip() for tag in request_tags if tag.strip()]
|
|
145
145
|
valid_tags_str = ",".join(valid_tags) if valid_tags else NOT_GIVEN
|
|
146
146
|
|
|
147
|
-
if
|
|
148
|
-
|
|
147
|
+
if experience_id is None or isinstance(experience_id, NotGiven):
|
|
148
|
+
experience_id = NOT_GIVEN
|
|
149
149
|
|
|
150
150
|
if user_id is None or isinstance(user_id, NotGiven):
|
|
151
151
|
user_id = NOT_GIVEN
|
|
@@ -155,7 +155,7 @@ class IngestResource(SyncAPIResource):
|
|
|
155
155
|
{
|
|
156
156
|
"xProxy-Budget-IDs": valid_ids_str,
|
|
157
157
|
"xProxy-Request-Tags": valid_tags_str,
|
|
158
|
-
"xProxy-Experience-
|
|
158
|
+
"xProxy-Experience-Id": experience_id,
|
|
159
159
|
"xProxy-User-ID": user_id,
|
|
160
160
|
}
|
|
161
161
|
),
|
|
@@ -233,9 +233,10 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
233
233
|
event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
234
234
|
budget_ids: Union[list[str], None] | NotGiven = NOT_GIVEN,
|
|
235
235
|
request_tags: Union[list[str], None] | NotGiven = NOT_GIVEN,
|
|
236
|
-
|
|
236
|
+
experience_id: Union[str, None] | NotGiven = NOT_GIVEN,
|
|
237
237
|
user_id: Union[str, None] | NotGiven = NOT_GIVEN,
|
|
238
|
-
|
|
238
|
+
|
|
239
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
239
240
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
240
241
|
extra_headers: Headers | None = None,
|
|
241
242
|
extra_query: Query | None = None,
|
|
@@ -243,7 +244,7 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
243
244
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
244
245
|
) -> IngestResponse:
|
|
245
246
|
"""
|
|
246
|
-
Ingest
|
|
247
|
+
Ingest an Event
|
|
247
248
|
|
|
248
249
|
Args:
|
|
249
250
|
category (str): The name of the category
|
|
@@ -260,7 +261,7 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
260
261
|
|
|
261
262
|
request_tags (list[str], optional): The request tags to associate with the request. Defaults to None.
|
|
262
263
|
|
|
263
|
-
|
|
264
|
+
experience_id (str, optional): The experience instance id
|
|
264
265
|
|
|
265
266
|
user_id (str, optional): The user id
|
|
266
267
|
|
|
@@ -293,8 +294,8 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
293
294
|
valid_tags = [tag.strip() for tag in request_tags if tag.strip()]
|
|
294
295
|
valid_tags_str = ",".join(valid_tags) if valid_tags else NOT_GIVEN
|
|
295
296
|
|
|
296
|
-
if
|
|
297
|
-
|
|
297
|
+
if experience_id is None or isinstance(experience_id, NotGiven):
|
|
298
|
+
experience_id = NOT_GIVEN
|
|
298
299
|
|
|
299
300
|
if user_id is None or isinstance(user_id, NotGiven):
|
|
300
301
|
user_id = NOT_GIVEN
|
|
@@ -304,7 +305,7 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
304
305
|
{
|
|
305
306
|
"xProxy-Budget-IDs": valid_ids_str,
|
|
306
307
|
"xProxy-Request-Tags": valid_tags_str,
|
|
307
|
-
"xProxy-Experience-
|
|
308
|
+
"xProxy-Experience-Id": experience_id,
|
|
308
309
|
"xProxy-User-ID": user_id,
|
|
309
310
|
}
|
|
310
311
|
),
|
payi/types/ingest_event_param.py
CHANGED
|
@@ -26,6 +26,6 @@ class IngestUnitsParams(TypedDict, total=False):
|
|
|
26
26
|
|
|
27
27
|
request_tags: Annotated[Union[list[str], None], PropertyInfo(alias="xProxy-Request-Tags")]
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
experience_id: Annotated[Union[str, None], PropertyInfo(alias="xProxy-Experience-Id")]
|
|
30
30
|
|
|
31
31
|
user_id: Annotated[Union[str, None], PropertyInfo(alias="xProxy-User-ID")]
|
|
@@ -11,7 +11,7 @@ payi/_resource.py,sha256=j2jIkTr8OIC8sU6-05nxSaCyj4MaFlbZrwlyg4_xJos,1088
|
|
|
11
11
|
payi/_response.py,sha256=SByCajzglbiy7lSG4F5enqb7R6jVQe1OQ9TBsaxWzE8,28508
|
|
12
12
|
payi/_streaming.py,sha256=Z_wIyo206T6Jqh2rolFg2VXZgX24PahLmpURp0-NssU,10092
|
|
13
13
|
payi/_types.py,sha256=mb6zn5qmTK5j0QMh0fevdShT091HBL4w0YCUfQ3u5VY,6101
|
|
14
|
-
payi/_version.py,sha256=
|
|
14
|
+
payi/_version.py,sha256=uIzHKQnRW3xF8AwVnDGbcxga9x8qelZPjxp9xnCrPBo,165
|
|
15
15
|
payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
payi/_utils/__init__.py,sha256=Uzq1-FIih_VUjzdNVWXks0sdC39KBKLMrZoz-_JOjJ4,1988
|
|
17
17
|
payi/_utils/_logs.py,sha256=fmnf5D9TOgkgZKfgYmSa3PiUc3SZgkchn6CzJUeo0SQ,768
|
|
@@ -23,18 +23,18 @@ payi/_utils/_transform.py,sha256=NCz3q9_O-vuj60xVe-qzhEQ8uJWlZWJTsM-GwHDccf8,129
|
|
|
23
23
|
payi/_utils/_typing.py,sha256=tFbktdpdHCQliwzGsWysgn0P5H0JRdagkZdb_LegGkY,3838
|
|
24
24
|
payi/_utils/_utils.py,sha256=LMVTMZG8pfu8AkJNSfmv_z3guQlOfm2UxDTjTTXggfg,11411
|
|
25
25
|
payi/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
26
|
-
payi/lib/helpers.py,sha256=
|
|
26
|
+
payi/lib/helpers.py,sha256=JpI9vy--oJP5kUlcWK0yfyRUbIRMXkvLeUQC4g8rLNY,1472
|
|
27
27
|
payi/resources/__init__.py,sha256=0bsV7zh4J03yh3W3MBoiiIT12uG2tdvsDrdqOeY0Cbc,2032
|
|
28
|
-
payi/resources/ingest.py,sha256=
|
|
28
|
+
payi/resources/ingest.py,sha256=mUZkNsb2zC7q90vHjD_RJ98YYl0jtAbnJl6Ymhnb-0A,14315
|
|
29
29
|
payi/resources/budgets/__init__.py,sha256=w1UhOdDXtUH4A91ME5Tw2nr9bRvPJyJY1YWiVVy7jj0,989
|
|
30
|
-
payi/resources/budgets/budgets.py,sha256=
|
|
31
|
-
payi/resources/budgets/tags.py,sha256=
|
|
30
|
+
payi/resources/budgets/budgets.py,sha256=5i-V9KT9SUmg3RbF0ZehEpCScMzAeszz9zia2jSzWcM,26500
|
|
31
|
+
payi/resources/budgets/tags.py,sha256=g0cln7tO1L1rm-hSZNnDJHdetiacDqExlSQ6YFudFsw,17817
|
|
32
32
|
payi/resources/categories/__init__.py,sha256=w5gMiPdBSzJA_qfoVtFBElaoe8wGf_O63R7R1Spr6Gk,1093
|
|
33
33
|
payi/resources/categories/categories.py,sha256=hqJE4iSiMe5nvvsui4RjFJxFb8170iRbJfTafk2NzGw,15072
|
|
34
|
-
payi/resources/categories/resources.py,sha256=
|
|
34
|
+
payi/resources/categories/resources.py,sha256=681npzIyzubMf7CS7Uw2_WvZfwMpJw1qaOspTWdoBbc,17696
|
|
35
35
|
payi/resources/experiences/__init__.py,sha256=gguTTCoGlAWDyrDJh1CtZwIVsyBbzERX63vRtFtjxjI,1054
|
|
36
|
-
payi/resources/experiences/experiences.py,sha256=
|
|
37
|
-
payi/resources/experiences/types.py,sha256=
|
|
36
|
+
payi/resources/experiences/experiences.py,sha256=UsE5DUeaxhmqzwmSXKx6BUNLYeXDKdU_QK0yM6_LRx0,12278
|
|
37
|
+
payi/resources/experiences/types.py,sha256=e1fitOnbPD8f7gyYOS2XhjupzKl495LX0pyBgcsQkCg,17110
|
|
38
38
|
payi/types/__init__.py,sha256=7zBCxYcYlvjAIecjsz9nw-LqsMAMXakYhTRJwXUTneo,1803
|
|
39
39
|
payi/types/budget_create_params.py,sha256=3PziVJT3_ll-6yv3i5EF8ERm19jFJAKbv9v-CvRW5ik,653
|
|
40
40
|
payi/types/budget_history_response.py,sha256=4SnisCLr1HImVecgonZK7HIm9WTmYl0YMaTbMP70qZY,934
|
|
@@ -51,11 +51,11 @@ payi/types/category_response.py,sha256=43i8bii20Sb-z9R5M1Ia6RGfRZmdQqsWPlv4Bl1XQ
|
|
|
51
51
|
payi/types/cost_data.py,sha256=jZtju_3WWNXh4wCu77XnyvxZkvewcvXBS_V0z07BizA,284
|
|
52
52
|
payi/types/cost_details.py,sha256=3ldvnYILAG6Sz9wGWMs1SZvIfdGEbn5i4-CauWEXMPA,265
|
|
53
53
|
payi/types/default_response.py,sha256=o617LpRsCIZHCZxAc5nVI2JQ3HPGZo4gCDvSDkxkIJ8,270
|
|
54
|
-
payi/types/experience_instance.py,sha256=
|
|
54
|
+
payi/types/experience_instance.py,sha256=qcG55W-ok341voIoGFIYGCcqfb2w7MLAS033xgT0ags,238
|
|
55
55
|
payi/types/ingest_bulk_params.py,sha256=aIsugHkiAe_DnGQ8JVpDUDYr1YNzR5cUY9mMPqusIP0,381
|
|
56
|
-
payi/types/ingest_event_param.py,sha256=
|
|
56
|
+
payi/types/ingest_event_param.py,sha256=0am1vo5ycVREaE2mPLHy-Qmt0vIGi0UzN0br_EBeYZs,712
|
|
57
57
|
payi/types/ingest_response.py,sha256=o43RH25dS4S54OCr3vkipZvLeAmI-hru6LuL789iEnM,1071
|
|
58
|
-
payi/types/ingest_units_params.py,sha256=
|
|
58
|
+
payi/types/ingest_units_params.py,sha256=WHxiSuEwstcLs48lg5YmyNPGmeKkB_GUKCgAeF-U0is,920
|
|
59
59
|
payi/types/paged_budget_list.py,sha256=FqKlbAifEWY3sZqiJSny-XtS-XIfmj14AufNffNVmqM,1385
|
|
60
60
|
payi/types/requests_data.py,sha256=UniFVu9SgDQIbZupzrLSrvBKV487_iKFemLw9nRDhGo,296
|
|
61
61
|
payi/types/total_cost_data.py,sha256=Nu1LyV1NX4CsI02Yn3GbvNXVZPrXG8U4Fs55rZE9KJk,603
|
|
@@ -77,7 +77,7 @@ payi/types/experiences/experience_type.py,sha256=KKjkfI0eaoB1TmTlA4UpHKa2fB1q0zX
|
|
|
77
77
|
payi/types/experiences/type_create_params.py,sha256=8dNpffodzeD5vm3s6UJrZVOG7YsiTkXo7viDnoEoCZY,311
|
|
78
78
|
payi/types/experiences/type_list_response.py,sha256=DgkPLw40oUqBETLePVMVenstMsGG12rZRU9w6kgQN28,280
|
|
79
79
|
payi/types/experiences/type_update_params.py,sha256=ziUJASn8QF_5nSp5lohT0HLK0tTOciT-X35CVH9dA5Q,329
|
|
80
|
-
payi-0.1.
|
|
81
|
-
payi-0.1.
|
|
82
|
-
payi-0.1.
|
|
83
|
-
payi-0.1.
|
|
80
|
+
payi-0.1.0a21.dist-info/METADATA,sha256=zdplHN3Shh0ZB_N7StZ_Y4hcXeDzgdy0HvrB4XCcRJc,12006
|
|
81
|
+
payi-0.1.0a21.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
82
|
+
payi-0.1.0a21.dist-info/licenses/LICENSE,sha256=8vX1pjh3esb6D5DvXAf6NxiBcVyon8aHWNJCxmmHXeY,11334
|
|
83
|
+
payi-0.1.0a21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|