Skip to content

Commit 849fd67

Browse files
Merge pull request #16 from codatio/speakeasy-sdk-regen-1677684840
chore: speakeasy sdk regeneration - Generate Bank Feeds SDK
2 parents 00fcceb + 7a27ac6 commit 849fd67

23 files changed

+2102
-1
lines changed

bankfeeds/README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# codat-bankfeeds
2+
3+
<!-- Start SDK Installation -->
4+
## SDK Installation
5+
6+
```bash
7+
pip install codat-bankfeeds
8+
```
9+
<!-- End SDK Installation -->
10+
11+
## SDK Example Usage
12+
<!-- Start SDK Example Usage -->
13+
```python
14+
import codat
15+
from codat.models import operations, shared
16+
17+
s = codat.Codat()
18+
s.config_security(
19+
security=shared.Security(
20+
api_key="YOUR_API_KEY_HERE",
21+
)
22+
)
23+
24+
req = operations.GetBankAccountPushOptionsRequest(
25+
security=operations.GetBankAccountPushOptionsSecurity(
26+
api_key="YOUR_API_KEY_HERE",
27+
),
28+
path_params=operations.GetBankAccountPushOptionsPathParams(
29+
account_id="unde",
30+
company_id="deserunt",
31+
connection_id="porro",
32+
),
33+
query_params=operations.GetBankAccountPushOptionsQueryParams(
34+
order_by="nulla",
35+
page=6027.63,
36+
page_size=8579.46,
37+
query="perspiciatis",
38+
),
39+
)
40+
41+
res = s.bank_account_transactions.get_bank_account_push_options(req)
42+
43+
if res.push_option is not None:
44+
# handle response
45+
```
46+
<!-- End SDK Example Usage -->
47+
48+
<!-- Start SDK Available Operations -->
49+
## SDK Available Operations
50+
51+
52+
### bank_account_transactions
53+
54+
* `get_bank_account_push_options` - List push options for bank account bank transactions
55+
* `list_all_bank_transactionscount` - List bank transactions for bank account
56+
* `post_bank_transactions` - Create bank transactions
57+
58+
### bank_feed_accounts
59+
60+
* `get_bank_feeds` - List bank feed bank accounts
61+
* `put_bank_feeds` - Update bank feed bank accounts
62+
* `update_bank_feed` - Update bank feed bank account
63+
<!-- End SDK Available Operations -->
64+
65+
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)

bankfeeds/RELEASES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
3+
## 2023-03-01 15:34:00
4+
### Changes
5+
Based on:
6+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml
7+
- Speakeasy CLI 1.7.0 https://github.com/speakeasy-api/speakeasy
8+
### Releases
9+
- [PyPI v0.1.0] https://pypi.org/project/codat-bankfeeds/0.1.0 - bankfeeds
10+
11+
## 2023-03-02 00:19:50
12+
### Changes
13+
Based on:
14+
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml
15+
- Speakeasy CLI 1.7.1 https://github.com/speakeasy-api/speakeasy
16+
### Releases
17+
- [PyPI v0.1.1] https://pypi.org/project/codat-bankfeeds/0.1.1 - bankfeeds

bankfeeds/USAGE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!-- Start SDK Example Usage -->
2+
```python
3+
import codat
4+
from codat.models import operations, shared
5+
6+
s = codat.Codat()
7+
s.config_security(
8+
security=shared.Security(
9+
api_key="YOUR_API_KEY_HERE",
10+
)
11+
)
12+
13+
req = operations.GetBankAccountPushOptionsRequest(
14+
security=operations.GetBankAccountPushOptionsSecurity(
15+
api_key="YOUR_API_KEY_HERE",
16+
),
17+
path_params=operations.GetBankAccountPushOptionsPathParams(
18+
account_id="unde",
19+
company_id="deserunt",
20+
connection_id="porro",
21+
),
22+
query_params=operations.GetBankAccountPushOptionsQueryParams(
23+
order_by="nulla",
24+
page=6027.63,
25+
page_size=8579.46,
26+
query="perspiciatis",
27+
),
28+
)
29+
30+
res = s.bank_account_transactions.get_bank_account_push_options(req)
31+
32+
if res.push_option is not None:
33+
# handle response
34+
```
35+
<!-- End SDK Example Usage -->

bankfeeds/files.gen

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
src/codat/bank_account_transactions.py
2+
src/codat/bank_feed_accounts.py
3+
src/codat/sdk.py
4+
setup.py
5+
src/codat/__init__.py
6+
src/codat/models/__init__.py
7+
src/codat/utils/__init__.py
8+
src/codat/utils/retries.py
9+
src/codat/utils/utils.py
10+
src/codat/models/operations/get_bank_account_push_options.py
11+
src/codat/models/operations/list_all_bank_transactionscount.py
12+
src/codat/models/operations/post_bank_transactions.py
13+
src/codat/models/operations/get_bank_feeds.py
14+
src/codat/models/operations/put_bank_feeds.py
15+
src/codat/models/operations/update_bank_feed.py
16+
src/codat/models/operations/__init__.py
17+
src/codat/models/shared/security.py
18+
src/codat/models/shared/__init__.py
19+
USAGE.md

bankfeeds/gen.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
configVersion: 1.0.0
2+
management:
3+
docChecksum: 2850b50909854a03af955e915ac1f608
4+
docVersion: 2.1.0
5+
speakeasyVersion: 1.7.1
26
generation:
7+
telemetryEnabled: false
38
sdkClassName: codat
49
sdkFlattening: true
510
python:
6-
version: 0.0.1
11+
version: 0.1.1
12+
author: Speakeasy
13+
description: Python Client SDK Generated by Speakeasy
714
packageName: codat-bankfeeds

