payi 0.1.0a3__py3-none-any.whl → 0.1.0a5__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.

Potentially problematic release.


This version of payi might be problematic. Click here for more details.

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.3" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.5" # x-release-please-version
payi/resources/ingest.py CHANGED
@@ -40,10 +40,11 @@ class IngestResource(SyncAPIResource):
40
40
  self,
41
41
  *,
42
42
  category: str,
43
+ input: int,
44
+ output: int,
43
45
  resource: str,
44
- units: ingest_units_params.Units,
45
- budget_ids: str | NotGiven = NOT_GIVEN,
46
- x_proxy_request_tags: str | NotGiven = NOT_GIVEN,
46
+ budget_ids: list[str] | NotGiven = NOT_GIVEN,
47
+ request_tags: list[str] | NotGiven = NOT_GIVEN,
47
48
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
48
49
  # The extra values given here take precedence over values defined on the client or passed to this method.
49
50
  extra_headers: Headers | None = None,
@@ -63,11 +64,27 @@ class IngestResource(SyncAPIResource):
63
64
 
64
65
  timeout: Override the client-level default timeout for this request, in seconds
65
66
  """
67
+ valid_ids_str: str | NotGiven = NOT_GIVEN
68
+ valid_tags_str: str | NotGiven = NOT_GIVEN
69
+
70
+ if isinstance(budget_ids, NotGiven):
71
+ valid_ids_str = NOT_GIVEN
72
+ else:
73
+ # Proceed with the list comprehension if budget_ids is not NotGiven
74
+ valid_ids = [id.strip() for id in budget_ids if id.strip()]
75
+ valid_ids_str = ",".join(valid_ids) if valid_ids else NOT_GIVEN
76
+ if isinstance(request_tags, NotGiven):
77
+ valid_tags_str = NOT_GIVEN
78
+ else:
79
+ # Proceed with the list comprehension if budget_ids is not NotGiven
80
+ valid_tags = [tag.strip() for tag in request_tags if tag.strip()]
81
+ valid_tags_str = ",".join(valid_tags) if valid_tags else NOT_GIVEN
82
+
66
83
  extra_headers = {
67
84
  **strip_not_given(
68
85
  {
69
- "xProxy-Budget-IDs": budget_ids,
70
- "xProxy-Request-Tags": x_proxy_request_tags,
86
+ "xProxy-Budget-IDs": valid_ids_str,
87
+ "xProxy-Request-Tags": valid_tags_str,
71
88
  }
72
89
  ),
73
90
  **(extra_headers or {}),
@@ -77,8 +94,9 @@ class IngestResource(SyncAPIResource):
77
94
  body=maybe_transform(
78
95
  {
79
96
  "category": category,
97
+ "input": input,
98
+ "output": output,
80
99
  "resource": resource,
81
- "units": units,
82
100
  },
83
101
  ingest_units_params.IngestUnitsParams,
84
102
  ),
@@ -102,10 +120,11 @@ class AsyncIngestResource(AsyncAPIResource):
102
120
  self,
103
121
  *,
104
122
  category: str,
123
+ input: int,
124
+ output: int,
105
125
  resource: str,
106
- units: ingest_units_params.Units,
107
- budget_ids: str | NotGiven = NOT_GIVEN,
108
- x_proxy_request_tags: str | NotGiven = NOT_GIVEN,
126
+ budget_ids: list[str] | NotGiven = NOT_GIVEN,
127
+ request_tags: list[str] | NotGiven = NOT_GIVEN,
109
128
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
110
129
  # The extra values given here take precedence over values defined on the client or passed to this method.
111
130
  extra_headers: Headers | None = None,
@@ -125,11 +144,27 @@ class AsyncIngestResource(AsyncAPIResource):
125
144
 
126
145
  timeout: Override the client-level default timeout for this request, in seconds
127
146
  """
