Skip to content

Commit d9855db

Browse files
committed
ci: regenerated with OpenAPI Doc 2.1.0, Speakeay CLI 1.20.0
1 parent 23f7160 commit d9855db

8 files changed

Lines changed: 124 additions & 102 deletions

File tree

bankfeeds/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,34 @@ req = operations.CreateBankFeedRequest(
3232
balance=6027.63,
3333
currency="nulla",
3434
feed_start_date="2022-10-23T00:00:00Z",
35-
id="corrupti",
35+
id="8d69a674-e0f4-467c-8879-6ed151a05dfc",
3636
modified_date="2022-10-23T00:00:00Z",
37-
sort_code="illum",
38-
status="vel",
37+
sort_code="odit",
38+
status="at",
3939
),
4040
shared.BankFeedAccount(
41-
account_name="error",
42-
account_number="deserunt",
43-
account_type="suscipit",
44-
balance=4375.87,
45-
currency="magnam",
41+
account_name="at",
42+
account_number="maiores",
43+
account_type="molestiae",
44+
balance=7991.59,
45+
currency="quod",
4646
feed_start_date="2022-10-23T00:00:00Z",
47-
id="debitis",
47+
id="78ca1ba9-28fc-4816-b42c-b73920592939",
4848
modified_date="2022-10-23T00:00:00Z",
49-
sort_code="ipsa",
50-
status="delectus",
49+
sort_code="laboriosam",
50+
status="hic",
5151
),
5252
shared.BankFeedAccount(
53-
account_name="tempora",
54-
account_number="suscipit",
55-
account_type="molestiae",
56-
balance=7917.25,
57-
currency="placeat",
53+
account_name="saepe",
54+
account_number="fuga",
55+
account_type="in",
56+
balance=3595.08,
57+
currency="iste",
5858
feed_start_date="2022-10-23T00:00:00Z",
59-
id="voluptatum",
59+
id="6eb10faa-a235-42c5-9559-07aff1a3a2fa",
6060
modified_date="2022-10-23T00:00:00Z",
61-
sort_code="iusto",
62-
status="excepturi",
61+
sort_code="occaecati",
62+
status="numquam",
6363
),
6464
],
6565
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",

bankfeeds/RELEASES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,12 @@ Based on:
254254
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml
255255
- Speakeasy CLI 1.19.7 (2.17.9) https://github.com/speakeasy-api/speakeasy
256256
### Releases
257-
- [PyPI v0.9.1] https://pypi.org/project/codat-bank-feeds/0.9.1 - bankfeeds
257+
- [PyPI v0.9.1] https://pypi.org/project/codat-bank-feeds/0.9.1 - bankfeeds
258+
259+
## 2023-04-14 00:16:01
260+
### Changes
261+
Based on:
262+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml
263+
- Speakeasy CLI 1.20.0 (2.18.0) https://github.com/speakeasy-api/speakeasy
264+
### Releases
265+
- [PyPI v0.10.0] https://pypi.org/project/codat-bank-feeds/0.10.0 - bankfeeds

bankfeeds/USAGE.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,34 @@ req = operations.CreateBankFeedRequest(
1919
balance=6027.63,
2020
currency="nulla",
2121
feed_start_date="2022-10-23T00:00:00Z",
22-
id="corrupti",
22+
id="8d69a674-e0f4-467c-8879-6ed151a05dfc",
2323
modified_date="2022-10-23T00:00:00Z",
24-
sort_code="illum",
25-
status="vel",
24+
sort_code="odit",
25+
status="at",
2626
),
2727
shared.BankFeedAccount(
28-
account_name="error",
29-
account_number="deserunt",
30-
account_type="suscipit",
31-
balance=4375.87,
32-
currency="magnam",
28+
account_name="at",
29+
account_number="maiores",
30+
account_type="molestiae",
31+
balance=7991.59,
32+
currency="quod",
3333
feed_start_date="2022-10-23T00:00:00Z",
34-
id="debitis",
34+
id="78ca1ba9-28fc-4816-b42c-b73920592939",
3535
modified_date="2022-10-23T00:00:00Z",
36-
sort_code="ipsa",
37-
status="delectus",
36+
sort_code="laboriosam",
37+
status="hic",
3838
),
3939
shared.BankFeedAccount(
40-
account_name="tempora",
41-
account_number="suscipit",
42-
account_type="molestiae",
43-
balance=7917.25,
44-
currency="placeat",
40+
account_name="saepe",
41+
account_number="fuga",
42+
account_type="in",
43+
balance=3595.08,
44+
currency="iste",
4545
feed_start_date="2022-10-23T00:00:00Z",
46-
id="voluptatum",
46+
id="6eb10faa-a235-42c5-9559-07aff1a3a2fa",
4747
modified_date="2022-10-23T00:00:00Z",
48-
sort_code="iusto",
49-
status="excepturi",
48+
sort_code="occaecati",
49+
status="numquam",
5050
),
5151
],
5252
company_id="8a210b68-6988-11ed-a1eb-0242ac120002",

