payi 0.1.0a14__py3-none-any.whl → 0.1.0a15__py3-none-any.whl

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.
payi/_version.py CHANGED
@@ -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.14" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.15" # x-release-please-version
@@ -57,7 +57,7 @@ class BudgetsResource(SyncAPIResource):
57
57
  budget_name: str,
58
58
  max: float,
59
59
  base_cost_estimate: Literal["max"] | NotGiven = NOT_GIVEN,
60
- billing_model_id: Optional[int] | NotGiven = NOT_GIVEN,
60
+ billing_model_id: Optional[str] | NotGiven = NOT_GIVEN,
61
61
  budget_response_type: Literal["block", "allow"] | NotGiven = NOT_GIVEN,
62
62
  budget_tags: Optional[List[str]] | NotGiven = NOT_GIVEN,
63
63
  budget_type: Literal["conservative", "liberal"] | NotGiven = NOT_GIVEN,
@@ -309,7 +309,7 @@ class AsyncBudgetsResource(AsyncAPIResource):
309
309
  budget_name: str,
310
310
  max: float,
311
311
  base_cost_estimate: Literal["max"] | NotGiven = NOT_GIVEN,
312
- billing_model_id: Optional[int] | NotGiven = NOT_GIVEN,
312
+ billing_model_id: Optional[str] | NotGiven = NOT_GIVEN,
313
313
  budget_response_type: Literal["block", "allow"] | NotGiven = NOT_GIVEN,
314
314
  budget_tags: Optional[List[str]] | NotGiven = NOT_GIVEN,
315
315
  budget_type: Literal["conservative", "liberal"] | NotGiven = NOT_GIVEN,
@@ -42,11 +42,11 @@ class ResourcesResource(SyncAPIResource):
42
42
  resource: str,
43
43
  *,
44
44
  category: str,
45
- start_timestamp: Union[str, datetime],
46
45
  input_price: float | NotGiven = NOT_GIVEN,
47
46
  max_input_units: int | NotGiven = NOT_GIVEN,
48
47
  max_output_units: int | NotGiven = NOT_GIVEN,
49
48
  output_price: float | NotGiven = NOT_GIVEN,
49
+ start_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
50
50
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
51
51
  # The extra values given here take precedence over values defined on the client or passed to this method.
52
52
  extra_headers: Headers | None = None,
@@ -74,11 +74,11 @@ class ResourcesResource(SyncAPIResource):
74
74
  f"/api/v1/categories/{category}/resources/{resource}",
75
75
  body=maybe_transform(
76
76
  {
77
- "start_timestamp": start_timestamp,
78
77
  "input_price": input_price,
79
78
  "max_input_units": max_input_units,
80
79
  "max_output_units": max_output_units,
81
80
  "output_price": output_price,
81
+ "start_timestamp": start_timestamp,
82
82
  },
83
83
  resource_create_params.ResourceCreateParams,
84
84
  ),
@@ -217,11 +217,11 @@ class AsyncResourcesResource(AsyncAPIResource):
217
217
  resource: str,
218
218
  *,
219
219
  category: str,
220
- start_timestamp: Union[str, datetime],
221
220
  input_price: float | NotGiven = NOT_GIVEN,
222
221
  max_input_units: int | NotGiven = NOT_GIVEN,
223
222
  max_output_units: int | NotGiven = NOT_GIVEN,
224
223
  output_price: float | NotGiven = NOT_GIVEN,
224
+ start_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
225
225
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
226
226
  # The extra values given here take precedence over values defined on the client or passed to this method.
227
227
  extra_headers: Headers | None = None,
@@ -249,11 +249,11 @@ class AsyncResourcesResource(AsyncAPIResource):
249
249
  f"/api/v1/categories/{category}/resources/{resource}",
250
250
  body=await async_maybe_transform(
251
251
  {
252
- "start_timestamp": start_timestamp,
253
252
  "input_price": input_price,
254
253
  "max_input_units": max_input_units,
255
254
  "max_output_units": max_output_units,
256
255
  "output_price": output_price,
256
+ "start_timestamp": start_timestamp,
257
257
  },
258
258
  resource_create_params.ResourceCreateParams,
259
259
  ),
