payi 0.1.0a28__tar.gz → 0.1.0a29__tar.gz
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-0.1.0a29/.release-please-manifest.json +3 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/CHANGELOG.md +8 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/PKG-INFO +1 -1
- {payi-0.1.0a28 → payi-0.1.0a29}/pyproject.toml +1 -1
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_client.py +2 -2
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_version.py +1 -1
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/billing_models.py +8 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/experiences/types.py +24 -4
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/ingest.py +12 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/billing_model.py +2 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/billing_model_create_params.py +2 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/billing_model_update_params.py +2 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/cost_details.py +2 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/experiences/experience_type.py +3 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/experiences/type_create_params.py +3 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/experiences/type_update_params.py +4 -1
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/ingest_event_param.py +8 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/ingest_units_params.py +6 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/experiences/test_types.py +44 -8
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/test_billing_models.py +4 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/test_ingest.py +6 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_client.py +2 -2
- payi-0.1.0a28/.release-please-manifest.json +0 -3
- {payi-0.1.0a28 → payi-0.1.0a29}/.gitignore +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/LICENSE +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/README.md +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/SECURITY.md +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/api.md +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/bin/check-release-environment +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/bin/publish-pypi +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/examples/.keep +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/mypy.ini +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/noxfile.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/release-please-config.json +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/requirements-dev.lock +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/requirements.lock +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_base_client.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_compat.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_constants.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_files.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_models.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_qs.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_resource.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_types.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/lib/helpers.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/py.typed +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/budgets/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/budgets/budgets.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/budgets/tags.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/categories/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/categories/categories.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/categories/resources.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/csat.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/experiences/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/experiences/experiences.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/resources/price_modifiers.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/billing_model_list_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budget_create_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budget_history_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budget_list_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budget_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budget_update_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/budget_tags.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/tag_create_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/tag_create_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/tag_delete_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/tag_list_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/tag_remove_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/tag_remove_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/tag_update_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/budgets/tag_update_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/bulk_ingest_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/categories/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/categories/resource_create_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/categories/resource_list_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/category_delete_resource_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/category_delete_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/category_list_resources_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/category_list_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/category_resource_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/category_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/csat.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/csat_create_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/experience_instance.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/experiences/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/experiences/type_list_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/experiences/type_list_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/ingest_bulk_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/ingest_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/paged_budget_list.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/price_modifier.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/price_modifier_create_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/price_modifier_retrieve_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/price_modifier_update_params.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/requests_data.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/src/payi/types/total_cost_data.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/budgets/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/budgets/test_tags.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/categories/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/categories/test_resources.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/experiences/__init__.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/test_budgets.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/test_categories.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/test_csat.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/test_experiences.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/api_resources/test_price_modifiers.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/conftest.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/sample_file.txt +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_files.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_models.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_qs.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_required_args.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_response.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_streaming.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_transform.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a28 → payi-0.1.0a29}/tests/utils.py +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.29 (2024-11-15)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.28...v0.1.0-alpha.29](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.28...v0.1.0-alpha.29)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** update apikey header ([#132](https://github.com/Pay-i/pay-i-python/issues/132)) ([4e42d00](https://github.com/Pay-i/pay-i-python/commit/4e42d005530be2e002f536c2008c75a2afc1dea2))
|
|
10
|
+
|
|
3
11
|
## 0.1.0-alpha.28 (2024-11-15)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.1.0-alpha.27...v0.1.0-alpha.28](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.27...v0.1.0-alpha.28)
|
|
@@ -129,7 +129,7 @@ class Payi(SyncAPIClient):
|
|
|
129
129
|
@override
|
|
130
130
|
def auth_headers(self) -> dict[str, str]:
|
|
131
131
|
api_key = self.api_key
|
|
132
|
-
return {"
|
|
132
|
+
return {"xProxy-api-key": api_key}
|
|
133
133
|
|
|
134
134
|
@property
|
|
135
135
|
@override
|
|
@@ -309,7 +309,7 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
309
309
|
@override
|
|
310
310
|
def auth_headers(self) -> dict[str, str]:
|
|
311
311
|
api_key = self.api_key
|
|
312
|
-
return {"
|
|
312
|
+
return {"xProxy-api-key": api_key}
|
|
313
313
|
|
|
314
314
|
@property
|
|
315
315
|
@override
|
|
@@ -53,6 +53,7 @@ class BillingModelsResource(SyncAPIResource):
|
|
|
53
53
|
*,
|
|
54
54
|
name: str,
|
|
55
55
|
type: Literal["costplus"],
|
|
56
|
+
default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
|
|
56
57
|
prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
|
|
57
58
|
prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
|
|
58
59
|
threshold: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -79,6 +80,7 @@ class BillingModelsResource(SyncAPIResource):
|
|
|
79
80
|
{
|
|
80
81
|
"name": name,
|
|
81
82
|
"type": type,
|
|
83
|
+
"default_price_modifier": default_price_modifier,
|
|
82
84
|
"prepaid_amount": prepaid_amount,
|
|
83
85
|
"prepaid_max": prepaid_max,
|
|
84
86
|
"threshold": threshold,
|
|
@@ -127,6 +129,7 @@ class BillingModelsResource(SyncAPIResource):
|
|
|
127
129
|
billing_model_id: str,
|
|
128
130
|
*,
|
|
129
131
|
type: Literal["costplus"],
|
|
132
|
+
default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
|
|
130
133
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
131
134
|
prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
|
|
132
135
|
prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -155,6 +158,7 @@ class BillingModelsResource(SyncAPIResource):
|
|
|
155
158
|
body=maybe_transform(
|
|
156
159
|
{
|
|
157
160
|
"type": type,
|
|
161
|
+
"default_price_modifier": default_price_modifier,
|
|
158
162
|
"name": name,
|
|
159
163
|
"prepaid_amount": prepaid_amount,
|
|
160
164
|
"prepaid_max": prepaid_max,
|
|
@@ -243,6 +247,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
|
|
|
243
247
|
*,
|
|
244
248
|
name: str,
|
|
245
249
|
type: Literal["costplus"],
|
|
250
|
+
default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
|
|
246
251
|
prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
|
|
247
252
|
prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
|
|
248
253
|
threshold: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -269,6 +274,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
|
|
|
269
274
|
{
|
|
270
275
|
"name": name,
|
|
271
276
|
"type": type,
|
|
277
|
+
"default_price_modifier": default_price_modifier,
|
|
272
278
|
"prepaid_amount": prepaid_amount,
|
|
273
279
|
"prepaid_max": prepaid_max,
|
|
274
280
|
"threshold": threshold,
|
|
@@ -317,6 +323,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
|
|
|
317
323
|
billing_model_id: str,
|
|
318
324
|
*,
|
|
319
325
|
type: Literal["costplus"],
|
|
326
|
+
default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
|
|
320
327
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
321
328
|
prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
|
|
322
329
|
prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -345,6 +352,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
|
|
|
345
352
|
body=await async_maybe_transform(
|
|
346
353
|
{
|
|
347
354
|
"type": type,
|
|
355
|
+
"default_price_modifier": default_price_modifier,
|
|
348
356
|
"name": name,
|
|
349
357
|
"prepaid_amount": prepaid_amount,
|
|
350
358
|
"prepaid_max": prepaid_max,
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
5
7
|
import httpx
|
|
6
8
|
|
|
7
9
|
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
@@ -50,6 +52,7 @@ class TypesResource(SyncAPIResource):
|
|
|
50
52
|
*,
|
|
51
53
|
description: str,
|
|
52
54
|
name: str,
|
|
55
|
+
logging_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
53
56
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
54
57
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
55
58
|
extra_headers: Headers | None = None,
|
|
@@ -75,6 +78,7 @@ class TypesResource(SyncAPIResource):
|
|
|
75
78
|
{
|
|
76
79
|
"description": description,
|
|
77
80
|
"name": name,
|
|
81
|
+
"logging_enabled": logging_enabled,
|
|
78
82
|
},
|
|
79
83
|
type_create_params.TypeCreateParams,
|
|
80
84
|
),
|
|
@@ -121,7 +125,8 @@ class TypesResource(SyncAPIResource):
|
|
|
121
125
|
self,
|
|
122
126
|
experience_name: str,
|
|
123
127
|
*,
|
|
124
|
-
description: str,
|
|
128
|
+
description: Optional[str],
|
|
129
|
+
logging_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
125
130
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
126
131
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
127
132
|
extra_headers: Headers | None = None,
|
|
@@ -145,7 +150,13 @@ class TypesResource(SyncAPIResource):
|
|
|
145
150
|
raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
|
|
146
151
|
return self._patch(
|
|
147
152
|
f"/api/v1/experiences/types/{experience_name}",
|
|
148
|
-
body=maybe_transform(
|
|
153
|
+
body=maybe_transform(
|
|
154
|
+
{
|
|
155
|
+
"description": description,
|
|
156
|
+
"logging_enabled": logging_enabled,
|
|
157
|
+
},
|
|
158
|
+
type_update_params.TypeUpdateParams,
|
|
159
|
+
),
|
|
149
160
|
options=make_request_options(
|
|
150
161
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
151
162
|
),
|
|
@@ -248,6 +259,7 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
248
259
|
*,
|
|
249
260
|
description: str,
|
|
250
261
|
name: str,
|
|
262
|
+
logging_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
251
263
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
252
264
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
253
265
|
extra_headers: Headers | None = None,
|
|
@@ -273,6 +285,7 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
273
285
|
{
|
|
274
286
|
"description": description,
|
|
275
287
|
"name": name,
|
|
288
|
+
"logging_enabled": logging_enabled,
|
|
276
289
|
},
|
|
277
290
|
type_create_params.TypeCreateParams,
|
|
278
291
|
),
|
|
@@ -319,7 +332,8 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
319
332
|
self,
|
|
320
333
|
experience_name: str,
|
|
321
334
|
*,
|
|
322
|
-
description: str,
|
|
335
|
+
description: Optional[str],
|
|
336
|
+
logging_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
323
337
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
324
338
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
325
339
|
extra_headers: Headers | None = None,
|
|
@@ -343,7 +357,13 @@ class AsyncTypesResource(AsyncAPIResource):
|
|
|
343
357
|
raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
|
|
344
358
|
return await self._patch(
|
|
345
359
|
f"/api/v1/experiences/types/{experience_name}",
|
|
346
|
-
body=await async_maybe_transform(
|
|
360
|
+
body=await async_maybe_transform(
|
|
361
|
+
{
|
|
362
|
+
"description": description,
|
|
363
|
+
"logging_enabled": logging_enabled,
|
|
364
|
+
},
|
|
365
|
+
type_update_params.TypeUpdateParams,
|
|
366
|
+
),
|
|
347
367
|
options=make_request_options(
|
|
348
368
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
349
369
|
),
|
|
@@ -91,8 +91,11 @@ class IngestResource(SyncAPIResource):
|
|
|
91
91
|
category: str,
|
|
92
92
|
resource: str,
|
|
93
93
|
units: Dict[str, ingest_units_params.Units],
|
|
94
|
+
end_to_end_latency_ms: Optional[int] | NotGiven = NOT_GIVEN,
|
|
94
95
|
event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
96
|
+
http_status_code: Optional[int] | NotGiven = NOT_GIVEN,
|
|
95
97
|
provisioned_resource_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
98
|
+
time_to_first_token_ms: Optional[int] | NotGiven = NOT_GIVEN,
|
|
96
99
|
budget_ids: Union[list[str], None] | NotGiven = NOT_GIVEN,
|
|
97
100
|
request_tags: Union[list[str], None] | NotGiven = NOT_GIVEN,
|
|
98
101
|
experience_id: Union[str, None] | NotGiven = NOT_GIVEN,
|
|
@@ -186,8 +189,11 @@ class IngestResource(SyncAPIResource):
|
|
|
186
189
|
"category": category,
|
|
187
190
|
"resource": resource,
|
|
188
191
|
"units": units,
|
|
192
|
+
"end_to_end_latency_ms": end_to_end_latency_ms,
|
|
189
193
|
"event_timestamp": event_timestamp,
|
|
194
|
+
"http_status_code": http_status_code,
|
|
190
195
|
"provisioned_resource_name": provisioned_resource_name,
|
|
196
|
+
"time_to_first_token_ms": time_to_first_token_ms,
|
|
191
197
|
},
|
|
192
198
|
ingest_units_params.IngestUnitsParams,
|
|
193
199
|
),
|
|
@@ -258,8 +264,11 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
258
264
|
category: str,
|
|
259
265
|
resource: str,
|
|
260
266
|
units: Dict[str, ingest_units_params.Units],
|
|
267
|
+
end_to_end_latency_ms: Optional[int] | NotGiven = NOT_GIVEN,
|
|
261
268
|
event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
269
|
+
http_status_code: Optional[int] | NotGiven = NOT_GIVEN,
|
|
262
270
|
provisioned_resource_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
271
|
+
time_to_first_token_ms: Optional[int] | NotGiven = NOT_GIVEN,
|
|
263
272
|
budget_ids: Union[list[str], None] | NotGiven = NOT_GIVEN,
|
|
264
273
|
request_tags: Union[list[str], None] | NotGiven = NOT_GIVEN,
|
|
265
274
|
experience_name: Union[str, None] | NotGiven = NOT_GIVEN,
|
|
@@ -352,8 +361,11 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
352
361
|
"category": category,
|
|
353
362
|
"resource": resource,
|
|
354
363
|
"units": units,
|
|
364
|
+
"end_to_end_latency_ms": end_to_end_latency_ms,
|
|
355
365
|
"event_timestamp": event_timestamp,
|
|
366
|
+
"http_status_code": http_status_code,
|
|
356
367
|
"provisioned_resource_name": provisioned_resource_name,
|
|
368
|
+
"time_to_first_token_ms": time_to_first_token_ms,
|
|
357
369
|
},
|
|
358
370
|
ingest_units_params.IngestUnitsParams,
|
|
359
371
|
),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from typing import Optional
|
|
3
4
|
|
|
4
5
|
from ..._models import BaseModel
|
|
5
6
|
|
|
@@ -12,3 +13,5 @@ class ExperienceType(BaseModel):
|
|
|
12
13
|
name: str
|
|
13
14
|
|
|
14
15
|
request_id: str
|
|
16
|
+
|
|
17
|
+
logging_enabled: Optional[bool] = None
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing import Optional
|
|
5
6
|
from typing_extensions import Required, TypedDict
|
|
6
7
|
|
|
7
8
|
__all__ = ["TypeCreateParams"]
|
|
@@ -11,3 +12,5 @@ class TypeCreateParams(TypedDict, total=False):
|
|
|
11
12
|
description: Required[str]
|
|
12
13
|
|
|
13
14
|
name: Required[str]
|
|
15
|
+
|
|
16
|
+
logging_enabled: Optional[bool]
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing import Optional
|
|
5
6
|
from typing_extensions import Required, TypedDict
|
|
6
7
|
|
|
7
8
|
__all__ = ["TypeUpdateParams"]
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class TypeUpdateParams(TypedDict, total=False):
|
|
11
|
-
description: Required[str]
|
|
12
|
+
description: Required[Optional[str]]
|
|
13
|
+
|
|
14
|
+
logging_enabled: Optional[bool]
|
|
@@ -26,14 +26,22 @@ class IngestEventParam(TypedDict, total=False):
|
|
|
26
26
|
|
|
27
27
|
budget_ids: Optional[List[str]]
|
|
28
28
|
|
|
29
|
+
csat_rating: Optional[int]
|
|
30
|
+
|
|
31
|
+
end_to_end_latency_ms: Optional[int]
|
|
32
|
+
|
|
29
33
|
event_timestamp: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
30
34
|
|
|
31
35
|
experience_id: Optional[str]
|
|
32
36
|
|
|
33
37
|
experience_name: Optional[str]
|
|
34
38
|
|
|
39
|
+
http_status_code: Optional[int]
|
|
40
|
+
|
|
35
41
|
provisioned_resource_name: Optional[str]
|
|
36
42
|
|
|
37
43
|
request_tags: Optional[List[str]]
|
|
38
44
|
|
|
45
|
+
time_to_first_token_ms: Optional[int]
|
|
46
|
+
|
|
39
47
|
user_id: Optional[str]
|
|
@@ -18,10 +18,16 @@ class IngestUnitsParams(TypedDict, total=False):
|
|
|
18
18
|
|
|
19
19
|
units: Required[Dict[str, Units]]
|
|
20
20
|
|
|
21
|
+
end_to_end_latency_ms: Optional[int]
|
|
22
|
+
|
|
21
23
|
event_timestamp: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
22
24
|
|
|
25
|
+
http_status_code: Optional[int]
|
|
26
|
+
|
|
23
27
|
provisioned_resource_name: Optional[str]
|
|
24
28
|
|
|
29
|
+
time_to_first_token_ms: Optional[int]
|
|
30
|
+
|
|
25
31
|
budget_ids: Annotated[Union[list[str], None], PropertyInfo(alias="xProxy-Budget-IDs")]
|
|
26
32
|
|
|
27
33
|
request_tags: Annotated[Union[list[str], None], PropertyInfo(alias="xProxy-Request-Tags")]
|
|
@@ -28,6 +28,15 @@ class TestTypes:
|
|
|
28
28
|
)
|
|
29
29
|
assert_matches_type(ExperienceType, type, path=["response"])
|
|
30
30
|
|
|
31
|
+
@parametrize
|
|
32
|
+
def test_method_create_with_all_params(self, client: Payi) -> None:
|
|
33
|
+
type = client.experiences.types.create(
|
|
34
|
+
description="x",
|
|
35
|
+
name="x",
|
|
36
|
+
logging_enabled=True,
|
|
37
|
+
)
|
|
38
|
+
assert_matches_type(ExperienceType, type, path=["response"])
|
|
39
|
+
|
|
31
40
|
@parametrize
|
|
32
41
|
def test_raw_response_create(self, client: Payi) -> None:
|
|
33
42
|
response = client.experiences.types.with_raw_response.create(
|
|
@@ -96,7 +105,16 @@ class TestTypes:
|
|
|
96
105
|
def test_method_update(self, client: Payi) -> None:
|
|
97
106
|
type = client.experiences.types.update(
|
|
98
107
|
experience_name="experience_name",
|
|
99
|
-
description="
|
|
108
|
+
description="description",
|
|
109
|
+
)
|
|
110
|
+
assert_matches_type(ExperienceType, type, path=["response"])
|
|
111
|
+
|
|
112
|
+
@parametrize
|
|
113
|
+
def test_method_update_with_all_params(self, client: Payi) -> None:
|
|
114
|
+
type = client.experiences.types.update(
|
|
115
|
+
experience_name="experience_name",
|
|
116
|
+
description="description",
|
|
117
|
+
logging_enabled=True,
|
|
100
118
|
)
|
|
101
119
|
assert_matches_type(ExperienceType, type, path=["response"])
|
|
102
120
|
|
|
@@ -104,7 +122,7 @@ class TestTypes:
|
|
|
104
122
|
def test_raw_response_update(self, client: Payi) -> None:
|
|
105
123
|
response = client.experiences.types.with_raw_response.update(
|
|
106
124
|
experience_name="experience_name",
|
|
107
|
-
description="
|
|
125
|
+
description="description",
|
|
108
126
|
)
|
|
109
127
|
|
|
110
128
|
assert response.is_closed is True
|
|
@@ -116,7 +134,7 @@ class TestTypes:
|
|
|
116
134
|
def test_streaming_response_update(self, client: Payi) -> None:
|
|
117
135
|
with client.experiences.types.with_streaming_response.update(
|
|
118
136
|
experience_name="experience_name",
|
|
119
|
-
description="
|
|
137
|
+
description="description",
|
|
120
138
|
) as response:
|
|
121
139
|
assert not response.is_closed
|
|
122
140
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
@@ -131,7 +149,7 @@ class TestTypes:
|
|
|
131
149
|
with pytest.raises(ValueError, match=r"Expected a non-empty value for `experience_name` but received ''"):
|
|
132
150
|
client.experiences.types.with_raw_response.update(
|
|
133
151
|
experience_name="",
|
|
134
|
-
description="
|
|
152
|
+
description="description",
|
|
135
153
|
)
|
|
136
154
|
|
|
137
155
|
@parametrize
|
|
@@ -216,6 +234,15 @@ class TestAsyncTypes:
|
|
|
216
234
|
)
|
|
217
235
|
assert_matches_type(ExperienceType, type, path=["response"])
|
|
218
236
|
|
|
237
|
+
@parametrize
|
|
238
|
+
async def test_method_create_with_all_params(self, async_client: AsyncPayi) -> None:
|
|
239
|
+
type = await async_client.experiences.types.create(
|
|
240
|
+
description="x",
|
|
241
|
+
name="x",
|
|
242
|
+
logging_enabled=True,
|
|
243
|
+
)
|
|
244
|
+
assert_matches_type(ExperienceType, type, path=["response"])
|
|
245
|
+
|
|
219
246
|
@parametrize
|
|
220
247
|
async def test_raw_response_create(self, async_client: AsyncPayi) -> None:
|
|
221
248
|
response = await async_client.experiences.types.with_raw_response.create(
|
|
@@ -284,7 +311,16 @@ class TestAsyncTypes:
|
|
|
284
311
|
async def test_method_update(self, async_client: AsyncPayi) -> None:
|
|
285
312
|
type = await async_client.experiences.types.update(
|
|
286
313
|
experience_name="experience_name",
|
|
287
|
-
description="
|
|
314
|
+
description="description",
|
|
315
|
+
)
|
|
316
|
+
assert_matches_type(ExperienceType, type, path=["response"])
|
|
317
|
+
|
|
318
|
+
@parametrize
|
|
319
|
+
async def test_method_update_with_all_params(self, async_client: AsyncPayi) -> None:
|
|
320
|
+
type = await async_client.experiences.types.update(
|
|
321
|
+
experience_name="experience_name",
|
|
322
|
+
description="description",
|
|
323
|
+
logging_enabled=True,
|
|
288
324
|
)
|
|
289
325
|
assert_matches_type(ExperienceType, type, path=["response"])
|
|
290
326
|
|
|
@@ -292,7 +328,7 @@ class TestAsyncTypes:
|
|
|
292
328
|
async def test_raw_response_update(self, async_client: AsyncPayi) -> None:
|
|
293
329
|
response = await async_client.experiences.types.with_raw_response.update(
|
|
294
330
|
experience_name="experience_name",
|
|
295
|
-
description="
|
|
331
|
+
description="description",
|
|
296
332
|
)
|
|
297
333
|
|
|
298
334
|
assert response.is_closed is True
|
|
@@ -304,7 +340,7 @@ class TestAsyncTypes:
|
|
|
304
340
|
async def test_streaming_response_update(self, async_client: AsyncPayi) -> None:
|
|
305
341
|
async with async_client.experiences.types.with_streaming_response.update(
|
|
306
342
|
experience_name="experience_name",
|
|
307
|
-
description="
|
|
343
|
+
description="description",
|
|
308
344
|
) as response:
|
|
309
345
|
assert not response.is_closed
|
|
310
346
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
@@ -319,7 +355,7 @@ class TestAsyncTypes:
|
|
|
319
355
|
with pytest.raises(ValueError, match=r"Expected a non-empty value for `experience_name` but received ''"):
|
|
320
356
|
await async_client.experiences.types.with_raw_response.update(
|
|
321
357
|
experience_name="",
|
|
322
|
-
description="
|
|
358
|
+
description="description",
|
|
323
359
|
)
|
|
324
360
|
|
|
325
361
|
@parametrize
|
|
@@ -30,6 +30,7 @@ class TestBillingModels:
|
|
|
30
30
|
billing_model = client.billing_models.create(
|
|
31
31
|
name="x",
|
|
32
32
|
type="costplus",
|
|
33
|
+
default_price_modifier=0,
|
|
33
34
|
prepaid_amount=0,
|
|
34
35
|
prepaid_max=0,
|
|
35
36
|
threshold=0,
|
|
@@ -113,6 +114,7 @@ class TestBillingModels:
|
|
|
113
114
|
billing_model = client.billing_models.update(
|
|
114
115
|
billing_model_id="billing_model_id",
|
|
115
116
|
type="costplus",
|
|
117
|
+
default_price_modifier=0,
|
|
116
118
|
name="name",
|
|
117
119
|
prepaid_amount=0,
|
|
118
120
|
prepaid_max=0,
|
|
@@ -234,6 +236,7 @@ class TestAsyncBillingModels:
|
|
|
234
236
|
billing_model = await async_client.billing_models.create(
|
|
235
237
|
name="x",
|
|
236
238
|
type="costplus",
|
|
239
|
+
default_price_modifier=0,
|
|
237
240
|
prepaid_amount=0,
|
|
238
241
|
prepaid_max=0,
|
|
239
242
|
threshold=0,
|
|
@@ -317,6 +320,7 @@ class TestAsyncBillingModels:
|
|
|
317
320
|
billing_model = await async_client.billing_models.update(
|
|
318
321
|
billing_model_id="billing_model_id",
|
|
319
322
|
type="costplus",
|
|
323
|
+
default_price_modifier=0,
|
|
320
324
|
name="name",
|
|
321
325
|
prepaid_amount=0,
|
|
322
326
|
prepaid_max=0,
|
|
@@ -117,8 +117,11 @@ class TestIngest:
|
|
|
117
117
|
"output": 0,
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
+
end_to_end_latency_ms=0,
|
|
120
121
|
event_timestamp=parse_datetime("2019-12-27T18:11:19.117Z"),
|
|
122
|
+
http_status_code=0,
|
|
121
123
|
provisioned_resource_name="provisioned_resource_name",
|
|
124
|
+
time_to_first_token_ms=0,
|
|
122
125
|
budget_ids=["budgetId1", "budgetId_2"],
|
|
123
126
|
request_tags=["requestTag1", "request_tag_2"],
|
|
124
127
|
experience_name="experience_name",
|
|
@@ -258,8 +261,11 @@ class TestAsyncIngest:
|
|
|
258
261
|
"output": 0,
|
|
259
262
|
}
|
|
260
263
|
},
|
|
264
|
+
end_to_end_latency_ms=0,
|
|
261
265
|
event_timestamp=parse_datetime("2019-12-27T18:11:19.117Z"),
|
|
266
|
+
http_status_code=0,
|
|
262
267
|
provisioned_resource_name="provisioned_resource_name",
|
|
268
|
+
time_to_first_token_ms=0,
|
|
263
269
|
budget_ids=["budgetId1", "budgetId_2"],
|
|
264
270
|
request_tags=["requestTag1", "request_tag_2"],
|
|
265
271
|
experience_name="experience_name",
|
|
@@ -320,7 +320,7 @@ class TestPayi:
|
|
|
320
320
|
def test_validate_headers(self) -> None:
|
|
321
321
|
client = Payi(base_url=base_url, api_key=api_key, _strict_response_validation=True)
|
|
322
322
|
request = client._build_request(FinalRequestOptions(method="get", url="/foo"))
|
|
323
|
-
assert request.headers.get("
|
|
323
|
+
assert request.headers.get("xProxy-api-key") == api_key
|
|
324
324
|
|
|
325
325
|
with pytest.raises(PayiError):
|
|
326
326
|
with update_env(**{"PAYI_API_KEY": Omit()}):
|
|
@@ -1084,7 +1084,7 @@ class TestAsyncPayi:
|
|
|
1084
1084
|
def test_validate_headers(self) -> None:
|
|
1085
1085
|
client = AsyncPayi(base_url=base_url, api_key=api_key, _strict_response_validation=True)
|
|
1086
1086
|
request = client._build_request(FinalRequestOptions(method="get", url="/foo"))
|
|
1087
|
-
assert request.headers.get("
|
|
1087
|
+
assert request.headers.get("xProxy-api-key") == api_key
|
|
1088
1088
|
|
|
1089
1089
|
with pytest.raises(PayiError):
|
|
1090
1090
|
with update_env(**{"PAYI_API_KEY": Omit()}):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|