bankfeeds/gen.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ configVersion: 1.0.0
22
management:
33
docChecksum: bf4855a1f75769985d375676f2d6ff7a
44
docVersion: 2.1.0
5-
speakeasyVersion: 1.19.7
6-
generationVersion: 2.17.9
5+
speakeasyVersion: 1.20.0
6+
generationVersion: 2.18.0
77
generation:
88
telemetryEnabled: false
99
sdkClassName: CodatBankFeeds
1010
tagNamespacingDisabled: true
1111
sdkFlattening: false
1212
singleTagPerOp: false
1313
python:
14-
version: 0.9.1
14+
version: 0.10.0
1515
author: Speakeasy
1616
description: Python Client SDK Generated by Speakeasy
1717
packageName: codat-bank-feeds

bankfeeds/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ disable=raw-checker-failed,
438438
using-constant-test,
439439
too-many-statements,
440440
cyclic-import,
441+
too-many-nested-blocks
441442

442443
# Enable the message, report, category or checker with the given id(s). You can
443444
# either give multiple identifier separated by comma (,) or put this option

bankfeeds/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setuptools.setup(
1212
name="codat-bank-feeds",
13-
version="0.9.1",
13+
version="0.10.0",
1414
author="Speakeasy",
1515
description="Python Client SDK Generated by Speakeasy",
1616
long_description=long_description,

bankfeeds/src/codatbankfeeds/sdk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class CodatBankFeeds:
2525
_security_client: requests_http.Session
2626
_server_url: str = SERVERS[0]
2727
_language: str = "python"
28-
_sdk_version: str = "0.9.1"
29-
_gen_version: str = "2.17.9"
28+
_sdk_version: str = "0.10.0"
29+
_gen_version: str = "2.18.0"
3030

3131
def __init__(self,
3232
security: shared.Security = None,

bankfeeds/src/codatbankfeeds/utils/utils.py

Lines changed: 70 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -152,62 +152,71 @@ def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass
152152
if param_metadata is None:
153153
continue
154154

155-
if param_metadata.get('style', 'simple') == 'simple':
156-
param = getattr(
157-
path_params, field.name) if path_params is not None else None
158-
param = _populate_from_globals(
159-
field.name, param, 'pathParam', gbls)
155+
param = getattr(
156+
path_params, field.name) if path_params is not None else None
157+
param = _populate_from_globals(
158+
field.name, param, 'pathParam', gbls)
160159

161-
if param is None:
162-
continue
163-
164-
if isinstance(param, list):
165-
pp_vals: list[str] = []
166-
for pp_val in param:
167-
if pp_val is None:
168-
continue
169-
pp_vals.append(_val_to_string(pp_val))
170-
path = path.replace(
171-
'{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
172-
elif isinstance(param, dict):
173-
pp_vals: list[str] = []
174-
for pp_key in param:
175-
if param[pp_key] is None:
176-
continue
177-
if param_metadata.get('explode'):
178-
pp_vals.append(
179-
f"{pp_key}={_val_to_string(param[pp_key])}")
180-
else:
181-
pp_vals.append(
182-
f"{pp_key},{_val_to_string(param[pp_key])}")
183-
path = path.replace(
184-
'{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
185-
elif not isinstance(param, (str, int, float, complex, bool)):
186-
pp_vals: list[str] = []
187-
param_fields: Tuple[Field, ...] = fields(param)
188-
for param_field in param_fields:
189-
param_value_metadata = param_field.metadata.get(
190-
'path_param')
191-
if not param_value_metadata:
192-
continue
193-
194-
parm_name = param_value_metadata.get(
195-
'field_name', field.name)
160+
if param is None:
161+
continue
196162

197-
param_field_val = getattr(param, param_field.name)
198-
if param_field_val is None:
199-
continue
200-
if param_metadata.get('explode'):
201-
pp_vals.append(
202-
f"{parm_name}={_val_to_string(param_field_val)}")
203-
else:
204-
pp_vals.append(
205-
f"{parm_name},{_val_to_string(param_field_val)}")
206-
path = path.replace(
207-
'{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
208-
else:
163+
f_name = param_metadata.get("field_name", field.name)
164+
serialization = param_metadata.get('serialization', '')
165+
if serialization != '':
166+
serialized_params = _get_serialized_params(
167+
param_metadata, f_name, param)
168+
for key, value in serialized_params.items():
209169
path = path.replace(
210-
'{' + param_metadata.get('field_name', field.name) + '}', _val_to_string(param), 1)
170+
'{' + key + '}', value, 1)
171+
else:
172+
if param_metadata.get('style', 'simple') == 'simple':
173+
if isinstance(param, list):
174+
pp_vals: list[str] = []
175+
for pp_val in param:
176+
if pp_val is None:
177+
continue
178+
pp_vals.append(_val_to_string(pp_val))
179+
path = path.replace(
180+
'{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
181+
elif isinstance(param, dict):
182+
pp_vals: list[str] = []
183+
for pp_key in param:
184+
if param[pp_key] is None:
185+
continue
186+
if param_metadata.get('explode'):
187+
pp_vals.append(
188+
f"{pp_key}={_val_to_string(param[pp_key])}")
189+
else:
190+
pp_vals.append(
191+
f"{pp_key},{_val_to_string(param[pp_key])}")
192+
path = path.replace(
193+
'{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
194+
elif not isinstance(param, (str, int, float, complex, bool)):
195+
pp_vals: list[str] = []
196+
param_fields: Tuple[Field, ...] = fields(param)
197+
for param_field in param_fields:
198+
param_value_metadata = param_field.metadata.get(
199+
'path_param')
200+
if not param_value_metadata:
201+
continue
202+
203+
parm_name = param_value_metadata.get(
204+
'field_name', field.name)
205+
206+
param_field_val = getattr(param, param_field.name)
207+
if param_field_val is None:
208+
continue
209+
if param_metadata.get('explode'):
210+
pp_vals.append(
211+
f"{parm_name}={_val_to_string(param_field_val)}")
212+
else:
213+
pp_vals.append(
214+
f"{parm_name},{_val_to_string(param_field_val)}")
215+
path = path.replace(
216+
'{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
217+
else:
218+
path = path.replace(
219+
'{' + param_metadata.get('field_name', field.name) + '}', _val_to_string(param), 1)
211220

212221
return server_url.removesuffix("/") + path
213222

@@ -246,8 +255,12 @@ def get_query_params(clazz: type, query_params: dataclass, gbls: dict[str, dict[
246255
f_name = metadata.get("field_name")
247256
serialization = metadata.get('serialization', '')
248257
if serialization != '':
249-
params = params | _get_serialized_query_params(
250-
metadata, f_name, value)
258+
serialized_parms = _get_serialized_params(metadata, f_name, value)
259+
for key, value in serialized_parms.items():
260+
if key in params:
261+
params[key].extend(value)
262+
else:
263+
params[key] = [value]
251264
else:
252265
style = metadata.get('style', 'form')
253266
if style == 'deepObject':
@@ -282,8 +295,8 @@ def get_headers(headers_params: dataclass) -> dict[str, str]:
282295
return headers
283296

284297

285-
def _get_serialized_query_params(metadata: dict, field_name: str, obj: any) -> dict[str, list[str]]:
286-
params: dict[str, list[str]] = {}
298+
def _get_serialized_params(metadata: dict, field_name: str, obj: any) -> dict[str, str]:
299+
params: dict[str, str] = {}
287300

288301
serialization = metadata.get('serialization', '')
289302
if serialization == 'json':

0 commit comments

Comments
 (0)