payi 0.1.0a130__tar.gz → 0.1.0a132__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.0a132/.release-please-manifest.json +3 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/CHANGELOG.md +16 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/PKG-INFO +1 -1
- {payi-0.1.0a130 → payi-0.1.0a132}/api.md +3 -14
- {payi-0.1.0a130 → payi-0.1.0a132}/pyproject.toml +1 -1
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_version.py +1 -1
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/instrument.py +42 -3
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/categories/categories.py +4 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/limits/__init__.py +14 -14
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/limits/limits.py +26 -26
- payi-0.1.0a132/src/payi/resources/limits/properties.py +171 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/request_id/properties.py +2 -2
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/response_id/properties.py +2 -2
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/use_cases/definitions/limit_config.py +6 -6
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/category_list_resources_params.py +5 -1
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/category_resource_response.py +1 -3
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/limit_create_params.py +3 -5
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/limit_list_response.py +1 -3
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/limit_response.py +1 -3
- payi-0.1.0a132/src/payi/types/limits/__init__.py +6 -0
- payi-0.1.0a130/src/payi/types/limits/tag_create_response.py → payi-0.1.0a132/src/payi/types/limits/property_update_response.py +3 -3
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +3 -3
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +3 -5
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/limit_config_create_params.py +3 -5
- payi-0.1.0a132/src/payi/types/use_cases/property_update_params.py +12 -0
- payi-0.1.0a132/tests/api_resources/limits/test_properties.py +108 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/test_categories.py +2 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/test_limits.py +2 -2
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/use_cases/definitions/test_limit_config.py +2 -2
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/use_cases/test_definitions.py +2 -2
- payi-0.1.0a130/.release-please-manifest.json +0 -3
- payi-0.1.0a130/src/payi/resources/limits/tags.py +0 -505
- payi-0.1.0a130/src/payi/types/limits/__init__.py +0 -13
- payi-0.1.0a130/src/payi/types/limits/limit_tags.py +0 -16
- payi-0.1.0a130/src/payi/types/limits/tag_create_params.py +0 -14
- payi-0.1.0a130/src/payi/types/limits/tag_delete_response.py +0 -10
- payi-0.1.0a130/src/payi/types/limits/tag_list_response.py +0 -10
- payi-0.1.0a130/src/payi/types/limits/tag_remove_params.py +0 -14
- payi-0.1.0a130/src/payi/types/limits/tag_remove_response.py +0 -10
- payi-0.1.0a130/src/payi/types/limits/tag_update_params.py +0 -14
- payi-0.1.0a130/src/payi/types/limits/tag_update_response.py +0 -10
- payi-0.1.0a130/tests/api_resources/limits/test_tags.py +0 -434
- {payi-0.1.0a130 → payi-0.1.0a132}/.gitignore +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/LICENSE +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/README.md +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/SECURITY.md +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/bin/check-release-environment +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/bin/publish-pypi +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/examples/.keep +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/noxfile.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/release-please-config.json +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/requirements-dev.lock +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/requirements.lock +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_base_client.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_client.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_compat.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_constants.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_files.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_models.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_qs.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_resource.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_types.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_compat.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_datetime_parse.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_resources_proxy.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/AnthropicInstrumentor.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/BedrockInstrumentor.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/GoogleGenAiInstrumentor.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/OpenAIInstrumentor.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/Stopwatch.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/VertexInstrumentor.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/VertexRequest.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/data/cohere_embed_english_v3.json +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/helpers.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/lib/version_helper.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/pagination.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/py.typed +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/categories/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/categories/resources.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/ingest.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/request_id/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/request_id/request_id.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/request_id/result.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/requests.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/response_id/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/response_id/response_id.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/requests/response_id/result.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/use_cases/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/use_cases/definitions/version.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/use_cases/kpis.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/use_cases/properties.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/resources/use_cases/use_cases.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/bulk_ingest_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/categories/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/categories/resource_create_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/categories/resource_list_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/category_delete_resource_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/category_delete_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/category_list_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/category_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/cost_details.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/ingest_bulk_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/ingest_event_param.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/ingest_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/ingest_units_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/limit_history_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/limit_list_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/limit_reset_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/limit_update_params.py +0 -0
- {payi-0.1.0a130/src/payi/types/requests/request_id → payi-0.1.0a132/src/payi/types/limits}/property_update_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/request_result.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/requests/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/requests/request_id/__init__.py +0 -0
- {payi-0.1.0a130/src/payi/types/use_cases → payi-0.1.0a132/src/payi/types/requests/request_id}/property_update_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/requests/response_id/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/requests/response_id/property_update_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/requests_data.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/api_error.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/evaluation_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/ingest_units.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/properties_request.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/properties_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/xproxy_error.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared/xproxy_result.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared_params/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/shared_params/ingest_units.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/total_cost_data.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_case_instance_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definition_create_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definition_list_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definition_update_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/kpi_list_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/kpi_list_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/kpi_update_params.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/src/payi/types/use_cases/use_case_definition.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/categories/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/categories/test_resources.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/limits/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/requests/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/requests/request_id/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/requests/request_id/test_properties.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/requests/request_id/test_result.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/requests/response_id/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/requests/response_id/test_properties.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/requests/response_id/test_result.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/test_ingest.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/test_use_cases.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/use_cases/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/use_cases/test_kpis.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/api_resources/use_cases/test_properties.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/conftest.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/sample_file.txt +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_client.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_files.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_models.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_qs.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_required_args.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_response.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_streaming.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_transform.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_utils/test_datetime_parse.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a130 → payi-0.1.0a132}/tests/utils.py +0 -0
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.132 (2025-10-22)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.131...v0.1.0-alpha.132](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.131...v0.1.0-alpha.132)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* thread local storage ([#385](https://github.com/Pay-i/pay-i-python/issues/385)) ([057de83](https://github.com/Pay-i/pay-i-python/commit/057de83b15fc791e6eb813d8cb62a54a0de0eea9))
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.131 (2025-10-21)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.1.0-alpha.130...v0.1.0-alpha.131](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.130...v0.1.0-alpha.131)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** limit properties ([16edabe](https://github.com/Pay-i/pay-i-python/commit/16edabe61a480db13ffb71cce1932bf3b017d766))
|
|
18
|
+
|
|
3
19
|
## 0.1.0-alpha.130 (2025-10-18)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.1.0-alpha.129...v0.1.0-alpha.130](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.129...v0.1.0-alpha.130)
|
|
@@ -39,28 +39,17 @@ Methods:
|
|
|
39
39
|
- <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>
|
|
40
40
|
- <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>
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## Properties
|
|
43
43
|
|
|
44
44
|
Types:
|
|
45
45
|
|
|
46
46
|
```python
|
|
47
|
-
from payi.types.limits import
|
|
48
|
-
LimitTags,
|
|
49
|
-
TagCreateResponse,
|
|
50
|
-
TagUpdateResponse,
|
|
51
|
-
TagListResponse,
|
|
52
|
-
TagDeleteResponse,
|
|
53
|
-
TagRemoveResponse,
|
|
54
|
-
)
|
|
47
|
+
from payi.types.limits import PropertyUpdateResponse
|
|
55
48
|
```
|
|
56
49
|
|
|
57
50
|
Methods:
|
|
58
51
|
|
|
59
|
-
- <code title="
|
|
60
|
-
- <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>
|
|
61
|
-
- <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>
|
|
62
|
-
- <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>
|
|
63
|
-
- <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>
|
|
52
|
+
- <code title="put /api/v1/limits/{limit_id}/properties">client.limits.properties.<a href="./src/payi/resources/limits/properties.py">update</a>(limit_id, \*\*<a href="src/payi/types/limits/property_update_params.py">params</a>) -> <a href="./src/payi/types/limits/property_update_response.py">PropertyUpdateResponse</a></code>
|
|
64
53
|
|
|
65
54
|
# Ingest
|
|
66
55
|
|
|
@@ -6,6 +6,7 @@ import atexit
|
|
|
6
6
|
import asyncio
|
|
7
7
|
import inspect
|
|
8
8
|
import logging
|
|
9
|
+
import threading
|
|
9
10
|
import traceback
|
|
10
11
|
from abc import abstractmethod
|
|
11
12
|
from enum import Enum
|
|
@@ -210,6 +211,15 @@ class _StreamingType(Enum):
|
|
|
210
211
|
iterator = 1
|
|
211
212
|
stream_manager = 2
|
|
212
213
|
|
|
214
|
+
class _ThreadLocalContextStorage(threading.local):
|
|
215
|
+
"""
|
|
216
|
+
Thread-local storage for context stacks. Each thread gets its own context stack.
|
|
217
|
+
|
|
218
|
+
Note: We don't use __init__ because threading.local's __init__ semantics are tricky.
|
|
219
|
+
Instead, we lazily initialize the context_stack attribute in the property accessor.
|
|
220
|
+
"""
|
|
221
|
+
context_stack: "list[_Context]"
|
|
222
|
+
|
|
213
223
|
class _InternalTrackContext:
|
|
214
224
|
def __init__(
|
|
215
225
|
self,
|
|
@@ -256,7 +266,12 @@ class _PayiInstrumentor:
|
|
|
256
266
|
if self._apayi:
|
|
257
267
|
_g_logger.debug(f"Pay-i instrumentor initialized with AsyncPayi instance: {self._apayi}")
|
|
258
268
|
|
|
259
|
-
|
|
269
|
+
# Thread-local storage for context stacks - each thread gets its own stack
|
|
270
|
+
self._thread_local_storage = _ThreadLocalContextStorage()
|
|
271
|
+
|
|
272
|
+
# Global immutable initial context that all threads inherit on first access
|
|
273
|
+
self._global_initial_context: Optional[_Context] = None
|
|
274
|
+
|
|
260
275
|
self._log_prompt_and_response: bool = log_prompt_and_response
|
|
261
276
|
|
|
262
277
|
self._blocked_limits: set[str] = set()
|
|
@@ -316,7 +331,7 @@ class _PayiInstrumentor:
|
|
|
316
331
|
|
|
317
332
|
self.__enter__()
|
|
318
333
|
|
|
319
|
-
# _init_current_context will update the
|
|
334
|
+
# _init_current_context will update the current context stack location
|
|
320
335
|
context: _Context = {}
|
|
321
336
|
# Copy allowed keys from global_config into context
|
|
322
337
|
# Dynamically use keys from _Context TypedDict
|
|
@@ -325,7 +340,12 @@ class _PayiInstrumentor:
|
|
|
325
340
|
if key in global_config:
|
|
326
341
|
context[key] = global_config[key] # type: ignore
|
|
327
342
|
|
|
328
|
-
self._init_current_context(**context)
|
|
343
|
+
self._init_current_context(**context)
|
|
344
|
+
|
|
345
|
+
# Store the initialized context as the global initial context (immutable after this point)
|
|
346
|
+
# All threads will inherit a copy of this context on their first access
|
|
347
|
+
current_context = self.get_context()
|
|
348
|
+
self._global_initial_context = current_context.copy() if current_context else None
|
|
329
349
|
|
|
330
350
|
def _ensure_payi_clients(self) -> None:
|
|
331
351
|
if self._offline_instrumentation is not None:
|
|
@@ -689,6 +709,25 @@ class _PayiInstrumentor:
|
|
|
689
709
|
def _ingest_units(self, request: _ProviderRequest) -> Optional[Union[XproxyResult, XproxyError]]:
|
|
690
710
|
return self.set_xproxy_result(self._ingest_units_worker(request))
|
|
691
711
|
|
|
712
|
+
@property
|
|
713
|
+
def _context_stack(self) -> "list[_Context]":
|
|
714
|
+
"""
|
|
715
|
+
Get the thread-local context stack. On first access per thread,
|
|
716
|
+
initializes with the global initial context if one was set.
|
|
717
|
+
"""
|
|
718
|
+
# Lazy-initialize the context_stack for this thread if it doesn't exist
|
|
719
|
+
if not hasattr(self._thread_local_storage, 'context_stack'):
|
|
720
|
+
self._thread_local_storage.context_stack = []
|
|
721
|
+
|
|
722
|
+
stack = self._thread_local_storage.context_stack
|
|
723
|
+
|
|
724
|
+
# If this is the first access in this thread and we have a global initial context,
|
|
725
|
+
# initialize this thread's stack with it
|
|
726
|
+
if len(stack) == 0 and self._global_initial_context is not None:
|
|
727
|
+
stack.append(self._global_initial_context.copy())
|
|
728
|
+
|
|
729
|
+
return stack
|
|
730
|
+
|
|
692
731
|
def _setup_call_func(
|
|
693
732
|
self
|
|
694
733
|
) -> _Context:
|
|
@@ -175,6 +175,7 @@ class CategoriesResource(SyncAPIResource):
|
|
|
175
175
|
self,
|
|
176
176
|
category: str,
|
|
177
177
|
*,
|
|
178
|
+
active: bool | Omit = omit,
|
|
178
179
|
cursor: str | Omit = omit,
|
|
179
180
|
limit: int | Omit = omit,
|
|
180
181
|
sort_ascending: bool | Omit = omit,
|
|
@@ -209,6 +210,7 @@ class CategoriesResource(SyncAPIResource):
|
|
|
209
210
|
timeout=timeout,
|
|
210
211
|
query=maybe_transform(
|
|
211
212
|
{
|
|
213
|
+
"active": active,
|
|
212
214
|
"cursor": cursor,
|
|
213
215
|
"limit": limit,
|
|
214
216
|
"sort_ascending": sort_ascending,
|
|
@@ -362,6 +364,7 @@ class AsyncCategoriesResource(AsyncAPIResource):
|
|
|
362
364
|
self,
|
|
363
365
|
category: str,
|
|
364
366
|
*,
|
|
367
|
+
active: bool | Omit = omit,
|
|
365
368
|
cursor: str | Omit = omit,
|
|
366
369
|
limit: int | Omit = omit,
|
|
367
370
|
sort_ascending: bool | Omit = omit,
|
|
@@ -396,6 +399,7 @@ class AsyncCategoriesResource(AsyncAPIResource):
|
|
|
396
399
|
timeout=timeout,
|
|
397
400
|
query=maybe_transform(
|
|
398
401
|
{
|
|
402
|
+
"active": active,
|
|
399
403
|
"cursor": cursor,
|
|
400
404
|
"limit": limit,
|
|
401
405
|
"sort_ascending": sort_ascending,
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from .tags import (
|
|
4
|
-
TagsResource,
|
|
5
|
-
AsyncTagsResource,
|
|
6
|
-
TagsResourceWithRawResponse,
|
|
7
|
-
AsyncTagsResourceWithRawResponse,
|
|
8
|
-
TagsResourceWithStreamingResponse,
|
|
9
|
-
AsyncTagsResourceWithStreamingResponse,
|
|
10
|
-
)
|
|
11
3
|
from .limits import (
|
|
12
4
|
LimitsResource,
|
|
13
5
|
AsyncLimitsResource,
|
|
@@ -16,14 +8,22 @@ from .limits import (
|
|
|
16
8
|
LimitsResourceWithStreamingResponse,
|
|
17
9
|
AsyncLimitsResourceWithStreamingResponse,
|
|
18
10
|
)
|
|
11
|
+
from .properties import (
|
|
12
|
+
PropertiesResource,
|
|
13
|
+
AsyncPropertiesResource,
|
|
14
|
+
PropertiesResourceWithRawResponse,
|
|
15
|
+
AsyncPropertiesResourceWithRawResponse,
|
|
16
|
+
PropertiesResourceWithStreamingResponse,
|
|
17
|
+
AsyncPropertiesResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
19
|
|
|
20
20
|
__all__ = [
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
21
|
+
"PropertiesResource",
|
|
22
|
+
"AsyncPropertiesResource",
|
|
23
|
+
"PropertiesResourceWithRawResponse",
|
|
24
|
+
"AsyncPropertiesResourceWithRawResponse",
|
|
25
|
+
"PropertiesResourceWithStreamingResponse",
|
|
26
|
+
"AsyncPropertiesResourceWithStreamingResponse",
|
|
27
27
|
"LimitsResource",
|
|
28
28
|
"AsyncLimitsResource",
|
|
29
29
|
"LimitsResourceWithRawResponse",
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Union, Optional
|
|
5
|
+
from typing import Dict, Union, Optional
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing_extensions import Literal
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
10
10
|
|
|
11
|
-
from .tags import (
|
|
12
|
-
TagsResource,
|
|
13
|
-
AsyncTagsResource,
|
|
14
|
-
TagsResourceWithRawResponse,
|
|
15
|
-
AsyncTagsResourceWithRawResponse,
|
|
16
|
-
TagsResourceWithStreamingResponse,
|
|
17
|
-
AsyncTagsResourceWithStreamingResponse,
|
|
18
|
-
)
|
|
19
11
|
from ...types import limit_list_params, limit_reset_params, limit_create_params, limit_update_params
|
|
20
|
-
from ..._types import Body, Omit, Query, Headers, NotGiven,
|
|
12
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
21
13
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
22
14
|
from ..._compat import cached_property
|
|
15
|
+
from .properties import (
|
|
16
|
+
PropertiesResource,
|
|
17
|
+
AsyncPropertiesResource,
|
|
18
|
+
PropertiesResourceWithRawResponse,
|
|
19
|
+
AsyncPropertiesResourceWithRawResponse,
|
|
20
|
+
PropertiesResourceWithStreamingResponse,
|
|
21
|
+
AsyncPropertiesResourceWithStreamingResponse,
|
|
22
|
+
)
|
|
23
23
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
24
24
|
from ..._response import (
|
|
25
25
|
to_raw_response_wrapper,
|
|
@@ -39,8 +39,8 @@ __all__ = ["LimitsResource", "AsyncLimitsResource"]
|
|
|
39
39
|
|
|
40
40
|
class LimitsResource(SyncAPIResource):
|
|
41
41
|
@cached_property
|
|
42
|
-
def
|
|
43
|
-
return
|
|
42
|
+
def properties(self) -> PropertiesResource:
|
|
43
|
+
return PropertiesResource(self._client)
|
|
44
44
|
|
|
45
45
|
@cached_property
|
|
46
46
|
def with_raw_response(self) -> LimitsResourceWithRawResponse:
|
|
@@ -67,8 +67,8 @@ class LimitsResource(SyncAPIResource):
|
|
|
67
67
|
limit_name: str,
|
|
68
68
|
max: float,
|
|
69
69
|
limit_id: Optional[str] | Omit = omit,
|
|
70
|
-
limit_tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
71
70
|
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
71
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
72
72
|
threshold: Optional[float] | Omit = omit,
|
|
73
73
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
74
74
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -96,8 +96,8 @@ class LimitsResource(SyncAPIResource):
|
|
|
96
96
|
"limit_name": limit_name,
|
|
97
97
|
"max": max,
|
|
98
98
|
"limit_id": limit_id,
|
|
99
|
-
"limit_tags": limit_tags,
|
|
100
99
|
"limit_type": limit_type,
|
|
100
|
+
"properties": properties,
|
|
101
101
|
"threshold": threshold,
|
|
102
102
|
},
|
|
103
103
|
limit_create_params.LimitCreateParams,
|
|
@@ -306,8 +306,8 @@ class LimitsResource(SyncAPIResource):
|
|
|
306
306
|
|
|
307
307
|
class AsyncLimitsResource(AsyncAPIResource):
|
|
308
308
|
@cached_property
|
|
309
|
-
def
|
|
310
|
-
return
|
|
309
|
+
def properties(self) -> AsyncPropertiesResource:
|
|
310
|
+
return AsyncPropertiesResource(self._client)
|
|
311
311
|
|
|
312
312
|
@cached_property
|
|
313
313
|
def with_raw_response(self) -> AsyncLimitsResourceWithRawResponse:
|
|
@@ -334,8 +334,8 @@ class AsyncLimitsResource(AsyncAPIResource):
|
|
|
334
334
|
limit_name: str,
|
|
335
335
|
max: float,
|
|
336
336
|
limit_id: Optional[str] | Omit = omit,
|
|
337
|
-
limit_tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
338
337
|
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
338
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
339
339
|
threshold: Optional[float] | Omit = omit,
|
|
340
340
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
341
341
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -363,8 +363,8 @@ class AsyncLimitsResource(AsyncAPIResource):
|
|
|
363
363
|
"limit_name": limit_name,
|
|
364
364
|
"max": max,
|
|
365
365
|
"limit_id": limit_id,
|
|
366
|
-
"limit_tags": limit_tags,
|
|
367
366
|
"limit_type": limit_type,
|
|
367
|
+
"properties": properties,
|
|
368
368
|
"threshold": threshold,
|
|
369
369
|
},
|
|
370
370
|
limit_create_params.LimitCreateParams,
|
|
@@ -595,8 +595,8 @@ class LimitsResourceWithRawResponse:
|
|
|
595
595
|
)
|
|
596
596
|
|
|
597
597
|
@cached_property
|
|
598
|
-
def
|
|
599
|
-
return
|
|
598
|
+
def properties(self) -> PropertiesResourceWithRawResponse:
|
|
599
|
+
return PropertiesResourceWithRawResponse(self._limits.properties)
|
|
600
600
|
|
|
601
601
|
|
|
602
602
|
class AsyncLimitsResourceWithRawResponse:
|
|
@@ -623,8 +623,8 @@ class AsyncLimitsResourceWithRawResponse:
|
|
|
623
623
|
)
|
|
624
624
|
|
|
625
625
|
@cached_property
|
|
626
|
-
def
|
|
627
|
-
return
|
|
626
|
+
def properties(self) -> AsyncPropertiesResourceWithRawResponse:
|
|
627
|
+
return AsyncPropertiesResourceWithRawResponse(self._limits.properties)
|
|
628
628
|
|
|
629
629
|
|
|
630
630
|
class LimitsResourceWithStreamingResponse:
|
|
@@ -651,8 +651,8 @@ class LimitsResourceWithStreamingResponse:
|
|
|
651
651
|
)
|
|
652
652
|
|
|
653
653
|
@cached_property
|
|
654
|
-
def
|
|
655
|
-
return
|
|
654
|
+
def properties(self) -> PropertiesResourceWithStreamingResponse:
|
|
655
|
+
return PropertiesResourceWithStreamingResponse(self._limits.properties)
|
|
656
656
|
|
|
657
657
|
|
|
658
658
|
class AsyncLimitsResourceWithStreamingResponse:
|
|
@@ -679,5 +679,5 @@ class AsyncLimitsResourceWithStreamingResponse:
|
|
|
679
679
|
)
|
|
680
680
|
|
|
681
681
|
@cached_property
|
|
682
|
-
def
|
|
683
|
-
return
|
|
682
|
+
def properties(self) -> AsyncPropertiesResourceWithStreamingResponse:
|
|
683
|
+
return AsyncPropertiesResourceWithStreamingResponse(self._limits.properties)
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
10
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ..._compat import cached_property
|
|
12
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ..._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ..._base_client import make_request_options
|
|
20
|
+
from ...types.limits import property_update_params
|
|
21
|
+
from ...types.limits.property_update_response import PropertyUpdateResponse
|
|
22
|
+
|
|
23
|
+
__all__ = ["PropertiesResource", "AsyncPropertiesResource"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class PropertiesResource(SyncAPIResource):
|
|
27
|
+
@cached_property
|
|
28
|
+
def with_raw_response(self) -> PropertiesResourceWithRawResponse:
|
|
29
|
+
"""
|
|
30
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
31
|
+
the raw response object instead of the parsed content.
|
|
32
|
+
|
|
33
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
34
|
+
"""
|
|
35
|
+
return PropertiesResourceWithRawResponse(self)
|
|
36
|
+
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_streaming_response(self) -> PropertiesResourceWithStreamingResponse:
|
|
39
|
+
"""
|
|
40
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
43
|
+
"""
|
|
44
|
+
return PropertiesResourceWithStreamingResponse(self)
|
|
45
|
+
|
|
46
|
+
def update(
|
|
47
|
+
self,
|
|
48
|
+
limit_id: str,
|
|
49
|
+
*,
|
|
50
|
+
properties: Dict[str, Optional[str]],
|
|
51
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
52
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
53
|
+
extra_headers: Headers | None = None,
|
|
54
|
+
extra_query: Query | None = None,
|
|
55
|
+
extra_body: Body | None = None,
|
|
56
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
57
|
+
) -> PropertyUpdateResponse:
|
|
58
|
+
"""
|
|
59
|
+
Update a Limit Properties
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
extra_headers: Send extra headers
|
|
63
|
+
|
|
64
|
+
extra_query: Add additional query parameters to the request
|
|
65
|
+
|
|
66
|
+
extra_body: Add additional JSON properties to the request
|
|
67
|
+
|
|
68
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
69
|
+
"""
|
|
70
|
+
if not limit_id:
|
|
71
|
+
raise ValueError(f"Expected a non-empty value for `limit_id` but received {limit_id!r}")
|
|
72
|
+
return self._put(
|
|
73
|
+
f"/api/v1/limits/{limit_id}/properties",
|
|
74
|
+
body=maybe_transform({"properties": properties}, property_update_params.PropertyUpdateParams),
|
|
75
|
+
options=make_request_options(
|
|
76
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
77
|
+
),
|
|
78
|
+
cast_to=PropertyUpdateResponse,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class AsyncPropertiesResource(AsyncAPIResource):
|
|
83
|
+
@cached_property
|
|
84
|
+
def with_raw_response(self) -> AsyncPropertiesResourceWithRawResponse:
|
|
85
|
+
"""
|
|
86
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
87
|
+
the raw response object instead of the parsed content.
|
|
88
|
+
|
|
89
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
|
|
90
|
+
"""
|
|
91
|
+
return AsyncPropertiesResourceWithRawResponse(self)
|
|
92
|
+
|
|
93
|
+
@cached_property
|
|
94
|
+
def with_streaming_response(self) -> AsyncPropertiesResourceWithStreamingResponse:
|
|
95
|
+
"""
|
|
96
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
97
|
+
|
|
98
|
+
For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
|
|
99
|
+
"""
|
|
100
|
+
return AsyncPropertiesResourceWithStreamingResponse(self)
|
|
101
|
+
|
|
102
|
+
async def update(
|
|
103
|
+
self,
|
|
104
|
+
limit_id: str,
|
|
105
|
+
*,
|
|
106
|
+
properties: Dict[str, Optional[str]],
|
|
107
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
108
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
109
|
+
extra_headers: Headers | None = None,
|
|
110
|
+
extra_query: Query | None = None,
|
|
111
|
+
extra_body: Body | None = None,
|
|
112
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
113
|
+
) -> PropertyUpdateResponse:
|
|
114
|
+
"""
|
|
115
|
+
Update a Limit Properties
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
extra_headers: Send extra headers
|
|
119
|
+
|
|
120
|
+
extra_query: Add additional query parameters to the request
|
|
121
|
+
|
|
122
|
+
extra_body: Add additional JSON properties to the request
|
|
123
|
+
|
|
124
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
125
|
+
"""
|
|
126
|
+
if not limit_id:
|
|
127
|
+
raise ValueError(f"Expected a non-empty value for `limit_id` but received {limit_id!r}")
|
|
128
|
+
return await self._put(
|
|
129
|
+
f"/api/v1/limits/{limit_id}/properties",
|
|
130
|
+
body=await async_maybe_transform({"properties": properties}, property_update_params.PropertyUpdateParams),
|
|
131
|
+
options=make_request_options(
|
|
132
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
133
|
+
),
|
|
134
|
+
cast_to=PropertyUpdateResponse,
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
class PropertiesResourceWithRawResponse:
|
|
139
|
+
def __init__(self, properties: PropertiesResource) -> None:
|
|
140
|
+
self._properties = properties
|
|
141
|
+
|
|
142
|
+
self.update = to_raw_response_wrapper(
|
|
143
|
+
properties.update,
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class AsyncPropertiesResourceWithRawResponse:
|
|
148
|
+
def __init__(self, properties: AsyncPropertiesResource) -> None:
|
|
149
|
+
self._properties = properties
|
|
150
|
+
|
|
151
|
+
self.update = async_to_raw_response_wrapper(
|
|
152
|
+
properties.update,
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class PropertiesResourceWithStreamingResponse:
|
|
157
|
+
def __init__(self, properties: PropertiesResource) -> None:
|
|
158
|
+
self._properties = properties
|
|
159
|
+
|
|
160
|
+
self.update = to_streamed_response_wrapper(
|
|
161
|
+
properties.update,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class AsyncPropertiesResourceWithStreamingResponse:
|
|
166
|
+
def __init__(self, properties: AsyncPropertiesResource) -> None:
|
|
167
|
+
self._properties = properties
|
|
168
|
+
|
|
169
|
+
self.update = async_to_streamed_response_wrapper(
|
|
170
|
+
properties.update,
|
|
171
|
+
)
|
|
@@ -56,7 +56,7 @@ class PropertiesResource(SyncAPIResource):
|
|
|
56
56
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
57
57
|
) -> PropertiesResponse:
|
|
58
58
|
"""
|
|
59
|
-
Update Request properties
|
|
59
|
+
Update a Request properties
|
|
60
60
|
|
|
61
61
|
Args:
|
|
62
62
|
extra_headers: Send extra headers
|
|
@@ -112,7 +112,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
|
|
|
112
112
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
113
113
|
) -> PropertiesResponse:
|
|
114
114
|
"""
|
|
115
|
-
Update Request properties
|
|
115
|
+
Update a Request properties
|
|
116
116
|
|
|
117
117
|
Args:
|
|
118
118
|
extra_headers: Send extra headers
|
|
@@ -57,7 +57,7 @@ class PropertiesResource(SyncAPIResource):
|
|
|
57
57
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
58
58
|
) -> PropertiesResponse:
|
|
59
59
|
"""
|
|
60
|
-
Update Request properties
|
|
60
|
+
Update a Request properties
|
|
61
61
|
|
|
62
62
|
Args:
|
|
63
63
|
extra_headers: Send extra headers
|
|
@@ -118,7 +118,7 @@ class AsyncPropertiesResource(AsyncAPIResource):
|
|
|
118
118
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
119
119
|
) -> PropertiesResponse:
|
|
120
120
|
"""
|
|
121
|
-
Update Request properties
|
|
121
|
+
Update a Request properties
|
|
122
122
|
|
|
123
123
|
Args:
|
|
124
124
|
extra_headers: Send extra headers
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
5
|
+
from typing import Dict, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ...._types import Body, Omit, Query, Headers, NotGiven,
|
|
10
|
+
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
11
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from ...._compat import cached_property
|
|
13
13
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -49,8 +49,8 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
49
49
|
use_case_name: str,
|
|
50
50
|
*,
|
|
51
51
|
max: float,
|
|
52
|
-
limit_tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
53
52
|
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
53
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
54
54
|
threshold: Optional[float] | Omit = omit,
|
|
55
55
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
56
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -78,8 +78,8 @@ class LimitConfigResource(SyncAPIResource):
|
|
|
78
78
|
body=maybe_transform(
|
|
79
79
|
{
|
|
80
80
|
"max": max,
|
|
81
|
-
"limit_tags": limit_tags,
|
|
82
81
|
"limit_type": limit_type,
|
|
82
|
+
"properties": properties,
|
|
83
83
|
"threshold": threshold,
|
|
84
84
|
},
|
|
85
85
|
limit_config_create_params.LimitConfigCreateParams,
|
|
@@ -149,8 +149,8 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
149
149
|
use_case_name: str,
|
|
150
150
|
*,
|
|
151
151
|
max: float,
|
|
152
|
-
limit_tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
153
152
|
limit_type: Literal["block", "allow"] | Omit = omit,
|
|
153
|
+
properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
|
|
154
154
|
threshold: Optional[float] | Omit = omit,
|
|
155
155
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
156
156
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -178,8 +178,8 @@ class AsyncLimitConfigResource(AsyncAPIResource):
|
|
|
178
178
|
body=await async_maybe_transform(
|
|
179
179
|
{
|
|
180
180
|
"max": max,
|
|
181
|
-
"limit_tags": limit_tags,
|
|
182
181
|
"limit_type": limit_type,
|
|
182
|
+
"properties": properties,
|
|
183
183
|
"threshold": threshold,
|
|
184
184
|
},
|
|
185
185
|
limit_config_create_params.LimitConfigCreateParams,
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing_extensions import TypedDict
|
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
6
8
|
|
|
7
9
|
__all__ = ["CategoryListResourcesParams"]
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
class CategoryListResourcesParams(TypedDict, total=False):
|
|
13
|
+
active: Annotated[bool, PropertyInfo(alias="Active")]
|
|
14
|
+
|
|
11
15
|
cursor: str
|
|
12
16
|
|
|
13
17
|
limit: int
|