payi 0.1.0a9__tar.gz → 0.1.0a11__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.0a11/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a9 → payi-0.1.0a11}/CHANGELOG.md +17 -0
  3. {payi-0.1.0a9 → payi-0.1.0a11}/PKG-INFO +1 -1
  4. {payi-0.1.0a9 → payi-0.1.0a11}/pyproject.toml +1 -1
  5. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_base_client.py +18 -2
  6. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_version.py +1 -1
  7. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/resources/budgets/budgets.py +46 -48
  8. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/resources/ingest.py +10 -7
  9. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budget_create_params.py +5 -3
  10. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budget_history_response.py +5 -5
  11. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budget_response.py +3 -3
  12. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/paged_budget_list.py +3 -3
  13. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/proxy_result.py +2 -1
  14. {payi-0.1.0a9 → payi-0.1.0a11}/tests/api_resources/test_budgets.py +8 -6
  15. payi-0.1.0a9/.release-please-manifest.json +0 -3
  16. {payi-0.1.0a9 → payi-0.1.0a11}/.gitignore +0 -0
  17. {payi-0.1.0a9 → payi-0.1.0a11}/CONTRIBUTING.md +0 -0
  18. {payi-0.1.0a9 → payi-0.1.0a11}/LICENSE +0 -0
  19. {payi-0.1.0a9 → payi-0.1.0a11}/README.md +0 -0
  20. {payi-0.1.0a9 → payi-0.1.0a11}/SECURITY.md +0 -0
  21. {payi-0.1.0a9 → payi-0.1.0a11}/api.md +0 -0
  22. {payi-0.1.0a9 → payi-0.1.0a11}/bin/check-release-environment +0 -0
  23. {payi-0.1.0a9 → payi-0.1.0a11}/bin/publish-pypi +0 -0
  24. {payi-0.1.0a9 → payi-0.1.0a11}/examples/.keep +0 -0
  25. {payi-0.1.0a9 → payi-0.1.0a11}/mypy.ini +0 -0
  26. {payi-0.1.0a9 → payi-0.1.0a11}/noxfile.py +0 -0
  27. {payi-0.1.0a9 → payi-0.1.0a11}/release-please-config.json +0 -0
  28. {payi-0.1.0a9 → payi-0.1.0a11}/requirements-dev.lock +0 -0
  29. {payi-0.1.0a9 → payi-0.1.0a11}/requirements.lock +0 -0
  30. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/__init__.py +0 -0
  31. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_client.py +0 -0
  32. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_compat.py +0 -0
  33. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_constants.py +0 -0
  34. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_exceptions.py +0 -0
  35. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_files.py +0 -0
  36. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_models.py +0 -0
  37. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_qs.py +0 -0
  38. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_resource.py +0 -0
  39. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_response.py +0 -0
  40. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_streaming.py +0 -0
  41. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_types.py +0 -0
  42. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_utils/__init__.py +0 -0
  43. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_utils/_logs.py +0 -0
  44. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_utils/_proxy.py +0 -0
  45. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_utils/_reflection.py +0 -0
  46. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_utils/_streams.py +0 -0
  47. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_utils/_sync.py +0 -0
  48. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_utils/_transform.py +0 -0
  49. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_utils/_typing.py +0 -0
  50. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/_utils/_utils.py +0 -0
  51. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/lib/.keep +0 -0
  52. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/lib/helpers.py +0 -0
  53. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/py.typed +0 -0
  54. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/resources/__init__.py +0 -0
  55. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/resources/budgets/__init__.py +0 -0
  56. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/resources/budgets/tags.py +0 -0
  57. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/__init__.py +0 -0
  58. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budget_list_params.py +0 -0
  59. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budget_update_params.py +0 -0
  60. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/__init__.py +0 -0
  61. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/budget_tags.py +0 -0
  62. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/tag_create_params.py +0 -0
  63. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/tag_create_response.py +0 -0
  64. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/tag_delete_response.py +0 -0
  65. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/tag_list_response.py +0 -0
  66. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/tag_remove_params.py +0 -0
  67. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/tag_remove_response.py +0 -0
  68. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/tag_update_params.py +0 -0
  69. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/budgets/tag_update_response.py +0 -0
  70. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/cost_data.py +0 -0
  71. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/cost_details.py +0 -0
  72. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/default_response.py +0 -0
  73. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/ingest_units_params.py +0 -0
  74. {payi-0.1.0a9 → payi-0.1.0a11}/src/payi/types/requests_data.py +0 -0
  75. {payi-0.1.0a9 → payi-0.1.0a11}/tests/__init__.py +0 -0
  76. {payi-0.1.0a9 → payi-0.1.0a11}/tests/api_resources/__init__.py +0 -0
  77. {payi-0.1.0a9 → payi-0.1.0a11}/tests/api_resources/budgets/__init__.py +0 -0
  78. {payi-0.1.0a9 → payi-0.1.0a11}/tests/api_resources/budgets/test_tags.py +0 -0
  79. {payi-0.1.0a9 → payi-0.1.0a11}/tests/api_resources/test_ingest.py +0 -0
  80. {payi-0.1.0a9 → payi-0.1.0a11}/tests/conftest.py +0 -0
  81. {payi-0.1.0a9 → payi-0.1.0a11}/tests/sample_file.txt +0 -0
  82. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_client.py +0 -0
  83. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_deepcopy.py +0 -0
  84. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_extract_files.py +0 -0
  85. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_files.py +0 -0
  86. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_models.py +0 -0
  87. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_qs.py +0 -0
  88. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_required_args.py +0 -0
  89. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_response.py +0 -0
  90. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_streaming.py +0 -0
  91. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_transform.py +0 -0
  92. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_utils/test_proxy.py +0 -0
  93. {payi-0.1.0a9 → payi-0.1.0a11}/tests/test_utils/test_typing.py +0 -0
  94. {payi-0.1.0a9 → payi-0.1.0a11}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.11"
