Skip to content

Commit d6b9008

Browse files
authored
Merge pull request #75 from codatio/speakeasy-sdk-regen-1680739363
chore: speakeasy sdk regeneration - Generate Banking SDK
2 parents e3819ad + 3718410 commit d6b9008

46 files changed

Lines changed: 296 additions & 147 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

banking/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ pip install codat-banking
1313
## SDK Example Usage
1414
<!-- Start SDK Example Usage -->
1515
```python
16-
import codat
17-
from codat.models import operations, shared
16+
import codatbanking
17+
from codatbanking.models import operations, shared
1818

19-
s = codat.Codat(
19+
s = codatbanking.CodatBanking(
2020
security=shared.Security(
2121
auth_header="YOUR_API_KEY_HERE",
2222
),

banking/RELEASES.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,36 @@ Based on:
174174
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Banking.yaml
175175
- Speakeasy CLI 1.19.3 (2.16.7) https://github.com/speakeasy-api/speakeasy
176176
### Releases
177-
- [PyPI v0.8.4] https://pypi.org/project/codat-banking/0.8.4 - banking
177+
- [PyPI v0.8.4] https://pypi.org/project/codat-banking/0.8.4 - banking
178+
179+
## 2023-04-06 00:02:42
180+
### Changes
181+
Based on:
182+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Banking.yaml
183+
- Speakeasy CLI 1.19.6 (2.17.8) https://github.com/speakeasy-api/speakeasy
184+
### Releases
185+
- [PyPI v0.9.0] https://pypi.org/project/codat-banking/0.9.0 - banking
186+
187+
## 2023-04-12 00:02:35
188+
### Changes
189+
Based on:
190+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Banking.yaml
191+
- Speakeasy CLI 1.19.7 (2.17.9) https://github.com/speakeasy-api/speakeasy
192+
### Releases
193+
- [PyPI v0.9.1] https://pypi.org/project/codat-banking/0.9.1 - banking
194+
195+
## 2023-04-14 00:02:37
196+
### Changes
197+
Based on:
198+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Banking.yaml
199+
- Speakeasy CLI 1.20.0 (2.18.0) https://github.com/speakeasy-api/speakeasy
200+
### Releases
201+
- [PyPI v0.10.0] https://pypi.org/project/codat-banking/0.10.0 - banking
202+
203+
## 2023-04-18 00:02:27
204+
### Changes
205+
Based on:
206+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Banking.yaml
207+
- Speakeasy CLI 1.20.1 (2.18.1) https://github.com/speakeasy-api/speakeasy
208+
### Releases
209+
- [PyPI v0.10.1] https://pypi.org/project/codat-banking/0.10.1 - banking

banking/USAGE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!-- Start SDK Example Usage -->
22
```python
3-
import codat
4-
from codat.models import operations, shared
3+
import codatbanking
4+
from codatbanking.models import operations, shared
55

