payi 0.1.0a17__tar.gz → 0.1.0a19__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.0a19/.release-please-manifest.json +3 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/CHANGELOG.md +28 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/PKG-INFO +6 -6
- {payi-0.1.0a17 → payi-0.1.0a19}/README.md +5 -5
- {payi-0.1.0a17 → payi-0.1.0a19}/api.md +3 -3
- {payi-0.1.0a17 → payi-0.1.0a19}/pyproject.toml +5 -3
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_client.py +24 -24
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_version.py +1 -1
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/categories/resources.py +16 -16
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/ingest.py +6 -5
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/__init__.py +1 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/category_resource_response.py +2 -0
- payi-0.1.0a19/src/payi/types/ingest_bulk_params.py +14 -0
- payi-0.1.0a17/src/payi/types/ingest_bulk_params.py → payi-0.1.0a19/src/payi/types/ingest_event_param.py +3 -6
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/categories/test_resources.py +28 -28
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/conftest.py +3 -3
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_client.py +63 -127
- payi-0.1.0a17/.release-please-manifest.json +0 -3
- {payi-0.1.0a17 → payi-0.1.0a19}/.gitignore +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/LICENSE +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/SECURITY.md +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/bin/check-release-environment +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/bin/publish-pypi +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/examples/.keep +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/mypy.ini +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/noxfile.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/release-please-config.json +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/requirements-dev.lock +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/requirements.lock +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_base_client.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_compat.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_constants.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_files.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_models.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_qs.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_resource.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_types.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/lib/helpers.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/py.typed +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/budgets/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/budgets/budgets.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/budgets/tags.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/categories/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/categories/categories.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/experiences/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/experiences/experiences.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/resources/experiences/types.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budget_create_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budget_history_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budget_list_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budget_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budget_update_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/budget_tags.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/tag_create_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/tag_create_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/tag_delete_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/tag_list_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/tag_remove_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/tag_remove_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/tag_update_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/budgets/tag_update_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/bulk_ingest_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/categories/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/categories/resource_create_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/categories/resource_list_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/category_delete_resource_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/category_delete_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/category_list_resources_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/category_list_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/category_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/cost_details.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/experience_instance.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/experiences/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/experiences/experience_type.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/experiences/type_create_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/experiences/type_list_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/experiences/type_update_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/ingest_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/ingest_units_params.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/paged_budget_list.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/requests_data.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/src/payi/types/total_cost_data.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/budgets/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/budgets/test_tags.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/categories/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/experiences/__init__.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/experiences/test_types.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/test_budgets.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/test_categories.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/test_experiences.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/api_resources/test_ingest.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/sample_file.txt +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_files.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_models.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_qs.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_required_args.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_response.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_streaming.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_transform.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a17 → payi-0.1.0a19}/tests/utils.py +0 -0
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.19 (2024-08-09)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.18...v0.1.0-alpha.19)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** update via SDK Studio ([#89](https://github.com/Pay-i/pay-i-python/issues/89)) ([b031428](https://github.com/Pay-i/pay-i-python/commit/b03142879e9d1798d08288578d078eab98e86353))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **ci:** bump prism mock server version ([#91](https://github.com/Pay-i/pay-i-python/issues/91)) ([6cd2937](https://github.com/Pay-i/pay-i-python/commit/6cd29379f24f7a7d261ed6beea8e4833e01eacfd))
|
|
15
|
+
* **internal:** ensure package is importable in lint cmd ([#92](https://github.com/Pay-i/pay-i-python/issues/92)) ([5af85e5](https://github.com/Pay-i/pay-i-python/commit/5af85e57dac94be4da96b45b406e683701150365))
|
|
16
|
+
|
|
17
|
+
## 0.1.0-alpha.18 (2024-08-08)
|
|
18
|
+
|
|
19
|
+
Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **api:** update via SDK Studio ([#83](https://github.com/Pay-i/pay-i-python/issues/83)) ([c78b273](https://github.com/Pay-i/pay-i-python/commit/c78b273d807606abe94212e0092eff80895da96d))
|
|
24
|
+
* **api:** update via SDK Studio ([#86](https://github.com/Pay-i/pay-i-python/issues/86)) ([ea1bc86](https://github.com/Pay-i/pay-i-python/commit/ea1bc86c6a3671b49ba7394841b5534d7e8c0263))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Chores
|
|
28
|
+
|
|
29
|
+
* **internal:** remove deprecated ruff config ([#85](https://github.com/Pay-i/pay-i-python/issues/85)) ([744ae88](https://github.com/Pay-i/pay-i-python/commit/744ae888b57aa5a424e4a4729d7c0e85776b6d08))
|
|
30
|
+
|
|
3
31
|
## 0.1.0-alpha.17 (2024-08-07)
|
|
4
32
|
|
|
5
33
|
Full Changelog: [v0.1.0-alpha.16...v0.1.0-alpha.17](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.16...v0.1.0-alpha.17)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: payi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a19
|
|
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,7 +63,7 @@ from payi import Payi
|
|
|
63
63
|
|
|
64
64
|
client = Payi(
|
|
65
65
|
# This is the default and can be omitted
|
|
66
|
-
|
|
66
|
+
api_key=os.environ.get("PAYI_API_KEY"),
|
|
67
67
|
)
|
|
68
68
|
|
|
69
69
|
budget_response = client.budgets.create(
|
|
@@ -73,10 +73,10 @@ budget_response = client.budgets.create(
|
|
|
73
73
|
print(budget_response.request_id)
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
While you can provide
|
|
76
|
+
While you can provide an `api_key` keyword argument,
|
|
77
77
|
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
|
|
78
|
-
to add `PAYI_API_KEY="My
|
|
79
|
-
so that your
|
|
78
|
+
to add `PAYI_API_KEY="My API Key"` to your `.env` file
|
|
79
|
+
so that your API Key is not stored in source control.
|
|
80
80
|
|
|
81
81
|
## Async usage
|
|
82
82
|
|
|
@@ -89,7 +89,7 @@ from payi import AsyncPayi
|
|
|
89
89
|
|
|
90
90
|
client = AsyncPayi(
|
|
91
91
|
# This is the default and can be omitted
|
|
92
|
-
|
|
92
|
+
api_key=os.environ.get("PAYI_API_KEY"),
|
|
93
93
|
)
|
|
94
94
|
|
|
95
95
|
|
|
@@ -29,7 +29,7 @@ from payi import Payi
|
|
|
29
29
|
|
|
30
30
|
client = Payi(
|
|
31
31
|
# This is the default and can be omitted
|
|
32
|
-
|
|
32
|
+
api_key=os.environ.get("PAYI_API_KEY"),
|
|
33
33
|
)
|
|
34
34
|
|
|
35
35
|
budget_response = client.budgets.create(
|
|
@@ -39,10 +39,10 @@ budget_response = client.budgets.create(
|
|
|
39
39
|
print(budget_response.request_id)
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
While you can provide
|
|
42
|
+
While you can provide an `api_key` keyword argument,
|
|
43
43
|
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
|
|
44
|
-
to add `PAYI_API_KEY="My
|
|
45
|
-
so that your
|
|
44
|
+
to add `PAYI_API_KEY="My API Key"` to your `.env` file
|
|
45
|
+
so that your API Key is not stored in source control.
|
|
46
46
|
|
|
47
47
|
## Async usage
|
|
48
48
|
|
|
@@ -55,7 +55,7 @@ from payi import AsyncPayi
|
|
|
55
55
|
|
|
56
56
|
client = AsyncPayi(
|
|
57
57
|
# This is the default and can be omitted
|
|
58
|
-
|
|
58
|
+
api_key=os.environ.get("PAYI_API_KEY"),
|
|
59
59
|
)
|
|
60
60
|
|
|
61
61
|
|
|
@@ -52,7 +52,7 @@ Methods:
|
|
|
52
52
|
Types:
|
|
53
53
|
|
|
54
54
|
```python
|
|
55
|
-
from payi.types import BulkIngestResponse, IngestEvent, IngestResponse
|
|
55
|
+
from payi.types import BulkIngestResponse, IngestEvent, IngestResponse, IngestUnits
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
Methods:
|
|
@@ -93,9 +93,9 @@ from payi.types.categories import ResourceListResponse
|
|
|
93
93
|
Methods:
|
|
94
94
|
|
|
95
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}/{
|
|
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
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}/{
|
|
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
99
|
|
|
100
100
|
# Experiences
|
|
101
101
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "payi"
|
|
3
|
-
version = "0.1.0-alpha.
|
|
3
|
+
version = "0.1.0-alpha.19"
|
|
4
4
|
description = "The official Python library for the payi API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -76,10 +76,13 @@ format = { chain = [
|
|
|
76
76
|
"lint" = { chain = [
|
|
77
77
|
"check:ruff",
|
|
78
78
|
"typecheck",
|
|
79
|
+
"check:importable",
|
|
79
80
|
]}
|
|
80
81
|
"check:ruff" = "ruff check ."
|
|
81
82
|
"fix:ruff" = "ruff check --fix ."
|
|
82
83
|
|
|
84
|
+
"check:importable" = "python -c 'import payi'"
|
|
85
|
+
|
|
83
86
|
typecheck = { chain = [
|
|
84
87
|
"typecheck:pyright",
|
|
85
88
|
"typecheck:mypy"
|
|
@@ -195,7 +198,6 @@ unfixable = [
|
|
|
195
198
|
"T201",
|
|
196
199
|
"T203",
|
|
197
200
|
]
|
|
198
|
-
ignore-init-module-imports = true
|
|
199
201
|
|
|
200
202
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
|
201
203
|
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
|
|
@@ -207,7 +209,7 @@ combine-as-imports = true
|
|
|
207
209
|
extra-standard-library = ["typing_extensions"]
|
|
208
210
|
known-first-party = ["payi", "tests"]
|
|
209
211
|
|
|
210
|
-
[tool.ruff.per-file-ignores]
|
|
212
|
+
[tool.ruff.lint.per-file-ignores]
|
|
211
213
|
"bin/**.py" = ["T201", "T203"]
|
|
212
214
|
"scripts/**.py" = ["T201", "T203"]
|
|
213
215
|
"tests/**.py" = ["T201", "T203"]
|
|
@@ -54,12 +54,12 @@ class Payi(SyncAPIClient):
|
|
|
54
54
|
with_streaming_response: PayiWithStreamedResponse
|
|
55
55
|
|
|
56
56
|
# client options
|
|
57
|
-
|
|
57
|
+
api_key: str
|
|
58
58
|
|
|
59
59
|
def __init__(
|
|
60
60
|
self,
|
|
61
61
|
*,
|
|
62
|
-
|
|
62
|
+
api_key: str | None = None,
|
|
63
63
|
base_url: str | httpx.URL | None = None,
|
|
64
64
|
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
|
|
65
65
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
@@ -81,15 +81,15 @@ class Payi(SyncAPIClient):
|
|
|
81
81
|
) -> None:
|
|
82
82
|
"""Construct a new synchronous payi client instance.
|
|
83
83
|
|
|
84
|
-
This automatically infers the `
|
|
84
|
+
This automatically infers the `api_key` argument from the `PAYI_API_KEY` environment variable if it is not provided.
|
|
85
85
|
"""
|
|
86
|
-
if
|
|
87
|
-
|
|
88
|
-
if
|
|
86
|
+
if api_key is None:
|
|
87
|
+
api_key = os.environ.get("PAYI_API_KEY")
|
|
88
|
+
if api_key is None:
|
|
89
89
|
raise PayiError(
|
|
90
|
-
"The
|
|
90
|
+
"The api_key client option must be set either by passing api_key to the client or by setting the PAYI_API_KEY environment variable"
|
|
91
91
|
)
|
|
92
|
-
self.
|
|
92
|
+
self.api_key = api_key
|
|
93
93
|
|
|
94
94
|
if base_url is None:
|
|
95
95
|
base_url = os.environ.get("PAYI_BASE_URL")
|
|
@@ -122,8 +122,8 @@ class Payi(SyncAPIClient):
|
|
|
122
122
|
@property
|
|
123
123
|
@override
|
|
124
124
|
def auth_headers(self) -> dict[str, str]:
|
|
125
|
-
|
|
126
|
-
return {"Authorization":
|
|
125
|
+
api_key = self.api_key
|
|
126
|
+
return {"Authorization": api_key}
|
|
127
127
|
|
|
128
128
|
@property
|
|
129
129
|
@override
|
|
@@ -137,7 +137,7 @@ class Payi(SyncAPIClient):
|
|
|
137
137
|
def copy(
|
|
138
138
|
self,
|
|
139
139
|
*,
|
|
140
|
-
|
|
140
|
+
api_key: str | None = None,
|
|
141
141
|
base_url: str | httpx.URL | None = None,
|
|
142
142
|
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
|
|
143
143
|
http_client: httpx.Client | None = None,
|
|
@@ -171,7 +171,7 @@ class Payi(SyncAPIClient):
|
|
|
171
171
|
|
|
172
172
|
http_client = http_client or self._client
|
|
173
173
|
return self.__class__(
|
|
174
|
-
|
|
174
|
+
api_key=api_key or self.api_key,
|
|
175
175
|
base_url=base_url or self.base_url,
|
|
176
176
|
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
|
|
177
177
|
http_client=http_client,
|
|
@@ -228,12 +228,12 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
228
228
|
with_streaming_response: AsyncPayiWithStreamedResponse
|
|
229
229
|
|
|
230
230
|
# client options
|
|
231
|
-
|
|
231
|
+
api_key: str
|
|
232
232
|
|
|
233
233
|
def __init__(
|
|
234
234
|
self,
|
|
235
235
|
*,
|
|
236
|
-
|
|
236
|
+
api_key: str | None = None,
|
|
237
237
|
base_url: str | httpx.URL | None = None,
|
|
238
238
|
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
|
|
239
239
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
@@ -255,15 +255,15 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
255
255
|
) -> None:
|
|
256
256
|
"""Construct a new async payi client instance.
|
|
257
257
|
|
|
258
|
-
This automatically infers the `
|
|
258
|
+
This automatically infers the `api_key` argument from the `PAYI_API_KEY` environment variable if it is not provided.
|
|
259
259
|
"""
|
|
260
|
-
if
|
|
261
|
-
|
|
262
|
-
if
|
|
260
|
+
if api_key is None:
|
|
261
|
+
api_key = os.environ.get("PAYI_API_KEY")
|
|
262
|
+
if api_key is None:
|
|
263
263
|
raise PayiError(
|
|
264
|
-
"The
|
|
264
|
+
"The api_key client option must be set either by passing api_key to the client or by setting the PAYI_API_KEY environment variable"
|
|
265
265
|
)
|
|
266
|
-
self.
|
|
266
|
+
self.api_key = api_key
|
|
267
267
|
|
|
268
268
|
if base_url is None:
|
|
269
269
|
base_url = os.environ.get("PAYI_BASE_URL")
|
|
@@ -296,8 +296,8 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
296
296
|
@property
|
|
297
297
|
@override
|
|
298
298
|
def auth_headers(self) -> dict[str, str]:
|
|
299
|
-
|
|
300
|
-
return {"Authorization":
|
|
299
|
+
api_key = self.api_key
|
|
300
|
+
return {"Authorization": api_key}
|
|
301
301
|
|
|
302
302
|
@property
|
|
303
303
|
@override
|
|
@@ -311,7 +311,7 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
311
311
|
def copy(
|
|
312
312
|
self,
|
|
313
313
|
*,
|
|
314
|
-
|
|
314
|
+
api_key: str | None = None,
|
|
315
315
|
base_url: str | httpx.URL | None = None,
|
|
316
316
|
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
|
|
317
317
|
http_client: httpx.AsyncClient | None = None,
|
|
@@ -345,7 +345,7 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
345
345
|
|
|
346
346
|
http_client = http_client or self._client
|
|
347
347
|
return self.__class__(
|
|
348
|
-
|
|
348
|
+
api_key=api_key or self.api_key,
|
|
349
349
|
base_url=base_url or self.base_url,
|
|
350
350
|
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
|
|
351
351
|
http_client=http_client,
|
|
@@ -90,7 +90,7 @@ class ResourcesResource(SyncAPIResource):
|
|
|
90
90
|
|
|
91
91
|
def retrieve(
|
|
92
92
|
self,
|
|
93
|
-
|
|
93
|
+
resource_id: str,
|
|
94
94
|
*,
|
|
95
95
|
category: str,
|
|
96
96
|
resource: str,
|
|
@@ -117,10 +117,10 @@ class ResourcesResource(SyncAPIResource):
|
|
|
117
117
|
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
118
118
|
if not resource:
|
|
119
119
|
raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
|
|
120
|
-
if not
|
|
121
|
-
raise ValueError(f"Expected a non-empty value for `
|
|
120
|
+
if not resource_id:
|
|
121
|
+
raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
|
|
122
122
|
return self._get(
|
|
123
|
-
f"/api/v1/categories/{category}/resources/{resource}/{
|
|
123
|
+
f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
|
|
124
124
|
options=make_request_options(
|
|
125
125
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
126
126
|
),
|
|
@@ -165,7 +165,7 @@ class ResourcesResource(SyncAPIResource):
|
|
|
165
165
|
|
|
166
166
|
def delete(
|
|
167
167
|
self,
|
|
168
|
-
|
|
168
|
+
resource_id: str,
|
|
169
169
|
*,
|
|
170
170
|
category: str,
|
|
171
171
|
resource: str,
|
|
@@ -192,10 +192,10 @@ class ResourcesResource(SyncAPIResource):
|
|
|
192
192
|
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
193
193
|
if not resource:
|
|
194
194
|
raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
|
|
195
|
-
if not
|
|
196
|
-
raise ValueError(f"Expected a non-empty value for `
|
|
195
|
+
if not resource_id:
|
|
196
|
+
raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
|
|
197
197
|
return self._delete(
|
|
198
|
-
f"/api/v1/categories/{category}/resources/{resource}/{
|
|
198
|
+
f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
|
|
199
199
|
options=make_request_options(
|
|
200
200
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
201
201
|
),
|
|
@@ -265,7 +265,7 @@ class AsyncResourcesResource(AsyncAPIResource):
|
|
|
265
265
|
|
|
266
266
|
async def retrieve(
|
|
267
267
|
self,
|
|
268
|
-
|
|
268
|
+
resource_id: str,
|
|
269
269
|
*,
|
|
270
270
|
category: str,
|
|
271
271
|
resource: str,
|
|
@@ -292,10 +292,10 @@ class AsyncResourcesResource(AsyncAPIResource):
|
|
|
292
292
|
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
293
293
|
if not resource:
|
|
294
294
|
raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
|
|
295
|
-
if not
|
|
296
|
-
raise ValueError(f"Expected a non-empty value for `
|
|
295
|
+
if not resource_id:
|
|
296
|
+
raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
|
|
297
297
|
return await self._get(
|
|
298
|
-
f"/api/v1/categories/{category}/resources/{resource}/{
|
|
298
|
+
f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
|
|
299
299
|
options=make_request_options(
|
|
300
300
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
301
301
|
),
|
|
@@ -340,7 +340,7 @@ class AsyncResourcesResource(AsyncAPIResource):
|
|
|
340
340
|
|
|
341
341
|
async def delete(
|
|
342
342
|
self,
|
|
343
|
-
|
|
343
|
+
resource_id: str,
|
|
344
344
|
*,
|
|
345
345
|
category: str,
|
|
346
346
|
resource: str,
|
|
@@ -367,10 +367,10 @@ class AsyncResourcesResource(AsyncAPIResource):
|
|
|
367
367
|
raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
|
|
368
368
|
if not resource:
|
|
369
369
|
raise ValueError(f"Expected a non-empty value for `resource` but received {resource!r}")
|
|
370
|
-
if not
|
|
371
|
-
raise ValueError(f"Expected a non-empty value for `
|
|
370
|
+
if not resource_id:
|
|
371
|
+
raise ValueError(f"Expected a non-empty value for `resource_id` but received {resource_id!r}")
|
|
372
372
|
return await self._delete(
|
|
373
|
-
f"/api/v1/categories/{category}/resources/{resource}/{
|
|
373
|
+
f"/api/v1/categories/{category}/resources/{resource}/{resource_id}",
|
|
374
374
|
options=make_request_options(
|
|
375
375
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
376
376
|
),
|
|
@@ -7,7 +7,7 @@ from datetime import datetime
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ..types import
|
|
10
|
+
from ..types import ingest_units_params
|
|
11
11
|
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
12
12
|
from .._utils import (
|
|
13
13
|
maybe_transform,
|
|
@@ -24,6 +24,7 @@ from .._response import (
|
|
|
24
24
|
)
|
|
25
25
|
from .._base_client import make_request_options
|
|
26
26
|
from ..types.ingest_response import IngestResponse
|
|
27
|
+
from ..types.ingest_event_param import IngestEventParam
|
|
27
28
|
from ..types.bulk_ingest_response import BulkIngestResponse
|
|
28
29
|
|
|
29
30
|
__all__ = ["IngestResource", "AsyncIngestResource"]
|
|
@@ -41,7 +42,7 @@ class IngestResource(SyncAPIResource):
|
|
|
41
42
|
def bulk(
|
|
42
43
|
self,
|
|
43
44
|
*,
|
|
44
|
-
events: Iterable[
|
|
45
|
+
events: Iterable[IngestEventParam],
|
|
45
46
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
46
47
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
47
48
|
extra_headers: Headers | None = None,
|
|
@@ -66,7 +67,7 @@ class IngestResource(SyncAPIResource):
|
|
|
66
67
|
"""
|
|
67
68
|
return self._post(
|
|
68
69
|
"/api/v1/ingest/bulk",
|
|
69
|
-
body=maybe_transform(events, Iterable[
|
|
70
|
+
body=maybe_transform(events, Iterable[IngestEventParam]),
|
|
70
71
|
options=make_request_options(
|
|
71
72
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
72
73
|
),
|
|
@@ -191,7 +192,7 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
191
192
|
async def bulk(
|
|
192
193
|
self,
|
|
193
194
|
*,
|
|
194
|
-
events: Iterable[
|
|
195
|
+
events: Iterable[IngestEventParam],
|
|
195
196
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
196
197
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
197
198
|
extra_headers: Headers | None = None,
|
|
@@ -215,7 +216,7 @@ class AsyncIngestResource(AsyncAPIResource):
|
|
|
215
216
|
"""
|
|
216
217
|
return await self._post(
|
|
217
218
|
"/api/v1/ingest/bulk",
|
|
218
|
-
body=await async_maybe_transform(events, Iterable[
|
|
219
|
+
body=await async_maybe_transform(events, Iterable[IngestEventParam]),
|
|
219
220
|
options=make_request_options(
|
|
220
221
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
221
222
|
),
|
|
@@ -13,6 +13,7 @@ from .category_response import CategoryResponse as CategoryResponse
|
|
|
13
13
|
from .paged_budget_list import PagedBudgetList as PagedBudgetList
|
|
14
14
|
from .budget_list_params import BudgetListParams as BudgetListParams
|
|
15
15
|
from .ingest_bulk_params import IngestBulkParams as IngestBulkParams
|
|
16
|
+
from .ingest_event_param import IngestEventParam as IngestEventParam
|
|
16
17
|
from .experience_instance import ExperienceInstance as ExperienceInstance
|
|
17
18
|
from .ingest_units_params import IngestUnitsParams as IngestUnitsParams
|
|
18
19
|
from .budget_create_params import BudgetCreateParams as BudgetCreateParams
|
|
@@ -0,0 +1,14 @@
|
|
|
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 Iterable
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .ingest_event_param import IngestEventParam
|
|
9
|
+
|
|
10
|
+
__all__ = ["IngestBulkParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class IngestBulkParams(TypedDict, total=False):
|
|
14
|
+
events: Required[Iterable[IngestEventParam]]
|
|
@@ -2,19 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Union,
|
|
5
|
+
from typing import List, Union, Optional
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing_extensions import Required, Annotated, TypedDict
|
|
8
8
|
|
|
9
9
|
from .._utils import PropertyInfo
|
|
10
10
|
|
|
11
|
-
__all__ = ["
|
|
11
|
+
__all__ = ["IngestEventParam"]
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
15
|
-
events: Required[Iterable[Event]]
|
|
16
|
-
|
|
17
|
-
class Event(TypedDict, total=False):
|
|
14
|
+
class IngestEventParam(TypedDict, total=False):
|
|
18
15
|
category: Required[str]
|
|
19
16
|
|
|
20
17
|
input: Required[int]
|