3
+ }
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.11 (2024-07-03)
4
+
5
+ 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
+
7
+ ### Features
8
+
9
+ * **api:** update via SDK Studio ([#39](https://github.com/Pay-i/pay-i-python/issues/39)) ([924942e](https://github.com/Pay-i/pay-i-python/commit/924942ed83577f9d6d6bc9709d22e5423a2c50b4))
10
+ * **api:** update via SDK Studio ([#41](https://github.com/Pay-i/pay-i-python/issues/41)) ([5fb515c](https://github.com/Pay-i/pay-i-python/commit/5fb515c9399354230bda965857e2dfa090db83b7))
11
+
12
+ ## 0.1.0-alpha.10 (2024-07-02)
13
+
14
+ 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)
15
+
16
+ ### Features
17
+
18
+ * **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))
19
+
3
20
  ## 0.1.0-alpha.9 (2024-07-02)
4
21
 
5
22
  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.0a11
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.11"
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.11" # x-release-please-version
@@ -58,10 +58,11 @@ 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
+ currency: Literal["usd"] | NotGiven = NOT_GIVEN,
65
66
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
66
67
  # The extra values given here take precedence over values defined on the client or passed to this method.
67
68
  extra_headers: Headers | None = None,
@@ -73,13 +74,16 @@ class BudgetsResource(SyncAPIResource):
73
74
  Create a Budget
74
75
 
75
76
  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
77
+ budget_name (str): The name of the budget.
78
+ max (float): The maximum budget amount.
79
+ base_cost_estimate (Union[float, Literal['max']], optional): The base cost estimate. Defaults to 'max'.
80
+ budget_response_type (Literal['block', 'allow'], optional): The budget response type. Defaults to 'block'.
81
+ budget_tags (Union[List[str], None], optional): List of budget tags. Defaults to None.
82
+ budget_type (Literal['conservative', 'liberal'], optional): The budget type. Defaults to 'conservative'.
83
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
84
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
85
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
86
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
83
87
  """
84
88
  return self._post(
85
89
  "/api/v1/budgets",
@@ -91,6 +95,7 @@ class BudgetsResource(SyncAPIResource):
91
95
  "budget_response_type": budget_response_type,
92
96
  "budget_tags": budget_tags,
93
97
  "budget_type": budget_type,
98
+ "currency": currency,
94
99
  },
95
100
  budget_create_params.BudgetCreateParams,
96
101
  ),
@@ -115,13 +120,11 @@ class BudgetsResource(SyncAPIResource):
115
120
  Get a Budget's details
116
121
 
117
122
  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
123
+ budget_id (str): The ID of the budget.
124
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
125
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
126
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
127
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
125
128
  """
126
129
  if not budget_id:
127
130
  raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
@@ -150,13 +153,13 @@ class BudgetsResource(SyncAPIResource):
150
153
  Update a Budget
151
154
 
152
155
  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
156
+ budget_id (str): The ID of the budget.
157
+ budget_name (Union[str, optional]): The updated name of the budget. Defaults to None.
158
+ max (Union[float, optional])): The maximum budget amount. Defaults to None.
159
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
160
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
161
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
162
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
160
163
  """
161
164
  if not budget_id:
162
165
  raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
@@ -195,13 +198,10 @@ class BudgetsResource(SyncAPIResource):
195
198
  Get all Budgets
196
199
 
197
200
  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
201
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
202
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
203
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
204
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
205
205
  """