6-
s = codat.Codat(
6+
s = codatbanking.CodatBanking(
77
security=shared.Security(
88
auth_header="YOUR_API_KEY_HERE",
99
),

banking/files.gen

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
src/codat/account_balances.py
2-
src/codat/accounts.py
3-
src/codat/transaction_categories.py
4-
src/codat/transactions.py
5-
src/codat/sdk.py
1+
src/codatbanking/account_balances.py
2+
src/codatbanking/accounts.py
3+
src/codatbanking/transaction_categories.py
4+
src/codatbanking/transactions.py
5+
src/codatbanking/sdk.py
66
pylintrc
77
setup.py
8-
src/codat/__init__.py
9-
src/codat/models/__init__.py
10-
src/codat/utils/__init__.py
11-
src/codat/utils/retries.py
12-
src/codat/utils/utils.py
13-
src/codat/models/operations/list_account_balances.py
14-
src/codat/models/operations/get_account.py
15-
src/codat/models/operations/list_accounts.py
16-
src/codat/models/operations/get_transaction_category.py
17-
src/codat/models/operations/list_transaction_categories.py
18-
src/codat/models/operations/get_transaction.py
19-
src/codat/models/operations/list_bank_transactions.py
20-
src/codat/models/operations/list_transactions.py
21-
src/codat/models/operations/__init__.py
22-
src/codat/models/shared/accountbalances.py
23-
src/codat/models/shared/accountbalance.py
24-
src/codat/models/shared/accountbalanceamounts.py
25-
src/codat/models/shared/links.py
26-
src/codat/models/shared/href.py
27-
src/codat/models/shared/account.py
28-
src/codat/models/shared/accounttype_enum.py
29-
src/codat/models/shared/accountinstitution.py
30-
src/codat/models/shared/accountidentifiers.py
31-
src/codat/models/shared/accountidentifiertype_enum.py
32-
src/codat/models/shared/accounts.py
33-
src/codat/models/shared/transactioncategory.py
34-
src/codat/models/shared/transactioncategorystatus_enum.py
35-
src/codat/models/shared/transactioncategories.py
36-
src/codat/models/shared/transaction.py
37-
src/codat/models/shared/transactioncategoryref.py
38-
src/codat/models/shared/transactioncode_enum.py
39-
src/codat/models/shared/transactions.py
40-
src/codat/models/shared/security.py
41-
src/codat/models/shared/__init__.py
8+
src/codatbanking/__init__.py
9+
src/codatbanking/models/__init__.py
10+
src/codatbanking/utils/__init__.py
11+
src/codatbanking/utils/retries.py
12+
src/codatbanking/utils/utils.py
13+
src/codatbanking/models/operations/list_account_balances.py
14+
src/codatbanking/models/operations/get_account.py
15+
src/codatbanking/models/operations/list_accounts.py
16+
src/codatbanking/models/operations/get_transaction_category.py
17+
src/codatbanking/models/operations/list_transaction_categories.py
18+
src/codatbanking/models/operations/get_transaction.py
19+
src/codatbanking/models/operations/list_bank_transactions.py
20+
src/codatbanking/models/operations/list_transactions.py
21+
src/codatbanking/models/operations/__init__.py
22+
src/codatbanking/models/shared/accountbalances.py
23+
src/codatbanking/models/shared/accountbalance.py
24+
src/codatbanking/models/shared/accountbalanceamounts.py
25+
src/codatbanking/models/shared/links.py
26+
src/codatbanking/models/shared/href.py
27+
src/codatbanking/models/shared/account.py
28+
src/codatbanking/models/shared/accounttype_enum.py
29+
src/codatbanking/models/shared/accountinstitution.py
30+
src/codatbanking/models/shared/accountidentifiers.py
31+
src/codatbanking/models/shared/accountidentifiertype_enum.py
32+
src/codatbanking/models/shared/accounts.py
33+
src/codatbanking/models/shared/transactioncategory.py
34+
src/codatbanking/models/shared/transactioncategorystatus_enum.py
35+
src/codatbanking/models/shared/transactioncategories.py
36+
src/codatbanking/models/shared/transaction.py
37+
src/codatbanking/models/shared/transactioncategoryref.py
38+
src/codatbanking/models/shared/transactioncode_enum.py
39+
src/codatbanking/models/shared/transactions.py
40+
src/codatbanking/models/shared/security.py
41+
src/codatbanking/models/shared/__init__.py
4242
USAGE.md

banking/gen.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
configVersion: 1.0.0
22
management:
3-
docChecksum: 28844c8dedeb3f25310054b80f9c6705
3+
docChecksum: b5ae7657de4fa507cc512f6388fc83b7
44
docVersion: 2.1.0
5-
speakeasyVersion: 1.19.3
6-
generationVersion: 2.16.7
5+
speakeasyVersion: 1.20.1
6+
generationVersion: 2.18.1
77
generation:
88
telemetryEnabled: false
99
sdkClassName: CodatBanking
10-
sdkFlattening: true
1110
singleTagPerOp: false
1211
python:
13-
version: 0.8.4
12+
version: 0.10.1
1413
author: Speakeasy
1514
description: Python Client SDK Generated by Speakeasy
1615
packageName: codat-banking

banking/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

banking/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-banking",
13-
version="0.8.4",
13+
version="0.10.1",
1414
author="Speakeasy",
1515
description="Python Client SDK Generated by Speakeasy",
1616
long_description=long_description,

banking/src/codat/account_balances.py renamed to banking/src/codatbanking/account_balances.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import requests as requests_http
44
from . import utils
5-
from codat.models import operations, shared
5+
from codatbanking.models import operations, shared
66
from typing import Optional
77

88
class AccountBalances:
@@ -22,7 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http
2222
self._sdk_version = sdk_version
2323
self._gen_version = gen_version
2424

25-
def list_account_balances(self, request: operations.ListAccountBalancesRequest) -> operations.ListAccountBalancesResponse:
25+
def list_account_balances(self, request: operations.ListAccountBalancesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListAccountBalancesResponse:
2626
r"""List account balances
2727
Gets a list of balances for a bank account including end-of-day batch balance or running balances per transaction.
2828
"""
@@ -34,7 +34,20 @@ def list_account_balances(self, request: operations.ListAccountBalancesRequest)
3434

3535
client = self._security_client
3636

37-
http_res = client.request('GET', url, params=query_params)
37+
retry_config = retries
38+
if retry_config is None:
39+
retry_config = utils.RetryConfig('backoff', True)
40+
retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000)
41+
42+
43+
def do_request():
44+
return client.request('GET', url, params=query_params)
45+
46+
http_res = utils.retry(do_request, utils.Retries(retry_config, [
47+
'408',
48+
'429',
49+
'5XX'
50+
]))
3851
content_type = http_res.headers.get('Content-Type')
3952

4053
res = operations.ListAccountBalancesResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import requests as requests_http
44
from . import utils
5-
from codat.models import operations, shared
5+
from codatbanking.models import operations, shared
66
from typing import Optional
77

88
class Accounts:
@@ -22,7 +22,7 @@ def __init__(self, client: requests_http.Session, security_client: requests_http
2222
self._sdk_version = sdk_version
2323
self._gen_version = gen_version
2424

25-
def get_account(self, request: operations.GetAccountRequest) -> operations.GetAccountResponse:
25+
def get_account(self, request: operations.GetAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetAccountResponse:
2626
r"""Get account
2727
Gets a specified bank account for a given company
2828
"""
@@ -33,7 +33,20 @@ def get_account(self, request: operations.GetAccountRequest) -> operations.GetAc
3333

3434
client = self._security_client
3535

36-
http_res = client.request('GET', url)
36+
retry_config = retries
37+
if retry_config is None:
38+
retry_config = utils.RetryConfig('backoff', True)
39+
retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000)
40+
41+
42+
def do_request():
43+
return client.request('GET', url)
44+
45+
http_res = utils.retry(do_request, utils.Retries(retry_config, [
46+
'408',
47+
'429',
48+
'5XX'
49+
]))
3750
content_type = http_res.headers.get('Content-Type')
3851

3952
res = operations.GetAccountResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
@@ -45,7 +58,7 @@ def get_account(self, request: operations.GetAccountRequest) -> operations.GetAc
4558

4659
return res
4760

48-
def list_accounts(self, request: operations.ListAccountsRequest) -> operations.ListAccountsResponse:
61+
def list_accounts(self, request: operations.ListAccountsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListAccountsResponse:
4962
r"""List accounts
5063
Gets a list of all bank accounts of the SMB, with rich data like balances, account numbers and institutions holdingthe accounts.
5164
"""
@@ -57,7 +70,20 @@ def list_accounts(self, request: operations.ListAccountsRequest) -> operations.L
5770

5871
client = self._security_client
5972

60-
http_res = client.request('GET', url, params=query_params)
73+
retry_config = retries
74+
if retry_config is None:
75+
retry_config = utils.RetryConfig('backoff', True)
76+
retry_config.backoff = utils.BackoffStrategy(500, 60000, 1.5, 3600000)
77+
78+
79+
def do_request():
80+
return client.request('GET', url, params=query_params)
81+
82+
http_res = utils.retry(do_request, utils.Retries(retry_config, [
83+
'408',
84+
'429',
85+
'5XX'
86+
]))
6187
content_type = http_res.headers.get('Content-Type')
6288

6389
res = operations.ListAccountsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)

0 commit comments

Comments
 (0)