bankfeeds/setup.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import setuptools
2+
3+
try:
4+
with open("README.md", "r") as fh:
5+
long_description = fh.read()
6+
except FileNotFoundError:
7+
long_description = ""
8+
9+
setuptools.setup(
10+
name="codat-bankfeeds",
11+
version="0.1.1",
12+
author="Speakeasy",
13+
description="Python Client SDK Generated by Speakeasy",
14+
long_description=long_description,
15+
long_description_content_type="text/markdown",
16+
packages=setuptools.find_packages(where="src"),
17+
install_requires=[
18+
"certifi==2022.12.07",
19+
"charset-normalizer==2.1.1",
20+
"dataclasses-json-speakeasy==0.5.8",
21+
"idna==3.3",
22+
"marshmallow==3.17.1",
23+
"marshmallow-enum==1.5.1",
24+
"mypy-extensions==0.4.3",
25+
"packaging==21.3",
26+
"pyparsing==3.0.9",
27+
"python-dateutil==2.8.2",
28+
"requests==2.28.1",
29+
"six==1.16.0",
30+
"typing-inspect==0.8.0",
31+
"typing_extensions==4.3.0",
32+
"urllib3==1.26.12",
33+
],
34+
package_dir={'': 'src'},
35+
python_requires='>=3.9'
36+
)

bankfeeds/src/codat/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .sdk import *
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
import requests
2+
from . import utils
3+
from codat.models import operations
4+
from typing import Optional
5+
6+
class BankAccountTransactions:
7+
_client: requests.Session
8+
_security_client: requests.Session
9+
_server_url: str
10+
_language: str
11+
_sdk_version: str
12+
_gen_version: str
13+
14+
def __init__(self, client: requests.Session, security_client: requests.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None:
15+
self._client = client
16+
self._security_client = security_client
17+
self._server_url = server_url
18+
self._language = language
19+
self._sdk_version = sdk_version
20+
self._gen_version = gen_version
21+
22+
23+
def get_bank_account_push_options(self, request: operations.GetBankAccountPushOptionsRequest) -> operations.GetBankAccountPushOptionsResponse:
24+
r"""List push options for bank account bank transactions
25+
Gets the options of pushing bank account transactions.
26+
"""
27+
28+
base_url = self._server_url
29+
30+
url = utils.generate_url(base_url, "/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions", request.path_params)
31+
32+
query_params = utils.get_query_params(request.query_params)
33+
34+
client = utils.configure_security_client(self._client, request.security)
35+
36+
r = client.request("GET", url, params=query_params)
37+
content_type = r.headers.get("Content-Type")
38+
39+
res = operations.GetBankAccountPushOptionsResponse(status_code=r.status_code, content_type=content_type)
40+
41+
if r.status_code == 200:
42+
if utils.match_content_type(content_type, "application/json"):
43+
out = utils.unmarshal_json(r.text, Optional[operations.GetBankAccountPushOptionsPushOption])
44+
res.push_option = out
45+
46+
return res
47+
48+
49+
def list_all_bank_transactionscount(self, request: operations.ListAllBankTransactionscountRequest) -> operations.ListAllBankTransactionscountResponse:
50+
r"""List bank transactions for bank account
51+
Gets bank transactions for a given bank account ID
52+
"""
53+
54+
base_url = self._server_url
55+
56+
url = utils.generate_url(base_url, "/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}/bankTransactions", request.path_params)
57+
58+
query_params = utils.get_query_params(request.query_params)
59+
60+
client = utils.configure_security_client(self._client, request.security)
61+
62+
r = client.request("GET", url, params=query_params)
63+
content_type = r.headers.get("Content-Type")
64+
65+
res = operations.ListAllBankTransactionscountResponse(status_code=r.status_code, content_type=content_type)
66+
67+
if r.status_code == 200:
68+
if utils.match_content_type(content_type, "application/json"):
69+
out = utils.unmarshal_json(r.text, Optional[operations.ListAllBankTransactionscountLinks])
70+
res.links = out
71+
72+
return res
73+
74+
75+
def post_bank_transactions(self, request: operations.PostBankTransactionsRequest) -> operations.PostBankTransactionsResponse:
76+
r"""Create bank transactions
77+
Posts bank transactions to the accounting package for a given company.
78+
79+
> **Supported Integrations**
80+
>
81+
> Check out our [Knowledge UI](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support POST methods.
82+
"""
83+
84+
base_url = self._server_url
85+
86+
url = utils.generate_url(base_url, "/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}}/bankTransactions", request.path_params)
87+
88+
headers = {}
89+
req_content_type, data, form = utils.serialize_request_body(request)
90+
if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed":
91+
headers["content-type"] = req_content_type
92+
query_params = utils.get_query_params(request.query_params)
93+
94+
client = utils.configure_security_client(self._client, request.security)
95+
96+
r = client.request("POST", url, params=query_params, data=data, files=form, headers=headers)
97+
content_type = r.headers.get("Content-Type")
98+
99+
res = operations.PostBankTransactionsResponse(status_code=r.status_code, content_type=content_type)
100+
101+
if r.status_code == 200:
102+
if utils.match_content_type(content_type, "application/json"):
103+
out = utils.unmarshal_json(r.text, Optional[operations.PostBankTransactions200ApplicationJSON])
104+
res.post_bank_transactions_200_application_json_object = out
105+
106+
return res
107+
108+

0 commit comments

Comments
 (0)