payi/resources/ingest.py CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Union
5
+ from typing import Dict, Union, Iterable, cast
6
6
  from datetime import datetime
7
7
 
8
8
  import httpx
9
9
 
10
- from ..types import ingest_units_params
10
+ from ..types import ingest_bulk_params, ingest_units_params
11
11
  from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
12
12
  from .._utils import (
13
13
  maybe_transform,
@@ -23,7 +23,9 @@ from .._response import (
23
23
  async_to_streamed_response_wrapper,
24
24
  )
25
25
  from .._base_client import make_request_options
26
- from ..types.proxy_result import ProxyResult
26
+ from ..types.ingest_response import IngestResponse
27
+ from ..types.ingest_units_param import IngestUnitsParam
28
+ from ..types.bulk_ingest_response import BulkIngestResponse
27
29
 
28
30
  __all__ = ["IngestResource", "AsyncIngestResource"]
29
31
 
@@ -37,6 +39,46 @@ class IngestResource(SyncAPIResource):
37
39
  def with_streaming_response(self) -> IngestResourceWithStreamingResponse:
38
40
  return IngestResourceWithStreamingResponse(self)
39
41
 
42
+ def bulk(
43
+ self,
44
+ *,
45
+ items: Iterable[IngestUnitsParam],
46
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
47
+ # The extra values given here take precedence over values defined on the client or passed to this method.
48
+ extra_headers: Headers | None = None,
49
+ extra_query: Query | None = None,
50
+ extra_body: Body | None = None,
51
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
52
+ ) -> BulkIngestResponse:
53
+ """
54
+ Bulk Ingest
55
+
56
+ Args:
57
+
58
+ items (Iterable[IngestUnitsParams]): The items to ingest
59
+
60
+ extra_headers: Send extra headers
61
+
62
+ extra_query: Add additional query parameters to the request
63
+
64
+ extra_body: Add additional JSON properties to the request
65
+
66
+ timeout: Override the client-level default timeout for this request, in seconds
67
+ """
68
+ return self._post(
69
+ "/api/v1/ingest/bulk",
70
+ body=cast(Dict[str, object], maybe_transform(
71
+ {
72
+ "items": items,
73
+ },
74
+ ingest_bulk_params.IngestBulkParams)
75
+ )["items"],
76
+ options=make_request_options(
77
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
78
+ ),
79
+ cast_to=BulkIngestResponse,
80
+ )
81
+
40
82
  def units(
41
83
  self,
42
84
  *,
@@ -53,7 +95,7 @@ class IngestResource(SyncAPIResource):
53
95
  extra_query: Query | None = None,
54
96
  extra_body: Body | None = None,
55
97
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
56
- ) -> ProxyResult:
98
+ ) -> IngestResponse:
57
99
  """
58
100
  Ingest a request
59
101
 
@@ -66,7 +108,7 @@ class IngestResource(SyncAPIResource):
66
108
 
67
109
  output (int): The number of output units
68
110
 
69
- event_timestamp: (datetime, None): The timestamp of the event. Defaults to None.
111
+ event_timestamp: (str, datetime, None): The timestamp of the event. Defaults to None.
70
112
 
71
113
  budget_ids (list[str], optional): The budget IDs to associate with the request. Defaults to None.
72
114
 
@@ -125,7 +167,7 @@ class IngestResource(SyncAPIResource):
125
167
  options=make_request_options(
126
168
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
127
169
  ),
128
- cast_to=ProxyResult,
170
+ cast_to=IngestResponse,
129
171
  )
130
172
 
131
173
 
@@ -138,6 +180,46 @@ class AsyncIngestResource(AsyncAPIResource):
138
180
  def with_streaming_response(self) -> AsyncIngestResourceWithStreamingResponse:
139
181
  return AsyncIngestResourceWithStreamingResponse(self)
140
182
 
183
+ async def bulk(
184
+ self,
185
+ *,
186
+ items: Iterable[IngestUnitsParam],
187
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
188
+ # The extra values given here take precedence over values defined on the client or passed to this method.
189
+ extra_headers: Headers | None = None,
190
+ extra_query: Query | None = None,
191
+ extra_body: Body | None = None,
192
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
193
+ ) -> BulkIngestResponse:
194
+ """
195
+ Bulk Ingest
196
+
197
+ Args:
198
+ items (Iterable[IngestUnitsParams]): The items to ingest
199
+
200
+ extra_headers: Send extra headers
201
+
202
+ extra_query: Add additional query parameters to the request
203
+
204
+ extra_body: Add additional JSON properties to the request
205
+
206
+ timeout: Override the client-level default timeout for this request, in seconds
207
+ """
208
+ return await self._post(
209
+ "/api/v1/ingest/bulk",
210
+ body= cast(Dict[str, object],
211
+ await async_maybe_transform(
212
+ {
213
+ "items": items,
214
+ },
215
+ ingest_bulk_params.IngestBulkParams)
216
+ )["items"],
217
+ options=make_request_options(
218
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
219
+ ),
220
+ cast_to=BulkIngestResponse,
221
+ )
222
+
141
223
  async def units(
142
224
  self,
143
225
  *,
@@ -154,7 +236,7 @@ class AsyncIngestResource(AsyncAPIResource):
154
236
  extra_query: Query | None = None,
155
237
  extra_body: Body | None = None,
156
238
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
157
- ) -> ProxyResult:
239
+ ) -> IngestResponse:
158
240
  """
