payi 0.1.0a53__tar.gz → 0.1.0a56__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.0a56/.release-please-manifest.json +3 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/CHANGELOG.md +37 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/PKG-INFO +25 -4
- {payi-0.1.0a53 → payi-0.1.0a56}/README.md +22 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/api.md +30 -19
- payi-0.1.0a56/bin/publish-pypi +6 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/pyproject.toml +2 -4
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_base_client.py +1 -96
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_client.py +10 -17
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_models.py +5 -2
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_version.py +1 -1
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/lib/helpers.py +12 -1
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/__init__.py +14 -28
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/categories/resources.py +7 -7
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/experiences/types/types.py +5 -2
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/ingest.py +58 -6
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/limits/limits.py +4 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/limits/tags.py +12 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/requests/properties.py +1 -1
- payi-0.1.0a56/src/payi/resources/use_cases/__init__.py +47 -0
- payi-0.1.0a56/src/payi/resources/use_cases/properties.py +174 -0
- payi-0.1.0a56/src/payi/resources/use_cases/types/__init__.py +33 -0
- payi-0.1.0a56/src/payi/resources/use_cases/types/limit_config.py +275 -0
- payi-0.1.0a53/src/payi/resources/billing_models.py → payi-0.1.0a56/src/payi/resources/use_cases/types/types.py +225 -161
- payi-0.1.0a53/src/payi/resources/price_modifiers.py → payi-0.1.0a56/src/payi/resources/use_cases/use_cases.py +160 -130
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/__init__.py +6 -9
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/categories/resource_create_params.py +6 -6
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/category_resource_response.py +2 -2
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/experience_instance_response.py +2 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/experiences/__init__.py +0 -1
- payi-0.1.0a56/src/payi/types/experiences/experience_type.py +24 -0
- payi-0.1.0a56/src/payi/types/experiences/type_create_params.py +22 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/ingest_event_param.py +10 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/ingest_response.py +2 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/ingest_units_params.py +9 -1
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limit_list_params.py +6 -1
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/tag_create_params.py +1 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/tag_remove_params.py +1 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/tag_update_params.py +1 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/requests/request_result.py +2 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/shared/__init__.py +4 -0
- payi-0.1.0a53/src/payi/types/experiences/experience_type.py → payi-0.1.0a56/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +2 -14
- payi-0.1.0a56/src/payi/types/shared_params/__init__.py +5 -0
- payi-0.1.0a53/src/payi/types/experiences/type_create_params.py → payi-0.1.0a56/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +2 -12
- payi-0.1.0a56/src/payi/types/use_case_instance_response.py +15 -0
- payi-0.1.0a56/src/payi/types/use_cases/__init__.py +10 -0
- payi-0.1.0a56/src/payi/types/use_cases/property_create_params.py +12 -0
- payi-0.1.0a56/src/payi/types/use_cases/type_create_params.py +22 -0
- payi-0.1.0a56/src/payi/types/use_cases/type_list_params.py +12 -0
- payi-0.1.0a56/src/payi/types/use_cases/type_list_response.py +10 -0
- payi-0.1.0a56/src/payi/types/use_cases/type_update_params.py +14 -0
- payi-0.1.0a56/src/payi/types/use_cases/types/__init__.py +5 -0
- payi-0.1.0a56/src/payi/types/use_cases/types/limit_config_create_params.py +18 -0
- payi-0.1.0a56/src/payi/types/use_cases/use_case_type.py +24 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/categories/test_resources.py +10 -60
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/requests/test_properties.py +1 -1
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/test_ingest.py +18 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/test_limits.py +2 -0
- payi-0.1.0a56/tests/api_resources/test_use_cases.py +250 -0
- payi-0.1.0a56/tests/api_resources/use_cases/__init__.py +1 -0
- payi-0.1.0a56/tests/api_resources/use_cases/test_properties.py +106 -0
- payi-0.1.0a56/tests/api_resources/use_cases/test_types.py +430 -0
- payi-0.1.0a56/tests/api_resources/use_cases/types/__init__.py +1 -0
- payi-0.1.0a56/tests/api_resources/use_cases/types/test_limit_config.py +204 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_models.py +32 -0
- payi-0.1.0a53/.release-please-manifest.json +0 -3
- payi-0.1.0a53/bin/publish-pypi +0 -9
- payi-0.1.0a53/src/payi/types/billing_model.py +0 -31
- payi-0.1.0a53/src/payi/types/billing_model_create_params.py +0 -22
- payi-0.1.0a53/src/payi/types/billing_model_list_response.py +0 -10
- payi-0.1.0a53/src/payi/types/billing_model_update_params.py +0 -22
- payi-0.1.0a53/src/payi/types/price_modifier.py +0 -26
- payi-0.1.0a53/src/payi/types/price_modifier_create_params.py +0 -17
- payi-0.1.0a53/src/payi/types/price_modifier_retrieve_response.py +0 -10
- payi-0.1.0a53/src/payi/types/price_modifier_update_params.py +0 -17
- payi-0.1.0a53/tests/api_resources/test_billing_models.py +0 -426
- payi-0.1.0a53/tests/api_resources/test_price_modifiers.py +0 -261
- {payi-0.1.0a53 → payi-0.1.0a56}/.gitignore +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/LICENSE +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/SECURITY.md +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/bin/check-release-environment +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/examples/.keep +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/mypy.ini +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/noxfile.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/release-please-config.json +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/requirements-dev.lock +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/requirements.lock +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_compat.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_constants.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_files.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_qs.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_resource.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_types.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/lib/AnthropicInstrumentor.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/lib/BedrockInstrumentor.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/lib/OpenAIInstrumentor.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/lib/Stopwatch.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/lib/instrument.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/py.typed +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/categories/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/categories/categories.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/experiences/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/experiences/experiences.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/experiences/properties.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/experiences/types/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/experiences/types/limit_config.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/limits/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/requests/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/requests/requests.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/resources/requests/result.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/bulk_ingest_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/categories/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/categories/resource_list_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/category_delete_resource_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/category_delete_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/category_list_resources_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/category_list_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/category_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/cost_details.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/experiences/property_create_params.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/experiences/type_list_params.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/experiences/type_list_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/experiences/type_update_params.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/experiences/types/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/experiences/types/limit_config_create_params.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/ingest_bulk_params.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limit_create_params.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limit_history_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limit_reset_params.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limit_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limit_update_params.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/limit_tags.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/tag_create_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/tag_delete_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/tag_list_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/tag_remove_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/limits/tag_update_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/paged_limit_list.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/requests/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/requests/property_create_params.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/requests_data.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/shared/evaluation_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
- {payi-0.1.0a53/src/payi/types/experiences → payi-0.1.0a56/src/payi/types/shared}/properties_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/src/payi/types/total_cost_data.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/categories/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/experiences/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/experiences/test_properties.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/experiences/test_types.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/experiences/types/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/experiences/types/test_limit_config.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/limits/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/limits/test_tags.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/requests/__init__.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/requests/test_result.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/test_categories.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/api_resources/test_experiences.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/conftest.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/sample_file.txt +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_client.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_files.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_qs.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_required_args.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_response.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_streaming.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_transform.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a53 → payi-0.1.0a56}/tests/utils.py +0 -0
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.56 (2025-03-26)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.55...v0.1.0-alpha.56](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.55...v0.1.0-alpha.56)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([#261](https://github.com/Pay-i/pay-i-python/issues/261)) ([39d2166](https://github.com/Pay-i/pay-i-python/commit/39d21668bb6545d29897755a8a17ec7517a0989c))
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.55 (2025-03-19)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.1.0-alpha.54...v0.1.0-alpha.55](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.54...v0.1.0-alpha.55)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **ci:** remove publishing patch ([#257](https://github.com/Pay-i/pay-i-python/issues/257)) ([0c5bfb4](https://github.com/Pay-i/pay-i-python/commit/0c5bfb4725777b366fb50199209f4e8a50711ad9))
|
|
18
|
+
|
|
19
|
+
## 0.1.0-alpha.54 (2025-03-17)
|
|
20
|
+
|
|
21
|
+
Full Changelog: [v0.1.0-alpha.53...v0.1.0-alpha.54](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.53...v0.1.0-alpha.54)
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **ci:** ensure pip is always available ([#256](https://github.com/Pay-i/pay-i-python/issues/256)) ([13c3e2c](https://github.com/Pay-i/pay-i-python/commit/13c3e2c3c83f97bc0add1a7e670113e609e3c5d1))
|
|
26
|
+
* **types:** handle more discriminated union shapes ([#255](https://github.com/Pay-i/pay-i-python/issues/255)) ([be986f1](https://github.com/Pay-i/pay-i-python/commit/be986f12ea82af0a7a51e7b08803758381050086))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Chores
|
|
30
|
+
|
|
31
|
+
* **internal:** bump rye to 0.44.0 ([#254](https://github.com/Pay-i/pay-i-python/issues/254)) ([789c413](https://github.com/Pay-i/pay-i-python/commit/789c413b306c96905507c1b4de8c835cc484b2b8))
|
|
32
|
+
* **internal:** remove extra empty newlines ([#252](https://github.com/Pay-i/pay-i-python/issues/252)) ([8b33100](https://github.com/Pay-i/pay-i-python/commit/8b33100d0fee1693e3adc9fc6c652bd4150a2642))
|
|
33
|
+
* **internal:** remove unused http client options forwarding ([#248](https://github.com/Pay-i/pay-i-python/issues/248)) ([5f7bf7b](https://github.com/Pay-i/pay-i-python/commit/5f7bf7b9d3745fd3d63c49502bbc9b63ff8cd333))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Documentation
|
|
37
|
+
|
|
38
|
+
* revise readme docs about nested params ([#250](https://github.com/Pay-i/pay-i-python/issues/250)) ([19c655d](https://github.com/Pay-i/pay-i-python/commit/19c655d13bbe82916c599a5b9f8292057f7b4b0e))
|
|
39
|
+
|
|
3
40
|
## 0.1.0-alpha.53 (2025-03-01)
|
|
4
41
|
|
|
5
42
|
Full Changelog: [v0.1.0-alpha.52...v0.1.0-alpha.53](https://github.com/pay-i/pay-i-python/compare/v0.1.0-alpha.52...v0.1.0-alpha.53)
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: payi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a56
|
|
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
|
|
7
7
|
Author-email: Payi <support@payi.com>
|
|
8
|
-
License
|
|
9
|
-
License-File: LICENSE
|
|
8
|
+
License: Apache-2.0
|
|
10
9
|
Classifier: Intended Audience :: Developers
|
|
11
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
11
|
Classifier: Operating System :: MacOS
|
|
@@ -114,6 +113,28 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
|
|
|
114
113
|
|
|
115
114
|
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
|
|
116
115
|
|
|
116
|
+
## Nested params
|
|
117
|
+
|
|
118
|
+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
from payi import Payi
|
|
122
|
+
|
|
123
|
+
client = Payi()
|
|
124
|
+
|
|
125
|
+
experience_type = client.experiences.types.create(
|
|
126
|
+
description="x",
|
|
127
|
+
name="x",
|
|
128
|
+
limit_config={
|
|
129
|
+
"max": 0,
|
|
130
|
+
"limit_tags": ["tag1", "tag2"],
|
|
131
|
+
"limit_type": "block",
|
|
132
|
+
"threshold": 0,
|
|
133
|
+
},
|
|
134
|
+
)
|
|
135
|
+
print(experience_type.limit_config)
|
|
136
|
+
```
|
|
137
|
+
|
|
117
138
|
## Handling errors
|
|
118
139
|
|
|
119
140
|
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `payi.APIConnectionError` is raised.
|
|
@@ -79,6 +79,28 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
|
|
|
79
79
|
|
|
80
80
|
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
|
|
81
81
|
|
|
82
|
+
## Nested params
|
|
83
|
+
|
|
84
|
+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from payi import Payi
|
|
88
|
+
|
|
89
|
+
client = Payi()
|
|
90
|
+
|
|
91
|
+
experience_type = client.experiences.types.create(
|
|
92
|
+
description="x",
|
|
93
|
+
name="x",
|
|
94
|
+
limit_config={
|
|
95
|
+
"max": 0,
|
|
96
|
+
"limit_tags": ["tag1", "tag2"],
|
|
97
|
+
"limit_type": "block",
|
|
98
|
+
"threshold": 0,
|
|
99
|
+
},
|
|
100
|
+
)
|
|
101
|
+
print(experience_type.limit_config)
|
|
102
|
+
```
|
|
103
|
+
|
|
82
104
|
## Handling errors
|
|
83
105
|
|
|
84
106
|
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `payi.APIConnectionError` is raised.
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
# Shared Types
|
|
2
2
|
|
|
3
3
|
```python
|
|
4
|
-
from payi.types import
|
|
4
|
+
from payi.types import (
|
|
5
|
+
PayICommonModelsBudgetManagementCostDetailsBase,
|
|
6
|
+
PayICommonModelsBudgetManagementCreateLimitBase,
|
|
7
|
+
PropertiesResponse,
|
|
8
|
+
)
|
|
5
9
|
```
|
|
6
10
|
|
|
7
11
|
# Limits
|
|
@@ -148,45 +152,52 @@ Methods:
|
|
|
148
152
|
|
|
149
153
|
## Properties
|
|
150
154
|
|
|
155
|
+
Methods:
|
|
156
|
+
|
|
157
|
+
- <code title="post /api/v1/experiences/instances/{experience_id}/properties">client.experiences.properties.<a href="./src/payi/resources/experiences/properties.py">create</a>(experience_id, \*\*<a href="src/payi/types/experiences/property_create_params.py">params</a>) -> <a href="./src/payi/types/experience_instance_response.py">ExperienceInstanceResponse</a></code>
|
|
158
|
+
|
|
159
|
+
# UseCases
|
|
160
|
+
|
|
151
161
|
Types:
|
|
152
162
|
|
|
153
163
|
```python
|
|
154
|
-
from payi.types
|
|
164
|
+
from payi.types import UseCaseInstanceResponse
|
|
155
165
|
```
|
|
156
166
|
|
|
157
167
|
Methods:
|
|
158
168
|
|
|
159
|
-
- <code title="post /api/v1/
|
|
169
|
+
- <code title="post /api/v1/use_cases/instances/{use_case_name}">client.use_cases.<a href="./src/payi/resources/use_cases/use_cases.py">create</a>(use_case_name) -> <a href="./src/payi/types/use_case_instance_response.py">UseCaseInstanceResponse</a></code>
|
|
170
|
+
- <code title="get /api/v1/use_cases/instances/{use_case_id}">client.use_cases.<a href="./src/payi/resources/use_cases/use_cases.py">retrieve</a>(use_case_id) -> <a href="./src/payi/types/use_case_instance_response.py">UseCaseInstanceResponse</a></code>
|
|
171
|
+
- <code title="delete /api/v1/use_cases/instances/{use_case_id}">client.use_cases.<a href="./src/payi/resources/use_cases/use_cases.py">delete</a>(use_case_id) -> <a href="./src/payi/types/use_case_instance_response.py">UseCaseInstanceResponse</a></code>
|
|
160
172
|
|
|
161
|
-
|
|
173
|
+
## Types
|
|
162
174
|
|
|
163
175
|
Types:
|
|
164
176
|
|
|
165
177
|
```python
|
|
166
|
-
from payi.types import
|
|
178
|
+
from payi.types.use_cases import UseCaseType, TypeListResponse
|
|
167
179
|
```
|
|
168
180
|
|
|
169
181
|
Methods:
|
|
170
182
|
|
|
171
|
-
- <code title="post /api/v1/
|
|
172
|
-
- <code title="get /api/v1/
|
|
173
|
-
- <code title="
|
|
174
|
-
- <code title="get /api/v1/
|
|
175
|
-
- <code title="
|
|
183
|
+
- <code title="post /api/v1/use_cases/types">client.use_cases.types.<a href="./src/payi/resources/use_cases/types/types.py">create</a>(\*\*<a href="src/payi/types/use_cases/type_create_params.py">params</a>) -> <a href="./src/payi/types/use_cases/use_case_type.py">UseCaseType</a></code>
|
|
184
|
+
- <code title="get /api/v1/use_cases/types/{use_case_name}">client.use_cases.types.<a href="./src/payi/resources/use_cases/types/types.py">retrieve</a>(use_case_name) -> <a href="./src/payi/types/use_cases/use_case_type.py">UseCaseType</a></code>
|
|
185
|
+
- <code title="patch /api/v1/use_cases/types/{use_case_name}">client.use_cases.types.<a href="./src/payi/resources/use_cases/types/types.py">update</a>(use_case_name, \*\*<a href="src/payi/types/use_cases/type_update_params.py">params</a>) -> <a href="./src/payi/types/use_cases/use_case_type.py">UseCaseType</a></code>
|
|
186
|
+
- <code title="get /api/v1/use_cases/types">client.use_cases.types.<a href="./src/payi/resources/use_cases/types/types.py">list</a>(\*\*<a href="src/payi/types/use_cases/type_list_params.py">params</a>) -> <a href="./src/payi/types/use_cases/type_list_response.py">TypeListResponse</a></code>
|
|
187
|
+
- <code title="delete /api/v1/use_cases/types/{use_case_name}">client.use_cases.types.<a href="./src/payi/resources/use_cases/types/types.py">delete</a>(use_case_name) -> <a href="./src/payi/types/use_cases/use_case_type.py">UseCaseType</a></code>
|
|
176
188
|
|
|
177
|
-
|
|
189
|
+
### LimitConfig
|
|
178
190
|
|
|
179
|
-
|
|
191
|
+
Methods:
|
|
180
192
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
193
|
+
- <code title="post /api/v1/use_cases/types/{use_case_name}/limit_config">client.use_cases.types.limit_config.<a href="./src/payi/resources/use_cases/types/limit_config.py">create</a>(use_case_name, \*\*<a href="src/payi/types/use_cases/types/limit_config_create_params.py">params</a>) -> <a href="./src/payi/types/use_cases/use_case_type.py">UseCaseType</a></code>
|
|
194
|
+
- <code title="delete /api/v1/use_cases/types/{use_case_name}/limit_config">client.use_cases.types.limit_config.<a href="./src/payi/resources/use_cases/types/limit_config.py">delete</a>(use_case_name) -> <a href="./src/payi/types/use_cases/use_case_type.py">UseCaseType</a></code>
|
|
195
|
+
|
|
196
|
+
## Properties
|
|
184
197
|
|
|
185
198
|
Methods:
|
|
186
199
|
|
|
187
|
-
- <code title="post /api/v1/
|
|
188
|
-
- <code title="get /api/v1/price-modifier/{billing_model_id}">client.price_modifiers.<a href="./src/payi/resources/price_modifiers.py">retrieve</a>(billing_model_id) -> <a href="./src/payi/types/price_modifier_retrieve_response.py">PriceModifierRetrieveResponse</a></code>
|
|
189
|
-
- <code title="put /api/v1/price-modifier">client.price_modifiers.<a href="./src/payi/resources/price_modifiers.py">update</a>(\*\*<a href="src/payi/types/price_modifier_update_params.py">params</a>) -> <a href="./src/payi/types/price_modifier.py">PriceModifier</a></code>
|
|
200
|
+
- <code title="post /api/v1/use_cases/instances/{use_case_id}/properties">client.use_cases.properties.<a href="./src/payi/resources/use_cases/properties.py">create</a>(use_case_id, \*\*<a href="src/payi/types/use_cases/property_create_params.py">params</a>) -> <a href="./src/payi/types/use_case_instance_response.py">UseCaseInstanceResponse</a></code>
|
|
190
201
|
|
|
191
202
|
# Requests
|
|
192
203
|
|
|
@@ -194,7 +205,7 @@ Methods:
|
|
|
194
205
|
|
|
195
206
|
Methods:
|
|
196
207
|
|
|
197
|
-
- <code title="post /api/v1/requests/{request_id}/properties">client.requests.properties.<a href="./src/payi/resources/requests/properties.py">create</a>(request_id, \*\*<a href="src/payi/types/requests/property_create_params.py">params</a>) -> <a href="./src/payi/types/
|
|
208
|
+
- <code title="post /api/v1/requests/{request_id}/properties">client.requests.properties.<a href="./src/payi/resources/requests/properties.py">create</a>(request_id, \*\*<a href="src/payi/types/requests/property_create_params.py">params</a>) -> <a href="./src/payi/types/shared/properties_response.py">PropertiesResponse</a></code>
|
|
198
209
|
|
|
199
210
|
## Result
|
|
200
211
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "payi"
|
|
3
|
-
version = "0.1.0-alpha.
|
|
3
|
+
version = "0.1.0-alpha.56"
|
|
4
4
|
description = "The official Python library for the payi API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -41,7 +41,6 @@ Homepage = "https://github.com/Pay-i/pay-i-python"
|
|
|
41
41
|
Repository = "https://github.com/Pay-i/pay-i-python"
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
|
|
45
44
|
[tool.rye]
|
|
46
45
|
managed = true
|
|
47
46
|
# version pins are in requirements-dev.lock
|
|
@@ -91,7 +90,7 @@ typecheck = { chain = [
|
|
|
91
90
|
"typecheck:mypy" = "mypy ."
|
|
92
91
|
|
|
93
92
|
[build-system]
|
|
94
|
-
requires = ["hatchling", "hatch-fancy-pypi-readme"]
|
|
93
|
+
requires = ["hatchling==1.26.3", "hatch-fancy-pypi-readme"]
|
|
95
94
|
build-backend = "hatchling.build"
|
|
96
95
|
|
|
97
96
|
[tool.hatch.build]
|
|
@@ -156,7 +155,6 @@ reportImplicitOverride = true
|
|
|
156
155
|
reportImportCycles = false
|
|
157
156
|
reportPrivateUsage = false
|
|
158
157
|
|
|
159
|
-
|
|
160
158
|
[tool.ruff]
|
|
161
159
|
line-length = 120
|
|
162
160
|
output-format = "grouped"
|
|
@@ -9,7 +9,6 @@ import asyncio
|
|
|
9
9
|
import inspect
|
|
10
10
|
import logging
|
|
11
11
|
import platform
|
|
12
|
-
import warnings
|
|
13
12
|
import email.utils
|
|
14
13
|
from types import TracebackType
|
|
15
14
|
from random import random
|
|
@@ -36,7 +35,7 @@ import anyio
|
|
|
36
35
|
import httpx
|
|
37
36
|
import distro
|
|
38
37
|
import pydantic
|
|
39
|
-
from httpx import URL
|
|
38
|
+
from httpx import URL
|
|
40
39
|
from pydantic import PrivateAttr
|
|
41
40
|
|
|
42
41
|
from . import _exceptions
|
|
@@ -51,13 +50,10 @@ from ._types import (
|
|
|
51
50
|
Timeout,
|
|
52
51
|
NotGiven,
|
|
53
52
|
ResponseT,
|
|
54
|
-
Transport,
|
|
55
53
|
AnyMapping,
|
|
56
54
|
PostParser,
|
|
57
|
-
ProxiesTypes,
|
|
58
55
|
RequestFiles,
|
|
59
56
|
HttpxSendArgs,
|
|
60
|
-
AsyncTransport,
|
|
61
57
|
RequestOptions,
|
|
62
58
|
HttpxRequestFiles,
|
|
63
59
|
ModelBuilderProtocol,
|
|
@@ -337,9 +333,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
337
333
|
_base_url: URL
|
|
338
334
|
max_retries: int
|
|
339
335
|
timeout: Union[float, Timeout, None]
|
|
340
|
-
_limits: httpx.Limits
|
|
341
|
-
_proxies: ProxiesTypes | None
|
|
342
|
-
_transport: Transport | AsyncTransport | None
|
|
343
336
|
_strict_response_validation: bool
|
|
344
337
|
_idempotency_header: str | None
|
|
345
338
|
_default_stream_cls: type[_DefaultStreamT] | None = None
|
|
@@ -352,9 +345,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
352
345
|
_strict_response_validation: bool,
|
|
353
346
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
354
347
|
timeout: float | Timeout | None = DEFAULT_TIMEOUT,
|
|
355
|
-
limits: httpx.Limits,
|
|
356
|
-
transport: Transport | AsyncTransport | None,
|
|
357
|
-
proxies: ProxiesTypes | None,
|
|
358
348
|
custom_headers: Mapping[str, str] | None = None,
|
|
359
349
|
custom_query: Mapping[str, object] | None = None,
|
|
360
350
|
) -> None:
|
|
@@ -362,9 +352,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
362
352
|
self._base_url = self._enforce_trailing_slash(URL(base_url))
|
|
363
353
|
self.max_retries = max_retries
|
|
364
354
|
self.timeout = timeout
|
|
365
|
-
self._limits = limits
|
|
366
|
-
self._proxies = proxies
|
|
367
|
-
self._transport = transport
|
|
368
355
|
self._custom_headers = custom_headers or {}
|
|
369
356
|
self._custom_query = custom_query or {}
|
|
370
357
|
self._strict_response_validation = _strict_response_validation
|
|
@@ -800,46 +787,11 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
800
787
|
base_url: str | URL,
|
|
801
788
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
802
789
|
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
|
|
803
|
-
transport: Transport | None = None,
|
|
804
|
-
proxies: ProxiesTypes | None = None,
|
|
805
|
-
limits: Limits | None = None,
|
|
806
790
|
http_client: httpx.Client | None = None,
|
|
807
791
|
custom_headers: Mapping[str, str] | None = None,
|
|
808
792
|
custom_query: Mapping[str, object] | None = None,
|
|
809
793
|
_strict_response_validation: bool,
|
|
810
794
|
) -> None:
|
|
811
|
-
kwargs: dict[str, Any] = {}
|
|
812
|
-
if limits is not None:
|
|
813
|
-
warnings.warn(
|
|
814
|
-
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
|
|
815
|
-
category=DeprecationWarning,
|
|
816
|
-
stacklevel=3,
|
|
817
|
-
)
|
|
818
|
-
if http_client is not None:
|
|
819
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
|
|
820
|
-
else:
|
|
821
|
-
limits = DEFAULT_CONNECTION_LIMITS
|
|
822
|
-
|
|
823
|
-
if transport is not None:
|
|
824
|
-
kwargs["transport"] = transport
|
|
825
|
-
warnings.warn(
|
|
826
|
-
"The `transport` argument is deprecated. The `http_client` argument should be passed instead",
|
|
827
|
-
category=DeprecationWarning,
|
|
828
|
-
stacklevel=3,
|
|
829
|
-
)
|
|
830
|
-
if http_client is not None:
|
|
831
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
|
|
832
|
-
|
|
833
|
-
if proxies is not None:
|
|
834
|
-
kwargs["proxies"] = proxies
|
|
835
|
-
warnings.warn(
|
|
836
|
-
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
|
|
837
|
-
category=DeprecationWarning,
|
|
838
|
-
stacklevel=3,
|
|
839
|
-
)
|
|
840
|
-
if http_client is not None:
|
|
841
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")
|
|
842
|
-
|
|
843
795
|
if not is_given(timeout):
|
|
844
796
|
# if the user passed in a custom http client with a non-default
|
|
845
797
|
# timeout set then we use that timeout.
|
|
@@ -860,12 +812,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
860
812
|
|
|
861
813
|
super().__init__(
|
|
862
814
|
version=version,
|
|
863
|
-
limits=limits,
|
|
864
815
|
# cast to a valid type because mypy doesn't understand our type narrowing
|
|
865
816
|
timeout=cast(Timeout, timeout),
|
|
866
|
-
proxies=proxies,
|
|
867
817
|
base_url=base_url,
|
|
868
|
-
transport=transport,
|
|
869
818
|
max_retries=max_retries,
|
|
870
819
|
custom_query=custom_query,
|
|
871
820
|
custom_headers=custom_headers,
|
|
@@ -875,9 +824,6 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
875
824
|
base_url=base_url,
|
|
876
825
|
# cast to a valid type because mypy doesn't understand our type narrowing
|
|
877
826
|
timeout=cast(Timeout, timeout),
|
|
878
|
-
limits=limits,
|
|
879
|
-
follow_redirects=True,
|
|
880
|
-
**kwargs, # type: ignore
|
|
881
827
|
)
|
|
882
828
|
|
|
883
829
|
def is_closed(self) -> bool:
|
|
@@ -1372,45 +1318,10 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1372
1318
|
_strict_response_validation: bool,
|
|
1373
1319
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
1374
1320
|
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
|
|
1375
|
-
transport: AsyncTransport | None = None,
|
|
1376
|
-
proxies: ProxiesTypes | None = None,
|
|
1377
|
-
limits: Limits | None = None,
|
|
1378
1321
|
http_client: httpx.AsyncClient | None = None,
|
|
1379
1322
|
custom_headers: Mapping[str, str] | None = None,
|
|
1380
1323
|
custom_query: Mapping[str, object] | None = None,
|
|
1381
1324
|
) -> None:
|
|
1382
|
-
kwargs: dict[str, Any] = {}
|
|
1383
|
-
if limits is not None:
|
|
1384
|
-
warnings.warn(
|
|
1385
|
-
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
|
|
1386
|
-
category=DeprecationWarning,
|
|
1387
|
-
stacklevel=3,
|
|
1388
|
-
)
|
|
1389
|
-
if http_client is not None:
|
|
1390
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
|
|
1391
|
-
else:
|
|
1392
|
-
limits = DEFAULT_CONNECTION_LIMITS
|
|
1393
|
-
|
|
1394
|
-
if transport is not None:
|
|
1395
|
-
kwargs["transport"] = transport
|
|
1396
|
-
warnings.warn(
|
|
1397
|
-
"The `transport` argument is deprecated. The `http_client` argument should be passed instead",
|
|
1398
|
-
category=DeprecationWarning,
|
|
1399
|
-
stacklevel=3,
|
|
1400
|
-
)
|
|
1401
|
-
if http_client is not None:
|
|
1402
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
|
|
1403
|
-
|
|
1404
|
-
if proxies is not None:
|
|
1405
|
-
kwargs["proxies"] = proxies
|
|
1406
|
-
warnings.warn(
|
|
1407
|
-
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
|
|
1408
|
-
category=DeprecationWarning,
|
|
1409
|
-
stacklevel=3,
|
|
1410
|
-
)
|
|
1411
|
-
if http_client is not None:
|
|
1412
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")
|
|
1413
|
-
|
|
1414
1325
|
if not is_given(timeout):
|
|
1415
1326
|
# if the user passed in a custom http client with a non-default
|
|
1416
1327
|
# timeout set then we use that timeout.
|
|
@@ -1432,11 +1343,8 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1432
1343
|
super().__init__(
|
|
1433
1344
|
version=version,
|
|
1434
1345
|
base_url=base_url,
|
|
1435
|
-
limits=limits,
|
|
1436
1346
|
# cast to a valid type because mypy doesn't understand our type narrowing
|
|
1437
1347
|
timeout=cast(Timeout, timeout),
|
|
1438
|
-
proxies=proxies,
|
|
1439
|
-
transport=transport,
|
|
1440
1348
|
max_retries=max_retries,
|
|
1441
1349
|
custom_query=custom_query,
|
|
1442
1350
|
custom_headers=custom_headers,
|
|
@@ -1446,9 +1354,6 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1446
1354
|
base_url=base_url,
|
|
1447
1355
|
# cast to a valid type because mypy doesn't understand our type narrowing
|
|
1448
1356
|
timeout=cast(Timeout, timeout),
|
|
1449
|
-
limits=limits,
|
|
1450
|
-
follow_redirects=True,
|
|
1451
|
-
**kwargs, # type: ignore
|
|
1452
1357
|
)
|
|
1453
1358
|
|
|
1454
1359
|
def is_closed(self) -> bool:
|
|
@@ -24,7 +24,7 @@ from ._utils import (
|
|
|
24
24
|
get_async_library,
|
|
25
25
|
)
|
|
26
26
|
from ._version import __version__
|
|
27
|
-
from .resources import ingest
|
|
27
|
+
from .resources import ingest
|
|
28
28
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
29
29
|
from ._exceptions import PayiError, APIStatusError
|
|
30
30
|
from ._base_client import (
|
|
@@ -34,6 +34,7 @@ from ._base_client import (
|
|
|
34
34
|
)
|
|
35
35
|
from .resources.limits import limits
|
|
36
36
|
from .resources.requests import requests
|
|
37
|
+
from .resources.use_cases import use_cases
|
|
37
38
|
from .resources.categories import categories
|
|
38
39
|
from .resources.experiences import experiences
|
|
39
40
|
|
|
@@ -45,8 +46,7 @@ class Payi(SyncAPIClient):
|
|
|
45
46
|
ingest: ingest.IngestResource
|
|
46
47
|
categories: categories.CategoriesResource
|
|
47
48
|
experiences: experiences.ExperiencesResource
|
|
48
|
-
|
|
49
|
-
price_modifiers: price_modifiers.PriceModifiersResource
|
|
49
|
+
use_cases: use_cases.UseCasesResource
|
|
50
50
|
requests: requests.RequestsResource
|
|
51
51
|
with_raw_response: PayiWithRawResponse
|
|
52
52
|
with_streaming_response: PayiWithStreamedResponse
|
|
@@ -109,8 +109,7 @@ class Payi(SyncAPIClient):
|
|
|
109
109
|
self.ingest = ingest.IngestResource(self)
|
|
110
110
|
self.categories = categories.CategoriesResource(self)
|
|
111
111
|
self.experiences = experiences.ExperiencesResource(self)
|
|
112
|
-
self.
|
|
113
|
-
self.price_modifiers = price_modifiers.PriceModifiersResource(self)
|
|
112
|
+
self.use_cases = use_cases.UseCasesResource(self)
|
|
114
113
|
self.requests = requests.RequestsResource(self)
|
|
115
114
|
self.with_raw_response = PayiWithRawResponse(self)
|
|
116
115
|
self.with_streaming_response = PayiWithStreamedResponse(self)
|
|
@@ -225,8 +224,7 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
225
224
|
ingest: ingest.AsyncIngestResource
|
|
226
225
|
categories: categories.AsyncCategoriesResource
|
|
227
226
|
experiences: experiences.AsyncExperiencesResource
|
|
228
|
-
|
|
229
|
-
price_modifiers: price_modifiers.AsyncPriceModifiersResource
|
|
227
|
+
use_cases: use_cases.AsyncUseCasesResource
|
|
230
228
|
requests: requests.AsyncRequestsResource
|
|
231
229
|
with_raw_response: AsyncPayiWithRawResponse
|
|
232
230
|
with_streaming_response: AsyncPayiWithStreamedResponse
|
|
@@ -289,8 +287,7 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
289
287
|
self.ingest = ingest.AsyncIngestResource(self)
|
|
290
288
|
self.categories = categories.AsyncCategoriesResource(self)
|
|
291
289
|
self.experiences = experiences.AsyncExperiencesResource(self)
|
|
292
|
-
self.
|
|
293
|
-
self.price_modifiers = price_modifiers.AsyncPriceModifiersResource(self)
|
|
290
|
+
self.use_cases = use_cases.AsyncUseCasesResource(self)
|
|
294
291
|
self.requests = requests.AsyncRequestsResource(self)
|
|
295
292
|
self.with_raw_response = AsyncPayiWithRawResponse(self)
|
|
296
293
|
self.with_streaming_response = AsyncPayiWithStreamedResponse(self)
|
|
@@ -406,8 +403,7 @@ class PayiWithRawResponse:
|
|
|
406
403
|
self.ingest = ingest.IngestResourceWithRawResponse(client.ingest)
|
|
407
404
|
self.categories = categories.CategoriesResourceWithRawResponse(client.categories)
|
|
408
405
|
self.experiences = experiences.ExperiencesResourceWithRawResponse(client.experiences)
|
|
409
|
-
self.
|
|
410
|
-
self.price_modifiers = price_modifiers.PriceModifiersResourceWithRawResponse(client.price_modifiers)
|
|
406
|
+
self.use_cases = use_cases.UseCasesResourceWithRawResponse(client.use_cases)
|
|
411
407
|
self.requests = requests.RequestsResourceWithRawResponse(client.requests)
|
|
412
408
|
|
|
413
409
|
|
|
@@ -417,8 +413,7 @@ class AsyncPayiWithRawResponse:
|
|
|
417
413
|
self.ingest = ingest.AsyncIngestResourceWithRawResponse(client.ingest)
|
|
418
414
|
self.categories = categories.AsyncCategoriesResourceWithRawResponse(client.categories)
|
|
419
415
|
self.experiences = experiences.AsyncExperiencesResourceWithRawResponse(client.experiences)
|
|
420
|
-
self.
|
|
421
|
-
self.price_modifiers = price_modifiers.AsyncPriceModifiersResourceWithRawResponse(client.price_modifiers)
|
|
416
|
+
self.use_cases = use_cases.AsyncUseCasesResourceWithRawResponse(client.use_cases)
|
|
422
417
|
self.requests = requests.AsyncRequestsResourceWithRawResponse(client.requests)
|
|
423
418
|
|
|
424
419
|
|
|
@@ -428,8 +423,7 @@ class PayiWithStreamedResponse:
|
|
|
428
423
|
self.ingest = ingest.IngestResourceWithStreamingResponse(client.ingest)
|
|
429
424
|
self.categories = categories.CategoriesResourceWithStreamingResponse(client.categories)
|
|
430
425
|
self.experiences = experiences.ExperiencesResourceWithStreamingResponse(client.experiences)
|
|
431
|
-
self.
|
|
432
|
-
self.price_modifiers = price_modifiers.PriceModifiersResourceWithStreamingResponse(client.price_modifiers)
|
|
426
|
+
self.use_cases = use_cases.UseCasesResourceWithStreamingResponse(client.use_cases)
|
|
433
427
|
self.requests = requests.RequestsResourceWithStreamingResponse(client.requests)
|
|
434
428
|
|
|
435
429
|
|
|
@@ -439,8 +433,7 @@ class AsyncPayiWithStreamedResponse:
|
|
|
439
433
|
self.ingest = ingest.AsyncIngestResourceWithStreamingResponse(client.ingest)
|
|
440
434
|
self.categories = categories.AsyncCategoriesResourceWithStreamingResponse(client.categories)
|
|
441
435
|
self.experiences = experiences.AsyncExperiencesResourceWithStreamingResponse(client.experiences)
|
|
442
|
-
self.
|
|
443
|
-
self.price_modifiers = price_modifiers.AsyncPriceModifiersResourceWithStreamingResponse(client.price_modifiers)
|
|
436
|
+
self.use_cases = use_cases.AsyncUseCasesResourceWithStreamingResponse(client.use_cases)
|
|
444
437
|
self.requests = requests.AsyncRequestsResourceWithStreamingResponse(client.requests)
|
|
445
438
|
|
|
446
439
|
|
|
@@ -65,7 +65,7 @@ from ._compat import (
|
|
|
65
65
|
from ._constants import RAW_RESPONSE_HEADER
|
|
66
66
|
|
|
67
67
|
if TYPE_CHECKING:
|
|
68
|
-
from pydantic_core.core_schema import ModelField, LiteralSchema, ModelFieldsSchema
|
|
68
|
+
from pydantic_core.core_schema import ModelField, ModelSchema, LiteralSchema, ModelFieldsSchema
|
|
69
69
|
|
|
70
70
|
__all__ = ["BaseModel", "GenericModel"]
|
|
71
71
|
|
|
@@ -646,15 +646,18 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
|
|
|
646
646
|
|
|
647
647
|
def _extract_field_schema_pv2(model: type[BaseModel], field_name: str) -> ModelField | None:
|
|
648
648
|
schema = model.__pydantic_core_schema__
|
|
649
|
+
if schema["type"] == "definitions":
|
|
650
|
+
schema = schema["schema"]
|
|
651
|
+
|
|
649
652
|
if schema["type"] != "model":
|
|
650
653
|
return None
|
|
651
654
|
|
|
655
|
+
schema = cast("ModelSchema", schema)
|
|
652
656
|
fields_schema = schema["schema"]
|
|
653
657
|
if fields_schema["type"] != "model-fields":
|
|
654
658
|
return None
|
|
655
659
|
|
|
656
660
|
fields_schema = cast("ModelFieldsSchema", fields_schema)
|
|
657
|
-
|
|
658
661
|
field = fields_schema["fields"].get(field_name)
|
|
659
662
|
if not field:
|
|
660
663
|
return None
|
|
@@ -7,6 +7,9 @@ class PayiHeaderNames:
|
|
|
7
7
|
request_tags:str = "xProxy-Request-Tags"
|
|
8
8
|
experience_id:str = "xProxy-Experience-ID"
|
|
9
9
|
experience_name:str = "xProxy-Experience-Name"
|
|
10
|
+
use_case_id:str = "xProxy-UseCase-ID"
|
|
11
|
+
use_case_name:str = "xProxy-UseCase-Name"
|
|
12
|
+
use_case_version:str = "xProxy-UseCase-Version"
|
|
10
13
|
user_id:str = "xProxy-User-ID"
|
|
11
14
|
route_as_resource:str = "xProxy-RouteAs-Resource"
|
|
12
15
|
provider_base_uri = "xProxy-Provider-BaseUri"
|
|
@@ -42,6 +45,9 @@ def create_headers(
|
|
|
42
45
|
user_id: Union[str, None] = None,
|
|
43
46
|
experience_id: Union[str, None] = None,
|
|
44
47
|
experience_name: Union[str, None] = None,
|
|
48
|
+
use_case_id: Union[str, None] = None,
|
|
49
|
+
use_case_name: Union[str, None] = None,
|
|
50
|
+
use_case_version: Union[int, None] = None,
|
|
45
51
|
) -> Dict[str, str]:
|
|
46
52
|
headers: Dict[str, str] = {}
|
|
47
53
|
|
|
@@ -55,7 +61,12 @@ def create_headers(
|
|
|
55
61
|
headers.update({ PayiHeaderNames.experience_id: experience_id})
|
|
56
62
|
if experience_name:
|
|
57
63
|
headers.update({ PayiHeaderNames.experience_name: experience_name})
|
|
58
|
-
|
|
64
|
+
if use_case_id:
|
|
65
|
+
headers.update({ PayiHeaderNames.use_case_id: use_case_id})
|
|
66
|
+
if use_case_name:
|
|
67
|
+
headers.update({ PayiHeaderNames.use_case_name: use_case_name})
|
|
68
|
+
if use_case_version:
|
|
69
|
+
headers.update({ PayiHeaderNames.use_case_version: str(use_case_version)})
|
|
59
70
|
return headers
|
|
60
71
|
|
|
61
72
|
def payi_anthropic_url(payi_base_url: Union[str, None] = None) -> str:
|