payi 0.1.0a9__tar.gz → 0.1.0a10__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.

Files changed (94) hide show
  1. payi-0.1.0a10/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a9 → payi-0.1.0a10}/CHANGELOG.md +8 -0
  3. {payi-0.1.0a9 → payi-0.1.0a10}/PKG-INFO +1 -1
  4. {payi-0.1.0a9 → payi-0.1.0a10}/pyproject.toml +1 -1
  5. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_base_client.py +18 -2
  6. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_version.py +1 -1
  7. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/resources/budgets/budgets.py +42 -48
  8. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/resources/ingest.py +10 -7
  9. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budget_create_params.py +3 -3
  10. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budget_history_response.py +5 -5
  11. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budget_response.py +3 -3
  12. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/paged_budget_list.py +3 -3
  13. {payi-0.1.0a9 → payi-0.1.0a10}/tests/api_resources/test_budgets.py +6 -6
  14. payi-0.1.0a9/.release-please-manifest.json +0 -3
  15. {payi-0.1.0a9 → payi-0.1.0a10}/.gitignore +0 -0
  16. {payi-0.1.0a9 → payi-0.1.0a10}/CONTRIBUTING.md +0 -0
  17. {payi-0.1.0a9 → payi-0.1.0a10}/LICENSE +0 -0
  18. {payi-0.1.0a9 → payi-0.1.0a10}/README.md +0 -0
  19. {payi-0.1.0a9 → payi-0.1.0a10}/SECURITY.md +0 -0
  20. {payi-0.1.0a9 → payi-0.1.0a10}/api.md +0 -0
  21. {payi-0.1.0a9 → payi-0.1.0a10}/bin/check-release-environment +0 -0
  22. {payi-0.1.0a9 → payi-0.1.0a10}/bin/publish-pypi +0 -0
  23. {payi-0.1.0a9 → payi-0.1.0a10}/examples/.keep +0 -0
  24. {payi-0.1.0a9 → payi-0.1.0a10}/mypy.ini +0 -0
  25. {payi-0.1.0a9 → payi-0.1.0a10}/noxfile.py +0 -0
  26. {payi-0.1.0a9 → payi-0.1.0a10}/release-please-config.json +0 -0
  27. {payi-0.1.0a9 → payi-0.1.0a10}/requirements-dev.lock +0 -0
  28. {payi-0.1.0a9 → payi-0.1.0a10}/requirements.lock +0 -0
  29. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/__init__.py +0 -0
  30. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_client.py +0 -0
  31. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_compat.py +0 -0
  32. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_constants.py +0 -0
  33. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_exceptions.py +0 -0
  34. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_files.py +0 -0
  35. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_models.py +0 -0
  36. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_qs.py +0 -0
  37. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_resource.py +0 -0
  38. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_response.py +0 -0
  39. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_streaming.py +0 -0
  40. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_types.py +0 -0
  41. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_utils/__init__.py +0 -0
  42. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_utils/_logs.py +0 -0
  43. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_utils/_proxy.py +0 -0
  44. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_utils/_reflection.py +0 -0
  45. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_utils/_streams.py +0 -0
  46. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_utils/_sync.py +0 -0
  47. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_utils/_transform.py +0 -0
  48. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_utils/_typing.py +0 -0
  49. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/_utils/_utils.py +0 -0
  50. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/lib/.keep +0 -0
  51. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/lib/helpers.py +0 -0
  52. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/py.typed +0 -0
  53. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/resources/__init__.py +0 -0
  54. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/resources/budgets/__init__.py +0 -0
  55. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/resources/budgets/tags.py +0 -0
  56. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/__init__.py +0 -0
  57. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budget_list_params.py +0 -0
  58. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budget_update_params.py +0 -0
  59. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/__init__.py +0 -0
  60. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/budget_tags.py +0 -0
  61. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/tag_create_params.py +0 -0
  62. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/tag_create_response.py +0 -0
  63. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/tag_delete_response.py +0 -0
  64. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/tag_list_response.py +0 -0
  65. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/tag_remove_params.py +0 -0
  66. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/tag_remove_response.py +0 -0
  67. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/tag_update_params.py +0 -0
  68. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/budgets/tag_update_response.py +0 -0
  69. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/cost_data.py +0 -0
  70. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/cost_details.py +0 -0
  71. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/default_response.py +0 -0
  72. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/ingest_units_params.py +0 -0
  73. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/proxy_result.py +0 -0
  74. {payi-0.1.0a9 → payi-0.1.0a10}/src/payi/types/requests_data.py +0 -0
  75. {payi-0.1.0a9 → payi-0.1.0a10}/tests/__init__.py +0 -0
  76. {payi-0.1.0a9 → payi-0.1.0a10}/tests/api_resources/__init__.py +0 -0
  77. {payi-0.1.0a9 → payi-0.1.0a10}/tests/api_resources/budgets/__init__.py +0 -0
  78. {payi-0.1.0a9 → payi-0.1.0a10}/tests/api_resources/budgets/test_tags.py +0 -0
  79. {payi-0.1.0a9 → payi-0.1.0a10}/tests/api_resources/test_ingest.py +0 -0
  80. {payi-0.1.0a9 → payi-0.1.0a10}/tests/conftest.py +0 -0
  81. {payi-0.1.0a9 → payi-0.1.0a10}/tests/sample_file.txt +0 -0
  82. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_client.py +0 -0
  83. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_deepcopy.py +0 -0
  84. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_extract_files.py +0 -0
  85. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_files.py +0 -0
  86. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_models.py +0 -0
  87. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_qs.py +0 -0
  88. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_required_args.py +0 -0
  89. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_response.py +0 -0
  90. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_streaming.py +0 -0
  91. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_transform.py +0 -0
  92. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_utils/test_proxy.py +0 -0
  93. {payi-0.1.0a9 → payi-0.1.0a10}/tests/test_utils/test_typing.py +0 -0
  94. {payi-0.1.0a9 → payi-0.1.0a10}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.10"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.10 (2024-07-02)