159
241
  Ingest a request
160
242
 
@@ -226,7 +308,7 @@ class AsyncIngestResource(AsyncAPIResource):
226
308
  options=make_request_options(
227
309
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
228
310
  ),
229
- cast_to=ProxyResult,
311
+ cast_to=IngestResponse,
230
312
  )
231
313
 
232
314
 
@@ -234,6 +316,9 @@ class IngestResourceWithRawResponse:
234
316
  def __init__(self, ingest: IngestResource) -> None:
235
317
  self._ingest = ingest
236
318
 
319
+ self.bulk = to_raw_response_wrapper(
320
+ ingest.bulk,
321
+ )
237
322
  self.units = to_raw_response_wrapper(
238
323
  ingest.units,
239
324
  )
@@ -243,6 +328,9 @@ class AsyncIngestResourceWithRawResponse:
243
328
  def __init__(self, ingest: AsyncIngestResource) -> None:
244
329
  self._ingest = ingest
245
330
 
331
+ self.bulk = async_to_raw_response_wrapper(
332
+ ingest.bulk,
333
+ )
246
334
  self.units = async_to_raw_response_wrapper(
247
335
  ingest.units,
248
336
  )
@@ -252,6 +340,9 @@ class IngestResourceWithStreamingResponse:
252
340
  def __init__(self, ingest: IngestResource) -> None:
253
341
  self._ingest = ingest
254
342
 
343
+ self.bulk = to_streamed_response_wrapper(
344
+ ingest.bulk,
345
+ )
255
346
  self.units = to_streamed_response_wrapper(
256
347
  ingest.units,
257
348
  )
@@ -261,6 +352,9 @@ class AsyncIngestResourceWithStreamingResponse:
261
352
  def __init__(self, ingest: AsyncIngestResource) -> None:
262
353
  self._ingest = ingest
263
354
 
355
+ self.bulk = async_to_streamed_response_wrapper(
356
+ ingest.bulk,
357
+ )
264
358
  self.units = async_to_streamed_response_wrapper(
265
359
  ingest.units,
266
360
  )
payi/types/__init__.py CHANGED
@@ -4,16 +4,20 @@ from __future__ import annotations
4
4
 
5
5
  from .cost_data import CostData as CostData
6
6
  from .cost_details import CostDetails as CostDetails
7
- from .proxy_result import ProxyResult as ProxyResult
8
7
  from .requests_data import RequestsData as RequestsData
9
8
  from .budget_response import BudgetResponse as BudgetResponse
9
+ from .ingest_response import IngestResponse as IngestResponse
10
+ from .total_cost_data import TotalCostData as TotalCostData
10
11
  from .default_response import DefaultResponse as DefaultResponse
11
12
  from .category_response import CategoryResponse as CategoryResponse
12
13
  from .paged_budget_list import PagedBudgetList as PagedBudgetList
13
14
  from .budget_list_params import BudgetListParams as BudgetListParams
15
+ from .ingest_bulk_params import IngestBulkParams as IngestBulkParams
16
+ from .ingest_units_param import IngestUnitsParam as IngestUnitsParam
14
17
  from .ingest_units_params import IngestUnitsParams as IngestUnitsParams