206
206
  return self._get(
207
207
  "/api/v1/budgets",
@@ -240,13 +240,11 @@ class BudgetsResource(SyncAPIResource):
240
240
  Delete a Budget
241
241
 
242
242
  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
243
+ budget_id (str): The ID of the budget.
244
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
245
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
246
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
247
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
250
248
  """
251
249
  if not budget_id:
252
250
  raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
@@ -273,13 +271,11 @@ class BudgetsResource(SyncAPIResource):
273
271
  Reset the Budget
274
272
 
275
273
  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
274
+ budget_id (str): The ID of the budget.
275
+ extra_headers (Dict[str, str], optional): Additional headers for the request. Defaults to None.
276
+ extra_query (Dict[str, str], optional): Additional query parameters. Defaults to None.
277
+ extra_body (Dict[str, Any], optional): Additional body parameters. Defaults to None.
278
+ timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
283
279
  """
284
280
  if not budget_id:
285
281
  raise ValueError(f"Expected a non-empty value for `budget_id` but received {budget_id!r}")
@@ -310,10 +306,11 @@ class AsyncBudgetsResource(AsyncAPIResource):
310
306
  *,
311
307
  budget_name: str,
312
308
  max: float,
313
- base_cost_estimate: Literal["Max"] | NotGiven = NOT_GIVEN,
314
- budget_response_type: Literal["Block", "Allow"] | NotGiven = NOT_GIVEN,
309
+ base_cost_estimate: Literal["max"] | NotGiven = NOT_GIVEN,
310
+ budget_response_type: Literal["block", "allow"] | NotGiven = NOT_GIVEN,
315
311
  budget_tags: Optional[List[str]] | NotGiven = NOT_GIVEN,
316
- budget_type: Literal["Conservative", "Liberal"] | NotGiven = NOT_GIVEN,
312
+ budget_type: Literal["conservative", "liberal"] | NotGiven = NOT_GIVEN,
313
+ currency: Literal["usd"] | NotGiven = NOT_GIVEN,
317
314
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
318
315
  # The extra values given here take precedence over values defined on the client or passed to this method.
319
316
  extra_headers: Headers | None = None,
@@ -343,6 +340,7 @@ class AsyncBudgetsResource(AsyncAPIResource):
343
340
  "budget_response_type": budget_response_type,
344
341
  "budget_tags": budget_tags,
345
342
  "budget_type": budget_type,
343
+ "currency": currency,
346
344
  },
347
345
  budget_create_params.BudgetCreateParams,
348
346
  ),
@@ -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,12 @@ 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"]
23
+
24
+ currency: Literal["usd"]
@@ -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
 
@@ -1,6 +1,7 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from typing import Dict, List, Optional
4
+ from typing_extensions import Literal
4
5
 
5
6
  from .._models import BaseModel
6
7
  from .cost_details import CostDetails
@@ -13,7 +14,7 @@ class Budgets(BaseModel):
13
14
 
14
15
 
15
16
  class Cost(BaseModel):
16
- currency: Optional[str] = None
17
+ currency: Optional[Literal["usd"]] = None
17
18
 
18
19
  input: Optional[CostDetails] = None
19
20
 
@@ -35,10 +35,11 @@ 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
+ currency="usd",
42
43
  )
43
44
  assert_matches_type(BudgetResponse, budget, path=["response"])
44
45
 
@@ -287,10 +288,11 @@ class TestAsyncBudgets:
287
288
  budget = await async_client.budgets.create(
288
289
  budget_name="x",
289
290
  max=1,
290
- base_cost_estimate="Max",
291
- budget_response_type="Block",
291
+ base_cost_estimate="max",
292
+ budget_response_type="block",
292
293
  budget_tags=["tag1", "tag2"],
293
- budget_type="Conservative",
294
+ budget_type="conservative",
295
+ currency="usd",
294
296
  )
295
297
  assert_matches_type(BudgetResponse, budget, path=["response"])
296
298
 
@@ -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