-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from codatio/speakeasy-sdk-regen-1677684840
chore: speakeasy sdk regeneration - Generate Bank Feeds SDK
- Loading branch information
Showing
23 changed files
with
2,102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# codat-bankfeeds | ||
|
||
<!-- Start SDK Installation --> | ||
## SDK Installation | ||
|
||
```bash | ||
pip install codat-bankfeeds | ||
``` | ||
<!-- End SDK Installation --> | ||
|
||
## SDK Example Usage | ||
<!-- Start SDK Example Usage --> | ||
```python | ||
import codat | ||
from codat.models import operations, shared | ||
|
||
s = codat.Codat() | ||
s.config_security( | ||
security=shared.Security( | ||
api_key="YOUR_API_KEY_HERE", | ||
) | ||
) | ||
|
||
req = operations.GetBankAccountPushOptionsRequest( | ||
security=operations.GetBankAccountPushOptionsSecurity( | ||
api_key="YOUR_API_KEY_HERE", | ||
), | ||
path_params=operations.GetBankAccountPushOptionsPathParams( | ||
account_id="unde", | ||
company_id="deserunt", | ||
connection_id="porro", | ||
), | ||
query_params=operations.GetBankAccountPushOptionsQueryParams( | ||
order_by="nulla", | ||
page=6027.63, | ||
page_size=8579.46, | ||
query="perspiciatis", | ||
), | ||
) | ||
|
||
res = s.bank_account_transactions.get_bank_account_push_options(req) | ||
|
||
if res.push_option is not None: | ||
# handle response | ||
``` | ||
<!-- End SDK Example Usage --> | ||
|
||
<!-- Start SDK Available Operations --> | ||
## SDK Available Operations | ||
|
||
|
||
### bank_account_transactions | ||
|
||
* `get_bank_account_push_options` - List push options for bank account bank transactions | ||
* `list_all_bank_transactionscount` - List bank transactions for bank account | ||
* `post_bank_transactions` - Create bank transactions | ||
|
||
### bank_feed_accounts | ||
|
||
* `get_bank_feeds` - List bank feed bank accounts | ||
* `put_bank_feeds` - Update bank feed bank accounts | ||
* `update_bank_feed` - Update bank feed bank account | ||
<!-- End SDK Available Operations --> | ||
|
||
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
|
||
## 2023-03-01 15:34:00 | ||
### Changes | ||
Based on: | ||
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml | ||
- Speakeasy CLI 1.7.0 https://github.com/speakeasy-api/speakeasy | ||
### Releases | ||
- [PyPI v0.1.0] https://pypi.org/project/codat-bankfeeds/0.1.0 - bankfeeds | ||
|
||
## 2023-03-02 00:19:50 | ||
### Changes | ||
Based on: | ||
- OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml | ||
- Speakeasy CLI 1.7.1 https://github.com/speakeasy-api/speakeasy | ||
### Releases | ||
- [PyPI v0.1.1] https://pypi.org/project/codat-bankfeeds/0.1.1 - bankfeeds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- Start SDK Example Usage --> | ||
```python | ||
import codat | ||
from codat.models import operations, shared | ||
|
||
s = codat.Codat() | ||
s.config_security( | ||
security=shared.Security( | ||
api_key="YOUR_API_KEY_HERE", | ||
) | ||
) | ||
|
||
req = operations.GetBankAccountPushOptionsRequest( | ||
security=operations.GetBankAccountPushOptionsSecurity( | ||
api_key="YOUR_API_KEY_HERE", | ||
), | ||
path_params=operations.GetBankAccountPushOptionsPathParams( | ||
account_id="unde", | ||
company_id="deserunt", | ||
connection_id="porro", | ||
), | ||
query_params=operations.GetBankAccountPushOptionsQueryParams( | ||
order_by="nulla", | ||
page=6027.63, | ||
page_size=8579.46, | ||
query="perspiciatis", | ||
), | ||
) | ||
|
||
res = s.bank_account_transactions.get_bank_account_push_options(req) | ||
|
||
if res.push_option is not None: | ||
# handle response | ||
``` | ||
<!-- End SDK Example Usage --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
src/codat/bank_account_transactions.py | ||
src/codat/bank_feed_accounts.py | ||
src/codat/sdk.py | ||
setup.py | ||
src/codat/__init__.py | ||
src/codat/models/__init__.py | ||
src/codat/utils/__init__.py | ||
src/codat/utils/retries.py | ||
src/codat/utils/utils.py | ||
src/codat/models/operations/get_bank_account_push_options.py | ||
src/codat/models/operations/list_all_bank_transactionscount.py | ||
src/codat/models/operations/post_bank_transactions.py | ||
src/codat/models/operations/get_bank_feeds.py | ||
src/codat/models/operations/put_bank_feeds.py | ||
src/codat/models/operations/update_bank_feed.py | ||
src/codat/models/operations/__init__.py | ||
src/codat/models/shared/security.py | ||
src/codat/models/shared/__init__.py | ||
USAGE.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
configVersion: 1.0.0 | ||
management: | ||
docChecksum: 2850b50909854a03af955e915ac1f608 | ||
docVersion: 2.1.0 | ||
speakeasyVersion: 1.7.1 | ||
generation: | ||
telemetryEnabled: false | ||
sdkClassName: codat | ||
sdkFlattening: true | ||
python: | ||
version: 0.0.1 | ||
version: 0.1.1 | ||
author: Speakeasy | ||
description: Python Client SDK Generated by Speakeasy | ||
packageName: codat-bankfeeds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import setuptools | ||
|
||
try: | ||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
except FileNotFoundError: | ||
long_description = "" | ||
|
||
setuptools.setup( | ||
name="codat-bankfeeds", | ||
version="0.1.1", | ||
author="Speakeasy", | ||
description="Python Client SDK Generated by Speakeasy", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
packages=setuptools.find_packages(where="src"), | ||
install_requires=[ | ||
"certifi==2022.12.07", | ||
"charset-normalizer==2.1.1", | ||
"dataclasses-json-speakeasy==0.5.8", | ||
"idna==3.3", | ||
"marshmallow==3.17.1", | ||
"marshmallow-enum==1.5.1", | ||
"mypy-extensions==0.4.3", | ||
"packaging==21.3", | ||
"pyparsing==3.0.9", | ||
"python-dateutil==2.8.2", | ||
"requests==2.28.1", | ||
"six==1.16.0", | ||
"typing-inspect==0.8.0", | ||
"typing_extensions==4.3.0", | ||
"urllib3==1.26.12", | ||
], | ||
package_dir={'': 'src'}, | ||
python_requires='>=3.9' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .sdk import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import requests | ||
from . import utils | ||
from codat.models import operations | ||
from typing import Optional | ||
|
||
class BankAccountTransactions: | ||
_client: requests.Session | ||
_security_client: requests.Session | ||
_server_url: str | ||
_language: str | ||
_sdk_version: str | ||
_gen_version: str | ||
|
||
def __init__(self, client: requests.Session, security_client: requests.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None: | ||
self._client = client | ||
self._security_client = security_client | ||
self._server_url = server_url | ||
self._language = language | ||
self._sdk_version = sdk_version | ||
self._gen_version = gen_version | ||
|
||
|
||
def get_bank_account_push_options(self, request: operations.GetBankAccountPushOptionsRequest) -> operations.GetBankAccountPushOptionsResponse: | ||
r"""List push options for bank account bank transactions | ||
Gets the options of pushing bank account transactions. | ||
""" | ||
|
||
base_url = self._server_url | ||
|
||
url = utils.generate_url(base_url, "/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions", request.path_params) | ||
|
||
query_params = utils.get_query_params(request.query_params) | ||
|
||
client = utils.configure_security_client(self._client, request.security) | ||
|
||
r = client.request("GET", url, params=query_params) | ||
content_type = r.headers.get("Content-Type") | ||
|
||
res = operations.GetBankAccountPushOptionsResponse(status_code=r.status_code, content_type=content_type) | ||
|
||
if r.status_code == 200: | ||
if utils.match_content_type(content_type, "application/json"): | ||
out = utils.unmarshal_json(r.text, Optional[operations.GetBankAccountPushOptionsPushOption]) | ||
res.push_option = out | ||
|
||
return res | ||
|
||
|
||
def list_all_bank_transactionscount(self, request: operations.ListAllBankTransactionscountRequest) -> operations.ListAllBankTransactionscountResponse: | ||
r"""List bank transactions for bank account | ||
Gets bank transactions for a given bank account ID | ||
""" | ||
|
||
base_url = self._server_url | ||
|
||
url = utils.generate_url(base_url, "/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}/bankTransactions", request.path_params) | ||
|
||
query_params = utils.get_query_params(request.query_params) | ||
|
||
client = utils.configure_security_client(self._client, request.security) | ||
|
||
r = client.request("GET", url, params=query_params) | ||
content_type = r.headers.get("Content-Type") | ||
|
||
res = operations.ListAllBankTransactionscountResponse(status_code=r.status_code, content_type=content_type) | ||
|
||
if r.status_code == 200: | ||
if utils.match_content_type(content_type, "application/json"): | ||
out = utils.unmarshal_json(r.text, Optional[operations.ListAllBankTransactionscountLinks]) | ||
res.links = out | ||
|
||
return res | ||
|
||
|
||
def post_bank_transactions(self, request: operations.PostBankTransactionsRequest) -> operations.PostBankTransactionsResponse: | ||
r"""Create bank transactions | ||
Posts bank transactions to the accounting package for a given company. | ||
> **Supported Integrations** | ||
> | ||
> 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. | ||
""" | ||
|
||
base_url = self._server_url | ||
|
||
url = utils.generate_url(base_url, "/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}}/bankTransactions", request.path_params) | ||
|
||
headers = {} | ||
req_content_type, data, form = utils.serialize_request_body(request) | ||
if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": | ||
headers["content-type"] = req_content_type | ||
query_params = utils.get_query_params(request.query_params) | ||
|
||
client = utils.configure_security_client(self._client, request.security) | ||
|
||
r = client.request("POST", url, params=query_params, data=data, files=form, headers=headers) | ||
content_type = r.headers.get("Content-Type") | ||
|
||
res = operations.PostBankTransactionsResponse(status_code=r.status_code, content_type=content_type) | ||
|
||
if r.status_code == 200: | ||
if utils.match_content_type(content_type, "application/json"): | ||
out = utils.unmarshal_json(r.text, Optional[operations.PostBankTransactions200ApplicationJSON]) | ||
res.post_bank_transactions_200_application_json_object = out | ||
|
||
return res | ||
|
||
|
Oops, something went wrong.