4
+
5
+ Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.9...v0.1.0-alpha.10)
6
+
7
+ ### Features
8
+
9
+ * **api:** update via SDK Studio ([#37](https://github.com/Pay-i/pay-i-python/issues/37)) ([b794015](https://github.com/Pay-i/pay-i-python/commit/b7940155a65297fda08c4022417a2d78ced5ee3f))
10
+
3
11
  ## 0.1.0-alpha.9 (2024-07-02)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a9
3
+ Version: 0.1.0a10
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.9"
3
+ version = "0.1.0-alpha.10"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -58,6 +58,7 @@ from ._types import (
58
58
  HttpxSendArgs,
59
59
  AsyncTransport,
60
60
  RequestOptions,
61
+ HttpxRequestFiles,
61
62
  ModelBuilderProtocol,
62
63
  )
63
64
  from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
@@ -459,6 +460,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
459
460
  headers = self._build_headers(options)
460
461
  params = _merge_mappings(self.default_query, options.params)
461
462
  content_type = headers.get("Content-Type")
463
+ files = options.files
462
464
 
463
465
  # If the given Content-Type header is multipart/form-data then it
464
466
  # has to be removed so that httpx can generate the header with
@@ -472,7 +474,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
472
474
  headers.pop("Content-Type")
473
475
 
474
476
  # As we are now sending multipart/form-data instead of application/json
475
- # we need to tell httpx to use it, https://www.python-httpx.org/advanced/#multipart-file-encoding
477
+ # we need to tell httpx to use it, https://www.python-httpx.org/advanced/clients/#multipart-file-encoding
476
478
  if json_data:
477
479
  if not is_dict(json_data):
478
480
  raise TypeError(
@@ -480,6 +482,15 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
480
482
  )
481
483
  kwargs["data"] = self._serialize_multipartform(json_data)
482
484
 
485
+ # httpx determines whether or not to send a "multipart/form-data"
486
+ # request based on the truthiness of the "files" argument.
487
+ # This gets around that issue by generating a dict value that
488
+ # evaluates to true.
489
+ #
490
+ # https://github.com/encode/httpx/discussions/2399#discussioncomment-3814186
491
+ if not files:
492
+ files = cast(HttpxRequestFiles, ForceMultipartDict())
493
+
483
494
  # TODO: report this error to httpx
484
495
  return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
485
496
  headers=headers,
@@ -492,7 +503,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
492
503
  # https://github.com/microsoft/pyright/issues/3526#event-6715453066
493
504
  params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
494
505
  json=json_data,
495
- files=options.files,
506
+ files=files,
496
507
  **kwargs,
497
508
  )
498
509
 
@@ -1863,6 +1874,11 @@ def make_request_options(
1863
1874
  return options
1864
1875
 
1865
1876
 
1877
+ class ForceMultipartDict(Dict[str, None]):
1878
+ def __bool__(self) -> bool:
1879
+ return True
1880
+
1881
+
1866
1882
  class OtherPlatform:
1867
1883
  def __init__(self, name: str) -> None:
1868
1884
  self.name = name
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "payi"
4
- __version__ = "0.1.0-alpha.9" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.10" # x-release-please-version
@@ -58,10 +58,10 @@ class BudgetsResource(SyncAPIResource):
58
58
  *,
59
59
  budget_name: str,
60
60
  max: float,
61
- base_cost_estimate: Literal["Max"] | NotGiven = NOT_GIVEN,
62
- budget_response_type: Literal["Block", "Allow"] | NotGiven = NOT_GIVEN,
61
+ base_cost_estimate: Literal["max"] | NotGiven = NOT_GIVEN,
62
+ budget_response_type: Literal["block", "allow"] | NotGiven = NOT_GIVEN,
63
63
  budget_tags: Optional[List[str]] | NotGiven = NOT_GIVEN,
64
- budget_type: Literal["Conservative", "Liberal"] | NotGiven = NOT_GIVEN,
64
+ budget_type: Literal["conservative", "liberal"] | NotGiven = NOT_GIVEN,
65
65
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
66
66
  # The extra values given here take precedence over values defined on the client or passed to this method.
67
67
  extra_headers: Headers | None = None,
@@ -73,13 +73,16 @@ class BudgetsResource(SyncAPIResource):
73
73
  Create a Budget
74
74
 
75
75
  Args:
76
- extra_headers: Send extra headers
77
-
78
- extra_query: Add additional query parameters to the request
79
-
80
- extra_body: Add additional JSON properties to the request
81
-
82
- timeout: Override the client-level default timeout for this request, in seconds
76
+ budget_name (str): The name of the budget.
77
+ max (float): The maximum budget amount.
78
+ base_cost_estimate (Union[float, Literal['max']], optional): The base cost estimate. Defaults to 'max'.
79
+ budget_response_type (Literal['block', 'allow'], optional): The budget response type. Defaults to 'block'.
80
+ budget_tags (Union[List[str], None], optional): List of budget tags. Defaults to None.
81
+ budget_type (Literal['conservative', 'liberal'], optional): The budget type. Defaults to 'conservative'.
82
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
83
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
84
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
85
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
83
86
  """
84
87
  return self._post(
85
88
  "/api/v1/budgets",
@@ -115,13 +118,11 @@ class BudgetsResource(SyncAPIResource):
115
118
  Get a Budget's details
116
119
 
117
120
  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
121
+ budget_id (str): The ID of the budget.
122
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
123
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
124
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
125
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
125
126
  """
126
127
  if not budget_id:
127
128
  raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
@@ -150,13 +151,13 @@ class BudgetsResource(SyncAPIResource):
150
151
  Update a Budget
151
152
 
152
153
  Args:
153
- extra_headers: Send extra headers
154
-
155
- extra_query: Add additional query parameters to the request
156
-
157
- extra_body: Add additional JSON properties to the request
158
-
159
- timeout: Override the client-level default timeout for this request, in seconds
154
+ budget_id (str): The ID of the budget.
155
+ budget_name (Union[str, optional]): The updated name of the budget. Defaults to None.
156
+ max (Union[float, optional])): The maximum budget amount. Defaults to None.
157
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
158
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
159
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
160
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
160
161
  """
161
162
  if not budget_id:
162
163
  raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
@@ -195,13 +196,10 @@ class BudgetsResource(SyncAPIResource):
195
196
  Get all Budgets
196
197
 
197
198
  Args:
198
- extra_headers: Send extra headers
199
-
200
- extra_query: Add additional query parameters to the request
201
-
202
- extra_body: Add additional JSON properties to the request
203
-
204
- timeout: Override the client-level default timeout for this request, in seconds
199
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
200
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
201
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
202
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
205
203
  """
206
204
  return self._get(
207
205
  "/api/v1/budgets",
@@ -240,13 +238,11 @@ class BudgetsResource(SyncAPIResource):
240
238
  Delete a Budget
241
239
 
242
240
  Args:
243
- extra_headers: Send extra headers
244
-
245
- extra_query: Add additional query parameters to the request
246
-
247
- extra_body: Add additional JSON properties to the request
248
-
249
- timeout: Override the client-level default timeout for this request, in seconds
241
+ budget_id (str): The ID of the budget.
242
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
243
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
244
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
245
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
250
246
  """
251
247
  if not budget_id:
252
248
  raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
@@ -273,13 +269,11 @@ class BudgetsResource(SyncAPIResource):
273
269
  Reset the Budget
274
270
 
275
271
  Args:
276
- extra_headers: Send extra headers
277
-
278
- extra_query: Add additional query parameters to the request
279
-
280
- extra_body: Add additional JSON properties to the request
281
-
282
- timeout: Override the client-level default timeout for this request, in seconds
272
+ budget_id (str): The ID of the budget.
273
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
274
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
275
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
276
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
283
277
  """
284
278
  if not budget_id:
285
279
  raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
@@ -310,10 +304,10 @@ class AsyncBudgetsResource(AsyncAPIResource):
310
304
  *,
311
305
  budget_name: str,
312
306
  max: float,
313
- base_cost_estimate: Literal["Max"] | NotGiven = NOT_GIVEN,
314
- budget_response_type: Literal["Block", "Allow"] | NotGiven = NOT_GIVEN,
307
+ base_cost_estimate: Literal["max"] | NotGiven = NOT_GIVEN,
308
+ budget_response_type: Literal["block", "allow"] | NotGiven = NOT_GIVEN,
315
309
  budget_tags: Optional[List[str]] | NotGiven = NOT_GIVEN,
316
- budget_type: Literal["Conservative", "Liberal"] | NotGiven = NOT_GIVEN,
310
+ budget_type: Literal["conservative", "liberal"] | NotGiven = NOT_GIVEN,
317
311
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
318
312
  # The extra values given here take precedence over values defined on the client or passed to this method.
319
313
  extra_headers: Headers | None = None,
@@ -56,13 +56,16 @@ class IngestResource(SyncAPIResource):
56
56
  Ingest a request
57
57
 
58
58
  Args:
59
- extra_headers: Send extra headers
60
-
61
- extra_query: Add additional query parameters to the request
62
-
63
- extra_body: Add additional JSON properties to the request
64
-
65
- timeout: Override the client-level default timeout for this request, in seconds
59
+ category (str): The name of the category
60
+ resource (str): The name of the resource.
61
+ input (int): The number of input units
62
+ output (int): The number of output units
63
+ budget_ids (list[str], optional): The budget IDs to associate with the request. Defaults to None.
64
+ request_tags (list[str], optional): The request tags to associate with the request. Defaults to None.
65
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
66
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
67
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
68
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
66
69
  """
67
70
  valid_ids_str: str | NotGiven = NOT_GIVEN
68
71
  valid_tags_str: str | NotGiven = NOT_GIVEN
@@ -13,10 +13,10 @@ class BudgetCreateParams(TypedDict, total=False):
13
13
 
14
14
  max: Required[float]
15
15
 
16
- base_cost_estimate: Literal["Max"]
16
+ base_cost_estimate: Literal["max"]
17
17
 
18
- budget_response_type: Literal["Block", "Allow"]
18
+ budget_response_type: Literal["block", "allow"]
19
19
 
20
20
  budget_tags: Optional[List[str]]
21
21
 
22
- budget_type: Literal["Conservative", "Liberal"]
22
+ budget_type: Literal["conservative", "liberal"]
@@ -83,22 +83,22 @@ class BudgetHistoryTotals(BaseModel):
83
83
 
84
84
 
85
85
  class BudgetHistory(BaseModel):
86
- base_cost_estimate: Optional[Literal["Max"]] = None
86
+ base_cost_estimate: Optional[Literal["max"]] = None
87
87
 
88
88
  budget_id: Optional[str] = None
89
89
 
90
90
  budget_name: Optional[str] = None
91
91
 
92
- budget_response_type: Optional[Literal["Block", "Allow"]] = None
92
+ budget_reset_timestamp: Optional[datetime] = None
93
+
94
+ budget_response_type: Optional[Literal["block", "allow"]] = None
93
95
 
94
96
  budget_tags: Optional[List[str]] = None
95
97
 
96
- budget_type: Optional[Literal["Conservative", "Liberal"]] = None
98
+ budget_type: Optional[Literal["conservative", "liberal"]] = None
97
99
 
98
100
  max: Optional[float] = None
99
101
 
100
- reset_date: Optional[datetime] = None
101
-
102
102
  totals: Optional[BudgetHistoryTotals] = None
103
103
 
104
104
 
@@ -18,7 +18,7 @@ class BudgetTotals(BaseModel):
18
18
 
19
19
 
20
20
  class Budget(BaseModel):
21
- base_cost_estimate: Literal["Max"]
21
+ base_cost_estimate: Literal["max"]
22
22
 
23
23
  budget_creation_timestamp: datetime
24
24
 
@@ -26,9 +26,9 @@ class Budget(BaseModel):
26
26
 
27
27
  budget_name: str
28
28
 
29
- budget_response_type: Literal["Block", "Allow"]
29
+ budget_response_type: Literal["block", "allow"]
30
30
 
31
- budget_type: Literal["Conservative", "Liberal"]
31
+ budget_type: Literal["conservative", "liberal"]
32
32
 
33
33
  budget_update_timestamp: datetime
34
34
 
@@ -20,7 +20,7 @@ class ItemTotals(BaseModel):
20
20
 
21
21
 
22
22
  class Item(BaseModel):
23
- base_cost_estimate: Literal["Max"]
23
+ base_cost_estimate: Literal["max"]
24
24
 
25
25
  budget_creation_timestamp: datetime
26
26
 
@@ -28,9 +28,9 @@ class Item(BaseModel):
28
28
 
29
29
  budget_name: str
30
30
 
31
- budget_response_type: Literal["Block", "Allow"]
31
+ budget_response_type: Literal["block", "allow"]
32
32
 
33
- budget_type: Literal["Conservative", "Liberal"]
33
+ budget_type: Literal["conservative", "liberal"]
34
34
 
35
35
  budget_update_timestamp: datetime
36
36
 
@@ -35,10 +35,10 @@ class TestBudgets:
35
35
  budget = client.budgets.create(
36
36
  budget_name="x",
37
37
  max=1,
38
- base_cost_estimate="Max",
39
- budget_response_type="Block",
38
+ base_cost_estimate="max",
39
+ budget_response_type="block",
40
40
  budget_tags=["tag1", "tag2"],
41
- budget_type="Conservative",
41
+ budget_type="conservative",
42
42
  )
43
43
  assert_matches_type(BudgetResponse, budget, path=["response"])
44
44
 
@@ -287,10 +287,10 @@ class TestAsyncBudgets:
287
287
  budget = await async_client.budgets.create(
288
288
  budget_name="x",
289
289
  max=1,
290
- base_cost_estimate="Max",
291
- budget_response_type="Block",
290
+ base_cost_estimate="max",
291
+ budget_response_type="block",
292
292
  budget_tags=["tag1", "tag2"],
293
- budget_type="Conservative",
293
+ budget_type="conservative",
294
294
  )
295
295
  assert_matches_type(BudgetResponse, budget, path=["response"])
296
296
 
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.9"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes