payi 0.1.0a11__tar.gz → 0.1.0a13__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.0a13/.release-please-manifest.json +3 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/CHANGELOG.md +17 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/PKG-INFO +1 -1
- {payi-0.1.0a11 → payi-0.1.0a13}/pyproject.toml +1 -1
- {payi-0.1.0a11 → payi-0.1.0a13}/requirements-dev.lock +2 -1
- {payi-0.1.0a11 → payi-0.1.0a13}/requirements.lock +1 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_base_client.py +16 -6
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_models.py +8 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_version.py +1 -1
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/resources/budgets/budgets.py +1 -3
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/resources/budgets/tags.py +1 -3
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/resources/ingest.py +1 -3
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budget_history_response.py +7 -7
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budget_response.py +20 -4
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/paged_budget_list.py +20 -4
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/proxy_result.py +1 -1
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/requests_data.py +3 -7
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/api_resources/budgets/test_tags.py +36 -36
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/api_resources/test_budgets.py +34 -34
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/api_resources/test_ingest.py +16 -16
- payi-0.1.0a11/.release-please-manifest.json +0 -3
- {payi-0.1.0a11 → payi-0.1.0a13}/.gitignore +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/LICENSE +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/README.md +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/SECURITY.md +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/api.md +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/bin/check-release-environment +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/bin/publish-pypi +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/examples/.keep +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/mypy.ini +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/noxfile.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/release-please-config.json +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/__init__.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_client.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_compat.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_constants.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_files.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_qs.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_resource.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_response.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_types.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/lib/helpers.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/py.typed +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/resources/__init__.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/resources/budgets/__init__.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/__init__.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budget_create_params.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budget_list_params.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budget_update_params.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/__init__.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/budget_tags.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/tag_create_params.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/tag_create_response.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/tag_delete_response.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/tag_list_response.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/tag_remove_params.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/tag_remove_response.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/tag_update_params.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/budgets/tag_update_response.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/cost_details.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/src/payi/types/ingest_units_params.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/__init__.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/api_resources/budgets/__init__.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/conftest.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/sample_file.txt +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_client.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_files.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_models.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_qs.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_required_args.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_response.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_streaming.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_transform.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a11 → payi-0.1.0a13}/tests/utils.py +0 -0
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.13 (2024-07-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.12...v0.1.0-alpha.13](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.12...v0.1.0-alpha.13)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** update via SDK Studio ([#45](https://github.com/Pay-i/pay-i-python/issues/45)) ([8129c56](https://github.com/Pay-i/pay-i-python/commit/8129c56fe00cc676e56e8318533b98be3234cf8f))
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.12 (2024-07-08)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.11...v0.1.0-alpha.12)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** update via SDK Studio ([#42](https://github.com/Pay-i/pay-i-python/issues/42)) ([acfca49](https://github.com/Pay-i/pay-i-python/commit/acfca49e245ef237ca1459f3e80c77e883a7fa4a))
|
|
18
|
+
* **api:** update via SDK Studio ([#44](https://github.com/Pay-i/pay-i-python/issues/44)) ([8623402](https://github.com/Pay-i/pay-i-python/commit/86234024530b7a6b26508c65aad280a3a0fc33c3))
|
|
19
|
+
|
|
3
20
|
## 0.1.0-alpha.11 (2024-07-03)
|
|
4
21
|
|
|
5
22
|
Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
# features: []
|
|
7
7
|
# all-features: true
|
|
8
8
|
# with-sources: false
|
|
9
|
+
# generate-hashes: false
|
|
9
10
|
|
|
10
11
|
-e file:.
|
|
11
12
|
annotated-types==0.6.0
|
|
@@ -48,7 +49,7 @@ markdown-it-py==3.0.0
|
|
|
48
49
|
# via rich
|
|
49
50
|
mdurl==0.1.2
|
|
50
51
|
# via markdown-it-py
|
|
51
|
-
mypy==1.
|
|
52
|
+
mypy==1.10.1
|
|
52
53
|
mypy-extensions==1.0.0
|
|
53
54
|
# via mypy
|
|
54
55
|
nodeenv==1.8.0
|
|
@@ -955,6 +955,11 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
955
955
|
stream: bool,
|
|
956
956
|
stream_cls: type[_StreamT] | None,
|
|
957
957
|
) -> ResponseT | _StreamT:
|
|
958
|
+
# create a copy of the options we were given so that if the
|
|
959
|
+
# options are mutated later & we then retry, the retries are
|
|
960
|
+
# given the original options
|
|
961
|
+
input_options = model_copy(options)
|
|
962
|
+
|
|
958
963
|
cast_to = self._maybe_override_cast_to(cast_to, options)
|
|
959
964
|
self._prepare_options(options)
|
|
960
965
|
|
|
@@ -979,7 +984,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
979
984
|
|
|
980
985
|
if retries > 0:
|
|
981
986
|
return self._retry_request(
|
|
982
|
-
|
|
987
|
+
input_options,
|
|
983
988
|
cast_to,
|
|
984
989
|
retries,
|
|
985
990
|
stream=stream,
|
|
@@ -994,7 +999,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
994
999
|
|
|
995
1000
|
if retries > 0:
|
|
996
1001
|
return self._retry_request(
|
|
997
|
-
|
|
1002
|
+
input_options,
|
|
998
1003
|
cast_to,
|
|
999
1004
|
retries,
|
|
1000
1005
|
stream=stream,
|
|
@@ -1022,7 +1027,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1022
1027
|
if retries > 0 and self._should_retry(err.response):
|
|
1023
1028
|
err.response.close()
|
|
1024
1029
|
return self._retry_request(
|
|
1025
|
-
|
|
1030
|
+
input_options,
|
|
1026
1031
|
cast_to,
|
|
1027
1032
|
retries,
|
|
1028
1033
|
err.response.headers,
|
|
@@ -1518,6 +1523,11 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1518
1523
|
# execute it earlier while we are in an async context
|
|
1519
1524
|
self._platform = await asyncify(get_platform)()
|
|
1520
1525
|
|
|
1526
|
+
# create a copy of the options we were given so that if the
|
|
1527
|
+
# options are mutated later & we then retry, the retries are
|
|
1528
|
+
# given the original options
|
|
1529
|
+
input_options = model_copy(options)
|
|
1530
|
+
|
|
1521
1531
|
cast_to = self._maybe_override_cast_to(cast_to, options)
|
|
1522
1532
|
await self._prepare_options(options)
|
|
1523
1533
|
|
|
@@ -1540,7 +1550,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1540
1550
|
|
|
1541
1551
|
if retries > 0:
|
|
1542
1552
|
return await self._retry_request(
|
|
1543
|
-
|
|
1553
|
+
input_options,
|
|
1544
1554
|
cast_to,
|
|
1545
1555
|
retries,
|
|
1546
1556
|
stream=stream,
|
|
@@ -1555,7 +1565,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1555
1565
|
|
|
1556
1566
|
if retries > 0:
|
|
1557
1567
|
return await self._retry_request(
|
|
1558
|
-
|
|
1568
|
+
input_options,
|
|
1559
1569
|
cast_to,
|
|
1560
1570
|
retries,
|
|
1561
1571
|
stream=stream,
|
|
@@ -1578,7 +1588,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1578
1588
|
if retries > 0 and self._should_retry(err.response):
|
|
1579
1589
|
await err.response.aclose()
|
|
1580
1590
|
return await self._retry_request(
|
|
1581
|
-
|
|
1591
|
+
input_options,
|
|
1582
1592
|
cast_to,
|
|
1583
1593
|
retries,
|
|
1584
1594
|
err.response.headers,
|
|
@@ -643,6 +643,14 @@ def validate_type(*, type_: type[_T], value: object) -> _T:
|
|
|
643
643
|
return cast(_T, _validate_non_model_type(type_=type_, value=value))
|
|
644
644
|
|
|
645
645
|
|
|
646
|
+
def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None:
|
|
647
|
+
"""Add a pydantic config for the given type.
|
|
648
|
+
|
|
649
|
+
Note: this is a no-op on Pydantic v1.
|
|
650
|
+
"""
|
|
651
|
+
setattr(typ, "__pydantic_config__", config) # noqa: B010
|
|
652
|
+
|
|
653
|
+
|
|
646
654
|
# our use of subclasssing here causes weirdness for type checkers,
|
|
647
655
|
# so we just pretend that we don't subclass
|
|
648
656
|
if TYPE_CHECKING:
|
|
@@ -29,9 +29,7 @@ from ..._response import (
|
|
|
29
29
|
async_to_raw_response_wrapper,
|
|
30
30
|
async_to_streamed_response_wrapper,
|
|
31
31
|
)
|
|
32
|
-
from ..._base_client import
|
|
33
|
-
make_request_options,
|
|
34
|
-
)
|
|
32
|
+
from ..._base_client import make_request_options
|
|
35
33
|
from ...types.budget_response import BudgetResponse
|
|
36
34
|
from ...types.default_response import DefaultResponse
|
|
37
35
|
from ...types.paged_budget_list import PagedBudgetList
|
|
@@ -19,9 +19,7 @@ from ..._response import (
|
|
|
19
19
|
async_to_raw_response_wrapper,
|
|
20
20
|
async_to_streamed_response_wrapper,
|
|
21
21
|
)
|
|
22
|
-
from ..._base_client import
|
|
23
|
-
make_request_options,
|
|
24
|
-
)
|
|
22
|
+
from ..._base_client import make_request_options
|
|
25
23
|
from ...types.budgets import tag_create_params, tag_remove_params, tag_update_params
|
|
26
24
|
from ...types.budgets.tag_list_response import TagListResponse
|
|
27
25
|
from ...types.budgets.tag_create_response import TagCreateResponse
|
|
@@ -19,9 +19,7 @@ from .._response import (
|
|
|
19
19
|
async_to_raw_response_wrapper,
|
|
20
20
|
async_to_streamed_response_wrapper,
|
|
21
21
|
)
|
|
22
|
-
from .._base_client import
|
|
23
|
-
make_request_options,
|
|
24
|
-
)
|
|
22
|
+
from .._base_client import make_request_options
|
|
25
23
|
from ..types.proxy_result import ProxyResult
|
|
26
24
|
|
|
27
25
|
__all__ = ["IngestResource", "AsyncIngestResource"]
|
|
@@ -57,11 +57,11 @@ class BudgetHistoryTotalsCostTotal(BaseModel):
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
class BudgetHistoryTotalsCost(BaseModel):
|
|
60
|
-
input:
|
|
60
|
+
input: BudgetHistoryTotalsCostInput
|
|
61
61
|
|
|
62
|
-
output:
|
|
62
|
+
output: BudgetHistoryTotalsCostOutput
|
|
63
63
|
|
|
64
|
-
total:
|
|
64
|
+
total: BudgetHistoryTotalsCostTotal
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
class BudgetHistoryTotalsRequests(BaseModel):
|
|
@@ -77,18 +77,18 @@ class BudgetHistoryTotalsRequests(BaseModel):
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
class BudgetHistoryTotals(BaseModel):
|
|
80
|
-
cost:
|
|
80
|
+
cost: BudgetHistoryTotalsCost
|
|
81
81
|
|
|
82
|
-
requests:
|
|
82
|
+
requests: BudgetHistoryTotalsRequests
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
class BudgetHistory(BaseModel):
|
|
86
|
+
budget_name: Optional[str] = None
|
|
87
|
+
|
|
86
88
|
base_cost_estimate: Optional[Literal["max"]] = None
|
|
87
89
|
|
|
88
90
|
budget_id: Optional[str] = None
|
|
89
91
|
|
|
90
|
-
budget_name: Optional[str] = None
|
|
91
|
-
|
|
92
92
|
budget_reset_timestamp: Optional[datetime] = None
|
|
93
93
|
|
|
94
94
|
budget_response_type: Optional[Literal["block", "allow"]] = None
|
|
@@ -8,13 +8,29 @@ from .._models import BaseModel
|
|
|
8
8
|
from .cost_data import CostData
|
|
9
9
|
from .requests_data import RequestsData
|
|
10
10
|
|
|
11
|
-
__all__ = ["BudgetResponse", "Budget", "BudgetTotals"]
|
|
11
|
+
__all__ = ["BudgetResponse", "Budget", "BudgetTotals", "BudgetTotalsBudgetTransactions"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class BudgetTotalsBudgetTransactions(BaseModel):
|
|
15
|
+
blocked: int
|
|
16
|
+
|
|
17
|
+
blocked_external: int
|
|
18
|
+
|
|
19
|
+
exceeded: int
|
|
20
|
+
|
|
21
|
+
successful: int
|
|
22
|
+
|
|
23
|
+
error: Optional[int] = None
|
|
24
|
+
|
|
25
|
+
total: Optional[int] = None
|
|
12
26
|
|
|
13
27
|
|
|
14
28
|
class BudgetTotals(BaseModel):
|
|
15
|
-
|
|
29
|
+
budget_transactions: BudgetTotalsBudgetTransactions
|
|
30
|
+
|
|
31
|
+
cost: CostData
|
|
16
32
|
|
|
17
|
-
requests:
|
|
33
|
+
requests: RequestsData
|
|
18
34
|
|
|
19
35
|
|
|
20
36
|
class Budget(BaseModel):
|
|
@@ -32,7 +48,7 @@ class Budget(BaseModel):
|
|
|
32
48
|
|
|
33
49
|
budget_update_timestamp: datetime
|
|
34
50
|
|
|
35
|
-
currency:
|
|
51
|
+
currency: Literal["usd"]
|
|
36
52
|
|
|
37
53
|
max: float
|
|
38
54
|
|
|
@@ -10,13 +10,29 @@ from .._models import BaseModel
|
|
|
10
10
|
from .cost_data import CostData
|
|
11
11
|
from .requests_data import RequestsData
|
|
12
12
|
|
|
13
|
-
__all__ = ["PagedBudgetList", "Item", "ItemTotals"]
|
|
13
|
+
__all__ = ["PagedBudgetList", "Item", "ItemTotals", "ItemTotalsBudgetTransactions"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ItemTotalsBudgetTransactions(BaseModel):
|
|
17
|
+
blocked: int
|
|
18
|
+
|
|
19
|
+
blocked_external: int
|
|
20
|
+
|
|
21
|
+
exceeded: int
|
|
22
|
+
|
|
23
|
+
successful: int
|
|
24
|
+
|
|
25
|
+
error: Optional[int] = None
|
|
26
|
+
|
|
27
|
+
total: Optional[int] = None
|
|
14
28
|
|
|
15
29
|
|
|
16
30
|
class ItemTotals(BaseModel):
|
|
17
|
-
|
|
31
|
+
budget_transactions: ItemTotalsBudgetTransactions
|
|
32
|
+
|
|
33
|
+
cost: CostData
|
|
18
34
|
|
|
19
|
-
requests:
|
|
35
|
+
requests: RequestsData
|
|
20
36
|
|
|
21
37
|
|
|
22
38
|
class Item(BaseModel):
|
|
@@ -34,7 +50,7 @@ class Item(BaseModel):
|
|
|
34
50
|
|
|
35
51
|
budget_update_timestamp: datetime
|
|
36
52
|
|
|
37
|
-
currency:
|
|
53
|
+
currency: Literal["usd"]
|
|
38
54
|
|
|
39
55
|
max: float
|
|
40
56
|
|
|
@@ -8,14 +8,10 @@ __all__ = ["RequestsData"]
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class RequestsData(BaseModel):
|
|
11
|
-
blocked:
|
|
11
|
+
blocked: int
|
|
12
12
|
|
|
13
|
-
error:
|
|
13
|
+
error: int
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
failed: Optional[int] = None
|
|
18
|
-
|
|
19
|
-
successful: Optional[int] = None
|
|
15
|
+
successful: int
|
|
20
16
|
|
|
21
17
|
total: Optional[int] = None
|
|
@@ -26,7 +26,7 @@ class TestTags:
|
|
|
26
26
|
@parametrize
|
|
27
27
|
def test_method_create(self, client: Payi) -> None:
|
|
28
28
|
tag = client.budgets.tags.create(
|
|
29
|
-
"
|
|
29
|
+
budget_id="budget_id",
|
|
30
30
|
budget_tags=["tag1", "tag2"],
|
|
31
31
|
)
|
|
32
32
|
assert_matches_type(TagCreateResponse, tag, path=["response"])
|
|
@@ -34,7 +34,7 @@ class TestTags:
|
|
|
34
34
|
@parametrize
|
|
35
35
|
def test_raw_response_create(self, client: Payi) -> None:
|
|
36
36
|
response = client.budgets.tags.with_raw_response.create(
|
|
37
|
-
"
|
|
37
|
+
budget_id="budget_id",
|
|
38
38
|
budget_tags=["tag1", "tag2"],
|
|
39
39
|
)
|
|
40
40
|
|
|
@@ -46,7 +46,7 @@ class TestTags:
|
|
|
46
46
|
@parametrize
|
|
47
47
|
def test_streaming_response_create(self, client: Payi) -> None:
|
|
48
48
|
with client.budgets.tags.with_streaming_response.create(
|
|
49
|
-
"
|
|
49
|
+
budget_id="budget_id",
|
|
50
50
|
budget_tags=["tag1", "tag2"],
|
|
51
51
|
) as response:
|
|
52
52
|
assert not response.is_closed
|
|
@@ -61,14 +61,14 @@ class TestTags:
|
|
|
61
61
|
def test_path_params_create(self, client: Payi) -> None:
|
|
62
62
|
with pytest.raises(ValueError, match=r"Expected a non-empty value for `budget_id` but received ''"):
|
|
63
63
|
client.budgets.tags.with_raw_response.create(
|
|
64
|
-
"",
|
|
64
|
+
budget_id="",
|
|
65
65
|
budget_tags=["tag1", "tag2"],
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
@parametrize
|
|
69
69
|
def test_method_update(self, client: Payi) -> None:
|
|
70
70
|
tag = client.budgets.tags.update(
|
|
71
|
-
"
|
|
71
|
+
budget_id="budget_id",
|
|
72
72
|
budget_tags=["tag1", "tag2"],
|
|
73
73
|
)
|
|
74
74
|
assert_matches_type(TagUpdateResponse, tag, path=["response"])
|
|
@@ -76,7 +76,7 @@ class TestTags:
|
|
|
76
76
|
@parametrize
|
|
77
77
|
def test_raw_response_update(self, client: Payi) -> None:
|
|
78
78
|
response = client.budgets.tags.with_raw_response.update(
|
|
79
|
-
"
|
|
79
|
+
budget_id="budget_id",
|
|
80
80
|
budget_tags=["tag1", "tag2"],
|
|
81
81
|
)
|
|
82
82
|
|
|
@@ -88,7 +88,7 @@ class TestTags:
|
|
|
88
88
|
@parametrize
|
|
89
89
|
def test_streaming_response_update(self, client: Payi) -> None:
|
|
90
90
|
with client.budgets.tags.with_streaming_response.update(
|
|
91
|
-
"
|
|
91
|
+
budget_id="budget_id",
|
|
92
92
|
budget_tags=["tag1", "tag2"],
|
|
93
93
|
) as response:
|
|
94
94
|
assert not response.is_closed
|
|
@@ -103,21 +103,21 @@ class TestTags:
|
|
|
103
103
|
def test_path_params_update(self, client: Payi) -> None:
|
|
104
104
|
with pytest.raises(ValueError, match=r"Expected a non-empty value for `budget_id` but received ''"):
|
|
105
105
|
client.budgets.tags.with_raw_response.update(
|
|
106
|
-
"",
|
|
106
|
+
budget_id="",
|
|
107
107
|
budget_tags=["tag1", "tag2"],
|
|
108
108
|
)
|
|
109
109
|
|
|
110
110
|
@parametrize
|
|
111
111
|
def test_method_list(self, client: Payi) -> None:
|
|
112
112
|
tag = client.budgets.tags.list(
|
|
113
|
-
"
|
|
113
|
+
"budget_id",
|
|
114
114
|
)
|
|
115
115
|
assert_matches_type(TagListResponse, tag, path=["response"])
|
|
116
116
|
|
|
117
117
|
@parametrize
|
|
118
118
|
def test_raw_response_list(self, client: Payi) -> None:
|
|
119
119
|
response = client.budgets.tags.with_raw_response.list(
|
|
120
|
-
"
|
|
120
|
+
"budget_id",
|
|
121
121
|
)
|
|
122
122
|
|
|
123
123
|
assert response.is_closed is True
|
|
@@ -128,7 +128,7 @@ class TestTags:
|
|
|
128
128
|
@parametrize
|
|
129
129
|
def test_streaming_response_list(self, client: Payi) -> None:
|
|
130
130
|
with client.budgets.tags.with_streaming_response.list(
|
|
131
|
-
"
|
|
131
|
+
"budget_id",
|
|
132
132
|
) as response:
|
|
133
133
|
assert not response.is_closed
|
|
134
134
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
@@ -148,14 +148,14 @@ class TestTags:
|
|
|
148
148
|
@parametrize
|
|
149
149
|
def test_method_delete(self, client: Payi) -> None:
|
|
150
150
|
tag = client.budgets.tags.delete(
|
|
151
|
-
"
|
|
151
|
+
"budget_id",
|
|
152
152
|
)
|
|
153
153
|
assert_matches_type(TagDeleteResponse, tag, path=["response"])
|
|
154
154
|
|
|
155
155
|
@parametrize
|
|
156
156
|
def test_raw_response_delete(self, client: Payi) -> None:
|
|
157
157
|
response = client.budgets.tags.with_raw_response.delete(
|
|
158
|
-
"
|
|
158
|
+
"budget_id",
|
|
159
159
|
)
|
|
160
160
|
|
|
161
161
|
assert response.is_closed is True
|
|
@@ -166,7 +166,7 @@ class TestTags:
|
|
|
166
166
|
@parametrize
|
|
167
167
|
def test_streaming_response_delete(self, client: Payi) -> None:
|
|
168
168
|
with client.budgets.tags.with_streaming_response.delete(
|
|
169
|
-
"
|
|
169
|
+
"budget_id",
|
|
170
170
|
) as response:
|
|
171
171
|
assert not response.is_closed
|
|
172
172
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
@@ -186,7 +186,7 @@ class TestTags:
|
|
|
186
186
|
@parametrize
|
|
187
187
|
def test_method_remove(self, client: Payi) -> None:
|
|
188
188
|
tag = client.budgets.tags.remove(
|
|
189
|
-
"
|
|
189
|
+
budget_id="budget_id",
|
|
190
190
|
budget_tags=["tag1", "tag2"],
|
|
191
191
|
)
|
|
192
192
|
assert_matches_type(TagRemoveResponse, tag, path=["response"])
|
|
@@ -194,7 +194,7 @@ class TestTags:
|
|
|
194
194
|
@parametrize
|
|
195
195
|
def test_raw_response_remove(self, client: Payi) -> None:
|
|
196
196
|
response = client.budgets.tags.with_raw_response.remove(
|
|
197
|
-
"
|
|
197
|
+
budget_id="budget_id",
|
|
198
198
|
budget_tags=["tag1", "tag2"],
|
|
199
199
|
)
|
|
200
200
|
|
|
@@ -206,7 +206,7 @@ class TestTags:
|
|
|
206
206
|
@parametrize
|
|
207
207
|
def test_streaming_response_remove(self, client: Payi) -> None:
|
|
208
208
|
with client.budgets.tags.with_streaming_response.remove(
|
|
209
|
-
"
|
|
209
|
+
budget_id="budget_id",
|
|
210
210
|
budget_tags=["tag1", "tag2"],
|
|
211
211
|
) as response:
|
|
212
212
|
assert not response.is_closed
|
|
@@ -221,7 +221,7 @@ class TestTags:
|
|
|
221
221
|
def test_path_params_remove(self, client: Payi) -> None:
|
|
222
222
|
with pytest.raises(ValueError, match=r"Expected a non-empty value for `budget_id` but received ''"):
|
|
223
223
|
client.budgets.tags.with_raw_response.remove(
|
|
224
|
-
"",
|
|
224
|
+
budget_id="",
|
|
225
225
|
budget_tags=["tag1", "tag2"],
|
|
226
226
|
)
|
|
227
227
|
|
|
@@ -232,7 +232,7 @@ class TestAsyncTags:
|
|
|
232
232
|
@parametrize
|
|
233
233
|
async def test_method_create(self, async_client: AsyncPayi) -> None:
|
|
234
234
|
tag = await async_client.budgets.tags.create(
|
|
235
|
-
"
|
|
235
|
+
budget_id="budget_id",
|
|
236
236
|
budget_tags=["tag1", "tag2"],
|
|
237
237
|
)
|
|
238
238
|
assert_matches_type(TagCreateResponse, tag, path=["response"])
|
|
@@ -240,7 +240,7 @@ class TestAsyncTags:
|
|
|
240
240
|
@parametrize
|
|
241
241
|
async def test_raw_response_create(self, async_client: AsyncPayi) -> None:
|
|
242
242
|
response = await async_client.budgets.tags.with_raw_response.create(
|
|
243
|
-
"
|
|
243
|
+
budget_id="budget_id",
|
|
244
244
|
budget_tags=["tag1", "tag2"],
|
|
245
245
|
)
|
|
246
246
|
|
|
@@ -252,7 +252,7 @@ class TestAsyncTags:
|
|
|
252
252
|
@parametrize
|
|
253
253
|
async def test_streaming_response_create(self, async_client: AsyncPayi) -> None:
|
|
254
254
|
async with async_client.budgets.tags.with_streaming_response.create(
|
|
255
|
-
"
|
|
255
|
+
budget_id="budget_id",
|
|
256
256
|
budget_tags=["tag1", "tag2"],
|
|
257
257
|
) as response:
|
|
258
258
|
assert not response.is_closed
|
|
@@ -267,14 +267,14 @@ class TestAsyncTags:
|
|
|
267
267
|
async def test_path_params_create(self, async_client: AsyncPayi) -> None:
|
|
268
268
|
with pytest.raises(ValueError, match=r"Expected a non-empty value for `budget_id` but received ''"):
|
|
269
269
|
await async_client.budgets.tags.with_raw_response.create(
|
|
270
|
-
"",
|
|
270
|
+
budget_id="",
|
|
271
271
|
budget_tags=["tag1", "tag2"],
|
|
272
272
|
)
|
|
273
273
|
|
|
274
274
|
@parametrize
|
|
275
275
|
async def test_method_update(self, async_client: AsyncPayi) -> None:
|
|
276
276
|
tag = await async_client.budgets.tags.update(
|
|
277
|
-
"
|
|
277
|
+
budget_id="budget_id",
|
|
278
278
|
budget_tags=["tag1", "tag2"],
|
|
279
279
|
)
|
|
280
280
|
assert_matches_type(TagUpdateResponse, tag, path=["response"])
|
|
@@ -282,7 +282,7 @@ class TestAsyncTags:
|
|
|
282
282
|
@parametrize
|
|
283
283
|
async def test_raw_response_update(self, async_client: AsyncPayi) -> None:
|
|
284
284
|
response = await async_client.budgets.tags.with_raw_response.update(
|
|
285
|
-
"
|
|
285
|
+
budget_id="budget_id",
|
|
286
286
|
budget_tags=["tag1", "tag2"],
|
|
287
287
|
)
|
|
288
288
|
|
|
@@ -294,7 +294,7 @@ class TestAsyncTags:
|
|
|
294
294
|
@parametrize
|
|
295
295
|
async def test_streaming_response_update(self, async_client: AsyncPayi) -> None:
|
|
296
296
|
async with async_client.budgets.tags.with_streaming_response.update(
|
|
297
|
-
"
|
|
297
|
+
budget_id="budget_id",
|
|
298
298
|
budget_tags=["tag1", "tag2"],
|
|
299
299
|
) as response:
|
|
300
300
|
assert not response.is_closed
|
|
@@ -309,21 +309,21 @@ class TestAsyncTags:
|
|
|
309
309
|
async def test_path_params_update(self, async_client: AsyncPayi) -> None:
|
|
310
310
|
with pytest.raises(ValueError, match=r"Expected a non-empty value for `budget_id` but received ''"):
|
|
311
311
|
await async_client.budgets.tags.with_raw_response.update(
|
|
312
|
-
"",
|
|
312
|
+
budget_id="",
|
|
313
313
|
budget_tags=["tag1", "tag2"],
|
|
314
314
|
)
|
|
315
315
|
|
|
316
316
|
@parametrize
|
|
317
317
|
async def test_method_list(self, async_client: AsyncPayi) -> None:
|
|
318
318
|
tag = await async_client.budgets.tags.list(
|
|
319
|
-
"
|
|
319
|
+
"budget_id",
|
|
320
320
|
)
|
|
321
321
|
assert_matches_type(TagListResponse, tag, path=["response"])
|
|
322
322
|
|
|
323
323
|
@parametrize
|
|
324
324
|
async def test_raw_response_list(self, async_client: AsyncPayi) -> None:
|
|
325
325
|
response = await async_client.budgets.tags.with_raw_response.list(
|
|
326
|
-
"
|
|
326
|
+
"budget_id",
|
|
327
327
|
)
|
|
328
328
|
|
|
329
329
|
assert response.is_closed is True
|
|
@@ -334,7 +334,7 @@ class TestAsyncTags:
|
|
|
334
334
|
@parametrize
|
|
335
335
|
async def test_streaming_response_list(self, async_client: AsyncPayi) -> None:
|
|
336
336
|
async with async_client.budgets.tags.with_streaming_response.list(
|
|
337
|
-
"
|
|
337
|
+
"budget_id",
|
|
338
338
|
) as response:
|
|
339
339
|
assert not response.is_closed
|
|
340
340
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
@@ -354,14 +354,14 @@ class TestAsyncTags:
|
|
|
354
354
|
@parametrize
|
|
355
355
|
async def test_method_delete(self, async_client: AsyncPayi) -> None:
|
|
356
356
|
tag = await async_client.budgets.tags.delete(
|
|
357
|
-
"
|
|
357
|
+
"budget_id",
|
|
358
358
|
)
|
|
359
359
|
assert_matches_type(TagDeleteResponse, tag, path=["response"])
|
|
360
360
|
|
|
361
361
|
@parametrize
|
|
362
362
|
async def test_raw_response_delete(self, async_client: AsyncPayi) -> None:
|
|
363
363
|
response = await async_client.budgets.tags.with_raw_response.delete(
|
|
364
|
-
"
|
|
364
|
+
"budget_id",
|
|
365
365
|
)
|
|
366
366
|
|
|
367
367
|
assert response.is_closed is True
|
|
@@ -372,7 +372,7 @@ class TestAsyncTags:
|
|
|
372
372
|
@parametrize
|
|
373
373
|
async def test_streaming_response_delete(self, async_client: AsyncPayi) -> None:
|
|
374
374
|
async with async_client.budgets.tags.with_streaming_response.delete(
|
|
375
|
-
"
|
|
375
|
+
"budget_id",
|
|
376
376
|
) as response:
|
|
377
377
|
assert not response.is_closed
|
|
378
378
|
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
@@ -392,7 +392,7 @@ class TestAsyncTags:
|
|
|
392
392
|
@parametrize
|
|
393
393
|
async def test_method_remove(self, async_client: AsyncPayi) -> None:
|
|
394
394
|
tag = await async_client.budgets.tags.remove(
|
|
395
|
-
"
|
|
395
|
+
budget_id="budget_id",
|
|
396
396
|
budget_tags=["tag1", "tag2"],
|
|
397
397
|
)
|
|
398
398
|
assert_matches_type(TagRemoveResponse, tag, path=["response"])
|
|
@@ -400,7 +400,7 @@ class TestAsyncTags:
|
|
|
400
400
|
@parametrize
|
|
401
401
|
async def test_raw_response_remove(self, async_client: AsyncPayi) -> None:
|
|
402
402
|
response = await async_client.budgets.tags.with_raw_response.remove(
|
|
403
|
-
"
|
|
403
|
+
budget_id="budget_id",
|
|
404
404
|
budget_tags=["tag1", "tag2"],
|
|
405
405
|
)
|
|
406
406
|
|
|
@@ -412,7 +412,7 @@ class TestAsyncTags:
|
|
|
412
412
|
@parametrize
|
|
413
413
|
async def test_streaming_response_remove(self, async_client: AsyncPayi) -> None:
|
|
414
414
|
async with async_client.budgets.tags.with_streaming_response.remove(
|
|
415
|
-
"
|
|
415
|
+
budget_id="budget_id",
|
|
416
416
|
budget_tags=["tag1", "tag2"],
|
|
417
417
|
) as response:
|
|
418
418
|
assert not response.is_closed
|
|
@@ -427,6 +427,6 @@ class TestAsyncTags:
|
|
|
427
427
|
async def test_path_params_remove(self, async_client: AsyncPayi) -> None:
|
|
428
428
|
with pytest.raises(ValueError, match=r"Expected a non-empty value for `budget_id` but received ''"):
|
|
429
429
|
await async_client.budgets.tags.with_raw_response.remove(
|
|
430
|
-
"",
|
|
430
|
+
budget_id="",
|
|
431
431
|
budget_tags=["tag1", "tag2"],
|
|
432
432
|
)
|