payi 0.1.0a33__tar.gz → 0.1.0a34__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.0a34/.release-please-manifest.json +3 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/CHANGELOG.md +13 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/LICENSE +1 -1
- {payi-0.1.0a33 → payi-0.1.0a34}/PKG-INFO +19 -19
- {payi-0.1.0a33 → payi-0.1.0a34}/README.md +18 -18
- payi-0.1.0a34/api.md +128 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/pyproject.toml +1 -1
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_client.py +9 -9
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_version.py +1 -1
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/lib/helpers.py +8 -8
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/__init__.py +13 -13
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/billing_models.py +4 -4
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/experiences/properties.py +3 -3
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/ingest.py +47 -19
- {payi-0.1.0a33/src/payi/resources/budgets → payi-0.1.0a34/src/payi/resources/limits}/__init__.py +13 -13
- payi-0.1.0a33/src/payi/resources/budgets/budgets.py → payi-0.1.0a34/src/payi/resources/limits/limits.py +213 -196
- {payi-0.1.0a33/src/payi/resources/budgets → payi-0.1.0a34/src/payi/resources/limits}/tags.py +68 -68
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/requests/properties.py +3 -3
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/__init__.py +8 -6
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/billing_model.py +1 -1
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/billing_model_create_params.py +1 -1
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/billing_model_update_params.py +1 -1
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/category_resource_response.py +4 -0
- {payi-0.1.0a33/src/payi/types/requests → payi-0.1.0a34/src/payi/types/experiences}/property_create_params.py +2 -2
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/ingest_event_param.py +16 -2
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/ingest_response.py +7 -7
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/ingest_units_params.py +16 -2
- payi-0.1.0a33/src/payi/types/budget_create_params.py → payi-0.1.0a34/src/payi/types/limit_create_params.py +7 -9
- payi-0.1.0a34/src/payi/types/limit_history_response.py +34 -0
- payi-0.1.0a33/src/payi/types/budget_list_params.py → payi-0.1.0a34/src/payi/types/limit_list_params.py +3 -3
- payi-0.1.0a34/src/payi/types/limit_reset_params.py +16 -0
- payi-0.1.0a33/src/payi/types/budget_response.py → payi-0.1.0a34/src/payi/types/limit_response.py +11 -13
- payi-0.1.0a33/src/payi/types/budget_update_params.py → payi-0.1.0a34/src/payi/types/limit_update_params.py +3 -3
- {payi-0.1.0a33/src/payi/types/budgets → payi-0.1.0a34/src/payi/types/limits}/__init__.py +1 -1
- payi-0.1.0a33/src/payi/types/budgets/budget_tags.py → payi-0.1.0a34/src/payi/types/limits/limit_tags.py +2 -2
- {payi-0.1.0a33/src/payi/types/budgets → payi-0.1.0a34/src/payi/types/limits}/tag_create_params.py +1 -1
- {payi-0.1.0a33/src/payi/types/budgets → payi-0.1.0a34/src/payi/types/limits}/tag_create_response.py +2 -2
- {payi-0.1.0a33/src/payi/types/budgets → payi-0.1.0a34/src/payi/types/limits}/tag_delete_response.py +2 -2
- {payi-0.1.0a33/src/payi/types/budgets → payi-0.1.0a34/src/payi/types/limits}/tag_list_response.py +2 -2
- {payi-0.1.0a33/src/payi/types/budgets → payi-0.1.0a34/src/payi/types/limits}/tag_remove_params.py +1 -1
- {payi-0.1.0a33/src/payi/types/budgets → payi-0.1.0a34/src/payi/types/limits}/tag_remove_response.py +2 -2
- {payi-0.1.0a33/src/payi/types/budgets → payi-0.1.0a34/src/payi/types/limits}/tag_update_params.py +1 -1
- {payi-0.1.0a33/src/payi/types/budgets → payi-0.1.0a34/src/payi/types/limits}/tag_update_response.py +2 -2
- payi-0.1.0a33/src/payi/types/paged_budget_list.py → payi-0.1.0a34/src/payi/types/paged_limit_list.py +9 -11
- {payi-0.1.0a33/src/payi/types/experiences → payi-0.1.0a34/src/payi/types/requests}/property_create_params.py +2 -2
- payi-0.1.0a34/src/payi/types/shared/__init__.py +3 -0
- payi-0.1.0a34/src/payi/types/shared/evaluation_response.py +11 -0
- {payi-0.1.0a33/tests/api_resources/budgets → payi-0.1.0a34/tests/api_resources/limits}/test_tags.py +111 -111
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/test_billing_models.py +18 -18
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/test_ingest.py +16 -2
- payi-0.1.0a33/tests/api_resources/test_budgets.py → payi-0.1.0a34/tests/api_resources/test_limits.py +192 -177
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_client.py +28 -28
- payi-0.1.0a33/.release-please-manifest.json +0 -3
- payi-0.1.0a33/api.md +0 -190
- payi-0.1.0a33/src/payi/types/budget_history_response.py +0 -38
- {payi-0.1.0a33 → payi-0.1.0a34}/.gitignore +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/SECURITY.md +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/bin/check-release-environment +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/bin/publish-pypi +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/examples/.keep +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/mypy.ini +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/noxfile.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/release-please-config.json +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/requirements-dev.lock +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/requirements.lock +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_base_client.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_compat.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_constants.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_files.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_models.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_qs.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_resource.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_types.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/py.typed +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/categories/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/categories/categories.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/categories/resources.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/experiences/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/experiences/csat.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/experiences/experiences.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/experiences/types.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/price_modifiers.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/requests/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/resources/requests/requests.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/billing_model_list_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/bulk_ingest_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/categories/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/categories/resource_create_params.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/categories/resource_list_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/category_delete_resource_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/category_delete_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/category_list_resources_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/category_list_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/category_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/cost_details.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experience_instance_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experiences/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experiences/csat_create_params.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experiences/csat_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experiences/experience_type.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experiences/properties_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experiences/type_create_params.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experiences/type_list_params.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experiences/type_list_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/experiences/type_update_params.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/ingest_bulk_params.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/price_modifier.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/price_modifier_create_params.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/price_modifier_retrieve_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/price_modifier_update_params.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/requests/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/requests_data.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/src/payi/types/total_cost_data.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a33/tests/api_resources/budgets → payi-0.1.0a34/tests/api_resources/categories}/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/categories/test_resources.py +0 -0
- {payi-0.1.0a33/tests/api_resources/categories → payi-0.1.0a34/tests/api_resources/experiences}/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/experiences/test_csat.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/experiences/test_properties.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/experiences/test_types.py +0 -0
- {payi-0.1.0a33/tests/api_resources/experiences → payi-0.1.0a34/tests/api_resources/limits}/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/requests/__init__.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/requests/test_properties.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/test_categories.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/test_experiences.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/api_resources/test_price_modifiers.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/conftest.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/sample_file.txt +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_files.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_models.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_qs.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_required_args.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_response.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_streaming.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_transform.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a33 → payi-0.1.0a34}/tests/utils.py +0 -0
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.34 (2025-01-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.33...v0.1.0-alpha.34](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.33...v0.1.0-alpha.34)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** rename budgets to limits ([#166](https://github.com/Pay-i/pay-i-python/issues/166)) ([7b7bdf3](https://github.com/Pay-i/pay-i-python/commit/7b7bdf3e9deade234ddd46ec1ad8bb9255f4ab64))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** codegen related update ([#164](https://github.com/Pay-i/pay-i-python/issues/164)) ([c8be7a0](https://github.com/Pay-i/pay-i-python/commit/c8be7a00beab6874fbdae426c52b63c509eba450))
|
|
15
|
+
|
|
3
16
|
## 0.1.0-alpha.33 (2024-12-18)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v0.1.0-alpha.32...v0.1.0-alpha.33](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.32...v0.1.0-alpha.33)
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2025 Payi
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: payi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a34
|
|
4
4
|
Summary: The official Python library for the payi API
|
|
5
5
|
Project-URL: Homepage, https://github.com/Pay-i/pay-i-python
|
|
6
6
|
Project-URL: Repository, https://github.com/Pay-i/pay-i-python
|
|
@@ -63,11 +63,11 @@ client = Payi(
|
|
|
63
63
|
api_key=os.environ.get("PAYI_API_KEY"), # This is the default and can be omitted
|
|
64
64
|
)
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
limit_response = client.limits.create(
|
|
67
|
+
limit_name="x",
|
|
68
68
|
max=0,
|
|
69
69
|
)
|
|
70
|
-
print(
|
|
70
|
+
print(limit_response.request_id)
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
While you can provide an `api_key` keyword argument,
|
|
@@ -90,11 +90,11 @@ client = AsyncPayi(
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
async def main() -> None:
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
limit_response = await client.limits.create(
|
|
94
|
+
limit_name="x",
|
|
95
95
|
max=0,
|
|
96
96
|
)
|
|
97
|
-
print(
|
|
97
|
+
print(limit_response.request_id)
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
asyncio.run(main())
|
|
@@ -127,8 +127,8 @@ from payi import Payi
|
|
|
127
127
|
client = Payi()
|
|
128
128
|
|
|
129
129
|
try:
|
|
130
|
-
client.
|
|
131
|
-
|
|
130
|
+
client.limits.create(
|
|
131
|
+
limit_name="x",
|
|
132
132
|
max=0,
|
|
133
133
|
)
|
|
134
134
|
except payi.APIConnectionError as e:
|
|
@@ -173,8 +173,8 @@ client = Payi(
|
|
|
173
173
|
)
|
|
174
174
|
|
|
175
175
|
# Or, configure per-request:
|
|
176
|
-
client.with_options(max_retries=5).
|
|
177
|
-
|
|
176
|
+
client.with_options(max_retries=5).limits.create(
|
|
177
|
+
limit_name="x",
|
|
178
178
|
max=0,
|
|
179
179
|
)
|
|
180
180
|
```
|
|
@@ -199,8 +199,8 @@ client = Payi(
|
|
|
199
199
|
)
|
|
200
200
|
|
|
201
201
|
# Override per-request:
|
|
202
|
-
client.with_options(timeout=5.0).
|
|
203
|
-
|
|
202
|
+
client.with_options(timeout=5.0).limits.create(
|
|
203
|
+
limit_name="x",
|
|
204
204
|
max=0,
|
|
205
205
|
)
|
|
206
206
|
```
|
|
@@ -243,14 +243,14 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
243
243
|
from payi import Payi
|
|
244
244
|
|
|
245
245
|
client = Payi()
|
|
246
|
-
response = client.
|
|
247
|
-
|
|
246
|
+
response = client.limits.with_raw_response.create(
|
|
247
|
+
limit_name="x",
|
|
248
248
|
max=0,
|
|
249
249
|
)
|
|
250
250
|
print(response.headers.get('X-My-Header'))
|
|
251
251
|
|
|
252
|
-
|
|
253
|
-
print(
|
|
252
|
+
limit = response.parse() # get the object that `limits.create()` would have returned
|
|
253
|
+
print(limit.request_id)
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
These methods return an [`APIResponse`](https://github.com/Pay-i/pay-i-python/tree/main/src/payi/_response.py) object.
|
|
@@ -264,8 +264,8 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
264
264
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
265
265
|
|
|
266
266
|
```python
|
|
267
|
-
with client.
|
|
268
|
-
|
|
267
|
+
with client.limits.with_streaming_response.create(
|
|
268
|
+
limit_name="x",
|
|
269
269
|
max=0,
|
|
270
270
|
) as response:
|
|
271
271
|
print(response.headers.get("X-My-Header"))
|
|
@@ -31,11 +31,11 @@ client = Payi(
|
|
|
31
31
|
api_key=os.environ.get("PAYI_API_KEY"), # This is the default and can be omitted
|
|
32
32
|
)
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
limit_response = client.limits.create(
|
|
35
|
+
limit_name="x",
|
|
36
36
|
max=0,
|
|
37
37
|
)
|
|
38
|
-
print(
|
|
38
|
+
print(limit_response.request_id)
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
While you can provide an `api_key` keyword argument,
|
|
@@ -58,11 +58,11 @@ client = AsyncPayi(
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
async def main() -> None:
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
limit_response = await client.limits.create(
|
|
62
|
+
limit_name="x",
|
|
63
63
|
max=0,
|
|
64
64
|
)
|
|
65
|
-
print(
|
|
65
|
+
print(limit_response.request_id)
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
asyncio.run(main())
|
|
@@ -95,8 +95,8 @@ from payi import Payi
|
|
|
95
95
|
client = Payi()
|
|
96
96
|
|
|
97
97
|
try:
|
|
98
|
-
client.
|
|
99
|
-
|
|
98
|
+
client.limits.create(
|
|
99
|
+
limit_name="x",
|
|
100
100
|
max=0,
|
|
101
101
|
)
|
|
102
102
|
except payi.APIConnectionError as e:
|
|
@@ -141,8 +141,8 @@ client = Payi(
|
|
|
141
141
|
)
|
|
142
142
|
|
|
143
143
|
# Or, configure per-request:
|
|
144
|
-
client.with_options(max_retries=5).
|
|
145
|
-
|
|
144
|
+
client.with_options(max_retries=5).limits.create(
|
|
145
|
+
limit_name="x",
|
|
146
146
|
max=0,
|
|
147
147
|
)
|
|
148
148
|
```
|
|
@@ -167,8 +167,8 @@ client = Payi(
|
|
|
167
167
|
)
|
|
168
168
|
|
|
169
169
|
# Override per-request:
|
|
170
|
-
client.with_options(timeout=5.0).
|
|
171
|
-
|
|
170
|
+
client.with_options(timeout=5.0).limits.create(
|
|
171
|
+
limit_name="x",
|
|
172
172
|
max=0,
|
|
173
173
|
)
|
|
174
174
|
```
|
|
@@ -211,14 +211,14 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
211
211
|
from payi import Payi
|
|
212
212
|
|
|
213
213
|
client = Payi()
|
|
214
|
-
response = client.
|
|
215
|
-
|
|
214
|
+
response = client.limits.with_raw_response.create(
|
|
215
|
+
limit_name="x",
|
|
216
216
|
max=0,
|
|
217
217
|
)
|
|
218
218
|
print(response.headers.get('X-My-Header'))
|
|
219
219
|
|
|
220
|
-
|
|
221
|
-
print(
|
|
220
|
+
limit = response.parse() # get the object that `limits.create()` would have returned
|
|
221
|
+
print(limit.request_id)
|
|
222
222
|
```
|
|
223
223
|
|
|
224
224
|
These methods return an [`APIResponse`](https://github.com/Pay-i/pay-i-python/tree/main/src/payi/_response.py) object.
|
|
@@ -232,8 +232,8 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
232
232
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
233
233
|
|
|
234
234
|
```python
|
|
235
|
-
with client.
|
|
236
|
-
|
|
235
|
+
with client.limits.with_streaming_response.create(
|
|
236
|
+
limit_name="x",
|
|
237
237
|
max=0,
|
|
238
238
|
) as response:
|
|
239
239
|
print(response.headers.get("X-My-Header"))
|
payi-0.1.0a34/api.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Limits
|
|
2
|
+
|
|
3
|
+
Types:
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
from payi.types import (
|
|
7
|
+
CostData,
|
|
8
|
+
CostDetails,
|
|
9
|
+
DefaultResponse,
|
|
10
|
+
LimitHistoryResponse,
|
|
11
|
+
LimitResponse,
|
|
12
|
+
PagedLimitList,
|
|
13
|
+
RequestsData,
|
|
14
|
+
TotalCostData,
|
|
15
|
+
)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Methods:
|
|
19
|
+
|
|
20
|
+
- <code title="post /api/v1/limits">client.limits.<a href="./src/payi/resources/limits/limits.py">create</a>(\*\*<a href="src/payi/types/limit_create_params.py">params</a>) -> <a href="./src/payi/types/limit_response.py">LimitResponse</a></code>
|
|
21
|
+
- <code title="get /api/v1/limits/{limit_id}">client.limits.<a href="./src/payi/resources/limits/limits.py">retrieve</a>(limit_id) -> <a href="./src/payi/types/limit_response.py">LimitResponse</a></code>
|
|
22
|
+
- <code title="put /api/v1/limits/{limit_id}">client.limits.<a href="./src/payi/resources/limits/limits.py">update</a>(limit_id, \*\*<a href="src/payi/types/limit_update_params.py">params</a>) -> <a href="./src/payi/types/limit_response.py">LimitResponse</a></code>
|
|
23
|
+
- <code title="get /api/v1/limits">client.limits.<a href="./src/payi/resources/limits/limits.py">list</a>(\*\*<a href="src/payi/types/limit_list_params.py">params</a>) -> <a href="./src/payi/types/paged_limit_list.py">PagedLimitList</a></code>
|
|
24
|
+
- <code title="delete /api/v1/limits/{limit_id}">client.limits.<a href="./src/payi/resources/limits/limits.py">delete</a>(limit_id) -> <a href="./src/payi/types/default_response.py">DefaultResponse</a></code>
|
|
25
|
+
- <code title="post /api/v1/limits/{limit_id}/reset">client.limits.<a href="./src/payi/resources/limits/limits.py">reset</a>(limit_id, \*\*<a href="src/payi/types/limit_reset_params.py">params</a>) -> <a href="./src/payi/types/limit_history_response.py">LimitHistoryResponse</a></code>
|
|
26
|
+
|
|
27
|
+
## Tags
|
|
28
|
+
|
|
29
|
+
Types:
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from payi.types.limits import (
|
|
33
|
+
LimitTags,
|
|
34
|
+
TagCreateResponse,
|
|
35
|
+
TagUpdateResponse,
|
|
36
|
+
TagListResponse,
|
|
37
|
+
TagDeleteResponse,
|
|
38
|
+
TagRemoveResponse,
|
|
39
|
+
)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Methods:
|
|
43
|
+
|
|
44
|
+
- <code title="post /api/v1/limits/{limit_id}/tags">client.limits.tags.<a href="./src/payi/resources/limits/tags.py">create</a>(limit_id, \*\*<a href="src/payi/types/limits/tag_create_params.py">params</a>) -> <a href="./src/payi/types/limits/tag_create_response.py">TagCreateResponse</a></code>
|
|
45
|
+
- <code title="put /api/v1/limits/{limit_id}/tags">client.limits.tags.<a href="./src/payi/resources/limits/tags.py">update</a>(limit_id, \*\*<a href="src/payi/types/limits/tag_update_params.py">params</a>) -> <a href="./src/payi/types/limits/tag_update_response.py">TagUpdateResponse</a></code>
|
|
46
|
+
- <code title="get /api/v1/limits/{limit_id}/tags">client.limits.tags.<a href="./src/payi/resources/limits/tags.py">list</a>(limit_id) -> <a href="./src/payi/types/limits/tag_list_response.py">TagListResponse</a></code>
|
|
47
|
+
- <code title="delete /api/v1/limits/{limit_id}/tags">client.limits.tags.<a href="./src/payi/resources/limits/tags.py">delete</a>(limit_id) -> <a href="./src/payi/types/limits/tag_delete_response.py">TagDeleteResponse</a></code>
|
|
48
|
+
- <code title="patch /api/v1/limits/{limit_id}/tags/remove">client.limits.tags.<a href="./src/payi/resources/limits/tags.py">remove</a>(limit_id, \*\*<a href="src/payi/types/limits/tag_remove_params.py">params</a>) -> <a href="./src/payi/types/limits/tag_remove_response.py">TagRemoveResponse</a></code>
|
|
49
|
+
|
|
50
|
+
# Ingest
|
|
51
|
+
|
|
52
|
+
Types:
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
from payi.types import BulkIngestResponse, IngestEvent, IngestResponse, IngestUnits
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Methods:
|
|
59
|
+
|
|
60
|
+
- <code title="post /api/v1/ingest/bulk">client.ingest.<a href="./src/payi/resources/ingest.py">bulk</a>(\*\*<a href="src/payi/types/ingest_bulk_params.py">params</a>) -> <a href="./src/payi/types/bulk_ingest_response.py">BulkIngestResponse</a></code>
|
|
61
|
+
- <code title="post /api/v1/ingest">client.ingest.<a href="./src/payi/resources/ingest.py">units</a>(\*\*<a href="src/payi/types/ingest_units_params.py">params</a>) -> <a href="./src/payi/types/ingest_response.py">IngestResponse</a></code>
|
|
62
|
+
|
|
63
|
+
# Categories
|
|
64
|
+
|
|
65
|
+
Types:
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
from payi.types import (
|
|
69
|
+
CategoryResourceResponse,
|
|
70
|
+
CategoryResponse,
|
|
71
|
+
CategoryListResponse,
|
|
72
|
+
CategoryDeleteResponse,
|
|
73
|
+
CategoryDeleteResourceResponse,
|
|
74
|
+
CategoryListResourcesResponse,
|
|
75
|
+
)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Methods:
|
|
79
|
+
|
|
80
|
+
- <code title="get /api/v1/categories">client.categories.<a href="./src/payi/resources/categories/categories.py">list</a>() -> <a href="./src/payi/types/category_list_response.py">CategoryListResponse</a></code>
|
|
81
|
+
- <code title="delete /api/v1/categories/{category}">client.categories.<a href="./src/payi/resources/categories/categories.py">delete</a>(category) -> <a href="./src/payi/types/category_delete_response.py">CategoryDeleteResponse</a></code>
|
|
82
|
+
- <code title="delete /api/v1/categories/{category}/resources/{resource}">client.categories.<a href="./src/payi/resources/categories/categories.py">delete_resource</a>(resource, \*, category) -> <a href="./src/payi/types/category_delete_resource_response.py">CategoryDeleteResourceResponse</a></code>
|
|
83
|
+
- <code title="get /api/v1/categories/{category}/resources">client.categories.<a href="./src/payi/resources/categories/categories.py">list_resources</a>(category) -> <a href="./src/payi/types/category_list_resources_response.py">CategoryListResourcesResponse</a></code>
|
|
84
|
+
|
|
85
|
+
## Resources
|
|
86
|
+
|
|
87
|
+
Types:
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
from payi.types.categories import ResourceListResponse
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Methods:
|
|
94
|
+
|
|
95
|
+
- <code title="post /api/v1/categories/{category}/resources/{resource}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">create</a>(resource, \*, category, \*\*<a href="src/payi/types/categories/resource_create_params.py">params</a>) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
|
|
96
|
+
- <code title="get /api/v1/categories/{category}/resources/{resource}/{resource_id}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">retrieve</a>(resource_id, \*, category, resource) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
|
|
97
|
+
- <code title="get /api/v1/categories/{category}/resources/{resource}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">list</a>(resource, \*, category) -> <a href="./src/payi/types/categories/resource_list_response.py">ResourceListResponse</a></code>
|
|
98
|
+
- <code title="delete /api/v1/categories/{category}/resources/{resource}/{resource_id}">client.categories.resources.<a href="./src/payi/resources/categories/resources.py">delete</a>(resource_id, \*, category, resource) -> <a href="./src/payi/types/category_resource_response.py">CategoryResourceResponse</a></code>
|
|
99
|
+
|
|
100
|
+
# Experiences
|
|
101
|
+
|
|
102
|
+
Types:
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
from payi.types import ExperienceInstanceResponse
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Methods:
|
|
109
|
+
|
|
110
|
+
- <code title="post /api/v1/experiences/instances/{experience_name}">client.experiences.<a href="./src/payi/resources/experiences/experiences.py">create</a>(experience_name) -> <a href="./src/payi/types/experience_instance_response.py">ExperienceInstanceResponse</a></code>
|
|
111
|
+
- <code title="get /api/v1/experiences/instances/{experience_id}">client.experiences.<a href="./src/payi/resources/experiences/experiences.py">retrieve</a>(experience_id) -> <a href="./src/payi/types/experience_instance_response.py">ExperienceInstanceResponse</a></code>
|
|
112
|
+
- <code title="delete /api/v1/experiences/instances/{experience_id}">client.experiences.<a href="./src/payi/resources/experiences/experiences.py">delete</a>(experience_id) -> <a href="./src/payi/types/experience_instance_response.py">ExperienceInstanceResponse</a></code>
|
|
113
|
+
|
|
114
|
+
## Types
|
|
115
|
+
|
|
116
|
+
Types:
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
from payi.types.experiences import ExperienceType, TypeListResponse
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Methods:
|
|
123
|
+
|
|
124
|
+
- <code title="post /api/v1/experiences/types">client.experiences.types.<a href="./src/payi/resources/experiences/types.py">create</a>(\*\*<a href="src/payi/types/experiences/type_create_params.py">params</a>) -> <a href="./src/payi/types/experiences/experience_type.py">ExperienceType</a></code>
|
|
125
|
+
- <code title="get /api/v1/experiences/types/{experience_name}">client.experiences.types.<a href="./src/payi/resources/experiences/types.py">retrieve</a>(experience_name) -> <a href="./src/payi/types/experiences/experience_type.py">ExperienceType</a></code>
|
|
126
|
+
- <code title="patch /api/v1/experiences/types/{experience_name}">client.experiences.types.<a href="./src/payi/resources/experiences/types.py">update</a>(experience_name, \*\*<a href="src/payi/types/experiences/type_update_params.py">params</a>) -> <a href="./src/payi/types/experiences/experience_type.py">ExperienceType</a></code>
|
|
127
|
+
- <code title="get /api/v1/experiences/types">client.experiences.types.<a href="./src/payi/resources/experiences/types.py">list</a>(\*\*<a href="src/payi/types/experiences/type_list_params.py">params</a>) -> <a href="./src/payi/types/experiences/type_list_response.py">TypeListResponse</a></code>
|
|
128
|
+
- <code title="delete /api/v1/experiences/types/{experience_name}">client.experiences.types.<a href="./src/payi/resources/experiences/types.py">delete</a>(experience_name) -> <a href="./src/payi/types/experiences/experience_type.py">ExperienceType</a></code>
|
|
@@ -32,7 +32,7 @@ from ._base_client import (
|
|
|
32
32
|
SyncAPIClient,
|
|
33
33
|
AsyncAPIClient,
|
|
34
34
|
)
|
|
35
|
-
from .resources.
|
|
35
|
+
from .resources.limits import limits
|
|
36
36
|
from .resources.requests import requests
|
|
37
37
|
from .resources.categories import categories
|
|
38
38
|
from .resources.experiences import experiences
|
|
@@ -41,7 +41,7 @@ __all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Payi", "As
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
class Payi(SyncAPIClient):
|
|
44
|
-
|
|
44
|
+
limits: limits.LimitsResource
|
|
45
45
|
ingest: ingest.IngestResource
|
|
46
46
|
categories: categories.CategoriesResource
|
|
47
47
|
experiences: experiences.ExperiencesResource
|
|
@@ -105,7 +105,7 @@ class Payi(SyncAPIClient):
|
|
|
105
105
|
_strict_response_validation=_strict_response_validation,
|
|
106
106
|
)
|
|
107
107
|
|
|
108
|
-
self.
|
|
108
|
+
self.limits = limits.LimitsResource(self)
|
|
109
109
|
self.ingest = ingest.IngestResource(self)
|
|
110
110
|
self.categories = categories.CategoriesResource(self)
|
|
111
111
|
self.experiences = experiences.ExperiencesResource(self)
|
|
@@ -221,7 +221,7 @@ class Payi(SyncAPIClient):
|
|
|
221
221
|
|
|
222
222
|
|
|
223
223
|
class AsyncPayi(AsyncAPIClient):
|
|
224
|
-
|
|
224
|
+
limits: limits.AsyncLimitsResource
|
|
225
225
|
ingest: ingest.AsyncIngestResource
|
|
226
226
|
categories: categories.AsyncCategoriesResource
|
|
227
227
|
experiences: experiences.AsyncExperiencesResource
|
|
@@ -285,7 +285,7 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
285
285
|
_strict_response_validation=_strict_response_validation,
|
|
286
286
|
)
|
|
287
287
|
|
|
288
|
-
self.
|
|
288
|
+
self.limits = limits.AsyncLimitsResource(self)
|
|
289
289
|
self.ingest = ingest.AsyncIngestResource(self)
|
|
290
290
|
self.categories = categories.AsyncCategoriesResource(self)
|
|
291
291
|
self.experiences = experiences.AsyncExperiencesResource(self)
|
|
@@ -402,7 +402,7 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
402
402
|
|
|
403
403
|
class PayiWithRawResponse:
|
|
404
404
|
def __init__(self, client: Payi) -> None:
|
|
405
|
-
self.
|
|
405
|
+
self.limits = limits.LimitsResourceWithRawResponse(client.limits)
|
|
406
406
|
self.ingest = ingest.IngestResourceWithRawResponse(client.ingest)
|
|
407
407
|
self.categories = categories.CategoriesResourceWithRawResponse(client.categories)
|
|
408
408
|
self.experiences = experiences.ExperiencesResourceWithRawResponse(client.experiences)
|
|
@@ -413,7 +413,7 @@ class PayiWithRawResponse:
|
|
|
413
413
|
|
|
414
414
|
class AsyncPayiWithRawResponse:
|
|
415
415
|
def __init__(self, client: AsyncPayi) -> None:
|
|
416
|
-
self.
|
|
416
|
+
self.limits = limits.AsyncLimitsResourceWithRawResponse(client.limits)
|
|
417
417
|
self.ingest = ingest.AsyncIngestResourceWithRawResponse(client.ingest)
|
|
418
418
|
self.categories = categories.AsyncCategoriesResourceWithRawResponse(client.categories)
|
|
419
419
|
self.experiences = experiences.AsyncExperiencesResourceWithRawResponse(client.experiences)
|
|
@@ -424,7 +424,7 @@ class AsyncPayiWithRawResponse:
|
|
|
424
424
|
|
|
425
425
|
class PayiWithStreamedResponse:
|
|
426
426
|
def __init__(self, client: Payi) -> None:
|
|
427
|
-
self.
|
|
427
|
+
self.limits = limits.LimitsResourceWithStreamingResponse(client.limits)
|
|
428
428
|
self.ingest = ingest.IngestResourceWithStreamingResponse(client.ingest)
|
|
429
429
|
self.categories = categories.CategoriesResourceWithStreamingResponse(client.categories)
|
|
430
430
|
self.experiences = experiences.ExperiencesResourceWithStreamingResponse(client.experiences)
|
|
@@ -435,7 +435,7 @@ class PayiWithStreamedResponse:
|
|
|
435
435
|
|
|
436
436
|
class AsyncPayiWithStreamedResponse:
|
|
437
437
|
def __init__(self, client: AsyncPayi) -> None:
|
|
438
|
-
self.
|
|
438
|
+
self.limits = limits.AsyncLimitsResourceWithStreamingResponse(client.limits)
|
|
439
439
|
self.ingest = ingest.AsyncIngestResourceWithStreamingResponse(client.ingest)
|
|
440
440
|
self.categories = categories.AsyncCategoriesResourceWithStreamingResponse(client.categories)
|
|
441
441
|
self.experiences = experiences.AsyncExperiencesResourceWithStreamingResponse(client.experiences)
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
from typing import Dict, List, Union
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
def
|
|
6
|
-
if not isinstance(
|
|
7
|
-
raise TypeError("
|
|
5
|
+
def create_limit_header_from_ids(limit_ids: List[str]) -> Dict[str, str]:
|
|
6
|
+
if not isinstance(budglimit_idset_ids, list): # type: ignore
|
|
7
|
+
raise TypeError("limit_ids must be a list")
|
|
8
8
|
|
|
9
|
-
valid_ids = [id.strip() for id in
|
|
9
|
+
valid_ids = [id.strip() for id in limit_ids if isinstance(id, str) and id.strip()] # type: ignore
|
|
10
10
|
|
|
11
|
-
return {"xProxy-
|
|
11
|
+
return {"xProxy-Limit-IDs": ",".join(valid_ids)} if valid_ids else {}
|
|
12
12
|
|
|
13
13
|
def create_request_header_from_tags(request_tags: List[str]) -> Dict[str, str]:
|
|
14
14
|
if not isinstance(request_tags, list): # type: ignore
|
|
@@ -19,15 +19,15 @@ def create_request_header_from_tags(request_tags: List[str]) -> Dict[str, str]:
|
|
|
19
19
|
return {"xProxy-Request-Tags": ",".join(valid_tags)} if valid_tags else {}
|
|
20
20
|
|
|
21
21
|
def create_headers(
|
|
22
|
-
|
|
22
|
+
limit_ids: Union[List[str], None] = None,
|
|
23
23
|
request_tags: Union[List[str], None] = None,
|
|
24
24
|
user_id: Union[str, None] = None,
|
|
25
25
|
experience_id: Union[str, None] = None,
|
|
26
26
|
) -> Dict[str, str]:
|
|
27
27
|
headers: Dict[str, str] = {}
|
|
28
28
|
|
|
29
|
-
if
|
|
30
|
-
headers.update(
|
|
29
|
+
if limit_ids:
|
|
30
|
+
headers.update(create_limit_header_from_ids(limit_ids))
|
|
31
31
|
if request_tags:
|
|
32
32
|
headers.update(create_request_header_from_tags(request_tags))
|
|
33
33
|
if user_id:
|
|
@@ -8,13 +8,13 @@ from .ingest import (
|
|
|
8
8
|
IngestResourceWithStreamingResponse,
|
|
9
9
|
AsyncIngestResourceWithStreamingResponse,
|
|
10
10
|
)
|
|
11
|
-
from .
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
from .limits import (
|
|
12
|
+
LimitsResource,
|
|
13
|
+
AsyncLimitsResource,
|
|
14
|
+
LimitsResourceWithRawResponse,
|
|
15
|
+
AsyncLimitsResourceWithRawResponse,
|
|
16
|
+
LimitsResourceWithStreamingResponse,
|
|
17
|
+
AsyncLimitsResourceWithStreamingResponse,
|
|
18
18
|
)
|
|
19
19
|
from .requests import (
|
|
20
20
|
RequestsResource,
|
|
@@ -58,12 +58,12 @@ from .price_modifiers import (
|
|
|
58
58
|
)
|
|
59
59
|
|
|
60
60
|
__all__ = [
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
61
|
+
"LimitsResource",
|
|
62
|
+
"AsyncLimitsResource",
|
|
63
|
+
"LimitsResourceWithRawResponse",
|
|
64
|
+
"AsyncLimitsResourceWithRawResponse",
|
|
65
|
+
"LimitsResourceWithStreamingResponse",
|
|
66
|
+
"AsyncLimitsResourceWithStreamingResponse",
|
|
67
67
|
"IngestResource",
|
|
68
68
|
"AsyncIngestResource",
|
|
69
69
|
"IngestResourceWithRawResponse",
|
|
@@ -52,7 +52,7 @@ class BillingModelsResource(SyncAPIResource):
|
|
|
52
52
|
self,
|
|
53
53
|
*,
|
|
54
54
|
name: str,
|
|
55
|
-
type: Literal["
|
|
55
|
+
type: Literal["costplus", "subscription", "hybrid"],
|
|
56
56
|
default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
|
|
57
57
|
prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
|
|
58
58
|
prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -128,7 +128,7 @@ class BillingModelsResource(SyncAPIResource):
|
|
|
128
128
|
self,
|
|
129
129
|
billing_model_id: str,
|
|
130
130
|
*,
|
|
131
|
-
type: Literal["
|
|
131
|
+
type: Literal["costplus", "subscription", "hybrid"],
|
|
132
132
|
default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
|
|
133
133
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
134
134
|
prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -246,7 +246,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
|
|
|
246
246
|
self,
|
|
247
247
|
*,
|
|
248
248
|
name: str,
|
|
249
|
-
type: Literal["
|
|
249
|
+
type: Literal["costplus", "subscription", "hybrid"],
|
|
250
250
|
default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
|
|
251
251
|
prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
|
|
252
252
|
prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -322,7 +322,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
|
|
|
322
322
|
self,
|
|
323
323
|
billing_model_id: str,
|
|
324
324
|
*,
|
|
325
|
-
type: Literal["
|
|
325
|
+
type: Literal["costplus", "subscription", "hybrid"],
|
|
326
326
|
default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
|
|
327
327
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
328
328
|
prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict
|
|
5
|
+
from typing import Dict
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
@@ -50,7 +50,7 @@ class PropertiesResource(SyncAPIResource):
|
|
|
50
50
|
self,
|
|
51
51
|
experience_id: str,
|
|
52
52
|
*,
|
|
53
|
-
properties:
|
|
53
|
+
properties: Dict[str, str],
|
|
54
54
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
55
55
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
56
56
|
extra_headers: Headers | None = None,
|
|
@@ -106,7 +106,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
|
|
|
106
106
|
self,
|
|
107
107
|
experience_id: str,
|
|
108
108
|
*,
|
|
109
|
-
properties:
|
|
109
|
+
properties: Dict[str, str],
|
|
110
110
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
111
111
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
112
112
|
extra_headers: Headers | None = None,
|