147
+ valid_ids_str: str | NotGiven = NOT_GIVEN
148
+ valid_tags_str: str | NotGiven = NOT_GIVEN
149
+
150
+ if isinstance(budget_ids, NotGiven):
151
+ valid_ids_str = NOT_GIVEN
152
+ else:
153
+ # Proceed with the list comprehension if budget_ids is not NotGiven
154
+ valid_ids = [id.strip() for id in budget_ids if id.strip()]
155
+ valid_ids_str = ",".join(valid_ids) if valid_ids else NOT_GIVEN
156
+ if isinstance(request_tags, NotGiven):
157
+ valid_tags_str = NOT_GIVEN
158
+ else:
159
+ # Proceed with the list comprehension if budget_ids is not NotGiven
160
+ valid_tags = [tag.strip() for tag in request_tags if tag.strip()]
161
+ valid_tags_str = ",".join(valid_tags) if valid_tags else NOT_GIVEN
162
+
128
163
  extra_headers = {
129
164
  **strip_not_given(
130
165
  {
131
- "xProxy-Budget-IDs": budget_ids,
132
- "xProxy-Request-Tags": x_proxy_request_tags,
166
+ "xProxy-Budget-IDs": valid_ids_str,
167
+ "xProxy-Request-Tags": valid_tags_str,
133
168
  }
134
169
  ),
135
170
  **(extra_headers or {}),
@@ -139,8 +174,9 @@ class AsyncIngestResource(AsyncAPIResource):
139
174
  body=await async_maybe_transform(
140
175
  {
141
176
  "category": category,
177
+ "input": input,
178
+ "output": output,
142
179
  "resource": resource,
143
- "units": units,
144
180
  },
145
181
  ingest_units_params.IngestUnitsParams,
146
182
  ),
@@ -6,22 +6,18 @@ from typing_extensions import Required, Annotated, TypedDict
6
6
 
7
7
  from .._utils import PropertyInfo
8
8
 
9
- __all__ = ["IngestUnitsParams", "Units"]
9
+ __all__ = ["IngestUnitsParams"]
10
10
 
11
11
 
12
12
  class IngestUnitsParams(TypedDict, total=False):
13
13
  category: Required[str]
14
14
 
15
- resource: Required[str]
16
-
17
- units: Required[Units]
15
+ input: Required[int]
18
16
 
19
- budget_ids: Annotated[str, PropertyInfo(alias="xProxy-Budget-IDs")]
20
-
21
- x_proxy_request_tags: Annotated[str, PropertyInfo(alias="xProxy-Request-Tags")]
17
+ output: Required[int]
22
18
 
19
+ resource: Required[str]
23
20
 
24
- class Units(TypedDict, total=False):
25
- input: int
21
+ budget_ids: Annotated[list[str], PropertyInfo(alias="xProxy-Budget-IDs")]
26
22
 
27
- output: int
23
+ request_tags: Annotated[list[str], PropertyInfo(alias="xProxy-Request-Tags")]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a3
3
+ Version: 0.1.0a5
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=iY2HDZH65DZPNbSYsdb4smVcZV9Pxgk1syPMtq5aZqE,164
14
+ payi/_version.py,sha256=3mM6E715PZrcQHeMazvg0NDPTx5QFmYESDWiJMLk_UQ,164
15
15
  payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  payi/_utils/__init__.py,sha256=q5QC6ZmVNli9QaCqTlp9VrbQyjIU9EzmCn044UhHSIk,1919
17
17
  payi/_utils/_logs.py,sha256=fmnf5D9TOgkgZKfgYmSa3PiUc3SZgkchn6CzJUeo0SQ,768
@@ -24,7 +24,7 @@ payi/_utils/_typing.py,sha256=tFbktdpdHCQliwzGsWysgn0P5H0JRdagkZdb_LegGkY,3838
24
24
  payi/_utils/_utils.py,sha256=FaZdW0tWil7IERdxUfKt7pVcyXL2aCnR3lo73q66qgI,11447
25
25
  payi/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
26
26
  payi/resources/__init__.py,sha256=1p8kzMES8NNDQQoK3TEDE-8vVuQ59xxUjyyblZJBTjw,1015
27
- payi/resources/ingest.py,sha256=sMI2pK--oyo0YTF4nb2_VOEsrT7ZqB_AOW6hjuKgPq0,6086
27
+ payi/resources/ingest.py,sha256=IByW243qermlbqhlTYB_ZjhJ7Jfck6OREVJWsn2vATc,7692
28
28
  payi/resources/budgets/__init__.py,sha256=w1UhOdDXtUH4A91ME5Tw2nr9bRvPJyJY1YWiVVy7jj0,989
29
29
  payi/resources/budgets/budgets.py,sha256=aMu39MrRsVTtNfYwQPMeFK329ouwnHuFXM_vK9Ewj0k,24047
30
30
  payi/resources/budgets/tags.py,sha256=jzP0nal287bL2htY1TwDcdFRJyNMm6IdM936O1jCeMo,17850
@@ -35,7 +35,7 @@ payi/types/budget_list_params.py,sha256=Win-Spveurf6WarTgCXXsP-yDIxr_HCP7oV_4Jbq
35
35
  payi/types/budget_response.py,sha256=yXDXIrespfRuNreWdWmlCITO6VvLC4YZn0nzXw_BGzo,2072
36
36
  payi/types/budget_update_params.py,sha256=TTH7uu1c1zBK5zYhh2SPuRWEwr1XwDX_8bVS_GxIn9I,306
37
37
  payi/types/default_response.py,sha256=o617LpRsCIZHCZxAc5nVI2JQ3HPGZo4gCDvSDkxkIJ8,270
38
- payi/types/ingest_units_params.py,sha256=wu388NPI21P-wpI-GxMZBz8BH7RtSqg8w5uC03GaqrY,626
38
+ payi/types/ingest_units_params.py,sha256=NhC7wRF0lpoKikUPQUAgE1OxpU8dqMxtRZNIbiXkYCA,575
39
39
  payi/types/paged_budget_list.py,sha256=HNm834IAAy3eRNz0BjZwcbD9e-I8unWWKWxiSnlijWY,2553
40
40
  payi/types/successful_proxy_result.py,sha256=j8kQu8LAcfR3XuforqWDsYm1Bx6BQxCrezmE-3GnCWc,893
41
41
  payi/types/budgets/__init__.py,sha256=8lpRHXZQOc9ADCphhCB0JhQAH96lBIc68LbhlJn5Kys,750
@@ -48,7 +48,7 @@ payi/types/budgets/tag_remove_params.py,sha256=fNiHex1U11o_B0bfJDkpGARkEf99J-bd-
48
48
  payi/types/budgets/tag_remove_response.py,sha256=Gc_eBGGSx6Afa51g-S5AkXqwmRcGMjshiNSBsthDZJc,244
49
49
  payi/types/budgets/tag_update_params.py,sha256=bWWeDqfySt7CZ6HDsZzENREOWGWGWFgnAtyleNMwUsE,314
50
50
  payi/types/budgets/tag_update_response.py,sha256=5Q16vkLUMLkyzgCWRcz7aDVA0KTCHQd_eAKnx2-VoWQ,244
51
- payi-0.1.0a3.dist-info/METADATA,sha256=B6FUR9vsGNxxR5SYLKDP7bSyxulI7X7x4nVnxH1dT6w,11872
52
- payi-0.1.0a3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
53
- payi-0.1.0a3.dist-info/licenses/LICENSE,sha256=8vX1pjh3esb6D5DvXAf6NxiBcVyon8aHWNJCxmmHXeY,11334
54
- payi-0.1.0a3.dist-info/RECORD,,
51
+ payi-0.1.0a5.dist-info/METADATA,sha256=UO6iAhZQ0DZpRyi0xAQY7T-bekMrtPNIUFxPmZKkfeg,11872
52
+ payi-0.1.0a5.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
53
+ payi-0.1.0a5.dist-info/licenses/LICENSE,sha256=8vX1pjh3esb6D5DvXAf6NxiBcVyon8aHWNJCxmmHXeY,11334
54
+ payi-0.1.0a5.dist-info/RECORD,,
File without changes