15
18
  from .budget_create_params import BudgetCreateParams as BudgetCreateParams
16
19
  from .budget_update_params import BudgetUpdateParams as BudgetUpdateParams
20
+ from .bulk_ingest_response import BulkIngestResponse as BulkIngestResponse
17
21
  from .category_list_response import CategoryListResponse as CategoryListResponse
18
22
  from .budget_history_response import BudgetHistoryResponse as BudgetHistoryResponse
19
23
  from .category_delete_response import CategoryDeleteResponse as CategoryDeleteResponse
@@ -15,7 +15,7 @@ class BudgetCreateParams(TypedDict, total=False):
15
15
 
16
16
  base_cost_estimate: Literal["max"]
17
17
 
18
- billing_model_id: Optional[int]
18
+ billing_model_id: Optional[str]
19
19
 
20
20
  budget_response_type: Literal["block", "allow"]
21
21
 
@@ -5,32 +5,9 @@ from datetime import datetime
5
5
  from typing_extensions import Literal
6
6
 
7
7
  from .._models import BaseModel
8
- from .cost_data import CostData
9
- from .requests_data import RequestsData
8
+ from .total_cost_data import TotalCostData
10
9
 
11
- __all__ = ["BudgetHistoryResponse", "BudgetHistory", "BudgetHistoryTotals", "BudgetHistoryTotalsBudgetTransactions"]
12
-
13
-
14
- class BudgetHistoryTotalsBudgetTransactions(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
26
-
27
-
28
- class BudgetHistoryTotals(BaseModel):
29
- cost: CostData
30
-
31
- requests: RequestsData
32
-
33
- budget_transactions: Optional[BudgetHistoryTotalsBudgetTransactions] = None
10
+ __all__ = ["BudgetHistoryResponse", "BudgetHistory"]
34
11
 
35
12
 
36
13
  class BudgetHistory(BaseModel):
@@ -50,7 +27,7 @@ class BudgetHistory(BaseModel):
50
27
 
51
28
  max: Optional[float] = None
52
29
 
53
- totals: Optional[BudgetHistoryTotals] = None
30
+ totals: Optional[TotalCostData] = None
54
31
 
55
32
 
56
33
  class BudgetHistoryResponse(BaseModel):
@@ -5,32 +5,9 @@ from datetime import datetime
5
5
  from typing_extensions import Literal
6
6
 
7
7
  from .._models import BaseModel
8
- from .cost_data import CostData
9
- from .requests_data import RequestsData
8
+ from .total_cost_data import TotalCostData
10
9
 
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
26
-
27
-
28
- class BudgetTotals(BaseModel):
29
- cost: CostData
30
-
31
- requests: RequestsData
32
-
33
- budget_transactions: Optional[BudgetTotalsBudgetTransactions] = None
10
+ __all__ = ["BudgetResponse", "Budget"]
34
11
 
35
12
 
36
13
  class Budget(BaseModel):
@@ -52,7 +29,7 @@ class Budget(BaseModel):
52
29
 
53
30
  max: float
54
31
 
55
- totals: BudgetTotals
32
+ totals: TotalCostData
56
33
 
57
34
  budget_tags: Optional[List[str]] = None
58
35
 
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from datetime import datetime
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from .._models import BaseModel
9
+
10
+ __all__ = ["BulkIngestResponse", "Error", "ErrorXproxyResult", "ErrorXproxyResultXproxyError"]
11
+
12
+
13
+ class ErrorXproxyResultXproxyError(BaseModel):
14
+ code: Optional[str] = None
15
+
16
+ message: Optional[str] = None
17
+
18
+
19
+ class ErrorXproxyResult(BaseModel):
20
+ message: str
21
+
22
+ status_code: int = FieldInfo(alias="statusCode")
23
+
24
+ xproxy_error: Optional[ErrorXproxyResultXproxyError] = None
25
+
26
+
27
+ class Error(BaseModel):
28
+ item_index: Optional[int] = None
29
+
30
+ xproxy_result: Optional[ErrorXproxyResult] = None
31
+
32
+
33
+ class BulkIngestResponse(BaseModel):
34
+ ingest_count: int
35
+
36
+ ingest_timestamp: datetime
37
+
38
+ request_id: str
39
+
40
+ error_count: Optional[int] = None
41
+
42
+ errors: Optional[List[Error]] = None
43
+
44
+ total_count: Optional[int] = None
@@ -14,8 +14,6 @@ __all__ = ["ResourceCreateParams"]
14
14
  class ResourceCreateParams(TypedDict, total=False):
15
15
  category: Required[str]
16
16
 
17
- start_timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
18
-
19
17
  input_price: float
20
18
 
21
19
  max_input_units: int
@@ -23,3 +21,5 @@ class ResourceCreateParams(TypedDict, total=False):
23
21
  max_output_units: int
24
22
 
25
23
  output_price: float
24
+
25
+ start_timestamp: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
@@ -13,8 +13,6 @@ class CategoryResourceResponse(BaseModel):
13
13
 
14
14
  resource: str
15
15
 
16
- start_timestamp: datetime
17
-
18
16
  input_price: Optional[float] = None
19
17
 
20
18
  max_input_units: Optional[int] = None
@@ -22,3 +20,5 @@ class CategoryResourceResponse(BaseModel):
22
20
  max_output_units: Optional[int] = None
23
21
 
24
22
  output_price: Optional[float] = None
23
+
24
+ start_timestamp: Optional[datetime] = None
@@ -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_units_param import IngestUnitsParam
9
+
10
+ __all__ = ["IngestBulkParams"]
11
+
12
+
13
+ class IngestBulkParams(TypedDict, total=False):
14
+ items: Required[Iterable[IngestUnitsParam]]
@@ -1,19 +1,20 @@
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 datetime import datetime
4
5
  from typing_extensions import Literal
5
6
 
6
7
  from .._models import BaseModel
7
8
  from .cost_details import CostDetails
8
9
 
9
- __all__ = ["ProxyResult", "Budgets", "Cost"]
10
+ __all__ = ["IngestResponse", "XproxyResult", "XproxyResultBudgets", "XproxyResultCost"]
10
11
 
11
12
 
12
- class Budgets(BaseModel):
13
+ class XproxyResultBudgets(BaseModel):
13
14
  state: Optional[Literal["ok", "blocked", "blocked_external", "exceeded", "failed"]] = None
14
15
 
15
16
 
16
- class Cost(BaseModel):
17
+ class XproxyResultCost(BaseModel):
17
18
  currency: Optional[Literal["usd"]] = None
18
19
 
19
20
  input: Optional[CostDetails] = None
@@ -23,11 +24,19 @@ class Cost(BaseModel):
23
24
  total: Optional[CostDetails] = None
24
25
 
25
26
 
26
- class ProxyResult(BaseModel):
27
- budgets: Optional[Dict[str, Budgets]] = None
27
+ class XproxyResult(BaseModel):
28
+ budgets: Optional[Dict[str, XproxyResultBudgets]] = None
28
29
 
29
- cost: Optional[Cost] = None
30
+ cost: Optional[XproxyResultCost] = None
30
31
 
31
32
  request_id: Optional[str] = None
32
33
 
33
34
  request_tags: Optional[List[str]] = None
35
+
36
+
37
+ class IngestResponse(BaseModel):
38
+ ingest_timestamp: datetime
39
+
40
+ request_id: str
41
+
42
+ xproxy_result: XproxyResult
@@ -0,0 +1,23 @@
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 Union
6
+ from datetime import datetime
7
+ from typing_extensions import Required, Annotated, TypedDict
8
+
9
+ from .._utils import PropertyInfo
10
+
11
+ __all__ = ["IngestUnitsParam"]
12
+
13
+
14
+ class IngestUnitsParam(TypedDict, total=False):
15
+ category: Required[str]
16
+
17
+ input: Required[int]
18
+
19
+ output: Required[int]
20
+
21
+ resource: Required[str]
22
+
23
+ event_timestamp: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
@@ -7,32 +7,9 @@ from typing_extensions import Literal
7
7
  from pydantic import Field as FieldInfo
8
8
 
9
9
  from .._models import BaseModel
10
- from .cost_data import CostData
11
- from .requests_data import RequestsData
10
+ from .total_cost_data import TotalCostData
12
11
 
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
28
-
29
-
30
- class ItemTotals(BaseModel):
31
- cost: CostData
32
-
33
- requests: RequestsData
34
-
35
- budget_transactions: Optional[ItemTotalsBudgetTransactions] = None
12
+ __all__ = ["PagedBudgetList", "Item"]
36
13
 
37
14
 
38
15
  class Item(BaseModel):
@@ -54,7 +31,7 @@ class Item(BaseModel):
54
31
 
55
32
  max: float
56
33
 
57
- totals: ItemTotals
34
+ totals: TotalCostData
58
35
 
59
36
  budget_tags: Optional[List[str]] = None
60
37
 
@@ -0,0 +1,31 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from .._models import BaseModel
6
+ from .cost_data import CostData
7
+ from .requests_data import RequestsData
8
+
9
+ __all__ = ["TotalCostData", "BudgetTransactions"]
10
+
11
+
12
+ class BudgetTransactions(BaseModel):
13
+ blocked: int
14
+
15
+ blocked_external: int
16
+
17
+ exceeded: int
18
+
19
+ successful: int
20
+
21
+ error: Optional[int] = None
22
+
23
+ total: Optional[int] = None
24
+
25
+
26
+ class TotalCostData(BaseModel):
27
+ cost: CostData
28
+
29
+ requests: RequestsData
30
+
31
+ budget_transactions: Optional[BudgetTransactions] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a14
3
+ Version: 0.1.0a15
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
@@ -11,7 +11,7 @@ payi/_resource.py,sha256=j2jIkTr8OIC8sU6-05nxSaCyj4MaFlbZrwlyg4_xJos,1088
11
11
  payi/_response.py,sha256=W6pADUzbnMFGnVzGY4M3FkX9uvw8AFSMTPZKPgQ_TV4,28363
12
12
  payi/_streaming.py,sha256=Z_wIyo206T6Jqh2rolFg2VXZgX24PahLmpURp0-NssU,10092
13
13
  payi/_types.py,sha256=04q-KHD-qZ1xlfwEb_muyIHWmD-nZ-KxnRxA_QEjqNk,6125
14
- payi/_version.py,sha256=cwDaS1s4d14-vMkYZvUwMjxwz304MCqJ-dzDY2Svctc,165
14
+ payi/_version.py,sha256=10rhRcen69ntoRaQVy3kwdgI8S_SdpwWX5apB-8lwxc,165
15
15
  payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  payi/_utils/__init__.py,sha256=Uzq1-FIih_VUjzdNVWXks0sdC39KBKLMrZoz-_JOjJ4,1988
17
17
  payi/_utils/_logs.py,sha256=fmnf5D9TOgkgZKfgYmSa3PiUc3SZgkchn6CzJUeo0SQ,768
@@ -25,32 +25,36 @@ payi/_utils/_utils.py,sha256=FaZdW0tWil7IERdxUfKt7pVcyXL2aCnR3lo73q66qgI,11447
25
25
  payi/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
26
26
  payi/lib/helpers.py,sha256=IdB_pi8dLtVh9b4DG-zasA1i9Yk-5xAayoUTNWBAFpc,1235
27
27
  payi/resources/__init__.py,sha256=uGNmPeysPonVR9KOzw-Qs1WB4CqJm17pEfoXqeEX1JA,1517
28
- payi/resources/ingest.py,sha256=bj7iQqKHQVhOOh4x80x7-8D-zCYeSKW_fd_umy8Fzew,10050
28
+ payi/resources/ingest.py,sha256=nl1-h7_xItYfQSmXUveuuyBSNmwcLZ03JZe31EgpztE,13468
29
29
  payi/resources/budgets/__init__.py,sha256=w1UhOdDXtUH4A91ME5Tw2nr9bRvPJyJY1YWiVVy7jj0,989
30
- payi/resources/budgets/budgets.py,sha256=TD9aUdxhoD_JIXOISzb7RfmvLEUuCAUn4oUyJimi7zA,26508
30
+ payi/resources/budgets/budgets.py,sha256=VQiwsQIF6Rp7jlIUPQ5VpJbbVxFOxYHEPI-bWkiPt2k,26508
31
31
  payi/resources/budgets/tags.py,sha256=N26Uc7N8N1egvujY4LZ7RDoQ7oWeTR9w1pPbbgKLLqc,17841
32
32
  payi/resources/categories/__init__.py,sha256=w5gMiPdBSzJA_qfoVtFBElaoe8wGf_O63R7R1Spr6Gk,1093
33
33
  payi/resources/categories/categories.py,sha256=hqJE4iSiMe5nvvsui4RjFJxFb8170iRbJfTafk2NzGw,15072
34
- payi/resources/categories/resources.py,sha256=07OP3lAU7NAFoUAInEeT8EywRTPq5GhVqwPXsVs6SF4,17790
35
- payi/types/__init__.py,sha256=HSIq-IJqP_J6TTkig6Oodn61zi1-NErWQUOsNOnJckE,1447
36
- payi/types/budget_create_params.py,sha256=Et0SeC3yekUUkl0FxqAaQ5wa3BgaH1wsrpYWhz0aanc,653
37
- payi/types/budget_history_response.py,sha256=YPWeFGM9NwQj3maUccX_sqlzOE34wsI1PRUtmYMhOyM,1409
34
+ payi/resources/categories/resources.py,sha256=tEx1D3hrjgB_CDoGPIung-Ub3-jMFSYVnzmqZg-pr5g,17848
35
+ payi/types/__init__.py,sha256=yL2tBUOA4T1_S8E1K039r9Sr2OUOXI6hsdlA__r-S2I,1729
36
+ payi/types/budget_create_params.py,sha256=3PziVJT3_ll-6yv3i5EF8ERm19jFJAKbv9v-CvRW5ik,653
37
+ payi/types/budget_history_response.py,sha256=4SnisCLr1HImVecgonZK7HIm9WTmYl0YMaTbMP70qZY,934
38
38
  payi/types/budget_list_params.py,sha256=Win-Spveurf6WarTgCXXsP-yDIxr_HCP7oV_4JbqKOc,674
39
- payi/types/budget_response.py,sha256=t3E501aCpUpgldgVs4zJa7JGIdJrnjKms7aYiHoDQ98,1260
39
+ payi/types/budget_response.py,sha256=ZAZOvA5KLirARR92IuLkjGNWTLBUVJp5RwGI9Ow2Au0,827
40
40
  payi/types/budget_update_params.py,sha256=foD5cPa1p2M2cpVUqlwkXwSEQlQcBLaigUQMUGkvcic,334
41
+ payi/types/bulk_ingest_response.py,sha256=uZO89-RjrckzM37LRXNifvRptyz_mqbyVP6zO2FlBiM,962
41
42
  payi/types/category_delete_resource_response.py,sha256=DHGvvldGMSxwqsk83EAkqzEge94bYYZKPNyzL9jULdM,288
42
43
  payi/types/category_delete_response.py,sha256=i9hW9WGPSIR9cBCLgSfH6lseGISoQwAK_3pgjlVMoI4,289
43
44
  payi/types/category_list_resources_response.py,sha256=CnaOKWwDUPH47EKrNyeiI3p7jhEdgM9qs97M2tPRSGg,286
44
45
  payi/types/category_list_response.py,sha256=LHuL6iKGoDVjHWWbpA4tm1r3mQMauQm4EZrWGrOZzWQ,243
45
- payi/types/category_resource_response.py,sha256=OIzFoGSQgxY1zo2eLqXJSOzDf4kUoUwXCxL1wE5CfWk,501
46
+ payi/types/category_resource_response.py,sha256=GL3SjVawwzxQCTTHw5CyF4jajBKx5j7dirBmBHGoya0,518
46
47
  payi/types/category_response.py,sha256=43i8bii20Sb-z9R5M1Ia6RGfRZmdQqsWPlv4Bl1XQf0,293
47
48
  payi/types/cost_data.py,sha256=jZtju_3WWNXh4wCu77XnyvxZkvewcvXBS_V0z07BizA,284
48
49
  payi/types/cost_details.py,sha256=3ldvnYILAG6Sz9wGWMs1SZvIfdGEbn5i4-CauWEXMPA,265
49
50
  payi/types/default_response.py,sha256=o617LpRsCIZHCZxAc5nVI2JQ3HPGZo4gCDvSDkxkIJ8,270
51
+ payi/types/ingest_bulk_params.py,sha256=Yngb3DBIsVTZakvFxu3FMFJbXQyJwWeoeMgXUxtOqOA,381
52
+ payi/types/ingest_response.py,sha256=7v5RU7YbXOsd3qKG2tKHeJZmsWpWR3VSqAaX8TDOUhY,1040
53
+ payi/types/ingest_units_param.py,sha256=jPYNfk8wZVmd1qIXglKW6ckZH2MHw0dV3BwIWXG_U6Q,558
50
54
  payi/types/ingest_units_params.py,sha256=a3fEqwmrRNtGR9pqbTo50feTTjSmRGov6MYvXhBo1yc,748
51
- payi/types/paged_budget_list.py,sha256=MtRZBf0oGMC1rz1RxKtS_ab_Akg4FoM28qxslSqLvUA,1806
52
- payi/types/proxy_result.py,sha256=qsl1dwZMXf3Gy7f7BzE4Fe4Pnu6OlSUY_LIo0oYLEZo,798
55
+ payi/types/paged_budget_list.py,sha256=FqKlbAifEWY3sZqiJSny-XtS-XIfmj14AufNffNVmqM,1385
53
56
  payi/types/requests_data.py,sha256=UniFVu9SgDQIbZupzrLSrvBKV487_iKFemLw9nRDhGo,296
57
+ payi/types/total_cost_data.py,sha256=Nu1LyV1NX4CsI02Yn3GbvNXVZPrXG8U4Fs55rZE9KJk,603
54
58
  payi/types/budgets/__init__.py,sha256=5ByVuqOcgSYLHmGzhuj6-HG48mtQhC6oT5U5tNjQtxk,725
55
59
  payi/types/budgets/budget_tags.py,sha256=nOYMf7YgRdTZgGdedJw0UbQ2uupCq9MHlevLJoXxWB4,348
56
60
  payi/types/budgets/tag_create_params.py,sha256=_zEYfH2uKF44WenAdedx4TB9Az6RbIoAUMwqW8SAiuc,314
@@ -62,9 +66,9 @@ payi/types/budgets/tag_remove_response.py,sha256=Wt4KwC76y3qxdEqKhXzFkYu2iECYePg
62
66
  payi/types/budgets/tag_update_params.py,sha256=bWWeDqfySt7CZ6HDsZzENREOWGWGWFgnAtyleNMwUsE,314
63
67
  payi/types/budgets/tag_update_response.py,sha256=Vlf-zxLZzvmhUodhzF7hiqWcxyjrb7Ri_lSajg8vOPM,219
64
68
  payi/types/categories/__init__.py,sha256=HQScxfK3F_J9HYbphrhG6bYb7S6vtrwafLViar5pHcM,285
65
- payi/types/categories/resource_create_params.py,sha256=OcWN9QTsvtI9cItgHgD40jFmRWuKYvr8JA6MfSS6GVA,591
69
+ payi/types/categories/resource_create_params.py,sha256=mbLjAyRz9iuINs_KEWYCLLUZFq4GcRhs0vL2RxqBFwQ,587
66
70
  payi/types/categories/resource_list_response.py,sha256=DmfAmYm72WK9hSF0FSj6XYsZ59_S-ErmXNbZM8Bkc4o,269
67
- payi-0.1.0a14.dist-info/METADATA,sha256=2wgNSdRaM74LWRHU2XKBYEgCM7-SlaGC7HS1PG5nh8o,12030
68
- payi-0.1.0a14.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
69
- payi-0.1.0a14.dist-info/licenses/LICENSE,sha256=8vX1pjh3esb6D5DvXAf6NxiBcVyon8aHWNJCxmmHXeY,11334
70
- payi-0.1.0a14.dist-info/RECORD,,
71
+ payi-0.1.0a15.dist-info/METADATA,sha256=Xbtaak0SShck7BbYM2fwWus77dTwDPcEKtGCdoaia1g,12030
72
+ payi-0.1.0a15.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
73
+ payi-0.1.0a15.dist-info/licenses/LICENSE,sha256=8vX1pjh3esb6D5DvXAf6NxiBcVyon8aHWNJCxmmHXeY,11334
74
+ payi-0.1.0a15.dist-info/RECORD,,