diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 646fbad12..5403313b7 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -14,6 +14,13 @@ sources:
tags:
- latest
- main
+ bank-feeds-source:
+ sourceNamespace: bank-feeds-source
+ sourceRevisionDigest: sha256:2bf52af4a0753c29a508bf534075c9fc6bbd4ba070605d3c7d4e092a9f3733cf
+ sourceBlobDigest: sha256:24d837ec7ccccb55559e6de16951a64c09874b48e5ca92b7af36ea0b95b0eac2
+ tags:
+ - latest
+ - main
lending-source:
sourceNamespace: lending-source
sourceRevisionDigest: sha256:e9279793fec15674c2c6ff77d11be16f6945b43d47b8005e68d7300da68a24a4
@@ -32,6 +39,11 @@ targets:
sourceNamespace: assess-source
sourceRevisionDigest: sha256:fc689a909f3360047c372a7fa75818d0909de3c521b92f4c30037918524de981
sourceBlobDigest: sha256:93a5943e66c0bec898e50532b545a9e2694aa004d1e763c9fadc7424a311c2ed
+ bank-feeds-library:
+ source: bank-feeds-source
+ sourceNamespace: bank-feeds-source
+ sourceRevisionDigest: sha256:2bf52af4a0753c29a508bf534075c9fc6bbd4ba070605d3c7d4e092a9f3733cf
+ sourceBlobDigest: sha256:24d837ec7ccccb55559e6de16951a64c09874b48e5ca92b7af36ea0b95b0eac2
lending-library:
source: lending-source
sourceNamespace: lending-source
diff --git a/bank-feeds/.gitignore b/bank-feeds/.gitignore
index 8ac3f51d4..f49ed9610 100755
--- a/bank-feeds/.gitignore
+++ b/bank-feeds/.gitignore
@@ -1,3 +1,6 @@
+.venv/
+pyrightconfig.json
+README-PYPI.md
.python-version
.DS_Store
venv/
diff --git a/bank-feeds/.speakeasy/gen.lock b/bank-feeds/.speakeasy/gen.lock
index ba7175723..68e77003b 100755
--- a/bank-feeds/.speakeasy/gen.lock
+++ b/bank-feeds/.speakeasy/gen.lock
@@ -1,261 +1,1074 @@
lockVersion: 2.0.0
id: 07093ad1-99d8-4bbd-a29c-a624e1b0e25a
management:
- docChecksum: 4dc8263ccdcfe623fbd51a2f54a06f5d
+ docChecksum: 013890de98917d65fc592f4de8d32cf4
docVersion: 3.0.0
- speakeasyVersion: internal
- generationVersion: 2.257.2
- releaseVersion: 6.1.1
- configChecksum: e5708ca5e72122e988345930b5e76592
+ speakeasyVersion: 1.396.6
+ generationVersion: 2.415.6
+ releaseVersion: 7.0.0
+ configChecksum: 7cbc03e2137e5a741bb7ee86bb025764
repoURL: https://github.com/codatio/client-sdk-python.git
repoSubDirectory: bank-feeds
installationURL: https://github.com/codatio/client-sdk-python.git#subdirectory=bank-feeds
published: true
features:
python:
- constsAndDefaults: 0.1.2
- core: 4.4.6
- deprecations: 2.81.1
- examples: 2.81.3
- globalSecurity: 2.83.2
- globalServerURLs: 2.82.1
- inputOutputModels: 2.83.1
- nameOverrides: 2.81.1
- retries: 2.82.1
+ additionalDependencies: 1.0.0
+ constsAndDefaults: 1.0.2
+ core: 5.5.3
+ decimal: 1.0.0
+ defaultEnabledRetries: 0.2.0
+ deprecations: 3.0.0
+ enumUnions: 0.1.0
+ envVarSecurityUsage: 0.3.1
+ examples: 3.0.0
+ globalSecurity: 3.0.2
+ globalSecurityCallbacks: 1.0.0
+ globalServerURLs: 3.0.0
+ inputOutputModels: 3.0.0
+ nameOverrides: 3.0.0
+ nullables: 1.0.0
+ responseFormat: 1.0.0
+ retries: 3.0.2
+ sdkHooks: 1.0.0
+ serverEventsSentinels: 0.1.0
+ unions: 3.0.2
+ webhooks: 2.0.0
generatedFiles:
- - src/codatbankfeeds/sdkconfiguration.py
- - src/codatbankfeeds/companies.py
- - src/codatbankfeeds/connections.py
- - src/codatbankfeeds/account_mapping.py
- - src/codatbankfeeds/source_accounts.py
- - src/codatbankfeeds/bank_accounts.py
- - src/codatbankfeeds/transactions.py
- - src/codatbankfeeds/configuration.py
- - src/codatbankfeeds/sdk.py
- - pylintrc
- - setup.py
- - src/codatbankfeeds/__init__.py
- - src/codatbankfeeds/utils/__init__.py
- - src/codatbankfeeds/utils/retries.py
- - src/codatbankfeeds/utils/utils.py
- - src/codatbankfeeds/models/errors/sdkerror.py
- - tests/helpers.py
- - src/codatbankfeeds/models/operations/create_company.py
- - src/codatbankfeeds/models/operations/delete_company.py
- - src/codatbankfeeds/models/operations/get_company.py
- - src/codatbankfeeds/models/operations/list_companies.py
- - src/codatbankfeeds/models/operations/update_company.py
- - src/codatbankfeeds/models/operations/create_connection.py
- - src/codatbankfeeds/models/operations/delete_connection.py
- - src/codatbankfeeds/models/operations/get_connection.py
- - src/codatbankfeeds/models/operations/list_connections.py
- - src/codatbankfeeds/models/operations/unlink_connection.py
- - src/codatbankfeeds/models/operations/create_bank_account_mapping.py
- - src/codatbankfeeds/models/operations/get_bank_account_mapping.py
- - src/codatbankfeeds/models/operations/create_source_account.py
- - src/codatbankfeeds/models/operations/delete_source_account.py
- - src/codatbankfeeds/models/operations/delete_bank_feed_credentials.py
- - src/codatbankfeeds/models/operations/generate_credentials.py
- - src/codatbankfeeds/models/operations/list_source_accounts.py
- - src/codatbankfeeds/models/operations/update_source_account.py
- - src/codatbankfeeds/models/operations/create_bank_account.py
- - src/codatbankfeeds/models/operations/get_create_bankaccounts_model.py
- - src/codatbankfeeds/models/operations/list_bank_accounts.py
- - src/codatbankfeeds/models/operations/create_bank_transactions.py
- - src/codatbankfeeds/models/operations/get_create_operation.py
- - src/codatbankfeeds/models/operations/list_create_operations.py
- - src/codatbankfeeds/models/operations/get_configuration.py
- - src/codatbankfeeds/models/operations/set_configuration.py
- - src/codatbankfeeds/models/shared/zero.py
- - src/codatbankfeeds/models/shared/company.py
- - src/codatbankfeeds/models/shared/connection.py
- - src/codatbankfeeds/models/shared/dataconnectionstatus.py
- - src/codatbankfeeds/models/shared/dataconnectionerror.py
- - src/codatbankfeeds/models/shared/errorvalidation.py
- - src/codatbankfeeds/models/shared/errorvalidationitem.py
- - src/codatbankfeeds/models/shared/companyrequestbody.py
- - src/codatbankfeeds/models/shared/items.py
- - src/codatbankfeeds/models/shared/companies.py
- - src/codatbankfeeds/models/shared/links.py
- - src/codatbankfeeds/models/shared/halref.py
- - src/codatbankfeeds/models/shared/connections.py
- - src/codatbankfeeds/models/shared/bankfeedaccountmappingresponse.py
- - src/codatbankfeeds/models/shared/bankfeedmapping.py
- - src/codatbankfeeds/models/shared/targetaccountoption.py
- - src/codatbankfeeds/models/shared/sourceaccount.py
- - src/codatbankfeeds/models/shared/bankaccountcredentials.py
- - src/codatbankfeeds/models/shared/bankaccountcreateresponse.py
- - src/codatbankfeeds/models/shared/validation.py
- - src/codatbankfeeds/models/shared/validationitem.py
- - src/codatbankfeeds/models/shared/pushoperationstatus.py
- - src/codatbankfeeds/models/shared/datatype.py
- - src/codatbankfeeds/models/shared/pushoperationchange.py
- - src/codatbankfeeds/models/shared/pushchangetype.py
- - src/codatbankfeeds/models/shared/pushoperationref.py
- - src/codatbankfeeds/models/shared/bankaccountprototype.py
- - src/codatbankfeeds/models/shared/pushoption.py
- - src/codatbankfeeds/models/shared/pushvalidationinfo.py
- - src/codatbankfeeds/models/shared/pushfieldvalidation.py
- - src/codatbankfeeds/models/shared/pushoptiontype.py
- - src/codatbankfeeds/models/shared/pushoptionproperty.py
- - src/codatbankfeeds/models/shared/pushoptionchoice.py
- - src/codatbankfeeds/models/shared/bankaccounts.py
- - src/codatbankfeeds/models/shared/createbanktransactionsresponse.py
- - src/codatbankfeeds/models/shared/createbanktransactions.py
- - src/codatbankfeeds/models/shared/banktransactions.py
- - src/codatbankfeeds/models/shared/pushoperation.py
- - src/codatbankfeeds/models/shared/pushoperations.py
- - src/codatbankfeeds/models/shared/configuration.py
- - src/codatbankfeeds/models/shared/configurationschedule.py
- - src/codatbankfeeds/models/shared/syncconfiguration.py
- - src/codatbankfeeds/models/shared/syncasexpenses.py
- - src/codatbankfeeds/models/shared/configurationsupplier.py
- - src/codatbankfeeds/models/shared/configurationcontactref.py
- - src/codatbankfeeds/models/shared/configurationcustomer.py
- - src/codatbankfeeds/models/shared/bankaccountoption.py
- - src/codatbankfeeds/models/shared/syncasbankfeeds.py
- - src/codatbankfeeds/models/shared/security.py
- - src/codatbankfeeds/models/shared/clientratelimitreachedwebhook.py
- - src/codatbankfeeds/models/shared/clientratelimitreachedwebhookdata.py
- - src/codatbankfeeds/models/shared/clientratelimitresetwebhook.py
- - src/codatbankfeeds/models/shared/clientratelimitresetwebhookdata.py
- - src/codatbankfeeds/models/errors/errormessage.py
- - src/codatbankfeeds/models/webhooks/client_rate_limit_reached.py
- - src/codatbankfeeds/models/webhooks/client_rate_limit_reset.py
- - src/codatbankfeeds/models/__init__.py
- - src/codatbankfeeds/models/errors/__init__.py
- - src/codatbankfeeds/models/operations/__init__.py
- - src/codatbankfeeds/models/shared/__init__.py
- - src/codatbankfeeds/models/webhooks/__init__.py
- - docs/models/operations/createcompanyresponse.md
- - docs/models/operations/deletecompanyrequest.md
- - docs/models/operations/deletecompanyresponse.md
- - docs/models/operations/getcompanyrequest.md
- - docs/models/operations/getcompanyresponse.md
- - docs/models/operations/listcompaniesrequest.md
- - docs/models/operations/listcompaniesresponse.md
- - docs/models/operations/updatecompanyrequest.md
- - docs/models/operations/updatecompanyresponse.md
- - docs/models/operations/createconnectionrequestbody.md
- - docs/models/operations/createconnectionrequest.md
- - docs/models/operations/createconnectionresponse.md
- - docs/models/operations/deleteconnectionrequest.md
- - docs/models/operations/deleteconnectionresponse.md
- - docs/models/operations/getconnectionrequest.md
- - docs/models/operations/getconnectionresponse.md
- - docs/models/operations/listconnectionsrequest.md
- - docs/models/operations/listconnectionsresponse.md
- - docs/models/operations/unlinkconnectionupdateconnection.md
- - docs/models/operations/unlinkconnectionrequest.md
- - docs/models/operations/unlinkconnectionresponse.md
+ - .gitattributes
+ - .vscode/settings.json
+ - CONTRIBUTING.md
+ - USAGE.md
+ - docs/models/errors/errormessage.md
- docs/models/operations/createbankaccountmappingrequest.md
- - docs/models/operations/createbankaccountmappingresponse.md
- - docs/models/operations/getbankaccountmappingrequest.md
- - docs/models/operations/getbankaccountmappingresponse.md
+ - docs/models/operations/createbankaccountrequest.md
+ - docs/models/operations/createbanktransactionsrequest.md
+ - docs/models/operations/createconnectionrequest.md
+ - docs/models/operations/createconnectionrequestbody.md
- docs/models/operations/createsourceaccountrequest.md
- - docs/models/operations/createsourceaccountresponse.md
- - docs/models/operations/deletesourceaccountrequest.md
- - docs/models/operations/deletesourceaccountresponse.md
+ - docs/models/operations/createsourceaccountrequestbody.md
+ - docs/models/operations/createsourceaccountresponsebody.md
- docs/models/operations/deletebankfeedcredentialsrequest.md
- - docs/models/operations/deletebankfeedcredentialsresponse.md
+ - docs/models/operations/deletecompanyrequest.md
+ - docs/models/operations/deleteconnectionrequest.md
+ - docs/models/operations/deletesourceaccountrequest.md
- docs/models/operations/generatecredentialsrequest.md
- - docs/models/operations/generatecredentialsresponse.md
- - docs/models/operations/listsourceaccountsrequest.md
- - docs/models/operations/listsourceaccountsresponse.md
- - docs/models/operations/updatesourceaccountrequest.md
- - docs/models/operations/updatesourceaccountresponse.md
- - docs/models/operations/createbankaccountrequest.md
- - docs/models/operations/createbankaccountresponse.md
+ - docs/models/operations/getbankaccountmappingrequest.md
+ - docs/models/operations/getcompanyinformationrequest.md
+ - docs/models/operations/getcompanyrequest.md
+ - docs/models/operations/getconfigurationrequest.md
+ - docs/models/operations/getconnectionrequest.md
- docs/models/operations/getcreatebankaccountsmodelrequest.md
- - docs/models/operations/getcreatebankaccountsmodelresponse.md
- - docs/models/operations/listbankaccountsrequest.md
- - docs/models/operations/listbankaccountsresponse.md
- - docs/models/operations/createbanktransactionsrequest.md
- - docs/models/operations/createbanktransactionsresponse.md
- docs/models/operations/getcreateoperationrequest.md
- - docs/models/operations/getcreateoperationresponse.md
+ - docs/models/operations/getlastsuccessfulrequest.md
+ - docs/models/operations/listbankaccountsrequest.md
+ - docs/models/operations/listcompaniesrequest.md
+ - docs/models/operations/listconnectionsrequest.md
- docs/models/operations/listcreateoperationsrequest.md
- - docs/models/operations/listcreateoperationsresponse.md
- - docs/models/operations/getconfigurationrequest.md
- - docs/models/operations/getconfigurationresponse.md
+ - docs/models/operations/listsourceaccountsrequest.md
+ - docs/models/operations/listsourceaccountsresponsebody.md
- docs/models/operations/setconfigurationrequest.md
- - docs/models/operations/setconfigurationresponse.md
- - docs/models/shared/zero.md
- - docs/models/shared/groupreference.md
+ - docs/models/operations/unlinkconnectionrequest.md
+ - docs/models/operations/unlinkconnectionupdateconnection.md
+ - docs/models/operations/updatecompanyrequest.md
+ - docs/models/operations/updatesourceaccountrequest.md
+ - docs/models/shared/accountinfo.md
+ - docs/models/shared/accountingbankaccount.md
+ - docs/models/shared/accounttype.md
+ - docs/models/shared/bankaccountcreateresponse.md
+ - docs/models/shared/bankaccountcreateresponsebankaccounttype.md
+ - docs/models/shared/bankaccountcredentials.md
+ - docs/models/shared/bankaccountoption.md
+ - docs/models/shared/bankaccountprototype.md
+ - docs/models/shared/bankaccounts.md
+ - docs/models/shared/bankaccountsaccountingbankaccount.md
+ - docs/models/shared/bankaccountsbankaccounttype.md
+ - docs/models/shared/bankaccountsmetadata.md
+ - docs/models/shared/bankaccountssupplementaldata.md
+ - docs/models/shared/bankaccountstatus.md
+ - docs/models/shared/bankaccounttype.md
+ - docs/models/shared/bankfeedaccountmapping.md
+ - docs/models/shared/bankfeedaccountmappingresponse.md
+ - docs/models/shared/bankfeedmapping.md
+ - docs/models/shared/banktransactions.md
+ - docs/models/shared/banktransactiontype.md
+ - docs/models/shared/clientratelimitreachedwebhook.md
+ - docs/models/shared/clientratelimitreachedwebhookdata.md
+ - docs/models/shared/clientratelimitresetwebhook.md
+ - docs/models/shared/clientratelimitresetwebhookdata.md
+ - docs/models/shared/clientratelimitwebhook.md
+ - docs/models/shared/clientratelimitwebhookpayload.md
+ - docs/models/shared/companies.md
- docs/models/shared/company.md
- - docs/models/shared/sourcetype.md
+ - docs/models/shared/companyinformation.md
+ - docs/models/shared/companyrequestbody.md
+ - docs/models/shared/companysyncstatus.md
+ - docs/models/shared/configuration.md
+ - docs/models/shared/configurationcontactref.md
+ - docs/models/shared/configurationcustomer.md
+ - docs/models/shared/configurationschedule.md
+ - docs/models/shared/configurationsupplier.md
- docs/models/shared/connection.md
- - docs/models/shared/dataconnectionstatus.md
+ - docs/models/shared/connections.md
+ - docs/models/shared/createbanktransactions.md
+ - docs/models/shared/createbanktransactionsresponse.md
- docs/models/shared/dataconnectionerror.md
+ - docs/models/shared/dataconnectionstatus.md
+ - docs/models/shared/datatype.md
+ - docs/models/shared/errorstatus.md
- docs/models/shared/errorvalidation.md
- docs/models/shared/errorvalidationitem.md
- - docs/models/shared/companyrequestbody.md
- - docs/models/shared/items.md
- - docs/models/shared/companies.md
- - docs/models/shared/links.md
+ - docs/models/shared/groupreference.md
- docs/models/shared/halref.md
- - docs/models/shared/connections.md
- - docs/models/shared/bankfeedaccountmappingresponse.md
- - docs/models/shared/bankfeedmapping.md
- - docs/models/shared/targetaccountoption.md
- - docs/models/shared/sourceaccount.md
- - docs/models/shared/bankaccountcredentials.md
- - docs/models/shared/bankaccountcreateresponsebankaccounttype.md
+ - docs/models/shared/links.md
- docs/models/shared/metadata.md
- - docs/models/shared/supplementaldata.md
- - docs/models/shared/accountingbankaccount.md
- - docs/models/shared/bankaccountcreateresponse.md
- - docs/models/shared/validation.md
- - docs/models/shared/validationitem.md
- - docs/models/shared/pushoperationstatus.md
- - docs/models/shared/datatype.md
- - docs/models/shared/pushoperationchange.md
- docs/models/shared/pushchangetype.md
- - docs/models/shared/pushoperationref.md
- - docs/models/shared/bankaccounttype.md
- - docs/models/shared/bankaccountprototype.md
- - docs/models/shared/pushoption.md
- - docs/models/shared/pushvalidationinfo.md
- docs/models/shared/pushfieldvalidation.md
- - docs/models/shared/pushoptiontype.md
- - docs/models/shared/pushoptionproperty.md
- - docs/models/shared/pushoptionchoice.md
- - docs/models/shared/bankaccountsbankaccounttype.md
- - docs/models/shared/bankaccountsmetadata.md
- - docs/models/shared/bankaccountssupplementaldata.md
- - docs/models/shared/bankaccountsaccountingbankaccount.md
- - docs/models/shared/bankaccounts.md
- - docs/models/shared/createbanktransactionsresponse.md
- - docs/models/shared/createbanktransactions.md
- - docs/models/shared/banktransactiontype.md
- - docs/models/shared/banktransactions.md
- docs/models/shared/pushoperation.md
+ - docs/models/shared/pushoperationchange.md
+ - docs/models/shared/pushoperationref.md
- docs/models/shared/pushoperations.md
- - docs/models/shared/configuration.md
- - docs/models/shared/configurationschedule.md
- - docs/models/shared/syncconfiguration.md
- - docs/models/shared/syncasexpenses.md
- - docs/models/shared/configurationsupplier.md
- - docs/models/shared/configurationcontactref.md
- - docs/models/shared/configurationcustomer.md
- - docs/models/shared/bankaccountoption.md
- - docs/models/shared/syncasbankfeeds.md
+ - docs/models/shared/pushoperationstatus.md
+ - docs/models/shared/pushoption.md
+ - docs/models/shared/pushoptionchoice.md
+ - docs/models/shared/pushoptionproperty.md
+ - docs/models/shared/pushoptiontype.md
+ - docs/models/shared/pushvalidationinfo.md
+ - docs/models/shared/routinginfo.md
- docs/models/shared/security.md
- - docs/models/shared/clientratelimitreachedwebhook.md
- - docs/models/shared/clientratelimitreachedwebhookdata.md
- - docs/models/shared/clientratelimitresetwebhook.md
- - docs/models/shared/clientratelimitresetwebhookdata.md
- - docs/models/errors/errormessage.md
- - docs/models/webhooks/clientratelimitreachedresponse.md
- - docs/models/webhooks/clientratelimitresetresponse.md
- - docs/sdks/codatbankfeeds/README.md
+ - docs/models/shared/sourceaccount.md
+ - docs/models/shared/sourceaccountv2.md
+ - docs/models/shared/sourceaccountv2status.md
+ - docs/models/shared/sourceaccountwebhook.md
+ - docs/models/shared/sourceaccountwebhookpayload.md
+ - docs/models/shared/sourcetype.md
+ - docs/models/shared/status.md
+ - docs/models/shared/supplementaldata.md
+ - docs/models/shared/syncasbankfeeds.md
+ - docs/models/shared/syncasexpenses.md
+ - docs/models/shared/syncconfiguration.md
+ - docs/models/shared/tags.md
+ - docs/models/shared/targetaccountoption.md
+ - docs/models/shared/type.md
+ - docs/models/shared/validation.md
+ - docs/models/shared/validationitem.md
- docs/models/utils/retryconfig.md
+ - docs/sdks/accountmapping/README.md
+ - docs/sdks/bankaccounts/README.md
+ - docs/sdks/codatbankfeeds/README.md
- docs/sdks/companies/README.md
+ - docs/sdks/companyinformation/README.md
+ - docs/sdks/configuration/README.md
- docs/sdks/connections/README.md
- - docs/sdks/accountmapping/README.md
- docs/sdks/sourceaccounts/README.md
- - docs/sdks/bankaccounts/README.md
+ - docs/sdks/sync/README.md
- docs/sdks/transactions/README.md
- - docs/sdks/configuration/README.md
- - USAGE.md
- - .gitattributes
+ - poetry.toml
+ - py.typed
+ - pylintrc
+ - pyproject.toml
+ - scripts/compile.sh
+ - scripts/prepare-readme.py
+ - scripts/publish.sh
+ - src/codat_bankfeeds/__init__.py
+ - src/codat_bankfeeds/_hooks/__init__.py
+ - src/codat_bankfeeds/_hooks/sdkhooks.py
+ - src/codat_bankfeeds/_hooks/types.py
+ - src/codat_bankfeeds/account_mapping.py
+ - src/codat_bankfeeds/bank_accounts.py
+ - src/codat_bankfeeds/basesdk.py
+ - src/codat_bankfeeds/companies.py
+ - src/codat_bankfeeds/company_information.py
+ - src/codat_bankfeeds/configuration.py
+ - src/codat_bankfeeds/connections.py
+ - src/codat_bankfeeds/httpclient.py
+ - src/codat_bankfeeds/models/errors/__init__.py
+ - src/codat_bankfeeds/models/errors/errormessage.py
+ - src/codat_bankfeeds/models/errors/sdkerror.py
+ - src/codat_bankfeeds/models/operations/__init__.py
+ - src/codat_bankfeeds/models/operations/create_bank_account.py
+ - src/codat_bankfeeds/models/operations/create_bank_account_mapping.py
+ - src/codat_bankfeeds/models/operations/create_bank_transactions.py
+ - src/codat_bankfeeds/models/operations/create_connection.py
+ - src/codat_bankfeeds/models/operations/create_source_account.py
+ - src/codat_bankfeeds/models/operations/delete_bank_feed_credentials.py
+ - src/codat_bankfeeds/models/operations/delete_company.py
+ - src/codat_bankfeeds/models/operations/delete_connection.py
+ - src/codat_bankfeeds/models/operations/delete_source_account.py
+ - src/codat_bankfeeds/models/operations/generate_credentials.py
+ - src/codat_bankfeeds/models/operations/get_bank_account_mapping.py
+ - src/codat_bankfeeds/models/operations/get_company.py
+ - src/codat_bankfeeds/models/operations/get_company_information.py
+ - src/codat_bankfeeds/models/operations/get_configuration.py
+ - src/codat_bankfeeds/models/operations/get_connection.py
+ - src/codat_bankfeeds/models/operations/get_create_bankaccounts_model.py
+ - src/codat_bankfeeds/models/operations/get_create_operation.py
+ - src/codat_bankfeeds/models/operations/get_last_successful.py
+ - src/codat_bankfeeds/models/operations/list_bank_accounts.py
+ - src/codat_bankfeeds/models/operations/list_companies.py
+ - src/codat_bankfeeds/models/operations/list_connections.py
+ - src/codat_bankfeeds/models/operations/list_create_operations.py
+ - src/codat_bankfeeds/models/operations/list_source_accounts.py
+ - src/codat_bankfeeds/models/operations/set_configuration.py
+ - src/codat_bankfeeds/models/operations/unlink_connection.py
+ - src/codat_bankfeeds/models/operations/update_company.py
+ - src/codat_bankfeeds/models/operations/update_source_account.py
+ - src/codat_bankfeeds/models/shared/__init__.py
+ - src/codat_bankfeeds/models/shared/accountinfo.py
+ - src/codat_bankfeeds/models/shared/bankaccountcreateresponse.py
+ - src/codat_bankfeeds/models/shared/bankaccountcredentials.py
+ - src/codat_bankfeeds/models/shared/bankaccountoption.py
+ - src/codat_bankfeeds/models/shared/bankaccountprototype.py
+ - src/codat_bankfeeds/models/shared/bankaccounts.py
+ - src/codat_bankfeeds/models/shared/bankaccountstatus.py
+ - src/codat_bankfeeds/models/shared/bankfeedaccountmapping.py
+ - src/codat_bankfeeds/models/shared/bankfeedaccountmappingresponse.py
+ - src/codat_bankfeeds/models/shared/bankfeedmapping.py
+ - src/codat_bankfeeds/models/shared/banktransactions.py
+ - src/codat_bankfeeds/models/shared/clientratelimitreachedwebhook.py
+ - src/codat_bankfeeds/models/shared/clientratelimitreachedwebhookdata.py
+ - src/codat_bankfeeds/models/shared/clientratelimitresetwebhook.py
+ - src/codat_bankfeeds/models/shared/clientratelimitresetwebhookdata.py
+ - src/codat_bankfeeds/models/shared/clientratelimitwebhook.py
+ - src/codat_bankfeeds/models/shared/clientratelimitwebhookpayload.py
+ - src/codat_bankfeeds/models/shared/companies.py
+ - src/codat_bankfeeds/models/shared/company.py
+ - src/codat_bankfeeds/models/shared/companyinformation.py
+ - src/codat_bankfeeds/models/shared/companyrequestbody.py
+ - src/codat_bankfeeds/models/shared/companysyncstatus.py
+ - src/codat_bankfeeds/models/shared/configuration.py
+ - src/codat_bankfeeds/models/shared/configurationcontactref.py
+ - src/codat_bankfeeds/models/shared/configurationcustomer.py
+ - src/codat_bankfeeds/models/shared/configurationschedule.py
+ - src/codat_bankfeeds/models/shared/configurationsupplier.py
+ - src/codat_bankfeeds/models/shared/connection.py
+ - src/codat_bankfeeds/models/shared/connections.py
+ - src/codat_bankfeeds/models/shared/createbanktransactions.py
+ - src/codat_bankfeeds/models/shared/createbanktransactionsresponse.py
+ - src/codat_bankfeeds/models/shared/dataconnectionerror.py
+ - src/codat_bankfeeds/models/shared/dataconnectionstatus.py
+ - src/codat_bankfeeds/models/shared/datatype.py
+ - src/codat_bankfeeds/models/shared/errorvalidation.py
+ - src/codat_bankfeeds/models/shared/errorvalidationitem.py
+ - src/codat_bankfeeds/models/shared/halref.py
+ - src/codat_bankfeeds/models/shared/links.py
+ - src/codat_bankfeeds/models/shared/pushchangetype.py
+ - src/codat_bankfeeds/models/shared/pushfieldvalidation.py
+ - src/codat_bankfeeds/models/shared/pushoperation.py
+ - src/codat_bankfeeds/models/shared/pushoperationchange.py
+ - src/codat_bankfeeds/models/shared/pushoperationref.py
+ - src/codat_bankfeeds/models/shared/pushoperations.py
+ - src/codat_bankfeeds/models/shared/pushoperationstatus.py
+ - src/codat_bankfeeds/models/shared/pushoption.py
+ - src/codat_bankfeeds/models/shared/pushoptionchoice.py
+ - src/codat_bankfeeds/models/shared/pushoptionproperty.py
+ - src/codat_bankfeeds/models/shared/pushoptiontype.py
+ - src/codat_bankfeeds/models/shared/pushvalidationinfo.py
+ - src/codat_bankfeeds/models/shared/routinginfo.py
+ - src/codat_bankfeeds/models/shared/security.py
+ - src/codat_bankfeeds/models/shared/sourceaccount.py
+ - src/codat_bankfeeds/models/shared/sourceaccountv2.py
+ - src/codat_bankfeeds/models/shared/sourceaccountwebhook.py
+ - src/codat_bankfeeds/models/shared/sourceaccountwebhookpayload.py
+ - src/codat_bankfeeds/models/shared/syncasbankfeeds.py
+ - src/codat_bankfeeds/models/shared/syncasexpenses.py
+ - src/codat_bankfeeds/models/shared/syncconfiguration.py
+ - src/codat_bankfeeds/models/shared/targetaccountoption.py
+ - src/codat_bankfeeds/models/shared/validation.py
+ - src/codat_bankfeeds/models/shared/validationitem.py
+ - src/codat_bankfeeds/py.typed
+ - src/codat_bankfeeds/sdk.py
+ - src/codat_bankfeeds/sdkconfiguration.py
+ - src/codat_bankfeeds/source_accounts.py
+ - src/codat_bankfeeds/sync.py
+ - src/codat_bankfeeds/transactions.py
+ - src/codat_bankfeeds/types/__init__.py
+ - src/codat_bankfeeds/types/basemodel.py
+ - src/codat_bankfeeds/utils/__init__.py
+ - src/codat_bankfeeds/utils/annotations.py
+ - src/codat_bankfeeds/utils/enums.py
+ - src/codat_bankfeeds/utils/eventstreaming.py
+ - src/codat_bankfeeds/utils/forms.py
+ - src/codat_bankfeeds/utils/headers.py
+ - src/codat_bankfeeds/utils/logger.py
+ - src/codat_bankfeeds/utils/metadata.py
+ - src/codat_bankfeeds/utils/queryparams.py
+ - src/codat_bankfeeds/utils/requestbodies.py
+ - src/codat_bankfeeds/utils/retries.py
+ - src/codat_bankfeeds/utils/security.py
+ - src/codat_bankfeeds/utils/serializers.py
+ - src/codat_bankfeeds/utils/url.py
+ - src/codat_bankfeeds/utils/values.py
+examples:
+ create-company:
+ With no description:
+ requestBody:
+ application/json: {"description": "Requested early access to the new financing scheme.", "groups": [], "name": "Technicalium"}
+ responses:
+ "200":
+ application/json: {"created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "dataConnections": [], "description": "", "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "lastSync": "2022-10-23T00:00:00Z", "name": "Technicalium", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0"}
+ "400": {}
+ With a description:
+ requestBody:
+ application/json: {"description": "Technology services, including web and app design and development", "groups": [], "name": "Technicalium"}
+ responses:
+ "200":
+ application/json: {"created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "dataConnections": [], "description": "Technology services, including web and app design and development", "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "lastSync": "2022-10-23T00:00:00Z", "name": "Technicalium", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0"}
+ "400": {}
+ With a group:
+ requestBody:
+ application/json: {"description": "Requested early access to the new financing scheme.", "groups": [{"id": "d7a6c4b4-dc87-45f6-b803-62f466398680"}], "name": "Technicalium"}
+ responses:
+ "200":
+ application/json: {"created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "dataConnections": [], "description": "", "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "lastSync": "2022-10-23T00:00:00Z", "name": "Technicalium", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0"}
+ "400": {}
+ Malformed query:
+ requestBody:
+ application/json: {"description": "Requested early access to the new financing scheme.", "groups": [], "name": "Bank of Dave"}
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400}
+ delete-company:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ get-company:
+ Simple company:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ responses:
+ "200":
+ application/json: {"created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "dataConnections": [], "description": "", "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "lastSync": "2022-10-23T00:00:00Z", "name": "My First Company", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0"}
+ With groups:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ responses:
+ "200":
+ application/json: {"created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "dataConnections": [], "description": "", "id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "lastSync": "2022-10-23T00:00:00Z", "name": "My First Company", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0"}
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ list-companies:
+ "":
+ parameters:
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}, "self": {"href": "/companies/{id}/data/{dataType}"}}, "pageNumber": 1, "pageSize": 10, "results": [{"created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "dataConnections": [{"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}], "description": "Requested early access to the new financing scheme.", "id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "lastSync": "2022-01-01T12:00:00.000Z", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739"}], "totalResults": 1}
+ "400": {}
+ One company:
+ parameters:
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies?page=1&pageSize=100"}, "self": {"href": "/companies"}}, "pageNumber": 1, "pageSize": 100, "results": [{"created": "2022-01-01T11:30:00Z", "createdByUserName": "Mike Smith", "dataConnections": [{"created": "2022-01-01T11:30:00Z", "dataConnectionErrors": [], "id": "51baa045-4836-4317-a42e-3542e991e581", "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390", "integrationKey": "vjms", "lastSync": "2022-01-01T12:30:00.000Z", "linkUrl": "https://link-api.codat.io/companies/3fa85f64-5717-4562-b3fc-2c963f66afa6/connections/51baa045-4836-4317-a42e-3542e991e581/start", "platformName": "Pandle", "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b", "sourceType": "Accounting", "status": "Linked"}], "description": "My Test Company make testing software", "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "lastSync": "2022-01-01T12:30:00.000Z", "name": "My Test Company", "redirect": "https://link.codat.io/company/3fa85f64-5717-4562-b3fc-2c963f66afa6"}], "totalResults": 1}
+ List of Companies:
+ parameters:
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies?page=1&pageSize=100"}, "self": {"href": "/companies"}}, "pageNumber": 1, "pageSize": 100, "results": [{"created": "2022-01-01T11:30:00Z", "createdByUserName": "Joe Bloggs", "dataConnections": [{"created": "2022-01-01T11:30:00Z", "dataConnectionErrors": [], "id": "51baa045-4836-4317-a42e-3542e991e581", "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390", "integrationKey": "vjms", "lastSync": "2022-01-01T12:30:00.000Z", "linkUrl": "https://link-api.codat.io/companies/d1568dde-adf6-11ed-afa1-0242ac120002/connections/51baa045-4836-4317-a42e-3542e991e581/start", "platformName": "Pandle", "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b", "sourceType": "Accounting", "status": "Linked"}], "description": "Technology services, including web and app design and development", "id": "d1568dde-adf6-11ed-afa1-0242ac120002", "lastSync": "2022-01-01T12:30:00.000Z", "name": "Technicalium", "redirect": "https://link.codat.io/company/d1568dde-adf6-11ed-afa1-0242ac120002"}, {"created": "2022-01-01T11:30:00Z", "createdByUserName": "Mike Smith", "dataConnections": [{"created": "2022-01-01T11:30:00Z", "dataConnectionErrors": [], "id": "a70bc148-dc21-46b2-a257-d9c58ac15cbb", "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390", "integrationKey": "vjms", "lastSync": "2022-01-01T12:30:00.000Z", "linkUrl": "https://link-api.codat.io/companies/096db70b-78de-4ff0-aa98-299cb5fe17a0/connections/a70bc148-dc21-46b2-a257-d9c58ac15cbb/start", "platformName": "Pandle", "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b", "sourceType": "Accounting", "status": "Linked"}], "description": "A new digital agency with a passion for creating amazing digital experiences", "id": "096db70b-78de-4ff0-aa98-299cb5fe17a0", "lastSync": "2022-01-01T12:30:00.000Z", "name": "Godata", "redirect": "https://link.codat.io/company/096db70b-78de-4ff0-aa98-299cb5fe17a0"}], "totalResults": 2}
+ Malformed query:
+ parameters:
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error parsing query - Malformed query.", "service": "ClientsApi", "statusCode": 400}
+ Unresolved property:
+ parameters:
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "detailedErrorCode": 0, "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "service": "PullApi", "statusCode": 400}
+ update-company:
+ Update name:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ requestBody:
+ application/json: {"description": "Requested early access to the new financing scheme.", "groups": [], "name": "New Name"}
+ responses:
+ "200":
+ application/json: {"created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "dataConnections": [{"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}], "description": "Requested early access to the new financing scheme.", "id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "lastSync": "2022-01-01T12:00:00.000Z", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739"}
+ "401": {}
+ Update description:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ requestBody:
+ application/json: {"description": "Additional documents required", "groups": [], "name": "Same name"}
+ responses:
+ "200":
+ application/json: {"created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "dataConnections": [{"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}], "description": "Requested early access to the new financing scheme.", "id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "lastSync": "2022-01-01T12:00:00.000Z", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739"}
+ "401": {}
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ requestBody:
+ application/json: {"description": "Requested early access to the new financing scheme.", "groups": [], "name": "Bank of Dave"}
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ create-connection:
+ Connection:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ requestBody:
+ application/json: {"platformKey": "gbol"}
+ responses:
+ "200":
+ application/json: {"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ requestBody:
+ application/json: {"platformKey": "gbol"}
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ delete-connection:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ get-connection:
+ Connection:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ list-connections:
+ "":
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}, "self": {"href": "/companies/{id}/data/{dataType}"}}, "pageNumber": 1, "pageSize": 10, "results": [{"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}], "totalResults": 1}
+ "400": {}
+ Connections:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "string"}, "next": {"href": "string"}, "previous": {"href": "string"}, "self": {"href": "string"}}, "pageNumber": 0, "pageSize": 0, "results": [{"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}], "totalResults": 0}
+ Malformed query:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error parsing query - Malformed query.", "service": "ClientsApi", "statusCode": 400}
+ Unresolved property:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "detailedErrorCode": 0, "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "service": "PullApi", "statusCode": 400}
+ unlink-connection:
+ Example:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ requestBody:
+ application/json: {"status": "Unlinked"}
+ responses:
+ "200":
+ application/json: {"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}
+ "401": {}
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ create-bank-account-mapping:
+ Malformed query:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ requestBody:
+ application/json: {"sourceAccountId": "acc-002", "targetAccountId": "account-081"}
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400}
+ get-bank-account-mapping:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ get-company-information:
+ Malformed query:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400}
+ create-source-account:
+ Malformed query:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ requestBody:
+ application/json: {"accountInfo": {"accountOpenDate": "2023-05-06T00:00:00Z", "availableBalance": 10, "description": "account description 1", "nickname": "account 123"}, "accountName": "account-081", "accountNumber": "12345670", "accountType": "checking", "balance": 99.99, "currency": "GBP", "feedStartDate": "2024-05-01T00:00:00Z", "id": "acc-001", "modifiedDate": "2024-08-02T00:00:00.000Z", "routingInfo": {"bankCode": "21001088", "type": "bankcode"}, "status": "pending"}
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400}
+ delete-source-account:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ accountId: "7110701885"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ delete-bank-feed-credentials:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ generate-credentials:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ list-source-accounts:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ update-source-account:
+ Malformed query:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ accountId: "7110701885"
+ requestBody:
+ application/json: {"accountName": "account-095", "accountNumber": "12345671", "accountType": "Credit", "balance": 0, "currency": "USD", "feedStartDate": "2022-10-23T00:00:00Z", "id": "acc-003", "modifiedDate": "2023-01-09T14:14:14.1057478Z", "sortCode": "123456", "status": "pending"}
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400}
+ create-bank-account:
+ Malformed query:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query: {}
+ requestBody:
+ application/json: {"currency": "USD", "status": "Active"}
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400}
+ get-create-bankAccounts-model:
+ Dynamics 365 Business Central:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"description": "An account that bank transactions may be recorded against", "displayName": "Bank Account", "properties": {"accountName": {"description": "The name of the bank account in the originating system", "displayName": "Name", "required": true, "type": "String", "validation": {"information": [{"details": "Needs to be of the format '{No.}-{Name}'", "field": "AccountName"}], "warnings": []}}, "currency": {"description": "The currency of the bank account", "displayName": "Currency", "required": true, "type": "String"}, "accountNumber": {"description": "The account number for the bank account", "displayName": "Account Number", "required": false, "type": "String"}, "nominalCode": {"description": "The external reference given to each nominal account for a business", "displayName": "Nominal Code", "required": false, "type": "String", "validation": {"information": [{"details": "Bank Account Posting Group with Nominal Account must exist", "field": "NominalCode"}], "warnings": []}}, "sortCode": {"description": "The sort code for the bank account", "displayName": "Sort Code", "required": false, "type": "String", "validation": {"information": [{"details": "Must have a length between 0 and 20 characters", "field": "SortCode"}], "warnings": []}}, "iBan": {"description": "The international bank account number of the account. Often used when making or receiving international payments", "displayName": "IBAN", "required": false, "type": "String"}, "overdraftLimit": {"description": "The pre-arranged overdraft limit of the account", "displayName": "Overdraft Limit", "required": false, "type": "Number", "validation": {"information": [{"details": "Default value is 0", "field": "OverdraftLimit"}], "warnings": []}}}, "required": true, "type": "Object"}
+ Exact (Netherlands):
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"description": "An account that bank transactions may be recorded against", "displayName": "Bank Account", "properties": {"accountName": {"description": "The name of the bank account in the originating system", "displayName": "Name", "required": true, "type": "String"}, "accountNumber": {"description": "The account number for the bank account", "displayName": "Account Number", "required": true, "type": "String", "validation": {"information": [], "warnings": [{"details": "Should not exceed the maximum length of 14 characters if the specified currency is GBP.", "field": "AccountNumber"}]}}, "sortCode": {"description": "The sort code for the bank account", "displayName": "Sort Code", "required": false, "type": "String", "validation": {"information": [], "warnings": [{"details": "Must be 6 characters long if the specified currency is GBP.", "field": "SortCode"}, {"details": "Must be provided if the specified currency is GBP.", "field": "SortCode"}]}}, "currency": {"description": "The currency of the bank account", "displayName": "Currency", "required": false, "type": "String"}, "nominalCode": {"description": "The external reference given to each nominal account for a business", "displayName": "Nominal Code", "required": false, "type": "String"}}, "required": true, "type": "Object"}
+ Exact (UK):
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"description": "An account that bank transactions may be recorded against", "displayName": "Bank Account", "properties": {"accountName": {"description": "The name of the bank account in the originating system", "displayName": "Name", "required": true, "type": "String"}, "accountNumber": {"description": "The account number for the bank account", "displayName": "Account Number", "required": true, "type": "String", "validation": {"information": [], "warnings": [{"details": "Should not exceed the maximum length of 14 characters if the specified currency is GBP.", "field": "AccountNumber"}]}}, "sortCode": {"description": "The sort code for the bank account", "displayName": "Sort Code", "required": false, "type": "String", "validation": {"information": [], "warnings": [{"details": "Must be 6 characters long if the specified currency is GBP.", "field": "SortCode"}, {"details": "Must be provided if the specified currency is GBP.", "field": "SortCode"}]}}, "currency": {"description": "The currency of the bank account", "displayName": "Currency", "required": false, "type": "String"}, "nominalCode": {"description": "The external reference given to each nominal account for a business", "displayName": "Nominal Code", "required": false, "type": "String"}}, "required": true, "type": "Object"}
+ FreeAgent:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"description": "An account that bank transactions may be recorded against", "displayName": "Bank Account", "properties": {"accountName": {"description": "The name of the bank account in the originating system", "displayName": "Name", "required": true, "type": "String"}, "sortCode": {"description": "The sort code for the bank account", "displayName": "Sort Code", "required": false, "type": "String", "validation": {"information": [], "warnings": [{"details": "Must have a length between 0 and 8 characters", "field": "SortCode"}]}}, "accountNumber": {"description": "The account number for the bank account", "displayName": "Account Number", "required": false, "type": "String"}, "iBan": {"description": "The international bank account number of the account. Often used when making or receiving international payments", "displayName": "IBAN", "required": false, "type": "String"}, "currency": {"description": "The currency of the bank account", "displayName": "Currency", "options": [{"displayName": "AED", "required": false, "type": "String", "value": "AED"}, {"displayName": "AMD", "required": false, "type": "String", "value": "AMD"}, {"displayName": "AOA", "required": false, "type": "String", "value": "AOA"}, {"displayName": "ARS", "required": false, "type": "String", "value": "ARS"}, {"displayName": "AUD", "required": false, "type": "String", "value": "AUD"}, {"displayName": "AWG", "required": false, "type": "String", "value": "AWG"}, {"displayName": "AZN", "required": false, "type": "String", "value": "AZN"}, {"displayName": "BBD", "required": false, "type": "String", "value": "BBD"}, {"displayName": "BDT", "required": false, "type": "String", "value": "BDT"}, {"displayName": "BGN", "required": false, "type": "String", "value": "BGN"}, {"displayName": "BRL", "required": false, "type": "String", "value": "BRL"}, {"displayName": "BWP", "required": false, "type": "String", "value": "BWP"}, {"displayName": "CAD", "required": false, "type": "String", "value": "CAD"}, {"displayName": "CHF", "required": false, "type": "String", "value": "CHF"}, {"displayName": "CLP", "required": false, "type": "String", "value": "CLP"}, {"displayName": "CNY", "required": false, "type": "String", "value": "CNY"}, {"displayName": "COP", "required": false, "type": "String", "value": "COP"}, {"displayName": "CRC", "required": false, "type": "String", "value": "CRC"}, {"displayName": "CUC", "required": false, "type": "String", "value": "CUC"}, {"displayName": "CUP", "required": false, "type": "String", "value": "CUP"}, {"displayName": "CZK", "required": false, "type": "String", "value": "CZK"}, {"displayName": "DKK", "required": false, "type": "String", "value": "DKK"}, {"displayName": "DOP", "required": false, "type": "String", "value": "DOP"}, {"displayName": "EGP", "required": false, "type": "String", "value": "EGP"}, {"displayName": "EUR", "required": false, "type": "String", "value": "EUR"}, {"displayName": "FJD", "required": false, "type": "String", "value": "FJD"}, {"displayName": "GBP", "required": false, "type": "String", "value": "GBP"}, {"displayName": "GEL", "required": false, "type": "String", "value": "GEL"}, {"displayName": "GHS", "required": false, "type": "String", "value": "GHS"}, {"displayName": "GTQ", "required": false, "type": "String", "value": "GTQ"}, {"displayName": "GYD", "required": false, "type": "String", "value": "GYD"}, {"displayName": "HKD", "required": false, "type": "String", "value": "HKD"}, {"displayName": "HNL", "required": false, "type": "String", "value": "HNL"}, {"displayName": "HRK", "required": false, "type": "String", "value": "HRK"}, {"displayName": "HUF", "required": false, "type": "String", "value": "HUF"}, {"displayName": "IDR", "required": false, "type": "String", "value": "IDR"}, {"displayName": "ILS", "required": false, "type": "String", "value": "ILS"}, {"displayName": "INR", "required": false, "type": "String", "value": "INR"}, {"displayName": "ISK", "required": false, "type": "String", "value": "ISK"}, {"displayName": "JMD", "required": false, "type": "String", "value": "JMD"}, {"displayName": "JPY", "required": false, "type": "String", "value": "JPY"}, {"displayName": "KES", "required": false, "type": "String", "value": "KES"}, {"displayName": "KRW", "required": false, "type": "String", "value": "KRW"}, {"displayName": "KWD", "required": false, "type": "String", "value": "KWD"}, {"displayName": "KYD", "required": false, "type": "String", "value": "KYD"}, {"displayName": "KZT", "required": false, "type": "String", "value": "KZT"}, {"displayName": "LAK", "required": false, "type": "String", "value": "LAK"}, {"displayName": "LBP", "required": false, "type": "String", "value": "LBP"}, {"displayName": "LKR", "required": false, "type": "String", "value": "LKR"}, {"displayName": "LTL", "required": false, "type": "String", "value": "LTL"}, {"displayName": "LVL", "required": false, "type": "String", "value": "LVL"}, {"displayName": "MAD", "required": false, "type": "String", "value": "MAD"}, {"displayName": "MDL", "required": false, "type": "String", "value": "MDL"}, {"displayName": "MGA", "required": false, "type": "String", "value": "MGA"}, {"displayName": "MUR", "required": false, "type": "String", "value": "MUR"}, {"displayName": "MVR", "required": false, "type": "String", "value": "MVR"}, {"displayName": "MWK", "required": false, "type": "String", "value": "MWK"}, {"displayName": "MXN", "required": false, "type": "String", "value": "MXN"}, {"displayName": "MYR", "required": false, "type": "String", "value": "MYR"}, {"displayName": "MZN", "required": false, "type": "String", "value": "MZN"}, {"displayName": "NAD", "required": false, "type": "String", "value": "NAD"}, {"displayName": "NGN", "required": false, "type": "String", "value": "NGN"}, {"displayName": "NOK", "required": false, "type": "String", "value": "NOK"}, {"displayName": "NPR", "required": false, "type": "String", "value": "NPR"}, {"displayName": "NZD", "required": false, "type": "String", "value": "NZD"}, {"displayName": "OMR", "required": false, "type": "String", "value": "OMR"}, {"displayName": "PEN", "required": false, "type": "String", "value": "PEN"}, {"displayName": "PHP", "required": false, "type": "String", "value": "PHP"}, {"displayName": "PKR", "required": false, "type": "String", "value": "PKR"}, {"displayName": "PLN", "required": false, "type": "String", "value": "PLN"}, {"displayName": "QAR", "required": false, "type": "String", "value": "QAR"}, {"displayName": "RON", "required": false, "type": "String", "value": "RON"}, {"displayName": "RSD", "required": false, "type": "String", "value": "RSD"}, {"displayName": "RUB", "required": false, "type": "String", "value": "RUB"}, {"displayName": "RWF", "required": false, "type": "String", "value": "RWF"}, {"displayName": "SAR", "required": false, "type": "String", "value": "SAR"}, {"displayName": "SCR", "required": false, "type": "String", "value": "SCR"}, {"displayName": "SEK", "required": false, "type": "String", "value": "SEK"}, {"displayName": "SGD", "required": false, "type": "String", "value": "SGD"}, {"displayName": "THB", "required": false, "type": "String", "value": "THB"}, {"displayName": "TND", "required": false, "type": "String", "value": "TND"}, {"displayName": "TRY", "required": false, "type": "String", "value": "TRY"}, {"displayName": "TTD", "required": false, "type": "String", "value": "TTD"}, {"displayName": "TWD", "required": false, "type": "String", "value": "TWD"}, {"displayName": "TZS", "required": false, "type": "String", "value": "TZS"}, {"displayName": "UAH", "required": false, "type": "String", "value": "UAH"}, {"displayName": "UGX", "required": false, "type": "String", "value": "UGX"}, {"displayName": "USD", "required": false, "type": "String", "value": "USD"}, {"displayName": "UYU", "required": false, "type": "String", "value": "UYU"}, {"displayName": "VEF", "required": false, "type": "String", "value": "VEF"}, {"displayName": "VND", "required": false, "type": "String", "value": "VND"}, {"displayName": "VUV", "required": false, "type": "String", "value": "VUV"}, {"displayName": "XAF", "required": false, "type": "String", "value": "XAF"}, {"displayName": "XCD", "required": false, "type": "String", "value": "XCD"}, {"displayName": "XOF", "required": false, "type": "String", "value": "XOF"}, {"displayName": "ZAR", "required": false, "type": "String", "value": "ZAR"}, {"displayName": "ZMK", "required": false, "type": "String", "value": "ZMK"}], "required": true, "type": "String"}, "balance": {"description": "The balance of the bank account", "displayName": "Balance", "required": false, "type": "Number", "validation": {"information": [{"details": "The opening balance, in the account currency", "field": "Balance"}], "warnings": []}}, "institution": {"description": "The institution of the bank account", "displayName": "Institution", "required": false, "type": "String"}}, "required": true, "type": "Object"}
+ KashFlow:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"description": "An account that bank transactions may be recorded against", "displayName": "Bank Account", "properties": {"accountName": {"description": "Name of the bank account as it appears in Kashflow.", "displayName": "Account Name", "required": true, "type": "String"}, "balance": {"description": "The opening balance, in the account currency.", "displayName": "Balance", "required": false, "type": "Number"}, "currency": {"description": "The currency of the bank account.", "displayName": "Currency", "required": true, "type": "String"}}, "required": true, "type": "Object"}
+ QuickBooks Desktop:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"description": "An account that bank transactions may be recorded against", "displayName": "Bank Account", "properties": {"nominalCode": {"description": "The external reference given to each nominal account for a business", "displayName": "Nominal Code", "required": true, "type": "String", "validation": {"information": [], "warnings": [{"details": "Max length of 7 characters.", "field": "NominalCode"}]}}, "accountName": {"description": "The name of the bank account in the originating system", "displayName": "Name", "required": true, "type": "String", "validation": {"information": [], "warnings": [{"details": "Max length of 31 characters.", "field": "AccountName"}]}}, "currency": {"description": "The currency of the bank account", "displayName": "Currency", "required": false, "type": "String", "validation": {"information": [{"details": "If not set, will default to the base currency of the QuickBooks Desktop company", "field": "Currency"}], "warnings": [{"details": "The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is 'Asset.AccountsReceivable','Liability.AccountsPayable' or 'Liability.CreditCard'", "field": "Currency"}, {"details": "Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company", "field": "Currency"}, {"details": "Can only be set if the Quickbooks Desktop company has Multicurrency enabled.", "field": "Currency"}]}}, "balance": {"description": "The balance of the bank account", "displayName": "Balance", "required": false, "type": "Number"}}, "required": true, "type": "Object"}
+ QuickBooks Online Sandbox:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"description": "An account that bank transactions may be recorded against", "displayName": "Bank Account", "properties": {"accountName": {"description": "Name of account as it appears in the chart of accounts or general ledger.", "displayName": "Account Name", "required": true, "type": "String"}, "accountNumber": {"description": "User-defined account number to help the user in identifying the account within the chart-of-accounts and in deciding what should be posted to the account.", "displayName": "Account Number", "required": true, "type": "String"}, "currency": {"description": "Currency of the bank account.", "displayName": "Currency", "required": true, "type": "String"}}, "required": true, "type": "Object"}
+ Sage Business Cloud Accounting:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"description": "An account that bank transactions may be recorded against", "displayName": "Bank Account", "properties": {"accountName": {"description": "The name of the bank account in the originating system", "displayName": "Name", "required": true, "type": "String", "validation": {"information": [{"details": "Must be provided.", "field": "AccountName"}, {"details": "Should not be longer than 50 characters.", "field": "AccountName"}], "warnings": []}}, "currency": {"description": "The currency of the bank account", "displayName": "Currency", "required": true, "type": "String", "validation": {"information": [{"details": "Must be provided.", "field": "Currency"}, {"details": "Must match the company's base currency.", "field": "Currency"}], "warnings": []}}, "sortCode": {"description": "The sort code for the bank account", "displayName": "Sort Code", "required": false, "type": "String", "validation": {"information": [{"details": "Should be a 6 digit number.", "field": "SortCode"}], "warnings": []}}, "accountNumber": {"description": "The account number for the bank account", "displayName": "Account Number", "required": false, "type": "String", "validation": {"information": [{"details": "Should not be longer than 25 characters.", "field": "AccountNumber"}], "warnings": []}}, "iBan": {"description": "The international bank account number of the account. Often used when making or receiving international payments", "displayName": "IBAN", "required": false, "type": "String", "validation": {"information": [{"details": "Should be in the international bank account number format.", "field": "IBan"}], "warnings": []}}, "nominalCode": {"description": "The external reference given to each nominal account for a business", "displayName": "Nominal Code", "required": false, "type": "String", "validation": {"information": [{"details": "Should be a number between 1 and 99999999.", "field": "NominalCode"}], "warnings": []}}}, "required": true, "type": "Object"}
+ Sandbox:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "200":
+ application/json: {"description": "An account that bank transactions may be recorded against", "displayName": "Bank Account", "properties": {"accountName": {"description": "The name of the bank account in the originating system", "displayName": "Name", "required": true, "type": "String"}, "accountType": {"description": "The type of account", "displayName": "Account Type", "required": true, "type": "String"}, "nominalCode": {"description": "The external reference given to each nominal account for a business", "displayName": "Nominal Code", "required": true, "type": "String"}, "sortCode": {"description": "The sort code for the bank account", "displayName": "Sort Code", "required": true, "type": "String"}, "accountNumber": {"description": "The account number for the bank account", "displayName": "Account Number", "required": true, "type": "String"}, "iBan": {"description": "The international bank account number of the account. Often used when making or receiving international payments", "displayName": "IBAN", "required": true, "type": "String"}, "currency": {"description": "The currency of the bank account", "displayName": "Currency", "required": true, "type": "String"}, "balance": {"description": "The balance of the bank account", "displayName": "Balance", "required": true, "type": "Number"}, "availableBalance": {"description": "The available balance of the bank account", "displayName": "Available Balance", "required": true, "type": "Number"}, "overdraftLimit": {"description": "The pre-arranged overdraft limit of the account", "displayName": "Overdraft Limit", "required": true, "type": "Number"}, "institution": {"description": "The institution of the bank account", "displayName": "Institution", "required": true, "type": "String"}, "metadata": {"description": "Miscellaneous data about the item", "displayName": "Metadata", "required": true, "type": "Object"}}, "required": true, "type": "Object"}
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ list-bank-accounts:
+ "":
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}, "self": {"href": "/companies/{id}/data/{dataType}"}}, "pageNumber": 1, "pageSize": 10, "results": [], "totalResults": 1}
+ "400": {}
+ Dynamics 365 Business Central:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/connections/60acb117-5cf5-4745-b069-491551da4066/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "55", "accountNumber": "", "accountType": "Unknown", "balance": -352.03, "currency": "GBP", "iBan": "", "id": "c9a41bc7-6e5b-ed11-8c34-0022481b8b5b", "metadata": {"isDeleted": false}, "modifiedDate": "2023-03-27T14:21:10Z", "nominalCode": "10500", "overdraftLimit": 0, "sortCode": "", "sourceModifiedDate": "2023-02-07T00:00:00", "status": "Active"}, {"accountName": "555", "accountNumber": "", "accountType": "Unknown", "balance": 661.79, "currency": "PLN", "iBan": "", "id": "47020f80-60e6-ec11-82f8-0022481a77f0", "metadata": {"isDeleted": false}, "modifiedDate": "2023-03-27T14:21:10Z", "nominalCode": "40300", "overdraftLimit": 0, "sortCode": "", "sourceModifiedDate": "2022-06-07T00:00:00", "status": "Active"}], "totalResults": 28}
+ FreeAgent:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/connections/4fd7c69f-ecc1-45f5-83f2-42ed3391e386/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "\\w3fw", "accountNumber": "A06268209", "accountType": "Debit", "availableBalance": -10484.65, "balance": -10484.65, "currency": "GBP", "id": "738783", "metadata": {"isDeleted": false}, "modifiedDate": "2023-04-25T14:19:12Z", "sortCode": "236972", "sourceModifiedDate": "2022-10-23T00:00:00Z", "status": "Active"}, {"accountName": "2e2bna45hy\\", "accountNumber": "D01825250", "accountType": "Debit", "availableBalance": -114.4, "balance": -114.4, "currency": "GBP", "id": "738778", "metadata": {"isDeleted": false}, "modifiedDate": "2023-04-25T14:19:12Z", "sortCode": "236972", "sourceModifiedDate": "2022-10-23T00:00:00Z", "status": "Active"}], "totalResults": 82}
+ KashFlow:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/connections/ecab4f64-1a04-4c53-a343-bfd879f41f67/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "16th Account", "accountType": "Unknown", "availableBalance": 326, "balance": 326, "currency": "GBP", "id": "765768", "modifiedDate": "2022-09-30T10:29:16Z", "nominalCode": "70700", "sourceModifiedDate": "2022-10-23T00:00:00Z", "status": "Active"}, {"accountName": "1a1a", "accountType": "Unknown", "availableBalance": 0, "balance": 0, "currency": "GBP", "id": "765766", "modifiedDate": "2022-09-30T10:29:16Z", "nominalCode": "70600", "sourceModifiedDate": "2022-10-23T00:00:00Z", "status": "Active"}], "totalResults": 56}
+ Oracle NetSuite:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/connections/79f8313e-210a-4dc8-b69f-ba7e5004dda7/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "Codat Europe Bank", "accountType": "Debit", "balance": 558.22, "currency": "GBP", "id": "825", "metadata": {"isDeleted": false}, "modifiedDate": "2023-05-02T13:24:36Z", "nominalCode": "111111122222111", "sourceModifiedDate": "2022-07-15T11:34:02", "status": "Active"}, {"accountName": "Codat Europe Bank USD", "accountType": "Debit", "currency": "USD", "id": "826", "metadata": {"isDeleted": false}, "modifiedDate": "2023-05-02T13:24:36Z", "nominalCode": "1133221133", "sourceModifiedDate": "2021-03-26T10:31:40", "status": "Active"}], "totalResults": 4}
+ QuickBooks Desktop:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/connections/2c26b4da-97d4-4ba9-baad-1e18b49b96ac/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "Checking", "accountType": "Unknown", "availableBalance": 46954.1, "balance": 46954.1, "currency": "GBP", "id": "20000-933270541", "metadata": {"isDeleted": false}, "modifiedDate": "2023-04-26T09:12:37Z", "nominalCode": "10100", "sourceModifiedDate": "2023-12-16T05:06:45", "status": "Active"}, {"accountName": "Petty Cash", "accountType": "Unknown", "availableBalance": 500, "balance": 500, "currency": "GBP", "id": "550001-1071509830", "metadata": {"isDeleted": false}, "modifiedDate": "2023-04-26T09:12:37Z", "nominalCode": "10400", "sourceModifiedDate": "2023-12-16T05:06:45", "status": "Active"}], "totalResults": 3}
+ QuickBooks Online Sandbox:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/connections/1f9f6013-f8a5-4278-8a47-3ab7fdb6c24c/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "00", "accountType": "Debit", "availableBalance": 0, "balance": 0, "currency": "GBP", "id": "164", "metadata": {"isDeleted": false}, "modifiedDate": "2023-04-26T09:35:57Z", "nominalCode": "123567", "sourceModifiedDate": "2022-07-20T14:11:28Z", "status": "Active"}, {"accountName": "11", "accountType": "Debit", "availableBalance": 0, "balance": 0, "currency": "GBP", "id": "163", "metadata": {"isDeleted": false}, "modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2022-07-20T14:11:28Z", "status": "Active"}], "totalResults": 57}
+ QuickBooks Online:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/connections/9e28a776-f4be-425b-8a3d-ad49956de2c9/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "\\aa", "accountType": "Debit", "availableBalance": 123, "balance": 123, "currency": "GBP", "id": "202", "modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2022-11-11T14:15:13Z", "status": "Active"}, {"accountName": "1 year ago", "accountType": "Debit", "availableBalance": 5300.02, "balance": 5300.02, "currency": "GBP", "id": "193", "modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2023-01-18T06:05:12Z", "status": "Active"}], "totalResults": 140}
+ Sage 50 (UK):
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/connections/8ee4910f-4fc1-47e6-89b1-5931fb33d8f7/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "Bank Current Account", "accountNumber": "003234234", "accountType": "Unknown", "availableBalance": -20091.04, "balance": -20091.04, "currency": "GBP", "iBan": "", "id": "1200", "institution": "Lloyds Bank PLC", "metadata": {"isDeleted": false}, "modifiedDate": "2023-03-30T14:42:37Z", "nominalCode": "1200", "overdraftLimit": 120000, "sortCode": "23-34-34", "sourceModifiedDate": "2022-11-25T09:25:48", "status": "Active"}, {"accountName": "Bank Deposit Account", "accountNumber": "9/00474345", "accountType": "Unknown", "availableBalance": 3510, "balance": 3510, "currency": "GBP", "iBan": "", "id": "1210", "institution": "Halifax Building Society", "metadata": {"isDeleted": false}, "modifiedDate": "2023-03-30T14:42:37Z", "nominalCode": "1210", "overdraftLimit": 0, "sortCode": "45-45-45", "sourceModifiedDate": "2022-11-25T09:25:48", "status": "Active"}], "totalResults": 6}
+ Sage Business Cloud Accounting:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/connections/37916fb7-b4b8-4a78-8872-1751e20ee0cd/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "Abdi Internet Bank", "accountNumber": "11111", "accountType": "Unknown", "availableBalance": 49.61, "balance": 49.61, "currency": "GBP", "id": "154d05abe9f24c4babe0f6a741dec1b9", "modifiedDate": "2022-10-24T14:52:53Z", "nominalCode": "1560", "sortCode": "010101", "sourceModifiedDate": "2020-01-27T10:53:26Z", "status": "Active"}, {"accountName": "Abdi Live Test", "accountNumber": "1234567", "accountType": "Unknown", "availableBalance": -225830.75, "balance": -225830.75, "currency": "GBP", "id": "565ce07212bc492c8c2d04f43f9f67e3", "modifiedDate": "2022-10-24T14:52:53Z", "nominalCode": "147852", "sortCode": "123456", "sourceModifiedDate": "2020-01-28T14:00:20Z", "status": "Active"}], "totalResults": 45}
+ Sage Intacct:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/connections/8f457d9c-1142-4241-a07e-71d1ee2e3052/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "CoT Credit Card", "accountType": "Credit", "currency": "GBP", "id": "CREDITCARD:55", "metadata": {"isDeleted": false}, "modifiedDate": "2023-04-04T16:31:46Z", "nominalCode": "10021", "sourceModifiedDate": "2023-03-27T14:11:48", "status": "Active"}, {"accountName": "Cot Credit Card 2", "accountType": "Credit", "currency": "GBP", "id": "CREDITCARD:58", "metadata": {"isDeleted": false}, "modifiedDate": "2023-04-04T16:31:46Z", "nominalCode": "11112", "sourceModifiedDate": "2023-03-27T14:15:11", "status": "Active"}], "totalResults": 14}
+ Xero:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts?page=1&pageSize=2"}, "self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/connections/6a4bcf97-e46a-465c-abf6-c42cec8e48c0/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "Business Bank Account", "accountNumber": "987654321", "accountType": "Debit", "balance": 6681.79, "currency": "GBP", "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "metadata": {"isDeleted": false}, "modifiedDate": "2023-03-15T20:36:09Z", "sortCode": "990404", "sourceModifiedDate": "2023-03-15T20:35:07", "status": "Active"}, {"accountName": "Business Savings Account", "accountNumber": "876543210", "accountType": "Debit", "balance": 0, "currency": "GBP", "id": "a8d6fb1a-8c5d-4683-90ce-bf9d28fc62ba", "metadata": {"isDeleted": false}, "modifiedDate": "2023-03-15T20:36:09Z", "sortCode": "890303", "sourceModifiedDate": "2023-03-15T20:36:06", "status": "Active"}], "totalResults": 2}
+ Zoho Books:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts?page=2&pageSize=2"}, "self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/connections/a2324b8e-60e9-451d-8eb1-0fdc8e8224df/data/bankAccounts"}}, "pageNumber": 1, "pageSize": 2, "results": [{"accountName": "Abdi Test", "accountNumber": "xxxx5678", "accountType": "Unknown", "balance": 69858.44, "currency": "GBP", "id": "104957000000060010", "institution": "Test Bank", "modifiedDate": "2022-10-03T08:40:38Z", "sortCode": "112233", "sourceModifiedDate": "2022-10-23T00:00:00Z", "status": "Active"}, {"accountName": "Abdi Test 2", "accountNumber": "", "accountType": "Unknown", "balance": 98.03, "currency": "AED", "id": "104957000000065002", "institution": "", "modifiedDate": "2022-10-03T08:40:38Z", "sortCode": "", "sourceModifiedDate": "2022-10-23T00:00:00Z", "status": "Active"}], "totalResults": 4}
+ Malformed query:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error parsing query - Malformed query.", "service": "ClientsApi", "statusCode": 400}
+ Unresolved property:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "detailedErrorCode": 0, "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "service": "PullApi", "statusCode": 400}
+ create-bank-transactions:
+ Xero:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ accountId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2"
+ query: {}
+ requestBody:
+ application/json: {"accountId": "49cd5a42-b311-4750-9361-52e2ed1d4653", "transactions": [{"amount": 100, "balance": 100, "counterparty": "Bank of Example", "date": "2023-08-22T10:21:00Z", "description": "Repayment of Credit Card", "id": "716422529", "reconciled": true, "reference": "Ref-12345", "transactionType": "Credit"}, {"amount": -100, "balance": 0, "counterparty": "Amazon", "date": "2023-08-22T10:22:00Z", "description": "Amazon Purchase", "id": "716422530", "reconciled": false, "reference": "Ref-12346", "transactionType": "Debit"}, {"amount": -60, "balance": -60, "counterparty": "Office Mart", "date": "2023-08-22T10:23:00Z", "description": "Office Supplies", "id": "716422531", "reconciled": false, "reference": "Ref-12347", "transactionType": "Debit"}]}
+ responses:
+ "200":
+ application/json: {"changes": [], "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "completedOnUtc": "2022-10-23T00:00:00Z", "data": {"accountId": "EILBDVJVNUAGVKRQ", "transactions": []}, "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "dataType": "invoices", "pushOperationKey": "1fc6fe07-241b-4cdd-89dc-7fa504e08333", "requestedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 829142}
+ "400": {}
+ QuickBooks Online Bank Feeds:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ accountId: "7110701885"
+ query: {}
+ requestBody:
+ application/json: {"accountId": "49cd5a42-b311-4750-9361-52e2ed1d4653", "transactions": [{"amount": 100, "balance": 100, "counterparty": "ACME INC", "date": "2023-08-22T10:21:00Z", "description": "Repayment of Credit Card", "id": "716422529", "reconciled": false, "reference": "reference for transaction", "transactionType": "Credit"}, {"amount": -100, "balance": 0, "counterparty": "ACME INC", "date": "2023-08-22T10:22:00Z", "description": "Amazon Purchase", "id": "716422530", "reconciled": false, "reference": "reference for transaction", "transactionType": "Debit"}, {"amount": -60, "balance": -60, "counterparty": "ACME INC", "date": "2023-08-22T10:23:00Z", "description": "Office Supplies", "id": "716422531", "reconciled": false, "reference": "reference for transaction", "transactionType": "Debit"}]}
+ responses:
+ "200":
+ application/json: {"changes": [], "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "completedOnUtc": "2022-10-23T00:00:00Z", "data": {"accountId": "Checking 0202", "transactions": []}, "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "dataType": "invoices", "pushOperationKey": "261915a2-5d0d-49ea-9320-e8504aa8ce67", "requestedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 775787}
+ "400": {}
+ FreeAgent:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ accountId: "EILBDVJVNUAGVKRQ"
+ query: {}
+ requestBody:
+ application/json: {"accountId": "49cd5a42-b311-4750-9361-52e2ed1d4653", "transactions": [{"amount": 100, "balance": -999.99, "counterparty": "ACME INC", "date": "2023-08-22T10:21:00Z", "description": "Repayment of Credit Card", "id": "716422529", "reconciled": false, "reference": "reference for transaction", "transactionType": "Credit"}, {"amount": -100, "balance": -999.99, "counterparty": "ACME INC", "date": "2023-08-22T10:22:00Z", "description": "Amazon Purchase", "id": "716422530", "reconciled": false, "reference": "reference for transaction", "transactionType": "Debit"}, {"amount": -60, "balance": -999.99, "counterparty": "ACME INC", "date": "2023-08-22T10:23:00Z", "description": "Office Supplies", "id": "716422531", "reconciled": false, "reference": "reference for transaction", "transactionType": "Debit"}]}
+ responses:
+ "200":
+ application/json: {"changes": [], "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "completedOnUtc": "2022-10-23T00:00:00Z", "data": {"accountId": "EILBDVJVNUAGVKRQ", "transactions": []}, "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "dataType": "invoices", "pushOperationKey": "cf24bdeb-cfc2-43e7-96f9-415747251ef0", "requestedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 363328}
+ "400": {}
+ Sage:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ accountId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2"
+ query: {}
+ requestBody:
+ application/json: {"accountId": "49cd5a42-b311-4750-9361-52e2ed1d4653", "transactions": [{"amount": 100, "balance": 100, "counterparty": "Bank of Example", "date": "2023-08-22T10:21:00Z", "description": "Repayment of Credit Card", "id": "716422529", "reconciled": false, "reference": "Ref-12345", "transactionType": "Credit"}, {"amount": -100, "balance": 0, "counterparty": "Amazon", "date": "2023-08-22T10:22:00Z", "description": "Amazon Purchase", "id": "716422530", "reconciled": false, "reference": "Ref-12346", "transactionType": "Debit"}, {"amount": -60, "balance": -60, "counterparty": "Office Mart", "date": "2023-08-22T10:23:00Z", "description": "Office Supplies", "id": "716422531", "reconciled": false, "reference": "Ref-12347", "transactionType": "Debit"}]}
+ responses:
+ "200":
+ application/json: {"changes": [], "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "completedOnUtc": "2022-10-23T00:00:00Z", "data": {"accountId": "7110701885", "transactions": []}, "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "dataType": "invoices", "pushOperationKey": "95835d6b-1b39-4d7e-a0de-fed8d063eda5", "requestedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 121860}
+ "400": {}
+ Malformed query:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
+ accountId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2"
+ query: {}
+ requestBody:
+ application/json: {"accountId": "7110701885", "transactions": []}
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400}
+ get-create-operation:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ pushOperationKey: "1fb73c31-a851-46c2-ab8a-5ce6e25b57b8"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ list-create-operations:
+ "":
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "200":
+ application/json: {"_links": {"current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}, "self": {"href": "/companies/{id}/data/{dataType}"}}, "pageNumber": 1, "pageSize": 10, "results": [], "totalResults": 1}
+ "400": {}
+ Malformed query:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error parsing query - Malformed query.", "service": "ClientsApi", "statusCode": 400}
+ Unresolved property:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ query:
+ page: 1
+ pageSize: 100
+ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee"
+ orderBy: "-modifiedDate"
+ responses:
+ "400":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "detailedErrorCode": 0, "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "service": "PullApi", "statusCode": 400}
+ get-configuration:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ set-configuration:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ requestBody:
+ application/json: {"companyId": "8a210b68-6988-11ed-a1eb-0242ac120002"}
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
+ get-last-successful:
+ Unauthorized:
+ parameters:
+ path:
+ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
+ responses:
+ "401":
+ application/json: {"canBeRetried": "Unknown", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "detailedErrorCode": 0, "error": "Unauthorized", "service": "PublicApi", "statusCode": 401}
diff --git a/bank-feeds/.speakeasy/gen.yaml b/bank-feeds/.speakeasy/gen.yaml
index a289c3df8..2e37ba1ce 100644
--- a/bank-feeds/.speakeasy/gen.yaml
+++ b/bank-feeds/.speakeasy/gen.yaml
@@ -7,13 +7,22 @@ generation:
nameResolutionDec2023: false
parameterOrderingFeb2024: false
requestResponseComponentNamesFeb2024: false
+ auth:
+ oAuth2ClientCredentialsEnabled: false
telemetryEnabled: true
python:
- version: 6.1.1
+ version: 7.0.0
+ additionalDependencies:
+ dev: {}
+ main: {}
author: Codat
+ authors:
+ - Speakeasy
clientServerStatusCodesAsErrors: true
description: Set up bank feeds from accounts in your application to supported accounting platforms.
+ enumFormat: enum
flattenGlobalSecurity: false
+ flattenRequests: false
imports:
option: openapi
paths:
@@ -24,5 +33,8 @@ python:
webhooks: models/webhooks
inputModelSuffix: input
maxMethodParams: 0
+ methodArguments: infer-optional-args
outputModelSuffix: output
packageName: codat-bankfeeds
+ responseFormat: flat
+ templateVersion: v2
diff --git a/bank-feeds/.vscode/settings.json b/bank-feeds/.vscode/settings.json
new file mode 100644
index 000000000..8d79f0abb
--- /dev/null
+++ b/bank-feeds/.vscode/settings.json
@@ -0,0 +1,6 @@
+{
+ "python.testing.pytestArgs": ["tests", "-vv"],
+ "python.testing.unittestEnabled": false,
+ "python.testing.pytestEnabled": true,
+ "pylint.args": ["--rcfile=pylintrc"]
+}
diff --git a/bank-feeds/CONTRIBUTING.md b/bank-feeds/CONTRIBUTING.md
new file mode 100644
index 000000000..d585717fc
--- /dev/null
+++ b/bank-feeds/CONTRIBUTING.md
@@ -0,0 +1,26 @@
+# Contributing to This Repository
+
+Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.
+
+## How to Report Issues
+
+If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:
+
+- A clear and descriptive title
+- Steps to reproduce the issue
+- Expected and actual behavior
+- Any relevant logs, screenshots, or error messages
+- Information about your environment (e.g., operating system, software versions)
+ - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed
+
+## Issue Triage and Upstream Fixes
+
+We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.
+
+## Contact
+
+If you have any questions or need further assistance, please feel free to reach out by opening an issue.
+
+Thank you for your understanding and cooperation!
+
+The Maintainers
diff --git a/bank-feeds/README.md b/bank-feeds/README.md
index 4c44c65ac..bfa48e09c 100755
--- a/bank-feeds/README.md
+++ b/bank-feeds/README.md
@@ -4,46 +4,160 @@
Bank Feeds API enables your SMB users to set up bank feeds from accounts in your application to supported accounting platforms.
+
+## Summary
+
+Bank Feeds API: Bank Feeds API enables your SMB users to set up bank feeds from accounts in your application to supported accounting software.
+
+A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting software.
+
+[Explore product](https://docs.codat.io/bank-feeds-api/overview) | [See OpenAPI spec](https://github.com/codatio/oas)
+
+---
+
+## Endpoints
+
+| Endpoints | Description |
+| :- |:- |
+| Companies | Create and manage your SMB users' companies. |
+| Connections | Create new and manage existing data connections for a company. |
+| Source accounts | Provide and manage lists of source bank accounts. |
+| Account mapping | Extra functionality for building an account management UI. |
+| Company information | Get detailed information about a company from the underlying platform. |
+| Transactions | Create new bank account transactions for a company's connections, and see previous operations. |
+
+
+
+
+## Table of Contents
+
+* [SDK Installation](#sdk-installation)
+* [IDE Support](#ide-support)
+* [SDK Example Usage](#sdk-example-usage)
+* [Available Resources and Operations](#available-resources-and-operations)
+* [File uploads](#file-uploads)
+* [Retries](#retries)
+* [Error Handling](#error-handling)
+* [Server Selection](#server-selection)
+* [Custom HTTP Client](#custom-http-client)
+* [Authentication](#authentication)
+* [Debugging](#debugging)
+
+
## SDK Installation
+The SDK can be installed with either *pip* or *poetry* package managers.
+
+### PIP
+
+*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
+
```bash
pip install codat-bankfeeds
```
+
+### Poetry
+
+*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
+
+```bash
+poetry add codat-bankfeeds
+```
## Example Usage
+
+## IDE Support
+
+### PyCharm
+
+Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
+
+- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
+
+
## SDK Example Usage
### Example
```python
-import codatbankfeeds
-from codatbankfeeds.models import shared
+# Synchronous Example
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = shared.CompanyRequestBody(
- name='Bank of Dave',
- description='Requested early access to the new financing scheme.',
-)
-
-res = s.companies.create(req)
-
-if res.company is not None:
+res = s.companies.create(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+})
+
+if res is not None:
# handle response
pass
```
+
+
+
+The same SDK client can also be used to make asychronous requests by importing asyncio.
+```python
+# Asynchronous Example
+import asyncio
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
+
+async def main():
+ s = CodatBankFeeds(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+ )
+ res = await s.companies.create_async(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+ })
+ if res is not None:
+ # handle response
+ pass
+
+asyncio.run(main())
+```
## Available Resources and Operations
+
+Available methods
+
+### [account_mapping](docs/sdks/accountmapping/README.md)
+
+* [create](docs/sdks/accountmapping/README.md#create) - Create bank feed account mapping
+* [get](docs/sdks/accountmapping/README.md#get) - List bank feed account mappings
+
+### [bank_accounts](docs/sdks/bankaccounts/README.md)
+
+* [create](docs/sdks/bankaccounts/README.md#create) - Create bank account
+* [get_create_model](docs/sdks/bankaccounts/README.md#get_create_model) - Get create/update bank account model
+* [list](docs/sdks/bankaccounts/README.md#list) - List bank accounts
+
+
### [companies](docs/sdks/companies/README.md)
* [create](docs/sdks/companies/README.md#create) - Create company
@@ -52,6 +166,15 @@ if res.company is not None:
* [list](docs/sdks/companies/README.md#list) - List companies
* [update](docs/sdks/companies/README.md#update) - Update company
+### [company_information](docs/sdks/companyinformation/README.md)
+
+* [get](docs/sdks/companyinformation/README.md#get) - Get company information
+
+### [configuration](docs/sdks/configuration/README.md)
+
+* [get](docs/sdks/configuration/README.md#get) - Get configuration
+* [set](docs/sdks/configuration/README.md#set) - Set configuration
+
### [connections](docs/sdks/connections/README.md)
* [create](docs/sdks/connections/README.md#create) - Create connection
@@ -60,11 +183,6 @@ if res.company is not None:
* [list](docs/sdks/connections/README.md#list) - List connections
* [unlink](docs/sdks/connections/README.md#unlink) - Unlink connection
-### [account_mapping](docs/sdks/accountmapping/README.md)
-
-* [create](docs/sdks/accountmapping/README.md#create) - Create bank feed account mapping
-* [get](docs/sdks/accountmapping/README.md#get) - List bank feed account mappings
-
### [source_accounts](docs/sdks/sourceaccounts/README.md)
* [create](docs/sdks/sourceaccounts/README.md#create) - Create source account
@@ -74,11 +192,9 @@ if res.company is not None:
* [list](docs/sdks/sourceaccounts/README.md#list) - List source accounts
* [update](docs/sdks/sourceaccounts/README.md#update) - Update source account
-### [bank_accounts](docs/sdks/bankaccounts/README.md)
+### [sync](docs/sdks/sync/README.md)
-* [create](docs/sdks/bankaccounts/README.md#create) - Create bank account
-* [get_create_model](docs/sdks/bankaccounts/README.md#get_create_model) - Get create/update bank account model
-* [list](docs/sdks/bankaccounts/README.md#list) - List bank accounts
+* [get_last_successful_sync](docs/sdks/sync/README.md#get_last_successful_sync) - Get last successful sync
### [transactions](docs/sdks/transactions/README.md)
@@ -86,16 +202,46 @@ if res.company is not None:
* [get_create_operation](docs/sdks/transactions/README.md#get_create_operation) - Get create operation
* [list_create_operations](docs/sdks/transactions/README.md#list_create_operations) - List create operations
-### [configuration](docs/sdks/configuration/README.md)
-
-* [get](docs/sdks/configuration/README.md#get) - Get configuration
-* [set](docs/sdks/configuration/README.md#set) - Set configuration
+
+
+## File uploads
+
+Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
+
+> [!TIP]
+>
+> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
+>
+
+```python
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
+
+s = CodatBankFeeds(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+res = s.source_accounts.generate_credentials(request={
+ "request_body": open("example.file", "rb"),
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
+
+if res is not None:
+ # handle response
+ pass
+
+```
+
+
## Retries
@@ -103,52 +249,60 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
```python
-import codatbankfeeds
-from codatbankfeeds.models import shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
from codatbankfeeds.utils import BackoffStrategy, RetryConfig
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = shared.CompanyRequestBody(
- name='Bank of Dave',
- description='Requested early access to the new financing scheme.',
-)
-
-res = s.companies.create(req,
- RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False))
-
-if res.company is not None:
+res = s.companies.create(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+},
+ RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
+
+if res is not None:
# handle response
pass
+
```
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
```python
-import codatbankfeeds
-from codatbankfeeds.models import shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
from codatbankfeeds.utils import BackoffStrategy, RetryConfig
-s = codatbankfeeds.CodatBankFeeds(
- retry_config=RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False)
+s = CodatBankFeeds(
+ retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = shared.CompanyRequestBody(
- name='Bank of Dave',
- description='Requested early access to the new financing scheme.',
-)
-
-res = s.companies.create(req)
-
-if res.company is not None:
+res = s.companies.create(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+})
+
+if res is not None:
# handle response
pass
+
```
@@ -162,38 +316,42 @@ Handling errors in this SDK should largely match your expectations. All operati
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
### Example
```python
-import codatbankfeeds
-from codatbankfeeds.models import errors, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import errors, shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = shared.CompanyRequestBody(
- name='Bank of Dave',
- description='Requested early access to the new financing scheme.',
-)
-
res = None
try:
- res = s.companies.create(req)
+ res = s.companies.create(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+ })
+
+ if res is not None:
+ # handle response
+ pass
+
except errors.ErrorMessage as e:
- # handle exception
+ # handle e.data: errors.ErrorMessageData
raise(e)
except errors.SDKError as e:
# handle exception
raise(e)
-
-if res.company is not None:
- # handle response
- pass
```
@@ -213,26 +371,30 @@ You can override the default server globally by passing a server index to the `s
#### Example
```python
-import codatbankfeeds
-from codatbankfeeds.models import shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
server_idx=0,
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = shared.CompanyRequestBody(
- name='Bank of Dave',
- description='Requested early access to the new financing scheme.',
-)
-
-res = s.companies.create(req)
-
-if res.company is not None:
+res = s.companies.create(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+})
+
+if res is not None:
# handle response
pass
+
```
@@ -240,26 +402,30 @@ if res.company is not None:
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
```python
-import codatbankfeeds
-from codatbankfeeds.models import shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
server_url="https://api.codat.io",
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = shared.CompanyRequestBody(
- name='Bank of Dave',
- description='Requested early access to the new financing scheme.',
-)
-
-res = s.companies.create(req)
-
-if res.company is not None:
+res = s.companies.create(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+})
+
+if res is not None:
# handle response
pass
+
```
@@ -268,16 +434,81 @@ if res.company is not None:
## Custom HTTP Client
-The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
+The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
+Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
+This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
For example, you could specify a header for every request that this sdk makes as follows:
```python
-import codatbankfeeds
-import requests
+from codat_bankfeeds import CodatBankFeeds
+import httpx
-http_client = requests.Session()
-http_client.headers.update({'x-custom-header': 'someValue'})
-s = codatbankfeeds.CodatBankFeeds(client: http_client)
+http_client = httpx.Client(headers={"x-custom-header": "someValue"})
+s = CodatBankFeeds(client=http_client)
+```
+
+or you could wrap the client with your own custom logic:
+```python
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.httpclient import AsyncHttpClient
+import httpx
+
+class CustomClient(AsyncHttpClient):
+ client: AsyncHttpClient
+
+ def __init__(self, client: AsyncHttpClient):
+ self.client = client
+
+ async def send(
+ self,
+ request: httpx.Request,
+ *,
+ stream: bool = False,
+ auth: Union[
+ httpx._types.AuthTypes, httpx._client.UseClientDefault, None
+ ] = httpx.USE_CLIENT_DEFAULT,
+ follow_redirects: Union[
+ bool, httpx._client.UseClientDefault
+ ] = httpx.USE_CLIENT_DEFAULT,
+ ) -> httpx.Response:
+ request.headers["Client-Level-Header"] = "added by client"
+
+ return await self.client.send(
+ request, stream=stream, auth=auth, follow_redirects=follow_redirects
+ )
+
+ def build_request(
+ self,
+ method: str,
+ url: httpx._types.URLTypes,
+ *,
+ content: Optional[httpx._types.RequestContent] = None,
+ data: Optional[httpx._types.RequestData] = None,
+ files: Optional[httpx._types.RequestFiles] = None,
+ json: Optional[Any] = None,
+ params: Optional[httpx._types.QueryParamTypes] = None,
+ headers: Optional[httpx._types.HeaderTypes] = None,
+ cookies: Optional[httpx._types.CookieTypes] = None,
+ timeout: Union[
+ httpx._types.TimeoutTypes, httpx._client.UseClientDefault
+ ] = httpx.USE_CLIENT_DEFAULT,
+ extensions: Optional[httpx._types.RequestExtensions] = None,
+ ) -> httpx.Request:
+ return self.client.build_request(
+ method,
+ url,
+ content=content,
+ data=data,
+ files=files,
+ json=json,
+ params=params,
+ headers=headers,
+ cookies=cookies,
+ timeout=timeout,
+ extensions=extensions,
+ )
+
+s = CodatBankFeeds(async_client=CustomClient(httpx.AsyncClient()))
```
@@ -296,28 +527,47 @@ This SDK supports the following security scheme globally:
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
```python
-import codatbankfeeds
-from codatbankfeeds.models import shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = shared.CompanyRequestBody(
- name='Bank of Dave',
- description='Requested early access to the new financing scheme.',
-)
-
-res = s.companies.create(req)
-
-if res.company is not None:
+res = s.companies.create(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+})
+
+if res is not None:
# handle response
pass
+
```
+
+## Debugging
+
+You can setup your SDK to emit debug logs for SDK requests and responses.
+
+You can pass your own logger class directly into your SDK.
+```python
+from codat_bankfeeds import CodatBankFeeds
+import logging
+
+logging.basicConfig(level=logging.DEBUG)
+s = CodatBankFeeds(debug_logger=logging.getLogger("codat_bankfeeds"))
+```
+
+
diff --git a/bank-feeds/RELEASES.md b/bank-feeds/RELEASES.md
index 7dde7fc02..3e791f903 100644
--- a/bank-feeds/RELEASES.md
+++ b/bank-feeds/RELEASES.md
@@ -788,4 +788,14 @@ Based on:
### Generated
- [python v6.1.1] bank-feeds
### Releases
-- [PyPI v6.1.1] https://pypi.org/project/codat-bankfeeds/6.1.1 - bank-feeds
\ No newline at end of file
+- [PyPI v6.1.1] https://pypi.org/project/codat-bankfeeds/6.1.1 - bank-feeds
+
+## 2024-09-13 13:30:13
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.396.6 (2.415.6) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v7.0.0] bank-feeds
+### Releases
+- [PyPI v7.0.0] https://pypi.org/project/codat-bankfeeds/7.0.0 - bank-feeds
\ No newline at end of file
diff --git a/bank-feeds/USAGE.md b/bank-feeds/USAGE.md
index b09c12553..64186bcf3 100644
--- a/bank-feeds/USAGE.md
+++ b/bank-feeds/USAGE.md
@@ -1,23 +1,58 @@
```python
-import codatbankfeeds
-from codatbankfeeds.models import shared
+# Synchronous Example
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = shared.CompanyRequestBody(
- name='Bank of Dave',
- description='Requested early access to the new financing scheme.',
-)
-
-res = s.companies.create(req)
+res = s.companies.create(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+})
-if res.company is not None:
+if res is not None:
# handle response
pass
```
+
+
+
+The same SDK client can also be used to make asychronous requests by importing asyncio.
+```python
+# Asynchronous Example
+import asyncio
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
+
+async def main():
+ s = CodatBankFeeds(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+ )
+ res = await s.companies.create_async(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+ })
+ if res is not None:
+ # handle response
+ pass
+
+asyncio.run(main())
+```
\ No newline at end of file
diff --git a/bank-feeds/docs/models/errors/errormessage.md b/bank-feeds/docs/models/errors/errormessage.md
index 4c73e63ee..bd6f25c4d 100644
--- a/bank-feeds/docs/models/errors/errormessage.md
+++ b/bank-feeds/docs/models/errors/errormessage.md
@@ -13,4 +13,4 @@ The request made is not valid.
| `error` | *Optional[str]* | :heavy_minus_sign: | A brief description of the error. |
| `service` | *Optional[str]* | :heavy_minus_sign: | Codat's service the returned the error. |
| `status_code` | *Optional[int]* | :heavy_minus_sign: | The HTTP status code returned by the error. |
-| `validation` | [Optional[shared.ErrorValidation]](../../models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. |
\ No newline at end of file
+| `validation` | [OptionalNullable[shared.ErrorValidation]](../../models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/createbankaccountmappingrequest.md b/bank-feeds/docs/models/operations/createbankaccountmappingrequest.md
index e2b69af0a..3c25ae70e 100644
--- a/bank-feeds/docs/models/operations/createbankaccountmappingrequest.md
+++ b/bank-feeds/docs/models/operations/createbankaccountmappingrequest.md
@@ -3,8 +3,8 @@
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
-| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
-| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
-| `zero` | [Optional[shared.Zero]](../../models/shared/zero.md) | :heavy_minus_sign: | N/A | {"sourceAccountId":"acc-002","targetAccountId":"account-081","feedStartDate":"2023-01-09T14:14:14.1057478Z"} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `bank_feed_account_mapping` | [Optional[shared.BankFeedAccountMapping]](../../models/shared/bankfeedaccountmapping.md) | :heavy_minus_sign: | N/A | {
"sourceAccountId": "acc-002",
"targetAccountId": "account-081"
} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/createbankaccountmappingresponse.md b/bank-feeds/docs/models/operations/createbankaccountmappingresponse.md
deleted file mode 100644
index 70f61c04c..000000000
--- a/bank-feeds/docs/models/operations/createbankaccountmappingresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# CreateBankAccountMappingResponse
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `bank_feed_account_mapping_response` | [Optional[shared.BankFeedAccountMappingResponse]](../../models/shared/bankfeedaccountmappingresponse.md) | :heavy_minus_sign: | Success | {"sourceAccountId":"acc-002","targetAccountId":"account-081","Status":"Failed","Error":"A feed connection already exists to this account"} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/createbankaccountresponse.md b/bank-feeds/docs/models/operations/createbankaccountresponse.md
deleted file mode 100644
index dd96effea..000000000
--- a/bank-feeds/docs/models/operations/createbankaccountresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# CreateBankAccountResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
-| `bank_account_create_response` | [Optional[shared.BankAccountCreateResponse]](../../models/shared/bankaccountcreateresponse.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/createbanktransactionsresponse.md b/bank-feeds/docs/models/operations/createbanktransactionsresponse.md
deleted file mode 100644
index baff6d3e2..000000000
--- a/bank-feeds/docs/models/operations/createbanktransactionsresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# CreateBankTransactionsResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
-| `create_bank_transactions_response` | [Optional[shared.CreateBankTransactionsResponse]](../../models/shared/createbanktransactionsresponse.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/createconnectionresponse.md b/bank-feeds/docs/models/operations/createconnectionresponse.md
deleted file mode 100644
index 4d113122e..000000000
--- a/bank-feeds/docs/models/operations/createconnectionresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# CreateConnectionResponse
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/createsourceaccountrequest.md b/bank-feeds/docs/models/operations/createsourceaccountrequest.md
index b93e2ab72..a82b5a871 100644
--- a/bank-feeds/docs/models/operations/createsourceaccountrequest.md
+++ b/bank-feeds/docs/models/operations/createsourceaccountrequest.md
@@ -3,8 +3,8 @@
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
-| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
-| `source_account` | [Optional[shared.SourceAccount]](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | N/A | {"id":"acc-002","accountName":"account-081","sortCode":"123456","accountType":"Credit","accountNumber":"12345670","currency":"GBP","balance":99.99,"modifiedDate":"2023-01-09T14:14:14.1057478Z","status":"pending"} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `request_body` | [Optional[operations.CreateSourceAccountRequestBody]](../../models/operations/createsourceaccountrequestbody.md) | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/createsourceaccountrequestbody.md b/bank-feeds/docs/models/operations/createsourceaccountrequestbody.md
new file mode 100644
index 000000000..9529b6957
--- /dev/null
+++ b/bank-feeds/docs/models/operations/createsourceaccountrequestbody.md
@@ -0,0 +1,17 @@
+# CreateSourceAccountRequestBody
+
+
+## Supported Types
+
+### `shared.SourceAccountV2`
+
+```python
+value: shared.SourceAccountV2 = /* values here */
+```
+
+### `shared.SourceAccount`
+
+```python
+value: shared.SourceAccount = /* values here */
+```
+
diff --git a/bank-feeds/docs/models/operations/createsourceaccountresponsebody.md b/bank-feeds/docs/models/operations/createsourceaccountresponsebody.md
new file mode 100644
index 000000000..28e4dd0dd
--- /dev/null
+++ b/bank-feeds/docs/models/operations/createsourceaccountresponsebody.md
@@ -0,0 +1,19 @@
+# CreateSourceAccountResponseBody
+
+Success
+
+
+## Supported Types
+
+### `shared.SourceAccountV2`
+
+```python
+value: shared.SourceAccountV2 = /* values here */
+```
+
+### `shared.SourceAccount`
+
+```python
+value: shared.SourceAccount = /* values here */
+```
+
diff --git a/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md b/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md
deleted file mode 100644
index 611c3cdf9..000000000
--- a/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# DeleteBankFeedCredentialsResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/deletecompanyresponse.md b/bank-feeds/docs/models/operations/deletecompanyresponse.md
deleted file mode 100644
index 7dfc00111..000000000
--- a/bank-feeds/docs/models/operations/deletecompanyresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# DeleteCompanyResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/deleteconnectionresponse.md b/bank-feeds/docs/models/operations/deleteconnectionresponse.md
deleted file mode 100644
index 373abf82a..000000000
--- a/bank-feeds/docs/models/operations/deleteconnectionresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# DeleteConnectionResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/deletesourceaccountresponse.md b/bank-feeds/docs/models/operations/deletesourceaccountresponse.md
deleted file mode 100644
index a83c619be..000000000
--- a/bank-feeds/docs/models/operations/deletesourceaccountresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# DeleteSourceAccountResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/generatecredentialsrequest.md b/bank-feeds/docs/models/operations/generatecredentialsrequest.md
index f7d0b1d5a..822a2e604 100644
--- a/bank-feeds/docs/models/operations/generatecredentialsrequest.md
+++ b/bank-feeds/docs/models/operations/generatecredentialsrequest.md
@@ -3,8 +3,8 @@
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
-| `request_body` | *bytes* | :heavy_check_mark: | N/A | |
-| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
-| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
+| `request_body` | *Union[bytes, IO[bytes], io.BufferedReader]* | :heavy_check_mark: | N/A | |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/generatecredentialsresponse.md b/bank-feeds/docs/models/operations/generatecredentialsresponse.md
deleted file mode 100644
index 1baa2e568..000000000
--- a/bank-feeds/docs/models/operations/generatecredentialsresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# GenerateCredentialsResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
-| `bank_account_credentials` | [Optional[shared.BankAccountCredentials]](../../models/shared/bankaccountcredentials.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md b/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md
deleted file mode 100644
index 5bb6d4be8..000000000
--- a/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# GetBankAccountMappingResponse
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `bank_feed_mapping` | [Optional[shared.BankFeedMapping]](../../models/shared/bankfeedmapping.md) | :heavy_minus_sign: | Success | {"sourceAccountId":"acc-002","targetAccountId":"account-081","sourceCurrency":"USD","status":"Success","feedStartDate":"2023-01-09T14:14:14.1057478Z","sourceAccountName":"ACME Bank","sourceAccountNumber":"1234-5678","sourceBalance":500,"targetAccountName":"ACME Bank"} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/getcompanyinformationrequest.md b/bank-feeds/docs/models/operations/getcompanyinformationrequest.md
new file mode 100644
index 000000000..657eb5cde
--- /dev/null
+++ b/bank-feeds/docs/models/operations/getcompanyinformationrequest.md
@@ -0,0 +1,9 @@
+# GetCompanyInformationRequest
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/getconfigurationresponse.md b/bank-feeds/docs/models/operations/getconfigurationresponse.md
deleted file mode 100644
index d6a28ef4f..000000000
--- a/bank-feeds/docs/models/operations/getconfigurationresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# GetConfigurationResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
-| `configuration` | [Optional[shared.Configuration]](../../models/shared/configuration.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/getconnectionresponse.md b/bank-feeds/docs/models/operations/getconnectionresponse.md
deleted file mode 100644
index 66e3f65f1..000000000
--- a/bank-feeds/docs/models/operations/getconnectionresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# GetConnectionResponse
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/getcreatebankaccountsmodelresponse.md b/bank-feeds/docs/models/operations/getcreatebankaccountsmodelresponse.md
deleted file mode 100644
index 3a367c240..000000000
--- a/bank-feeds/docs/models/operations/getcreatebankaccountsmodelresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# GetCreateBankAccountsModelResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
-| `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/getcreateoperationresponse.md b/bank-feeds/docs/models/operations/getcreateoperationresponse.md
deleted file mode 100644
index e33dd4671..000000000
--- a/bank-feeds/docs/models/operations/getcreateoperationresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# GetCreateOperationResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
-| `push_operation` | [Optional[shared.PushOperation]](../../models/shared/pushoperation.md) | :heavy_minus_sign: | OK |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/items.md b/bank-feeds/docs/models/operations/getlastsuccessfulrequest.md
similarity index 65%
rename from bank-feeds/docs/models/shared/items.md
rename to bank-feeds/docs/models/operations/getlastsuccessfulrequest.md
index 8bf62de24..78a519a7e 100644
--- a/bank-feeds/docs/models/shared/items.md
+++ b/bank-feeds/docs/models/operations/getlastsuccessfulrequest.md
@@ -1,8 +1,8 @@
-# Items
+# GetLastSuccessfulRequest
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
-| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the group. | 60d2fa12-8a04-11ee-b9d1-0242ac120002 |
\ No newline at end of file
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listbankaccountsrequest.md b/bank-feeds/docs/models/operations/listbankaccountsrequest.md
index 3a9841d89..73e7ff8bc 100644
--- a/bank-feeds/docs/models/operations/listbankaccountsrequest.md
+++ b/bank-feeds/docs/models/operations/listbankaccountsrequest.md
@@ -10,4 +10,4 @@
| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
-| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listbankaccountsresponse.md b/bank-feeds/docs/models/operations/listbankaccountsresponse.md
deleted file mode 100644
index 504363bba..000000000
--- a/bank-feeds/docs/models/operations/listbankaccountsresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ListBankAccountsResponse
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `bank_accounts` | [Optional[shared.BankAccounts]](../../models/shared/bankaccounts.md) | :heavy_minus_sign: | Success | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listcompaniesrequest.md b/bank-feeds/docs/models/operations/listcompaniesrequest.md
index 8dfaf69d5..9fc1a9c7e 100644
--- a/bank-feeds/docs/models/operations/listcompaniesrequest.md
+++ b/bank-feeds/docs/models/operations/listcompaniesrequest.md
@@ -8,4 +8,4 @@
| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
-| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listcompaniesresponse.md b/bank-feeds/docs/models/operations/listcompaniesresponse.md
deleted file mode 100644
index 7abc40ecd..000000000
--- a/bank-feeds/docs/models/operations/listcompaniesresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ListCompaniesResponse
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `companies` | [Optional[shared.Companies]](../../models/shared/companies.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listconnectionsrequest.md b/bank-feeds/docs/models/operations/listconnectionsrequest.md
index e13ad736b..949d3e3b6 100644
--- a/bank-feeds/docs/models/operations/listconnectionsrequest.md
+++ b/bank-feeds/docs/models/operations/listconnectionsrequest.md
@@ -9,4 +9,4 @@
| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
-| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listconnectionsresponse.md b/bank-feeds/docs/models/operations/listconnectionsresponse.md
deleted file mode 100644
index 78b8ddd89..000000000
--- a/bank-feeds/docs/models/operations/listconnectionsresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ListConnectionsResponse
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `connections` | [Optional[shared.Connections]](../../models/shared/connections.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listcreateoperationsrequest.md b/bank-feeds/docs/models/operations/listcreateoperationsrequest.md
index 81b28fc41..e92d7ed96 100644
--- a/bank-feeds/docs/models/operations/listcreateoperationsrequest.md
+++ b/bank-feeds/docs/models/operations/listcreateoperationsrequest.md
@@ -9,4 +9,4 @@
| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
| `page` | *Optional[int]* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
-| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | |
\ No newline at end of file
+| `query` | *Optional[str]* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listcreateoperationsresponse.md b/bank-feeds/docs/models/operations/listcreateoperationsresponse.md
deleted file mode 100644
index 9e2636b44..000000000
--- a/bank-feeds/docs/models/operations/listcreateoperationsresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ListCreateOperationsResponse
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `push_operations` | [Optional[shared.PushOperations]](../../models/shared/pushoperations.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listsourceaccountsresponse.md b/bank-feeds/docs/models/operations/listsourceaccountsresponse.md
deleted file mode 100644
index 215bde744..000000000
--- a/bank-feeds/docs/models/operations/listsourceaccountsresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ListSourceAccountsResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
-| `source_accounts` | List[[shared.SourceAccount](../../models/shared/sourceaccount.md)] | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/listsourceaccountsresponsebody.md b/bank-feeds/docs/models/operations/listsourceaccountsresponsebody.md
new file mode 100644
index 000000000..e18be7bfb
--- /dev/null
+++ b/bank-feeds/docs/models/operations/listsourceaccountsresponsebody.md
@@ -0,0 +1,19 @@
+# ListSourceAccountsResponseBody
+
+Success
+
+
+## Supported Types
+
+### `List[shared.SourceAccountV2]`
+
+```python
+value: List[shared.SourceAccountV2] = /* values here */
+```
+
+### `List[shared.SourceAccount]`
+
+```python
+value: List[shared.SourceAccount] = /* values here */
+```
+
diff --git a/bank-feeds/docs/models/operations/setconfigurationresponse.md b/bank-feeds/docs/models/operations/setconfigurationresponse.md
deleted file mode 100644
index 59a60bc92..000000000
--- a/bank-feeds/docs/models/operations/setconfigurationresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# SetConfigurationResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
-| `configuration` | [Optional[shared.Configuration]](../../models/shared/configuration.md) | :heavy_minus_sign: | Success |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/unlinkconnectionresponse.md b/bank-feeds/docs/models/operations/unlinkconnectionresponse.md
deleted file mode 100644
index 08eb976b5..000000000
--- a/bank-feeds/docs/models/operations/unlinkconnectionresponse.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# UnlinkConnectionResponse
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/updatesourceaccountrequest.md b/bank-feeds/docs/models/operations/updatesourceaccountrequest.md
index 76d70042a..26a9d90e9 100644
--- a/bank-feeds/docs/models/operations/updatesourceaccountrequest.md
+++ b/bank-feeds/docs/models/operations/updatesourceaccountrequest.md
@@ -3,9 +3,9 @@
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `account_id` | *str* | :heavy_check_mark: | Unique identifier for an account. | 13d946f0-c5d5-42bc-b092-97ece17923ab |
-| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
-| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
-| `source_account` | [Optional[shared.SourceAccount]](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | N/A | {"id":"acc-002","accountName":"account-081","sortCode":"123456","accountType":"Credit","accountNumber":"12345670","currency":"GBP","balance":99.99,"modifiedDate":"2023-01-09T14:14:14.1057478Z","status":"pending"} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `account_id` | *str* | :heavy_check_mark: | Unique identifier for an account. | 13d946f0-c5d5-42bc-b092-97ece17923ab |
+| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *str* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `source_account` | [Optional[shared.SourceAccount]](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | N/A | {
"id": "acc-002",
"accountName": "account-081",
"sortCode": "123456",
"accountType": "Credit",
"accountNumber": "12345670",
"currency": "GBP",
"balance": 99.99,
"modifiedDate": "2023-01-09T14:14:14.1057478Z",
"status": "pending"
} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/createsourceaccountresponse.md b/bank-feeds/docs/models/shared/accountinfo.md
similarity index 54%
rename from bank-feeds/docs/models/operations/createsourceaccountresponse.md
rename to bank-feeds/docs/models/shared/accountinfo.md
index 1a7e7c1c7..9883d2487 100644
--- a/bank-feeds/docs/models/operations/createsourceaccountresponse.md
+++ b/bank-feeds/docs/models/shared/accountinfo.md
@@ -1,11 +1,11 @@
-# CreateSourceAccountResponse
+# AccountInfo
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `source_account` | [Optional[shared.SourceAccount]](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | {"id":"acc-002","accountName":"account-081","sortCode":"123456","accountType":"Credit","accountNumber":"12345670","currency":"GBP","balance":99.99,"modifiedDate":"2023-01-09T14:14:14.1057478Z","status":"pending"} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `account_open_date` | *OptionalNullable[str]* | :heavy_minus_sign: | In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
```
2020-10-08
``` | 2022-10-23 |
+| `available_balance` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Balance of funds available for use. This includes pending activity. | |
+| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the account. | |
+| `nickname` | *OptionalNullable[str]* | :heavy_minus_sign: | Name given to the account by the user. Used in UIs to assist in account selection. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/accountingbankaccount.md b/bank-feeds/docs/models/shared/accountingbankaccount.md
index e29cc863b..9ea15427d 100644
--- a/bank-feeds/docs/models/shared/accountingbankaccount.md
+++ b/bank-feeds/docs/models/shared/accountingbankaccount.md
@@ -13,7 +13,7 @@
A list of bank accounts associated with a company and a specific data connection.
Bank accounts data includes:
-* The name and ID of the account in the accounting platform.
+* The name and ID of the account in the accounting software.
* The currency and balance of the account.
* The sort code and account number.
@@ -24,19 +24,20 @@ Bank accounts data includes:
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `account_name` | *Optional[str]* | :heavy_minus_sign: | Name of the bank account in the accounting platform. | |
-| `account_number` | *Optional[str]* | :heavy_minus_sign: | Account number for the bank account.
Xero integrations
Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional. | |
+| `account_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the bank account in the accounting software. | |
+| `account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Account number for the bank account.
Xero integrations
Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional. | |
| `account_type` | [Optional[shared.BankAccountCreateResponseBankAccountType]](../../models/shared/bankaccountcreateresponsebankaccounttype.md) | :heavy_minus_sign: | The type of transactions and balances on the account.
For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
For Debit accounts, positive balances are assets, and positive transactions **increase** assets. | |
-| `available_balance` | *Optional[Decimal]* | :heavy_minus_sign: | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. | |
-| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | Balance of the bank account. | |
+| `available_balance` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. | |
+| `balance` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Balance of the bank account. | |
| `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
-| `i_ban` | *Optional[str]* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | |
-| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting platform. | |
-| `institution` | *Optional[str]* | :heavy_minus_sign: | The institution of the bank account. | |
+| `i_ban` | *OptionalNullable[str]* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | |
+| `institution` | *OptionalNullable[str]* | :heavy_minus_sign: | The institution of the bank account. | |
| `metadata` | [Optional[shared.Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | |
| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC |
-| `nominal_code` | *Optional[str]* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | |
-| `overdraft_limit` | *Optional[Decimal]* | :heavy_minus_sign: | Pre-arranged overdraft limit of the account.
The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. | |
-| `sort_code` | *Optional[str]* | :heavy_minus_sign: | Sort code for the bank account.
Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. | |
+| `nominal_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | |
+| `overdraft_limit` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Pre-arranged overdraft limit of the account.
The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. | |
+| `sort_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Sort code for the bank account.
Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. | |
| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC |
-| `supplemental_data` | [Optional[shared.SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
\ No newline at end of file
+| `status` | [Optional[shared.BankAccountStatus]](../../models/shared/bankaccountstatus.md) | :heavy_minus_sign: | Status of the bank account. | Active |
+| `supplemental_data` | [Optional[shared.SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/accounttype.md b/bank-feeds/docs/models/shared/accounttype.md
new file mode 100644
index 000000000..3761e8aa8
--- /dev/null
+++ b/bank-feeds/docs/models/shared/accounttype.md
@@ -0,0 +1,14 @@
+# AccountType
+
+The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
+
+
+## Values
+
+| Name | Value |
+| -------------- | -------------- |
+| `CHECKING` | checking |
+| `SAVINGS` | savings |
+| `LOAN` | loan |
+| `CREDIT_CARD` | creditCard |
+| `PREPAID_CARD` | prepaidCard |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/bankaccountcreateresponse.md b/bank-feeds/docs/models/shared/bankaccountcreateresponse.md
index 9ab962f0d..685488c3c 100644
--- a/bank-feeds/docs/models/shared/bankaccountcreateresponse.md
+++ b/bank-feeds/docs/models/shared/bankaccountcreateresponse.md
@@ -13,9 +13,9 @@
| `status_code` | *int* | :heavy_check_mark: | Push status code. | |
| `changes` | List[[shared.PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | |
| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
-| `data` | [Optional[shared.AccountingBankAccount]](../../models/shared/accountingbankaccount.md) | :heavy_minus_sign: | N/A | |
-| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
-| `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | |
-| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | |
-| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Number of seconds the push operation must complete within before it times out. | |
+| `data` | [OptionalNullable[shared.AccountingBankAccount]](../../models/shared/accountingbankaccount.md) | :heavy_minus_sign: | N/A | |
+| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available data types | invoices |
+| `error_message` | *OptionalNullable[str]* | :heavy_minus_sign: | A message about the error. | |
+| `timeout_in_minutes` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | |
+| ~~`timeout_in_seconds`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Number of seconds the push operation must complete within before it times out. | |
| `validation` | [Optional[shared.Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/bankaccountprototype.md b/bank-feeds/docs/models/shared/bankaccountprototype.md
index 9923f042f..eaaa4a252 100644
--- a/bank-feeds/docs/models/shared/bankaccountprototype.md
+++ b/bank-feeds/docs/models/shared/bankaccountprototype.md
@@ -5,14 +5,15 @@
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `account_name` | *Optional[str]* | :heavy_minus_sign: | Name of the bank account in the accounting platform. | |
-| `account_number` | *Optional[str]* | :heavy_minus_sign: | Account number for the bank account.
Xero integrations
Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional. | |
+| `account_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the bank account in the accounting software. | |
+| `account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Account number for the bank account.
Xero integrations
Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional. | |
| `account_type` | [Optional[shared.BankAccountType]](../../models/shared/bankaccounttype.md) | :heavy_minus_sign: | The type of transactions and balances on the account.
For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
For Debit accounts, positive balances are assets, and positive transactions **increase** assets. | |
-| `available_balance` | *Optional[Decimal]* | :heavy_minus_sign: | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. | |
-| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | Balance of the bank account. | |
+| `available_balance` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. | |
+| `balance` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Balance of the bank account. | |
| `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
-| `i_ban` | *Optional[str]* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | |
-| `institution` | *Optional[str]* | :heavy_minus_sign: | The institution of the bank account. | |
-| `nominal_code` | *Optional[str]* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | |
-| `overdraft_limit` | *Optional[Decimal]* | :heavy_minus_sign: | Pre-arranged overdraft limit of the account.
The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. | |
-| `sort_code` | *Optional[str]* | :heavy_minus_sign: | Sort code for the bank account.
Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. | |
\ No newline at end of file
+| `i_ban` | *OptionalNullable[str]* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | |
+| `institution` | *OptionalNullable[str]* | :heavy_minus_sign: | The institution of the bank account. | |
+| `nominal_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | |
+| `overdraft_limit` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Pre-arranged overdraft limit of the account.
The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. | |
+| `sort_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Sort code for the bank account.
Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. | |
+| `status` | [Optional[shared.BankAccountStatus]](../../models/shared/bankaccountstatus.md) | :heavy_minus_sign: | Status of the bank account. | Active |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/bankaccounts.md b/bank-feeds/docs/models/shared/bankaccounts.md
index 144c110ad..a0eaa800e 100644
--- a/bank-feeds/docs/models/shared/bankaccounts.md
+++ b/bank-feeds/docs/models/shared/bankaccounts.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
-| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} |
-| `page_number` | *int* | :heavy_check_mark: | Current page number. | |
-| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | |
-| `total_results` | *int* | :heavy_check_mark: | Total number of items. | |
-| `results` | List[[shared.BankAccountsAccountingBankAccount](../../models/shared/bankaccountsaccountingbankaccount.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} |
+| `page_number` | *int* | :heavy_check_mark: | Current page number. | |
+| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | |
+| `total_results` | *int* | :heavy_check_mark: | Total number of items. | |
+| `results` | List[[shared.BankAccountsAccountingBankAccount](../../models/shared/bankaccountsaccountingbankaccount.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/bankaccountsaccountingbankaccount.md b/bank-feeds/docs/models/shared/bankaccountsaccountingbankaccount.md
index 8d59f6e72..d25efc360 100644
--- a/bank-feeds/docs/models/shared/bankaccountsaccountingbankaccount.md
+++ b/bank-feeds/docs/models/shared/bankaccountsaccountingbankaccount.md
@@ -13,7 +13,7 @@
A list of bank accounts associated with a company and a specific data connection.
Bank accounts data includes:
-* The name and ID of the account in the accounting platform.
+* The name and ID of the account in the accounting software.
* The currency and balance of the account.
* The sort code and account number.
@@ -22,19 +22,20 @@ Bank accounts data includes:
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `account_name` | *Optional[str]* | :heavy_minus_sign: | Name of the bank account in the accounting platform. | |
-| `account_number` | *Optional[str]* | :heavy_minus_sign: | Account number for the bank account.
Xero integrations
Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional. | |
+| `account_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the bank account in the accounting software. | |
+| `account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Account number for the bank account.
Xero integrations
Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional. | |
| `account_type` | [Optional[shared.BankAccountsBankAccountType]](../../models/shared/bankaccountsbankaccounttype.md) | :heavy_minus_sign: | The type of transactions and balances on the account.
For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
For Debit accounts, positive balances are assets, and positive transactions **increase** assets. | |
-| `available_balance` | *Optional[Decimal]* | :heavy_minus_sign: | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. | |
-| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | Balance of the bank account. | |
+| `available_balance` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. | |
+| `balance` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Balance of the bank account. | |
| `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
-| `i_ban` | *Optional[str]* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | |
-| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting platform. | |
-| `institution` | *Optional[str]* | :heavy_minus_sign: | The institution of the bank account. | |
+| `i_ban` | *OptionalNullable[str]* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | |
+| `institution` | *OptionalNullable[str]* | :heavy_minus_sign: | The institution of the bank account. | |
| `metadata` | [Optional[shared.BankAccountsMetadata]](../../models/shared/bankaccountsmetadata.md) | :heavy_minus_sign: | N/A | |
| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC |
-| `nominal_code` | *Optional[str]* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | |
-| `overdraft_limit` | *Optional[Decimal]* | :heavy_minus_sign: | Pre-arranged overdraft limit of the account.
The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. | |
-| `sort_code` | *Optional[str]* | :heavy_minus_sign: | Sort code for the bank account.
Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. | |
+| `nominal_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | |
+| `overdraft_limit` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | Pre-arranged overdraft limit of the account.
The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. | |
+| `sort_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Sort code for the bank account.
Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. | |
| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC |
-| `supplemental_data` | [Optional[shared.BankAccountsSupplementalData]](../../models/shared/bankaccountssupplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
\ No newline at end of file
+| `status` | [Optional[shared.BankAccountStatus]](../../models/shared/bankaccountstatus.md) | :heavy_minus_sign: | Status of the bank account. | Active |
+| `supplemental_data` | [Optional[shared.BankAccountsSupplementalData]](../../models/shared/bankaccountssupplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.
It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/bankaccountsmetadata.md b/bank-feeds/docs/models/shared/bankaccountsmetadata.md
index c0150d48c..d6c8c9785 100644
--- a/bank-feeds/docs/models/shared/bankaccountsmetadata.md
+++ b/bank-feeds/docs/models/shared/bankaccountsmetadata.md
@@ -5,4 +5,4 @@
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
-| `is_deleted` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the record has been deleted in the third-party system this record originated from. |
\ No newline at end of file
+| `is_deleted` | *OptionalNullable[bool]* | :heavy_minus_sign: | Indicates whether the record has been deleted in the third-party system this record originated from. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/bankaccountssupplementaldata.md b/bank-feeds/docs/models/shared/bankaccountssupplementaldata.md
index 6676dbbe9..b26b85416 100644
--- a/bank-feeds/docs/models/shared/bankaccountssupplementaldata.md
+++ b/bank-feeds/docs/models/shared/bankaccountssupplementaldata.md
@@ -2,7 +2,7 @@
Supplemental data is additional data you can include in our standard data types.
-It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
## Fields
diff --git a/bank-feeds/docs/models/shared/bankaccountstatus.md b/bank-feeds/docs/models/shared/bankaccountstatus.md
new file mode 100644
index 000000000..b4d504d31
--- /dev/null
+++ b/bank-feeds/docs/models/shared/bankaccountstatus.md
@@ -0,0 +1,13 @@
+# BankAccountStatus
+
+Status of the bank account.
+
+
+## Values
+
+| Name | Value |
+| ---------- | ---------- |
+| `UNKNOWN` | Unknown |
+| `ACTIVE` | Active |
+| `ARCHIVED` | Archived |
+| `PENDING` | Pending |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/bankfeedaccountmapping.md b/bank-feeds/docs/models/shared/bankfeedaccountmapping.md
new file mode 100644
index 000000000..b8d5a2ac9
--- /dev/null
+++ b/bank-feeds/docs/models/shared/bankfeedaccountmapping.md
@@ -0,0 +1,9 @@
+# BankFeedAccountMapping
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
+| `source_account_id` | *str* | :heavy_check_mark: | Unique ID for the source account |
+| `target_account_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique ID for the target account |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/bankfeedaccountmappingresponse.md b/bank-feeds/docs/models/shared/bankfeedaccountmappingresponse.md
index 6fba72d03..a53ddaf59 100644
--- a/bank-feeds/docs/models/shared/bankfeedaccountmappingresponse.md
+++ b/bank-feeds/docs/models/shared/bankfeedaccountmappingresponse.md
@@ -7,7 +7,7 @@ The result from POSTing a Bank Account mapping.
| Field | Type | Required | Description |
| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
-| `error` | *Optional[str]* | :heavy_minus_sign: | Error returned during the post request |
-| `status` | *Optional[str]* | :heavy_minus_sign: | Status of the POST request. |
+| `error` | *OptionalNullable[str]* | :heavy_minus_sign: | Error returned during the post request |
+| `status` | *OptionalNullable[str]* | :heavy_minus_sign: | Status of the POST request. |
| `source_account_id` | *Optional[str]* | :heavy_minus_sign: | Unique ID for the source account. |
-| `target_account_id` | *Optional[str]* | :heavy_minus_sign: | Unique ID for the target account. |
\ No newline at end of file
+| `target_account_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique ID for the target account. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/bankfeedmapping.md b/bank-feeds/docs/models/shared/bankfeedmapping.md
index de152189e..b3fbadba2 100644
--- a/bank-feeds/docs/models/shared/bankfeedmapping.md
+++ b/bank-feeds/docs/models/shared/bankfeedmapping.md
@@ -14,6 +14,6 @@ A bank feed connection between a source account and a target account, including
| `source_balance` | *Optional[str]* | :heavy_minus_sign: | Balance for the source account. | |
| `source_currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
| `status` | *Optional[str]* | :heavy_minus_sign: | The status. | |
-| `target_account_id` | *Optional[str]* | :heavy_minus_sign: | Unique ID for the target account in the accounting platform. | |
-| `target_account_name` | *Optional[str]* | :heavy_minus_sign: | Name for the target account in the accounting platform. | |
+| `target_account_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique ID for the target account in the accounting software. | |
+| `target_account_name` | *Optional[str]* | :heavy_minus_sign: | Name for the target account in the accounting software. | |
| `target_account_options` | List[[shared.TargetAccountOption](../../models/shared/targetaccountoption.md)] | :heavy_minus_sign: | An array of potential target accounts. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/banktransactions.md b/bank-feeds/docs/models/shared/banktransactions.md
index 9c0af4840..8b602bee7 100644
--- a/bank-feeds/docs/models/shared/banktransactions.md
+++ b/bank-feeds/docs/models/shared/banktransactions.md
@@ -5,12 +5,12 @@
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | The amount transacted in the bank transaction. | 999.99 |
-| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | The remaining balance in the account with ID `accountId`. | -999.99 |
-| `counterparty` | *Optional[str]* | :heavy_minus_sign: | The giving or receiving party such as a person or organization. | ACME INC |
-| `date_` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
-| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the bank transaction. | Debit for Payment Id sdp-1-57379a43-c4b8-49f5-bd7c-699189ee7a60 |
-| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the bank account transaction, unique for the company in the accounting platform. | 716422529 |
-| `reconciled` | *Optional[bool]* | :heavy_minus_sign: | `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting platform. | false |
-| `reference` | *Optional[str]* | :heavy_minus_sign: | An optional reference to the bank transaction. | reference for transaction |
-| `transaction_type` | [Optional[shared.BankTransactionType]](../../models/shared/banktransactiontype.md) | :heavy_minus_sign: | Type of transaction for the bank statement line. | |
\ No newline at end of file
+| `amount` | *Decimal* | :heavy_check_mark: | The amount transacted in the bank transaction. | 999.99 |
+| `date_` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
+| `id` | *str* | :heavy_check_mark: | Identifier for the bank account transaction, unique for the company in the accounting software. | 716422529 |
+| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | The remaining balance in the account with ID `accountId`. This field is optional for QuickBooks Online but is required for Xero, Sage, NetSuite, Exact, and FreeAgent. | -999.99 |
+| `counterparty` | *OptionalNullable[str]* | :heavy_minus_sign: | The giving or receiving party such as a person or organization. | ACME INC |
+| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the bank transaction. | Debit for Payment Id sdp-1-57379a43-c4b8-49f5-bd7c-699189ee7a60 |
+| `reconciled` | *OptionalNullable[bool]* | :heavy_minus_sign: | `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software. | false |
+| `reference` | *OptionalNullable[str]* | :heavy_minus_sign: | An optional reference to the bank transaction. | reference for transaction |
+| `transaction_type` | [OptionalNullable[shared.BankTransactionType]](../../models/shared/banktransactiontype.md) | :heavy_minus_sign: | Type of transaction for the bank statement line. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/clientratelimitreachedwebhook.md b/bank-feeds/docs/models/shared/clientratelimitreachedwebhook.md
index 0e1855429..7e8db4c18 100644
--- a/bank-feeds/docs/models/shared/clientratelimitreachedwebhook.md
+++ b/bank-feeds/docs/models/shared/clientratelimitreachedwebhook.md
@@ -5,12 +5,12 @@ Webhook request body for a client that has reached their rate limit.
## Fields
-| Field | Type | Required | Description |
-| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
-| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. |
-| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. |
-| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. |
-| `data` | [Optional[shared.ClientRateLimitReachedWebhookData]](../../models/shared/clientratelimitreachedwebhookdata.md) | :heavy_minus_sign: | N/A |
-| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. |
-| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. |
-| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. |
\ No newline at end of file
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. |
+| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. |
+| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. |
+| `data` | [Optional[shared.ClientRateLimitReachedWebhookData]](../../models/shared/clientratelimitreachedwebhookdata.md) | :heavy_minus_sign: | N/A |
+| `message` | *Optional[str]* | :heavy_minus_sign: | A human-readable message about the webhook. |
+| ~~`rule_id`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Unique identifier for the rule. |
+| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/clientratelimitresetwebhook.md b/bank-feeds/docs/models/shared/clientratelimitresetwebhook.md
index de4352761..4b69731e8 100644
--- a/bank-feeds/docs/models/shared/clientratelimitresetwebhook.md
+++ b/bank-feeds/docs/models/shared/clientratelimitresetwebhook.md
@@ -5,12 +5,12 @@ Webhook request body for a client that has had their rate limit reset.
## Fields
-| Field | Type | Required | Description |
-| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
-| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. |
-| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. |
-| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. |
-| `data` | [Optional[shared.ClientRateLimitResetWebhookData]](../../models/shared/clientratelimitresetwebhookdata.md) | :heavy_minus_sign: | N/A |
-| `message` | *Optional[str]* | :heavy_minus_sign: | A human readable message about the webhook. |
-| `rule_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rule. |
-| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. |
\ No newline at end of file
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `alert_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the webhook event. |
+| `client_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your client in Codat. |
+| `client_name` | *Optional[str]* | :heavy_minus_sign: | Name of your client in Codat. |
+| `data` | [Optional[shared.ClientRateLimitResetWebhookData]](../../models/shared/clientratelimitresetwebhookdata.md) | :heavy_minus_sign: | N/A |
+| `message` | *Optional[str]* | :heavy_minus_sign: | A human-readable message about the webhook. |
+| ~~`rule_id`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Unique identifier for the rule. |
+| `rule_type` | *Optional[str]* | :heavy_minus_sign: | The type of rule. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/clientratelimitresetwebhookdata.md b/bank-feeds/docs/models/shared/clientratelimitresetwebhookdata.md
index e62b34279..e585938fa 100644
--- a/bank-feeds/docs/models/shared/clientratelimitresetwebhookdata.md
+++ b/bank-feeds/docs/models/shared/clientratelimitresetwebhookdata.md
@@ -7,5 +7,5 @@
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `daily_quota` | *Optional[int]* | :heavy_minus_sign: | The number of available requests per day. | |
| `expires_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
-| `quota_remaining` | *Optional[int]* | :heavy_minus_sign: | Total number of request remaining for your client. | |
+| `quota_remaining` | *OptionalNullable[int]* | :heavy_minus_sign: | Total number of requests remaining for your client. | |
| `reset_reason` | *Optional[str]* | :heavy_minus_sign: | The reason for your rate limit quota being reset. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/getcompanyresponse.md b/bank-feeds/docs/models/shared/clientratelimitwebhook.md
similarity index 84%
rename from bank-feeds/docs/models/operations/getcompanyresponse.md
rename to bank-feeds/docs/models/shared/clientratelimitwebhook.md
index 9b44863d2..063e072ec 100644
--- a/bank-feeds/docs/models/operations/getcompanyresponse.md
+++ b/bank-feeds/docs/models/shared/clientratelimitwebhook.md
@@ -1,11 +1,11 @@
-# GetCompanyResponse
+# ClientRateLimitWebhook
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"string","redirect":"https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739","lastSync":"2022-01-01T12:00:00.000Z","created":"2022-01-01T12:00:00.000Z","createdByUserName":"string","dataConnections":[{"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `event_type` | *Optional[str]* | :heavy_minus_sign: | The type of event. | client.rateLimit.reset |
+| `generated_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the event. | 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b |
+| `payload` | [Optional[shared.ClientRateLimitWebhookPayload]](../../models/shared/clientratelimitwebhookpayload.md) | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/zero.md b/bank-feeds/docs/models/shared/clientratelimitwebhookpayload.md
similarity index 96%
rename from bank-feeds/docs/models/shared/zero.md
rename to bank-feeds/docs/models/shared/clientratelimitwebhookpayload.md
index a799c355e..449b685f6 100644
--- a/bank-feeds/docs/models/shared/zero.md
+++ b/bank-feeds/docs/models/shared/clientratelimitwebhookpayload.md
@@ -1,12 +1,10 @@
-# Zero
-
-A bank feed connection between a source account and a target account.
+# ClientRateLimitWebhookPayload
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `feed_start_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
-| `source_account_id` | *Optional[str]* | :heavy_minus_sign: | Unique ID for the source account | |
-| `target_account_id` | *Optional[str]* | :heavy_minus_sign: | Unique ID for the target account | |
\ No newline at end of file
+| `daily_quota` | *Optional[int]* | :heavy_minus_sign: | The number of available requests per day. | |
+| `expiry_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
+| `quota_remaining` | *Optional[int]* | :heavy_minus_sign: | Total number of requests remaining for your client. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/companies.md b/bank-feeds/docs/models/shared/companies.md
index c19c46de5..d6b5a8ea8 100644
--- a/bank-feeds/docs/models/shared/companies.md
+++ b/bank-feeds/docs/models/shared/companies.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
-| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} |
-| `page_number` | *int* | :heavy_check_mark: | Current page number. | |
-| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | |
-| `total_results` | *int* | :heavy_check_mark: | Total number of items. | |
-| `results` | List[[shared.Company](../../models/shared/company.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
+| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} |
+| `page_number` | *int* | :heavy_check_mark: | Current page number. | |
+| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | |
+| `total_results` | *int* | :heavy_check_mark: | Total number of items. | |
+| `results` | List[[shared.Company](../../models/shared/company.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/company.md b/bank-feeds/docs/models/shared/company.md
index 00a3f639d..8693aac3b 100644
--- a/bank-feeds/docs/models/shared/company.md
+++ b/bank-feeds/docs/models/shared/company.md
@@ -15,9 +15,8 @@ When you create a company, you can specify a `name` and we will automatically ge
| `name` | *str* | :heavy_check_mark: | The name of the company | Codat Ltd. |
| `redirect` | *str* | :heavy_check_mark: | The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. | https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739 |
| `created` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
-| `created_by_user_name` | *Optional[str]* | :heavy_minus_sign: | Name of user that created the company in Codat. | |
+| `created_by_user_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of user that created the company in Codat. | |
| `data_connections` | List[[shared.Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | |
| `description` | *Optional[str]* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. |
-| `groups` | List[[shared.GroupReference](../../models/shared/groupreference.md)] | :heavy_minus_sign: | An array of groups the company has been assigned to. | |
| `last_sync` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
-| ~~`platform`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
`platformKeys` name used when creating the company. | Xero |
\ No newline at end of file
+| `tags` | [Optional[shared.Tags]](../../models/shared/tags.md) | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/companyinformation.md b/bank-feeds/docs/models/shared/companyinformation.md
new file mode 100644
index 000000000..b17de619a
--- /dev/null
+++ b/bank-feeds/docs/models/shared/companyinformation.md
@@ -0,0 +1,13 @@
+# CompanyInformation
+
+Information about the company from the underlying accounting software.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
+| `base_currency` | *Optional[str]* | :heavy_minus_sign: | Currency set in the accounting software of the linked company. |
+| `company_name` | *Optional[str]* | :heavy_minus_sign: | Name of the linked company. |
+| `multicurrency_enabled` | *OptionalNullable[bool]* | :heavy_minus_sign: | Boolean showing if the organisation has multicurrency enabled |
+| `plan_type` | *OptionalNullable[str]* | :heavy_minus_sign: | Accounting software subscription type such as Trial, Demo, Standard |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/companyrequestbody.md b/bank-feeds/docs/models/shared/companyrequestbody.md
index c88c7388b..db122dd65 100644
--- a/bank-feeds/docs/models/shared/companyrequestbody.md
+++ b/bank-feeds/docs/models/shared/companyrequestbody.md
@@ -7,4 +7,4 @@
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `name` | *str* | :heavy_check_mark: | Name of company being connected. | Bank of Dave |
| `description` | *Optional[str]* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. |
-| `groups` | List[[shared.Items](../../models/shared/items.md)] | :heavy_minus_sign: | Reference to the groups that the company is assigned to. | |
\ No newline at end of file
+| `groups` | List[[shared.GroupReference](../../models/shared/groupreference.md)] | :heavy_minus_sign: | Reference to the groups that the company is assigned to. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/createcompanyresponse.md b/bank-feeds/docs/models/shared/companysyncstatus.md
similarity index 50%
rename from bank-feeds/docs/models/operations/createcompanyresponse.md
rename to bank-feeds/docs/models/shared/companysyncstatus.md
index faee951b5..8e8337f4d 100644
--- a/bank-feeds/docs/models/operations/createcompanyresponse.md
+++ b/bank-feeds/docs/models/shared/companysyncstatus.md
@@ -1,11 +1,15 @@
-# CreateCompanyResponse
+# CompanySyncStatus
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"string","redirect":"https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739","lastSync":"2022-01-01T12:00:00.000Z","created":"2022-01-01T12:00:00.000Z","createdByUserName":"string","dataConnections":[{"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `company_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | d4d73051-ed31-42b6-99f6-d288cd940992 |
+| `data_pushed` | *Optional[bool]* | :heavy_minus_sign: | Boolean of whether the sync resulted in data being pushed. | |
+| `error_message` | *OptionalNullable[str]* | :heavy_minus_sign: | Error message of the sync. | |
+| `sync_exception_message` | *OptionalNullable[str]* | :heavy_minus_sign: | Exception message of the sync. | |
+| `sync_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the sync. | a6a22aff-a43a-411d-a910-2dae73217cce |
+| `sync_status` | *OptionalNullable[str]* | :heavy_minus_sign: | Text status of the sync. | Complete |
+| `sync_status_code` | *Optional[int]* | :heavy_minus_sign: | Status code of the sync. | 2000 |
+| `sync_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/configuration.md b/bank-feeds/docs/models/shared/configuration.md
index 8cd3956fd..2e5b5424a 100644
--- a/bank-feeds/docs/models/shared/configuration.md
+++ b/bank-feeds/docs/models/shared/configuration.md
@@ -5,7 +5,7 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
-| `accounting_software_company_name` | *Optional[str]* | :heavy_minus_sign: | The company name defined in the accounting platform. | |
+| `accounting_software_company_name` | *Optional[str]* | :heavy_minus_sign: | The company name defined in the accounting software. | |
| `company_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
| `configuration` | [Optional[shared.SyncConfiguration]](../../models/shared/syncconfiguration.md) | :heavy_minus_sign: | N/A | |
| `configured` | *Optional[bool]* | :heavy_minus_sign: | True if the company has been configured. | |
diff --git a/bank-feeds/docs/models/shared/connections.md b/bank-feeds/docs/models/shared/connections.md
index b2e15bef0..1323c74a1 100644
--- a/bank-feeds/docs/models/shared/connections.md
+++ b/bank-feeds/docs/models/shared/connections.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
-| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} |
-| `page_number` | *int* | :heavy_check_mark: | Current page number. | |
-| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | |
-| `total_results` | *int* | :heavy_check_mark: | Total number of items. | |
-| `results` | List[[shared.Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
+| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} |
+| `page_number` | *int* | :heavy_check_mark: | Current page number. | |
+| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | |
+| `total_results` | *int* | :heavy_check_mark: | Total number of items. | |
+| `results` | List[[shared.Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/createbanktransactions.md b/bank-feeds/docs/models/shared/createbanktransactions.md
index e8f6415e4..1180e7fc6 100644
--- a/bank-feeds/docs/models/shared/createbanktransactions.md
+++ b/bank-feeds/docs/models/shared/createbanktransactions.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
-| `account_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for a bank account. | 13d946f0-c5d5-42bc-b092-97ece17923ab |
-| `transactions` | List[[shared.BankTransactions](../../models/shared/banktransactions.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| `account_id` | *str* | :heavy_check_mark: | Unique identifier for a bank account. | 13d946f0-c5d5-42bc-b092-97ece17923ab |
+| `transactions` | List[[shared.BankTransactions](../../models/shared/banktransactions.md)] | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/createbanktransactionsresponse.md b/bank-feeds/docs/models/shared/createbanktransactionsresponse.md
index 1a59ca17d..6fe251a79 100644
--- a/bank-feeds/docs/models/shared/createbanktransactionsresponse.md
+++ b/bank-feeds/docs/models/shared/createbanktransactionsresponse.md
@@ -14,8 +14,8 @@
| `changes` | List[[shared.PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | |
| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
| `data` | [Optional[shared.CreateBankTransactions]](../../models/shared/createbanktransactions.md) | :heavy_minus_sign: | N/A | |
-| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
-| `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | |
-| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | |
-| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Number of seconds the push operation must complete within before it times out. | |
+| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available data types | invoices |
+| `error_message` | *OptionalNullable[str]* | :heavy_minus_sign: | A message about the error. | |
+| `timeout_in_minutes` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | |
+| ~~`timeout_in_seconds`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Number of seconds the push operation must complete within before it times out. | |
| `validation` | [Optional[shared.Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/dataconnectionerror.md b/bank-feeds/docs/models/shared/dataconnectionerror.md
index 2c12bb648..413231fec 100644
--- a/bank-feeds/docs/models/shared/dataconnectionerror.md
+++ b/bank-feeds/docs/models/shared/dataconnectionerror.md
@@ -5,7 +5,9 @@
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `error_message` | *Optional[str]* | :heavy_minus_sign: | A brief message about the error. | |
+| `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about a error returned by Codat. | |
| `errored_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
-| `status_code` | *Optional[str]* | :heavy_minus_sign: | The HTTP status code returned by the error. | |
-| `status_text` | *Optional[str]* | :heavy_minus_sign: | A non-numeric status code/text. | |
\ No newline at end of file
+| `resolved_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
+| `status` | [OptionalNullable[shared.ErrorStatus]](../../models/shared/errorstatus.md) | :heavy_minus_sign: | The current status of a transient error. Null statuses indicate that the error is not transient. | |
+| `status_code` | *Optional[str]* | :heavy_minus_sign: | The HTTP status code returned by the source platform when the error occurred. | |
+| `status_text` | *Optional[str]* | :heavy_minus_sign: | A non-numeric status code/text returned by the source platform when the error occurred. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/datatype.md b/bank-feeds/docs/models/shared/datatype.md
index 7a5f16172..593192d4b 100644
--- a/bank-feeds/docs/models/shared/datatype.md
+++ b/bank-feeds/docs/models/shared/datatype.md
@@ -1,6 +1,6 @@
# DataType
-Available Data types
+Available data types
## Values
diff --git a/bank-feeds/docs/models/shared/errorstatus.md b/bank-feeds/docs/models/shared/errorstatus.md
new file mode 100644
index 000000000..02c0ec3d9
--- /dev/null
+++ b/bank-feeds/docs/models/shared/errorstatus.md
@@ -0,0 +1,11 @@
+# ErrorStatus
+
+The current status of a transient error. Null statuses indicate that the error is not transient.
+
+
+## Values
+
+| Name | Value |
+| ---------- | ---------- |
+| `ACTIVE` | Active |
+| `RESOLVED` | Resolved |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/errorvalidationitem.md b/bank-feeds/docs/models/shared/errorvalidationitem.md
index 346bb51f1..fca2ef14a 100644
--- a/bank-feeds/docs/models/shared/errorvalidationitem.md
+++ b/bank-feeds/docs/models/shared/errorvalidationitem.md
@@ -5,6 +5,6 @@
| Field | Type | Required | Description |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
-| `item_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for a validation item. |
-| `message` | *Optional[str]* | :heavy_minus_sign: | A message outlining validation item's issue. |
-| `validator_name` | *Optional[str]* | :heavy_minus_sign: | Name of validator. |
\ No newline at end of file
+| `item_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for a validation item. |
+| `message` | *OptionalNullable[str]* | :heavy_minus_sign: | A message outlining validation item's issue. |
+| `validator_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of validator. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/metadata.md b/bank-feeds/docs/models/shared/metadata.md
index cb411f043..8fb4a6e5c 100644
--- a/bank-feeds/docs/models/shared/metadata.md
+++ b/bank-feeds/docs/models/shared/metadata.md
@@ -5,4 +5,4 @@
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
-| `is_deleted` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the record has been deleted in the third-party system this record originated from. |
\ No newline at end of file
+| `is_deleted` | *OptionalNullable[bool]* | :heavy_minus_sign: | Indicates whether the record has been deleted in the third-party system this record originated from. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/pushfieldvalidation.md b/bank-feeds/docs/models/shared/pushfieldvalidation.md
index 60ce548f0..d3558cfad 100644
--- a/bank-feeds/docs/models/shared/pushfieldvalidation.md
+++ b/bank-feeds/docs/models/shared/pushfieldvalidation.md
@@ -7,4 +7,4 @@
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `details` | *str* | :heavy_check_mark: | Details on the validation issue. |
| `field` | *Optional[str]* | :heavy_minus_sign: | Field name that resulted in the validation issue. |
-| `ref` | *Optional[str]* | :heavy_minus_sign: | Unique reference identifier for the validation issue. |
\ No newline at end of file
+| `ref` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique reference identifier for the validation issue. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/pushoperation.md b/bank-feeds/docs/models/shared/pushoperation.md
index 8ceefbf7f..13591843b 100644
--- a/bank-feeds/docs/models/shared/pushoperation.md
+++ b/bank-feeds/docs/models/shared/pushoperation.md
@@ -13,8 +13,8 @@
| `status_code` | *int* | :heavy_check_mark: | Push status code. | |
| `changes` | List[[shared.PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | |
| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
-| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
-| `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | |
-| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | |
-| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Number of seconds the push operation must complete within before it times out. | |
+| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available data types | invoices |
+| `error_message` | *OptionalNullable[str]* | :heavy_minus_sign: | A message about the error. | |
+| `timeout_in_minutes` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | |
+| ~~`timeout_in_seconds`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Number of seconds the push operation must complete within before it times out. | |
| `validation` | [Optional[shared.Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/pushoperationchange.md b/bank-feeds/docs/models/shared/pushoperationchange.md
index 3238ecf64..d5516b5c7 100644
--- a/bank-feeds/docs/models/shared/pushoperationchange.md
+++ b/bank-feeds/docs/models/shared/pushoperationchange.md
@@ -5,6 +5,6 @@
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
-| `attachment_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the attachment created otherwise null. |
+| `attachment_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for the attachment created otherwise null. |
| `record_ref` | [Optional[shared.PushOperationRef]](../../models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A |
| `type` | [Optional[shared.PushChangeType]](../../models/shared/pushchangetype.md) | :heavy_minus_sign: | Type of change being applied to record in third party platform. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/pushoperationref.md b/bank-feeds/docs/models/shared/pushoperationref.md
index 44929acb0..7c26e1c4f 100644
--- a/bank-feeds/docs/models/shared/pushoperationref.md
+++ b/bank-feeds/docs/models/shared/pushoperationref.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices |
+| `data_type` | [Optional[shared.DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available data types | invoices |
| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for a push operation. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/pushoperations.md b/bank-feeds/docs/models/shared/pushoperations.md
index fbdf79507..91dea4734 100644
--- a/bank-feeds/docs/models/shared/pushoperations.md
+++ b/bank-feeds/docs/models/shared/pushoperations.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
-| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} |
-| `page_number` | *int* | :heavy_check_mark: | Current page number. | |
-| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | |
-| `total_results` | *int* | :heavy_check_mark: | Total number of items. | |
-| `results` | List[[shared.PushOperation](../../models/shared/pushoperation.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
+| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} |
+| `page_number` | *int* | :heavy_check_mark: | Current page number. | |
+| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | |
+| `total_results` | *int* | :heavy_check_mark: | Total number of items. | |
+| `results` | List[[shared.PushOperation](../../models/shared/pushoperation.md)] | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/routinginfo.md b/bank-feeds/docs/models/shared/routinginfo.md
new file mode 100644
index 000000000..284bf18fb
--- /dev/null
+++ b/bank-feeds/docs/models/shared/routinginfo.md
@@ -0,0 +1,11 @@
+# RoutingInfo
+
+Routing information for the bank. This does not include account number.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
+| `bank_code` | *OptionalNullable[str]* | :heavy_minus_sign: | The numeric identifier of the routing number |
+| `type` | [OptionalNullable[shared.Type]](../../models/shared/type.md) | :heavy_minus_sign: | The type of routing number. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/sourceaccount.md b/bank-feeds/docs/models/shared/sourceaccount.md
index 96336a204..9bfd6b6df 100644
--- a/bank-feeds/docs/models/shared/sourceaccount.md
+++ b/bank-feeds/docs/models/shared/sourceaccount.md
@@ -1,6 +1,6 @@
# SourceAccount
-The target bank account in a supported accounting package for ingestion into a bank feed.
+The target bank account in a supported accounting software for ingestion into a bank feed.
## Fields
@@ -8,12 +8,12 @@ The target bank account in a supported accounting package for ingestion into a b
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | Unique ID for the bank account. | |
-| `account_name` | *Optional[str]* | :heavy_minus_sign: | The bank account name. | |
-| `account_number` | *Optional[str]* | :heavy_minus_sign: | The account number. | |
-| `account_type` | *Optional[str]* | :heavy_minus_sign: | The type of bank account e.g. Credit. | |
-| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | The latest balance for the bank account. | |
+| `account_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The bank account name. | |
+| `account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The account number. | |
+| `account_type` | *OptionalNullable[str]* | :heavy_minus_sign: | The type of bank account e.g. Credit. | |
+| `balance` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | The latest balance for the bank account. | |
| `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
| `feed_start_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
| `modified_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
-| `sort_code` | *Optional[str]* | :heavy_minus_sign: | The sort code. | |
-| `status` | *Optional[str]* | :heavy_minus_sign: | Status of the source account. | |
\ No newline at end of file
+| `sort_code` | *OptionalNullable[str]* | :heavy_minus_sign: | The sort code. | |
+| `status` | [OptionalNullable[shared.Status]](../../models/shared/status.md) | :heavy_minus_sign: | Status of the source account. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/sourceaccountv2.md b/bank-feeds/docs/models/shared/sourceaccountv2.md
new file mode 100644
index 000000000..32faef421
--- /dev/null
+++ b/bank-feeds/docs/models/shared/sourceaccountv2.md
@@ -0,0 +1,20 @@
+# SourceAccountV2
+
+The target bank account in a supported accounting software for ingestion into a bank feed.
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `account_name` | *str* | :heavy_check_mark: | The bank account name. | |
+| `account_number` | *str* | :heavy_check_mark: | The account number. | |
+| `account_type` | [shared.AccountType](../../models/shared/accounttype.md) | :heavy_check_mark: | The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. | |
+| `balance` | *Decimal* | :heavy_check_mark: | The latest balance for the bank account. | |
+| `currency` | *str* | :heavy_check_mark: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
+| `id` | *str* | :heavy_check_mark: | Unique ID for the bank account. | |
+| `account_info` | [OptionalNullable[shared.AccountInfo]](../../models/shared/accountinfo.md) | :heavy_minus_sign: | N/A | |
+| `feed_start_date` | *OptionalNullable[str]* | :heavy_minus_sign: | In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
```
2020-10-08
``` | 2022-10-23 |
+| `modified_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
+| `routing_info` | [Optional[shared.RoutingInfo]](../../models/shared/routinginfo.md) | :heavy_minus_sign: | Routing information for the bank. This does not include account number. | |
+| `status` | [OptionalNullable[shared.SourceAccountV2Status]](../../models/shared/sourceaccountv2status.md) | :heavy_minus_sign: | Status of the source account. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/sourceaccountv2status.md b/bank-feeds/docs/models/shared/sourceaccountv2status.md
new file mode 100644
index 000000000..7d626dc16
--- /dev/null
+++ b/bank-feeds/docs/models/shared/sourceaccountv2status.md
@@ -0,0 +1,14 @@
+# SourceAccountV2Status
+
+Status of the source account.
+
+
+## Values
+
+| Name | Value |
+| -------------- | -------------- |
+| `PENDING` | pending |
+| `CONNECTED` | connected |
+| `CONNECTING` | connecting |
+| `DISCONNECTED` | disconnected |
+| `UNKNOWN` | unknown |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/updatecompanyresponse.md b/bank-feeds/docs/models/shared/sourceaccountwebhook.md
similarity index 84%
rename from bank-feeds/docs/models/operations/updatecompanyresponse.md
rename to bank-feeds/docs/models/shared/sourceaccountwebhook.md
index 3005c9e88..2e00e2e94 100644
--- a/bank-feeds/docs/models/operations/updatecompanyresponse.md
+++ b/bank-feeds/docs/models/shared/sourceaccountwebhook.md
@@ -1,11 +1,11 @@
-# UpdateCompanyResponse
+# SourceAccountWebhook
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"string","redirect":"https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739","lastSync":"2022-01-01T12:00:00.000Z","created":"2022-01-01T12:00:00.000Z","createdByUserName":"string","dataConnections":[{"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `event_type` | *Optional[str]* | :heavy_minus_sign: | The type of event. | bankFeeds.sourceAccount.connected |
+| `generated_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the event. | ba29118f-5406-4e59-b05c-ba307ca38d01 |
+| `payload` | [Optional[shared.SourceAccountWebhookPayload]](../../models/shared/sourceaccountwebhookpayload.md) | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/operations/updatesourceaccountresponse.md b/bank-feeds/docs/models/shared/sourceaccountwebhookpayload.md
similarity index 56%
rename from bank-feeds/docs/models/operations/updatesourceaccountresponse.md
rename to bank-feeds/docs/models/shared/sourceaccountwebhookpayload.md
index 59b8a1900..3c2332d0e 100644
--- a/bank-feeds/docs/models/operations/updatesourceaccountresponse.md
+++ b/bank-feeds/docs/models/shared/sourceaccountwebhookpayload.md
@@ -1,11 +1,10 @@
-# UpdateSourceAccountResponse
+# SourceAccountWebhookPayload
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | |
-| `source_account` | [Optional[shared.SourceAccount]](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | {"id":"acc-002","accountName":"account-081","sortCode":"123456","accountType":"Credit","accountNumber":"12345670","currency":"GBP","balance":99.99,"modifiedDate":"2023-01-09T14:14:14.1057478Z","status":"pending"} |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `company_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connection_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `source_account` | [Optional[shared.SourceAccount]](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | The target bank account in a supported accounting software for ingestion into a bank feed. | {
"id": "acc-002",
"accountName": "account-081",
"sortCode": "123456",
"accountType": "Credit",
"accountNumber": "12345670",
"currency": "GBP",
"balance": 99.99,
"modifiedDate": "2023-01-09T14:14:14.1057478Z",
"status": "pending"
} |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/status.md b/bank-feeds/docs/models/shared/status.md
new file mode 100644
index 000000000..acf9087d9
--- /dev/null
+++ b/bank-feeds/docs/models/shared/status.md
@@ -0,0 +1,14 @@
+# Status
+
+Status of the source account.
+
+
+## Values
+
+| Name | Value |
+| -------------- | -------------- |
+| `PENDING` | pending |
+| `CONNECTED` | connected |
+| `CONNECTING` | connecting |
+| `DISCONNECTED` | disconnected |
+| `UNKNOWN` | unknown |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/supplementaldata.md b/bank-feeds/docs/models/shared/supplementaldata.md
index f9d04fc2b..7415a8519 100644
--- a/bank-feeds/docs/models/shared/supplementaldata.md
+++ b/bank-feeds/docs/models/shared/supplementaldata.md
@@ -2,7 +2,7 @@
Supplemental data is additional data you can include in our standard data types.
-It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
## Fields
diff --git a/bank-feeds/docs/models/shared/tags.md b/bank-feeds/docs/models/shared/tags.md
new file mode 100644
index 000000000..6de993aa8
--- /dev/null
+++ b/bank-feeds/docs/models/shared/tags.md
@@ -0,0 +1,9 @@
+# Tags
+
+A collection of user-defined key-value pairs that store custom metadata against the company.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------- | ----------- | ----------- | ----------- |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/targetaccountoption.md b/bank-feeds/docs/models/shared/targetaccountoption.md
index 8a8ec623e..651d5c279 100644
--- a/bank-feeds/docs/models/shared/targetaccountoption.md
+++ b/bank-feeds/docs/models/shared/targetaccountoption.md
@@ -5,8 +5,8 @@
| Field | Type | Required | Description |
| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
-| `account_number` | *Optional[str]* | :heavy_minus_sign: | The account number of the account. |
-| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | The balance of the account. |
+| `account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The account number of the account. |
+| `balance` | *OptionalNullable[Decimal]* | :heavy_minus_sign: | The balance of the account. |
| `id` | *Optional[str]* | :heavy_minus_sign: | Id of the target account. |
-| `name` | *Optional[str]* | :heavy_minus_sign: | Name of the target account. |
-| `sort_code` | *Optional[str]* | :heavy_minus_sign: | The sort code of the account. |
\ No newline at end of file
+| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the target account. |
+| `sort_code` | *OptionalNullable[str]* | :heavy_minus_sign: | The sort code of the account. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/type.md b/bank-feeds/docs/models/shared/type.md
new file mode 100644
index 000000000..94c6e75ed
--- /dev/null
+++ b/bank-feeds/docs/models/shared/type.md
@@ -0,0 +1,22 @@
+# Type
+
+The type of routing number.
+
+
+## Values
+
+| Name | Value |
+| ---------- | ---------- |
+| `RTN` | rtn |
+| `ABA` | aba |
+| `SWIFT` | swift |
+| `BSB` | bsb |
+| `IBAN` | iban |
+| `NZ2` | nz2 |
+| `TRNO` | trno |
+| `SORTCODE` | sortcode |
+| `BLZ` | blz |
+| `IFSC` | ifsc |
+| `BANKCODE` | bankcode |
+| `APCA` | apca |
+| `CLABE` | clabe |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/shared/validationitem.md b/bank-feeds/docs/models/shared/validationitem.md
index fe913f43e..1aaf084c9 100644
--- a/bank-feeds/docs/models/shared/validationitem.md
+++ b/bank-feeds/docs/models/shared/validationitem.md
@@ -5,6 +5,6 @@
| Field | Type | Required | Description |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
-| `item_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for a validation item. |
-| `message` | *Optional[str]* | :heavy_minus_sign: | A message outlining validation item's issue. |
-| `validator_name` | *Optional[str]* | :heavy_minus_sign: | Name of validator. |
\ No newline at end of file
+| `item_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for a validation item. |
+| `message` | *OptionalNullable[str]* | :heavy_minus_sign: | A message outlining validation item's issue. |
+| `validator_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of validator. |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md b/bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md
deleted file mode 100644
index 4408f824d..000000000
--- a/bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# ClientRateLimitReachedResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/webhooks/clientratelimitresetresponse.md b/bank-feeds/docs/models/webhooks/clientratelimitresetresponse.md
deleted file mode 100644
index 14a24dc94..000000000
--- a/bank-feeds/docs/models/webhooks/clientratelimitresetresponse.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# ClientRateLimitResetResponse
-
-
-## Fields
-
-| Field | Type | Required | Description |
-| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
-| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
-| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
-| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
\ No newline at end of file
diff --git a/bank-feeds/docs/sdks/accountmapping/README.md b/bank-feeds/docs/sdks/accountmapping/README.md
index c2f9dff66..0090fb5d1 100644
--- a/bank-feeds/docs/sdks/accountmapping/README.md
+++ b/bank-feeds/docs/sdks/accountmapping/README.md
@@ -3,7 +3,7 @@
## Overview
-Bank feed bank account mapping.
+Extra functionality for building an account management UI.
### Available Operations
@@ -12,7 +12,7 @@ Bank feed bank account mapping.
## create
-The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting platform (target account).
+The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).
A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform).
@@ -23,30 +23,28 @@ This endpoint is only needed if building an account management UI.
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.CreateBankAccountMappingRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- zero=shared.Zero(
- feed_start_date='2023-01-09T14:14:14.1057478Z',
- source_account_id='acc-002',
- target_account_id='account-081',
- ),
-)
-
-res = s.account_mapping.create(req)
+res = s.account_mapping.create(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+ "bank_feed_account_mapping": {
+ "source_account_id": "acc-002",
+ "target_account_id": "account-081",
+ },
+})
-if res.bank_feed_account_mapping_response is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -56,16 +54,17 @@ if res.bank_feed_account_mapping_response is not None:
| `request` | [operations.CreateBankAccountMappingRequest](../../models/operations/createbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.CreateBankAccountMappingResponse](../../models/operations/createbankaccountmappingresponse.md)**
+**[shared.BankFeedAccountMappingResponse](../../models/shared/bankfeedaccountmappingresponse.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## get
@@ -78,25 +77,24 @@ This endpoint is only needed if building an account management UI.
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.GetBankAccountMappingRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
-
-res = s.account_mapping.get(req)
+res = s.account_mapping.get(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
-if res.bank_feed_mapping is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -106,13 +104,13 @@ if res.bank_feed_mapping is not None:
| `request` | [operations.GetBankAccountMappingRequest](../../models/operations/getbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.GetBankAccountMappingResponse](../../models/operations/getbankaccountmappingresponse.md)**
+**[shared.BankFeedMapping](../../models/shared/bankfeedmapping.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/bank-feeds/docs/sdks/bankaccounts/README.md b/bank-feeds/docs/sdks/bankaccounts/README.md
index 23cd3c356..7694143aa 100644
--- a/bank-feeds/docs/sdks/bankaccounts/README.md
+++ b/bank-feeds/docs/sdks/bankaccounts/README.md
@@ -3,7 +3,7 @@
## Overview
-Access bank accounts in an SMBs accounting platform.
+Access bank accounts in an SMBs accounting software.
### Available Operations
@@ -26,25 +26,28 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.CreateBankAccountRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
-
-res = s.bank_accounts.create(req)
+res = s.bank_accounts.create(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+ "bank_account_prototype": {
+ "currency": "USD",
+ "status": shared.BankAccountStatus.ACTIVE,
+ },
+})
-if res.bank_account_create_response is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -54,16 +57,17 @@ if res.bank_account_create_response is not None:
| `request` | [operations.CreateBankAccountRequest](../../models/operations/createbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.CreateBankAccountResponse](../../models/operations/createbankaccountresponse.md)**
+**[shared.BankAccountCreateResponse](../../models/shared/bankaccountcreateresponse.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## get_create_model
@@ -81,25 +85,24 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.GetCreateBankAccountsModelRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
-
-res = s.bank_accounts.get_create_model(req)
+res = s.bank_accounts.get_create_model(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
-if res.push_option is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -109,16 +112,17 @@ if res.push_option is not None:
| `request` | [operations.GetCreateBankAccountsModelRequest](../../models/operations/getcreatebankaccountsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.GetCreateBankAccountsModelResponse](../../models/operations/getcreatebankaccountsmodelresponse.md)**
+**[shared.PushOption](../../models/shared/pushoption.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## list
@@ -132,28 +136,28 @@ Before using this endpoint, you must have [retrieved data for the company](https
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.ListBankAccountsRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- order_by='-modifiedDate',
- page=1,
- page_size=100,
-)
-
-res = s.bank_accounts.list(req)
+res = s.bank_accounts.list(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+ "order_by": "-modifiedDate",
+ "page": 1,
+ "page_size": 100,
+ "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
+})
-if res.bank_accounts is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -163,13 +167,13 @@ if res.bank_accounts is not None:
| `request` | [operations.ListBankAccountsRequest](../../models/operations/listbankaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.ListBankAccountsResponse](../../models/operations/listbankaccountsresponse.md)**
+**[shared.BankAccounts](../../models/shared/bankaccounts.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/bank-feeds/docs/sdks/codatbankfeeds/README.md b/bank-feeds/docs/sdks/codatbankfeeds/README.md
index d118844bf..9c63c2510 100644
--- a/bank-feeds/docs/sdks/codatbankfeeds/README.md
+++ b/bank-feeds/docs/sdks/codatbankfeeds/README.md
@@ -1,25 +1,23 @@
# CodatBankFeeds SDK
-
## Overview
-Bank Feeds API: Bank Feeds API enables your SMB users to set up bank feeds from accounts in your application to supported accounting platforms.
+Bank Feeds API: Bank Feeds API enables your SMB users to set up bank feeds from accounts in your application to supported accounting software.
-A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting package.
+A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting software.
[Explore product](https://docs.codat.io/bank-feeds-api/overview) | [See OpenAPI spec](https://github.com/codatio/oas)
---
-
+
## Endpoints
| Endpoints | Description |
-| :- | :- |
+| :- |:- |
| Companies | Create and manage your SMB users' companies. |
| Connections | Create new and manage existing data connections for a company. |
-| Source accounts | Provide and manage lists of source bank accounts. |
+| Source accounts | Provide and manage lists of source bank accounts. |
+| Account mapping | Extra functionality for building an account management UI. |
+| Company information | Get detailed information about a company from the underlying platform. |
| Transactions | Create new bank account transactions for a company's connections, and see previous operations. |
-| Account mapping | Extra functionality for building an account management UI |
-
-### Available Operations
-
+
\ No newline at end of file
diff --git a/bank-feeds/docs/sdks/companies/README.md b/bank-feeds/docs/sdks/companies/README.md
index cd814a2b1..2adad1249 100644
--- a/bank-feeds/docs/sdks/companies/README.md
+++ b/bank-feeds/docs/sdks/companies/README.md
@@ -3,7 +3,7 @@
## Overview
-Create and manage your Codat companies.
+Create and manage your SMB users' companies.
### Available Operations
@@ -25,25 +25,29 @@ If forbidden characters (see `name` pattern) are present in the request, a compa
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = shared.CompanyRequestBody(
- name='Bank of Dave',
- description='Requested early access to the new financing scheme.',
-)
-
-res = s.companies.create(req)
-
-if res.company is not None:
+res = s.companies.create(request={
+ "name": "Technicalium",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+})
+
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -53,16 +57,17 @@ if res.company is not None:
| `request` | [shared.CompanyRequestBody](../../models/shared/companyrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.CreateCompanyResponse](../../models/operations/createcompanyresponse.md)**
+**[shared.Company](../../models/shared/company.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## delete
@@ -75,24 +80,21 @@ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-ap
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.DeleteCompanyRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
+s.companies.delete(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+})
-res = s.companies.delete(req)
+# Use the SDK ...
-if res.status_code == 200:
- # handle response
- pass
```
### Parameters
@@ -102,16 +104,13 @@ if res.status_code == 200:
| `request` | [operations.DeleteCompanyRequest](../../models/operations/deletecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
-### Response
-
-**[operations.DeleteCompanyResponse](../../models/operations/deletecompanyresponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## get
@@ -124,24 +123,23 @@ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-ap
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.GetCompanyRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
-
-res = s.companies.get(req)
+res = s.companies.get(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+})
-if res.company is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -151,16 +149,17 @@ if res.company is not None:
| `request` | [operations.GetCompanyRequest](../../models/operations/getcompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.GetCompanyResponse](../../models/operations/getcompanyresponse.md)**
+**[shared.Company](../../models/shared/company.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## list
@@ -172,26 +171,26 @@ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-ap
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.ListCompaniesRequest(
- order_by='-modifiedDate',
- page=1,
- page_size=100,
-)
-
-res = s.companies.list(req)
+res = s.companies.list(request={
+ "order_by": "-modifiedDate",
+ "page": 1,
+ "page_size": 100,
+ "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
+})
-if res.companies is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -201,16 +200,17 @@ if res.companies is not None:
| `request` | [operations.ListCompaniesRequest](../../models/operations/listcompaniesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.ListCompaniesResponse](../../models/operations/listcompaniesresponse.md)**
+**[shared.Companies](../../models/shared/companies.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## update
@@ -223,24 +223,32 @@ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-ap
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.UpdateCompanyRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
-
-res = s.companies.update(req)
-
-if res.company is not None:
+res = s.companies.update(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "company_request_body": {
+ "name": "New Name",
+ "description": "Requested early access to the new financing scheme.",
+ "groups": [
+ {
+ "id": "60d2fa12-8a04-11ee-b9d1-0242ac120002",
+ },
+ ],
+ },
+})
+
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -250,13 +258,13 @@ if res.company is not None:
| `request` | [operations.UpdateCompanyRequest](../../models/operations/updatecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.UpdateCompanyResponse](../../models/operations/updatecompanyresponse.md)**
+**[shared.Company](../../models/shared/company.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/bank-feeds/docs/sdks/companyinformation/README.md b/bank-feeds/docs/sdks/companyinformation/README.md
new file mode 100644
index 000000000..6dac64f69
--- /dev/null
+++ b/bank-feeds/docs/sdks/companyinformation/README.md
@@ -0,0 +1,57 @@
+# CompanyInformation
+(*company_information*)
+
+## Overview
+
+Get detailed information about a company from the underlying accounting software.
+
+### Available Operations
+
+* [get](#get) - Get company information
+
+## get
+
+Use the *Get company information* endpoint to return information about the company available from the underlying accounting software.
+
+
+
+### Example Usage
+
+```python
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
+
+s = CodatBankFeeds(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+res = s.company_information.get(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
+
+if res is not None:
+ # handle response
+ pass
+
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
+| `request` | [operations.GetCompanyInformationRequest](../../models/operations/getcompanyinformationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+### Response
+
+**[shared.CompanyInformation](../../models/shared/companyinformation.md)**
+
+### Errors
+
+| Error Object | Status Code | Content Type |
+| ------------------------------- | ------------------------------- | ------------------------------- |
+| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/bank-feeds/docs/sdks/configuration/README.md b/bank-feeds/docs/sdks/configuration/README.md
index 9798c6eaf..ab818be64 100644
--- a/bank-feeds/docs/sdks/configuration/README.md
+++ b/bank-feeds/docs/sdks/configuration/README.md
@@ -17,24 +17,23 @@ Configure bank feeds for a company.
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.GetConfigurationRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
-
-res = s.configuration.get(req)
+res = s.configuration.get(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+})
-if res.configuration is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -44,16 +43,17 @@ if res.configuration is not None:
| `request` | [operations.GetConfigurationRequest](../../models/operations/getconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.GetConfigurationResponse](../../models/operations/getconfigurationresponse.md)**
+**[shared.Configuration](../../models/shared/configuration.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## set
@@ -62,24 +62,26 @@ if res.configuration is not None:
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.SetConfigurationRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
-
-res = s.configuration.set(req)
+res = s.configuration.set(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "configuration": {
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ },
+})
-if res.configuration is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -89,13 +91,13 @@ if res.configuration is not None:
| `request` | [operations.SetConfigurationRequest](../../models/operations/setconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.SetConfigurationResponse](../../models/operations/setconfigurationresponse.md)**
+**[shared.Configuration](../../models/shared/configuration.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/bank-feeds/docs/sdks/connections/README.md b/bank-feeds/docs/sdks/connections/README.md
index 3a6b6df17..62a8b6d1c 100644
--- a/bank-feeds/docs/sdks/connections/README.md
+++ b/bank-feeds/docs/sdks/connections/README.md
@@ -3,7 +3,7 @@
## Overview
-Manage your companies' data connections.
+Create new and manage existing data connections for a company.
### Available Operations
@@ -22,24 +22,26 @@ Use the [List Integrations](https://docs.codat.io/bank-feeds-api#/operations/lis
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.CreateConnectionRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
-)
-
-res = s.connections.create(req)
+res = s.connections.create(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "request_body": {
+ "platform_key": "gbol",
+ },
+})
-if res.connection is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -49,16 +51,17 @@ if res.connection is not None:
| `request` | [operations.CreateConnectionRequest](../../models/operations/createconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.CreateConnectionResponse](../../models/operations/createconnectionresponse.md)**
+**[shared.Connection](../../models/shared/connection.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## delete
@@ -68,25 +71,22 @@ This operation is not reversible. The end user would need to reauthorize a new d
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.DeleteConnectionRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
+s.connections.delete(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
-res = s.connections.delete(req)
+# Use the SDK ...
-if res.status_code == 200:
- # handle response
- pass
```
### Parameters
@@ -96,16 +96,13 @@ if res.status_code == 200:
| `request` | [operations.DeleteConnectionRequest](../../models/operations/deleteconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
-### Response
-
-**[operations.DeleteConnectionResponse](../../models/operations/deleteconnectionresponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## get
@@ -114,25 +111,24 @@ if res.status_code == 200:
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.GetConnectionRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
-
-res = s.connections.get(req)
+res = s.connections.get(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
-if res.connection is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -142,16 +138,17 @@ if res.connection is not None:
| `request` | [operations.GetConnectionRequest](../../models/operations/getconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.GetConnectionResponse](../../models/operations/getconnectionresponse.md)**
+**[shared.Connection](../../models/shared/connection.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## list
@@ -160,27 +157,27 @@ if res.connection is not None:
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.ListConnectionsRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- order_by='-modifiedDate',
- page=1,
- page_size=100,
-)
-
-res = s.connections.list(req)
+res = s.connections.list(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "order_by": "-modifiedDate",
+ "page": 1,
+ "page_size": 100,
+ "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
+})
-if res.connections is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -190,16 +187,17 @@ if res.connections is not None:
| `request` | [operations.ListConnectionsRequest](../../models/operations/listconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.ListConnectionsResponse](../../models/operations/listconnectionsresponse.md)**
+**[shared.Connections](../../models/shared/connections.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## unlink
@@ -208,25 +206,27 @@ if res.connections is not None:
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.UnlinkConnectionRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
-
-res = s.connections.unlink(req)
+res = s.connections.unlink(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+ "request_body": {
+ "status": shared.DataConnectionStatus.UNLINKED,
+ },
+})
-if res.connection is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -236,13 +236,13 @@ if res.connection is not None:
| `request` | [operations.UnlinkConnectionRequest](../../models/operations/unlinkconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.UnlinkConnectionResponse](../../models/operations/unlinkconnectionresponse.md)**
+**[shared.Connection](../../models/shared/connection.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/bank-feeds/docs/sdks/sourceaccounts/README.md b/bank-feeds/docs/sdks/sourceaccounts/README.md
index 1c34a27d6..b0aca23e9 100644
--- a/bank-feeds/docs/sdks/sourceaccounts/README.md
+++ b/bank-feeds/docs/sdks/sourceaccounts/README.md
@@ -3,7 +3,7 @@
## Overview
-Source accounts act as a bridge to bank accounts in accounting software.
+Provide and manage lists of source bank accounts.
### Available Operations
@@ -20,7 +20,7 @@ The _Create Source Account_ endpoint allows you to create a representation of a
#### Account mapping variability
-The method of mapping the source account to the target account varies depending on the accounting package your company uses.
+The method of mapping the source account to the target account varies depending on the accounting software your company uses.
#### Mapping options:
@@ -39,41 +39,52 @@ The method of mapping the source account to the target account varies depending
| QuickBooks Online | | | ✅ |
| Sage | | | ✅ |
+> ### Versioning
+> If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
+
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
from decimal import Decimal
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.CreateSourceAccountRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- source_account=shared.SourceAccount(
- id='acc-002',
- account_name='account-081',
- account_number='12345670',
- account_type='Credit',
- balance=Decimal('99.99'),
- currency='GBP',
- feed_start_date='2022-10-23T00:00:00Z',
- modified_date='2023-01-09T14:14:14.1057478Z',
- sort_code='123456',
- status='pending',
- ),
-)
-
-res = s.source_accounts.create(req)
-
-if res.source_account is not None:
+res = s.source_accounts.create(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+ "request_body": {
+ "account_name": "account-081",
+ "account_number": "12345670",
+ "account_type": shared.AccountType.CHECKING,
+ "balance": Decimal("99.99"),
+ "currency": "GBP",
+ "id": "acc-001",
+ "account_info": {
+ "account_open_date": "2023-05-06T00:00:00Z",
+ "available_balance": Decimal("10"),
+ "description": "account description 1",
+ "nickname": "account 123",
+ },
+ "feed_start_date": "2024-05-01T00:00:00Z",
+ "modified_date": "2024-08-02T00:00:00.000Z",
+ "routing_info": {
+ "bank_code": "21001088",
+ "type": shared.Type.BANKCODE,
+ },
+ "status": shared.SourceAccountV2Status.PENDING,
+ },
+})
+
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -83,16 +94,17 @@ if res.source_account is not None:
| `request` | [operations.CreateSourceAccountRequest](../../models/operations/createsourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.CreateSourceAccountResponse](../../models/operations/createsourceaccountresponse.md)**
+**[operations.CreateSourceAccountResponseBody](../../models/operations/createsourceaccountresponsebody.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## delete
@@ -104,26 +116,23 @@ Removing a source account will also remove any mapping between the source bank f
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.DeleteSourceAccountRequest(
- account_id='7110701885',
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
+s.source_accounts.delete(request={
+ "account_id": "7110701885",
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
-res = s.source_accounts.delete(req)
+# Use the SDK ...
-if res.status_code == 200:
- # handle response
- pass
```
### Parameters
@@ -133,16 +142,13 @@ if res.status_code == 200:
| `request` | [operations.DeleteSourceAccountRequest](../../models/operations/deletesourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
-### Response
-
-**[operations.DeleteSourceAccountResponse](../../models/operations/deletesourceaccountresponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## delete_credentials
@@ -153,25 +159,22 @@ In cases where multiple credential sets have been generated, a single API call t
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.DeleteBankFeedCredentialsRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
+s.source_accounts.delete_credentials(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
-res = s.source_accounts.delete_credentials(req)
+# Use the SDK ...
-if res.status_code == 200:
- # handle response
- pass
```
### Parameters
@@ -181,16 +184,13 @@ if res.status_code == 200:
| `request` | [operations.DeleteBankFeedCredentialsRequest](../../models/operations/deletebankfeedcredentialsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
-### Response
-
-**[operations.DeleteBankFeedCredentialsResponse](../../models/operations/deletebankfeedcredentialsresponse.md)**
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## generate_credentials
@@ -202,26 +202,25 @@ The old credentials will still be valid until the revoke credentials endpoint is
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.GenerateCredentialsRequest(
- request_body='0xeDCfFBde9E'.encode(),
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
-
-res = s.source_accounts.generate_credentials(req)
+res = s.source_accounts.generate_credentials(request={
+ "request_body": open("example.file", "rb"),
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
-if res.bank_account_credentials is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -231,16 +230,17 @@ if res.bank_account_credentials is not None:
| `request` | [operations.GenerateCredentialsRequest](../../models/operations/generatecredentialsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.GenerateCredentialsResponse](../../models/operations/generatecredentialsresponse.md)**
+**[shared.BankAccountCredentials](../../models/shared/bankaccountcredentials.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## list
@@ -248,29 +248,30 @@ if res.bank_account_credentials is not None:
[source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) are the bank's bank account within Codat's domain from which transactions are synced into the accounting platform.
+> ### Versioning
+> If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.ListSourceAccountsRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
-
-res = s.source_accounts.list(req)
+res = s.source_accounts.list(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+})
-if res.source_accounts is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -280,58 +281,62 @@ if res.source_accounts is not None:
| `request` | [operations.ListSourceAccountsRequest](../../models/operations/listsourceaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.ListSourceAccountsResponse](../../models/operations/listsourceaccountsresponse.md)**
+**[operations.ListSourceAccountsResponseBody](../../models/operations/listsourceaccountsresponsebody.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## update
The _Update source account_ endpoint updates a single source account for a single data connection connected to a single company.
+### Tips and pitfalls
+
+* This endpoint only updates the `accountName` field.
+* Updates made here apply exclusively to source accounts and will not affect target accounts in the accounting software.
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
from decimal import Decimal
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.UpdateSourceAccountRequest(
- account_id='EILBDVJVNUAGVKRQ',
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
- source_account=shared.SourceAccount(
- id='acc-002',
- account_name='account-081',
- account_number='12345670',
- account_type='Credit',
- balance=Decimal('99.99'),
- currency='GBP',
- feed_start_date='2022-10-23T00:00:00Z',
- modified_date='2023-01-09T14:14:14.1057478Z',
- sort_code='123456',
- status='pending',
- ),
-)
-
-res = s.source_accounts.update(req)
-
-if res.source_account is not None:
+res = s.source_accounts.update(request={
+ "account_id": "7110701885",
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+ "source_account": {
+ "id": "acc-003",
+ "account_name": "account-095",
+ "account_number": "12345671",
+ "account_type": "Credit",
+ "balance": Decimal("0"),
+ "currency": "USD",
+ "feed_start_date": "2022-10-23T00:00:00Z",
+ "modified_date": "2023-01-09T14:14:14.1057478Z",
+ "sort_code": "123456",
+ "status": shared.Status.PENDING,
+ },
+})
+
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -341,13 +346,13 @@ if res.source_account is not None:
| `request` | [operations.UpdateSourceAccountRequest](../../models/operations/updatesourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.UpdateSourceAccountResponse](../../models/operations/updatesourceaccountresponse.md)**
+**[shared.SourceAccount](../../models/shared/sourceaccount.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/bank-feeds/docs/sdks/sync/README.md b/bank-feeds/docs/sdks/sync/README.md
new file mode 100644
index 000000000..5fd3b9f5e
--- /dev/null
+++ b/bank-feeds/docs/sdks/sync/README.md
@@ -0,0 +1,54 @@
+# Sync
+(*sync*)
+
+## Overview
+
+Monitor the status of data syncs.
+
+### Available Operations
+
+* [get_last_successful_sync](#get_last_successful_sync) - Get last successful sync
+
+## get_last_successful_sync
+
+Use the _Get last successful sync_ endpoint to obtain the status information for the company's [most recent successful sync](https://docs.codat.io/bank-feeds-api#/schemas/CompanySyncStatus).
+
+### Example Usage
+
+```python
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
+
+s = CodatBankFeeds(
+ security=shared.Security(
+ auth_header="Basic BASE_64_ENCODED(API_KEY)",
+ ),
+)
+
+res = s.sync.get_last_successful_sync(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+})
+
+if res is not None:
+ # handle response
+ pass
+
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetLastSuccessfulRequest](../../models/operations/getlastsuccessfulrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
+
+### Response
+
+**[shared.CompanySyncStatus](../../models/shared/companysyncstatus.md)**
+
+### Errors
+
+| Error Object | Status Code | Content Type |
+| --------------------------- | --------------------------- | --------------------------- |
+| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/bank-feeds/docs/sdks/transactions/README.md b/bank-feeds/docs/sdks/transactions/README.md
index 35bba2cc5..062246a22 100644
--- a/bank-feeds/docs/sdks/transactions/README.md
+++ b/bank-feeds/docs/sdks/transactions/README.md
@@ -3,7 +3,7 @@
## Overview
-Transactions represent debits and credits from a source account.
+Create new bank account transactions for a company's connections, and see previous operations.
### Available Operations
@@ -27,26 +27,64 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
+from decimal import Decimal
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.CreateBankTransactionsRequest(
- account_id='9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2',
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
-)
-
-res = s.transactions.create(req)
-
-if res.create_bank_transactions_response is not None:
+res = s.transactions.create(request={
+ "account_id": "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2",
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171",
+ "create_bank_transactions": {
+ "account_id": "49cd5a42-b311-4750-9361-52e2ed1d4653",
+ "transactions": [
+ {
+ "amount": Decimal("100"),
+ "date_": "2023-08-22T10:21:00Z",
+ "id": "716422529",
+ "balance": Decimal("100"),
+ "counterparty": "Bank of Example",
+ "description": "Repayment of Credit Card",
+ "reconciled": True,
+ "reference": "Ref-12345",
+ "transaction_type": shared.BankTransactionType.CREDIT,
+ },
+ {
+ "amount": Decimal("-100"),
+ "date_": "2023-08-22T10:22:00Z",
+ "id": "716422530",
+ "balance": Decimal("0"),
+ "counterparty": "Amazon",
+ "description": "Amazon Purchase",
+ "reconciled": False,
+ "reference": "Ref-12346",
+ "transaction_type": shared.BankTransactionType.DEBIT,
+ },
+ {
+ "amount": Decimal("-60"),
+ "date_": "2023-08-22T10:23:00Z",
+ "id": "716422531",
+ "balance": Decimal("-60"),
+ "counterparty": "Office Mart",
+ "description": "Office Supplies",
+ "reconciled": False,
+ "reference": "Ref-12347",
+ "transaction_type": shared.BankTransactionType.DEBIT,
+ },
+ ],
+ },
+})
+
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -56,16 +94,17 @@ if res.create_bank_transactions_response is not None:
| `request` | [operations.CreateBankTransactionsRequest](../../models/operations/createbanktransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.CreateBankTransactionsResponse](../../models/operations/createbanktransactionsresponse.md)**
+**[shared.CreateBankTransactionsResponse](../../models/shared/createbanktransactionsresponse.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## get_create_operation
@@ -74,25 +113,24 @@ Retrieve push operation.
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.GetCreateOperationRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- push_operation_key='1fb73c31-a851-46c2-ab8a-5ce6e25b57b8',
-)
-
-res = s.transactions.get_create_operation(req)
+res = s.transactions.get_create_operation(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "push_operation_key": "1fb73c31-a851-46c2-ab8a-5ce6e25b57b8",
+})
-if res.push_operation is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -102,16 +140,17 @@ if res.push_operation is not None:
| `request` | [operations.GetCreateOperationRequest](../../models/operations/getcreateoperationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.GetCreateOperationResponse](../../models/operations/getcreateoperationresponse.md)**
+**[shared.PushOperation](../../models/shared/pushoperation.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| --------------------------- | --------------------------- | --------------------------- |
| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
+
## list_create_operations
@@ -120,27 +159,27 @@ List create operations.
### Example Usage
```python
-import codatbankfeeds
-from codatbankfeeds.models import operations, shared
+from codat_bankfeeds import CodatBankFeeds
+from codat_bankfeeds.models import shared
-s = codatbankfeeds.CodatBankFeeds(
+s = CodatBankFeeds(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
-req = operations.ListCreateOperationsRequest(
- company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
- order_by='-modifiedDate',
- page=1,
- page_size=100,
-)
+res = s.transactions.list_create_operations(request={
+ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002",
+ "order_by": "-modifiedDate",
+ "page": 1,
+ "page_size": 100,
+ "query": "id=e3334455-1aed-4e71-ab43-6bccf12092ee",
+})
-res = s.transactions.list_create_operations(req)
-
-if res.push_operations is not None:
+if res is not None:
# handle response
pass
+
```
### Parameters
@@ -150,13 +189,13 @@ if res.push_operations is not None:
| `request` | [operations.ListCreateOperationsRequest](../../models/operations/listcreateoperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
-
### Response
-**[operations.ListCreateOperationsResponse](../../models/operations/listcreateoperationsresponse.md)**
+**[shared.PushOperations](../../models/shared/pushoperations.md)**
+
### Errors
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
-| errors.SDKError | 4x-5xx | */* |
+| errors.SDKError | 4xx-5xx | */* |
diff --git a/bank-feeds/poetry.lock b/bank-feeds/poetry.lock
new file mode 100644
index 000000000..0a33995a2
--- /dev/null
+++ b/bank-feeds/poetry.lock
@@ -0,0 +1,548 @@
+# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
+
+[[package]]
+name = "annotated-types"
+version = "0.7.0"
+description = "Reusable constraint types to use with typing.Annotated"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"},
+ {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"},
+]
+
+[package.dependencies]
+typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""}
+
+[[package]]
+name = "anyio"
+version = "4.4.0"
+description = "High level compatibility layer for multiple asynchronous event loop implementations"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "anyio-4.4.0-py3-none-any.whl", hash = "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7"},
+ {file = "anyio-4.4.0.tar.gz", hash = "sha256:5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94"},
+]
+
+[package.dependencies]
+exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""}
+idna = ">=2.8"
+sniffio = ">=1.1"
+typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""}
+
+[package.extras]
+doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"]
+test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"]
+trio = ["trio (>=0.23)"]
+
+[[package]]
+name = "astroid"
+version = "3.2.4"
+description = "An abstract syntax tree for Python with inference support."
+optional = false
+python-versions = ">=3.8.0"
+files = [
+ {file = "astroid-3.2.4-py3-none-any.whl", hash = "sha256:413658a61eeca6202a59231abb473f932038fbcbf1666587f66d482083413a25"},
+ {file = "astroid-3.2.4.tar.gz", hash = "sha256:0e14202810b30da1b735827f78f5157be2bbd4a7a59b7707ca0bfc2fb4c0063a"},
+]
+
+[package.dependencies]
+typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""}
+
+[[package]]
+name = "certifi"
+version = "2024.8.30"
+description = "Python package for providing Mozilla's CA Bundle."
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"},
+ {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"},
+]
+
+[[package]]
+name = "colorama"
+version = "0.4.6"
+description = "Cross-platform colored terminal text."
+optional = false
+python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
+files = [
+ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
+ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
+]
+
+[[package]]
+name = "dill"
+version = "0.3.8"
+description = "serialize all of Python"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7"},
+ {file = "dill-0.3.8.tar.gz", hash = "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca"},
+]
+
+[package.extras]
+graph = ["objgraph (>=1.7.2)"]
+profile = ["gprof2dot (>=2022.7.29)"]
+
+[[package]]
+name = "eval-type-backport"
+version = "0.2.0"
+description = "Like `typing._eval_type`, but lets older Python versions use newer typing features."
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "eval_type_backport-0.2.0-py3-none-any.whl", hash = "sha256:ac2f73d30d40c5a30a80b8739a789d6bb5e49fdffa66d7912667e2015d9c9933"},
+ {file = "eval_type_backport-0.2.0.tar.gz", hash = "sha256:68796cfbc7371ebf923f03bdf7bef415f3ec098aeced24e054b253a0e78f7b37"},
+]
+
+[package.extras]
+tests = ["pytest"]
+
+[[package]]
+name = "exceptiongroup"
+version = "1.2.2"
+description = "Backport of PEP 654 (exception groups)"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"},
+ {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"},
+]
+
+[package.extras]
+test = ["pytest (>=6)"]
+
+[[package]]
+name = "h11"
+version = "0.14.0"
+description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"},
+ {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
+]
+
+[[package]]
+name = "httpcore"
+version = "1.0.5"
+description = "A minimal low-level HTTP client."
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"},
+ {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"},
+]
+
+[package.dependencies]
+certifi = "*"
+h11 = ">=0.13,<0.15"
+
+[package.extras]
+asyncio = ["anyio (>=4.0,<5.0)"]
+http2 = ["h2 (>=3,<5)"]
+socks = ["socksio (==1.*)"]
+trio = ["trio (>=0.22.0,<0.26.0)"]
+
+[[package]]
+name = "httpx"
+version = "0.27.2"
+description = "The next generation HTTP client."
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"},
+ {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"},
+]
+
+[package.dependencies]
+anyio = "*"
+certifi = "*"
+httpcore = "==1.*"
+idna = "*"
+sniffio = "*"
+
+[package.extras]
+brotli = ["brotli", "brotlicffi"]
+cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"]
+http2 = ["h2 (>=3,<5)"]
+socks = ["socksio (==1.*)"]
+zstd = ["zstandard (>=0.18.0)"]
+
+[[package]]
+name = "idna"
+version = "3.8"
+description = "Internationalized Domain Names in Applications (IDNA)"
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "idna-3.8-py3-none-any.whl", hash = "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac"},
+ {file = "idna-3.8.tar.gz", hash = "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603"},
+]
+
+[[package]]
+name = "isort"
+version = "5.13.2"
+description = "A Python utility / library to sort Python imports."
+optional = false
+python-versions = ">=3.8.0"
+files = [
+ {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"},
+ {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"},
+]
+
+[package.extras]
+colors = ["colorama (>=0.4.6)"]
+
+[[package]]
+name = "jsonpath-python"
+version = "1.0.6"
+description = "A more powerful JSONPath implementation in modern python"
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "jsonpath-python-1.0.6.tar.gz", hash = "sha256:dd5be4a72d8a2995c3f583cf82bf3cd1a9544cfdabf2d22595b67aff07349666"},
+ {file = "jsonpath_python-1.0.6-py3-none-any.whl", hash = "sha256:1e3b78df579f5efc23565293612decee04214609208a2335884b3ee3f786b575"},
+]
+
+[[package]]
+name = "mccabe"
+version = "0.7.0"
+description = "McCabe checker, plugin for flake8"
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
+ {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
+]
+
+[[package]]
+name = "mypy"
+version = "1.10.1"
+description = "Optional static typing for Python"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "mypy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e36f229acfe250dc660790840916eb49726c928e8ce10fbdf90715090fe4ae02"},
+ {file = "mypy-1.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:51a46974340baaa4145363b9e051812a2446cf583dfaeba124af966fa44593f7"},
+ {file = "mypy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:901c89c2d67bba57aaaca91ccdb659aa3a312de67f23b9dfb059727cce2e2e0a"},
+ {file = "mypy-1.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0cd62192a4a32b77ceb31272d9e74d23cd88c8060c34d1d3622db3267679a5d9"},
+ {file = "mypy-1.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:a2cbc68cb9e943ac0814c13e2452d2046c2f2b23ff0278e26599224cf164e78d"},
+ {file = "mypy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd6f629b67bb43dc0d9211ee98b96d8dabc97b1ad38b9b25f5e4c4d7569a0c6a"},
+ {file = "mypy-1.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1bbb3a6f5ff319d2b9d40b4080d46cd639abe3516d5a62c070cf0114a457d84"},
+ {file = "mypy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8edd4e9bbbc9d7b79502eb9592cab808585516ae1bcc1446eb9122656c6066f"},
+ {file = "mypy-1.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6166a88b15f1759f94a46fa474c7b1b05d134b1b61fca627dd7335454cc9aa6b"},
+ {file = "mypy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bb9cd11c01c8606a9d0b83ffa91d0b236a0e91bc4126d9ba9ce62906ada868e"},
+ {file = "mypy-1.10.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d8681909f7b44d0b7b86e653ca152d6dff0eb5eb41694e163c6092124f8246d7"},
+ {file = "mypy-1.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:378c03f53f10bbdd55ca94e46ec3ba255279706a6aacaecac52ad248f98205d3"},
+ {file = "mypy-1.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bacf8f3a3d7d849f40ca6caea5c055122efe70e81480c8328ad29c55c69e93e"},
+ {file = "mypy-1.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:701b5f71413f1e9855566a34d6e9d12624e9e0a8818a5704d74d6b0402e66c04"},
+ {file = "mypy-1.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:3c4c2992f6ea46ff7fce0072642cfb62af7a2484efe69017ed8b095f7b39ef31"},
+ {file = "mypy-1.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:604282c886497645ffb87b8f35a57ec773a4a2721161e709a4422c1636ddde5c"},
+ {file = "mypy-1.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37fd87cab83f09842653f08de066ee68f1182b9b5282e4634cdb4b407266bade"},
+ {file = "mypy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8addf6313777dbb92e9564c5d32ec122bf2c6c39d683ea64de6a1fd98b90fe37"},
+ {file = "mypy-1.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5cc3ca0a244eb9a5249c7c583ad9a7e881aa5d7b73c35652296ddcdb33b2b9c7"},
+ {file = "mypy-1.10.1-cp38-cp38-win_amd64.whl", hash = "sha256:1b3a2ffce52cc4dbaeee4df762f20a2905aa171ef157b82192f2e2f368eec05d"},
+ {file = "mypy-1.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe85ed6836165d52ae8b88f99527d3d1b2362e0cb90b005409b8bed90e9059b3"},
+ {file = "mypy-1.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c2ae450d60d7d020d67ab440c6e3fae375809988119817214440033f26ddf7bf"},
+ {file = "mypy-1.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6be84c06e6abd72f960ba9a71561c14137a583093ffcf9bbfaf5e613d63fa531"},
+ {file = "mypy-1.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2189ff1e39db399f08205e22a797383613ce1cb0cb3b13d8bcf0170e45b96cc3"},
+ {file = "mypy-1.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:97a131ee36ac37ce9581f4220311247ab6cba896b4395b9c87af0675a13a755f"},
+ {file = "mypy-1.10.1-py3-none-any.whl", hash = "sha256:71d8ac0b906354ebda8ef1673e5fde785936ac1f29ff6987c7483cfbd5a4235a"},
+ {file = "mypy-1.10.1.tar.gz", hash = "sha256:1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0"},
+]
+
+[package.dependencies]
+mypy-extensions = ">=1.0.0"
+tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
+typing-extensions = ">=4.1.0"
+
+[package.extras]
+dmypy = ["psutil (>=4.0)"]
+install-types = ["pip"]
+mypyc = ["setuptools (>=50)"]
+reports = ["lxml"]
+
+[[package]]
+name = "mypy-extensions"
+version = "1.0.0"
+description = "Type system extensions for programs checked with the mypy type checker."
+optional = false
+python-versions = ">=3.5"
+files = [
+ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
+ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
+]
+
+[[package]]
+name = "platformdirs"
+version = "4.3.2"
+description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`."
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "platformdirs-4.3.2-py3-none-any.whl", hash = "sha256:eb1c8582560b34ed4ba105009a4badf7f6f85768b30126f351328507b2beb617"},
+ {file = "platformdirs-4.3.2.tar.gz", hash = "sha256:9e5e27a08aa095dd127b9f2e764d74254f482fef22b0970773bfba79d091ab8c"},
+]
+
+[package.extras]
+docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"]
+test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"]
+type = ["mypy (>=1.11.2)"]
+
+[[package]]
+name = "pydantic"
+version = "2.9.1"
+description = "Data validation using Python type hints"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "pydantic-2.9.1-py3-none-any.whl", hash = "sha256:7aff4db5fdf3cf573d4b3c30926a510a10e19a0774d38fc4967f78beb6deb612"},
+ {file = "pydantic-2.9.1.tar.gz", hash = "sha256:1363c7d975c7036df0db2b4a61f2e062fbc0aa5ab5f2772e0ffc7191a4f4bce2"},
+]
+
+[package.dependencies]
+annotated-types = ">=0.6.0"
+pydantic-core = "2.23.3"
+typing-extensions = [
+ {version = ">=4.6.1", markers = "python_version < \"3.13\""},
+ {version = ">=4.12.2", markers = "python_version >= \"3.13\""},
+]
+
+[package.extras]
+email = ["email-validator (>=2.0.0)"]
+timezone = ["tzdata"]
+
+[[package]]
+name = "pydantic-core"
+version = "2.23.3"
+description = "Core functionality for Pydantic validation and serialization"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "pydantic_core-2.23.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:7f10a5d1b9281392f1bf507d16ac720e78285dfd635b05737c3911637601bae6"},
+ {file = "pydantic_core-2.23.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3c09a7885dd33ee8c65266e5aa7fb7e2f23d49d8043f089989726391dd7350c5"},
+ {file = "pydantic_core-2.23.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6470b5a1ec4d1c2e9afe928c6cb37eb33381cab99292a708b8cb9aa89e62429b"},
+ {file = "pydantic_core-2.23.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9172d2088e27d9a185ea0a6c8cebe227a9139fd90295221d7d495944d2367700"},
+ {file = "pydantic_core-2.23.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86fc6c762ca7ac8fbbdff80d61b2c59fb6b7d144aa46e2d54d9e1b7b0e780e01"},
+ {file = "pydantic_core-2.23.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f0cb80fd5c2df4898693aa841425ea1727b1b6d2167448253077d2a49003e0ed"},
+ {file = "pydantic_core-2.23.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03667cec5daf43ac4995cefa8aaf58f99de036204a37b889c24a80927b629cec"},
+ {file = "pydantic_core-2.23.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:047531242f8e9c2db733599f1c612925de095e93c9cc0e599e96cf536aaf56ba"},
+ {file = "pydantic_core-2.23.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:5499798317fff7f25dbef9347f4451b91ac2a4330c6669821c8202fd354c7bee"},
+ {file = "pydantic_core-2.23.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bbb5e45eab7624440516ee3722a3044b83fff4c0372efe183fd6ba678ff681fe"},
+ {file = "pydantic_core-2.23.3-cp310-none-win32.whl", hash = "sha256:8b5b3ed73abb147704a6e9f556d8c5cb078f8c095be4588e669d315e0d11893b"},
+ {file = "pydantic_core-2.23.3-cp310-none-win_amd64.whl", hash = "sha256:2b603cde285322758a0279995b5796d64b63060bfbe214b50a3ca23b5cee3e83"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:c889fd87e1f1bbeb877c2ee56b63bb297de4636661cc9bbfcf4b34e5e925bc27"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ea85bda3189fb27503af4c45273735bcde3dd31c1ab17d11f37b04877859ef45"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a7f7f72f721223f33d3dc98a791666ebc6a91fa023ce63733709f4894a7dc611"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2b2b55b0448e9da68f56b696f313949cda1039e8ec7b5d294285335b53104b61"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c24574c7e92e2c56379706b9a3f07c1e0c7f2f87a41b6ee86653100c4ce343e5"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f2b05e6ccbee333a8f4b8f4d7c244fdb7a979e90977ad9c51ea31261e2085ce0"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2c409ce1c219c091e47cb03feb3c4ed8c2b8e004efc940da0166aaee8f9d6c8"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d965e8b325f443ed3196db890d85dfebbb09f7384486a77461347f4adb1fa7f8"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f56af3a420fb1ffaf43ece3ea09c2d27c444e7c40dcb7c6e7cf57aae764f2b48"},
+ {file = "pydantic_core-2.23.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5b01a078dd4f9a52494370af21aa52964e0a96d4862ac64ff7cea06e0f12d2c5"},
+ {file = "pydantic_core-2.23.3-cp311-none-win32.whl", hash = "sha256:560e32f0df04ac69b3dd818f71339983f6d1f70eb99d4d1f8e9705fb6c34a5c1"},
+ {file = "pydantic_core-2.23.3-cp311-none-win_amd64.whl", hash = "sha256:c744fa100fdea0d000d8bcddee95213d2de2e95b9c12be083370b2072333a0fa"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:e0ec50663feedf64d21bad0809f5857bac1ce91deded203efc4a84b31b2e4305"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:db6e6afcb95edbe6b357786684b71008499836e91f2a4a1e55b840955b341dbb"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:98ccd69edcf49f0875d86942f4418a4e83eb3047f20eb897bffa62a5d419c8fa"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a678c1ac5c5ec5685af0133262103defb427114e62eafeda12f1357a12140162"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:01491d8b4d8db9f3391d93b0df60701e644ff0894352947f31fff3e52bd5c801"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fcf31facf2796a2d3b7fe338fe8640aa0166e4e55b4cb108dbfd1058049bf4cb"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7200fd561fb3be06827340da066df4311d0b6b8eb0c2116a110be5245dceb326"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:dc1636770a809dee2bd44dd74b89cc80eb41172bcad8af75dd0bc182c2666d4c"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:67a5def279309f2e23014b608c4150b0c2d323bd7bccd27ff07b001c12c2415c"},
+ {file = "pydantic_core-2.23.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:748bdf985014c6dd3e1e4cc3db90f1c3ecc7246ff5a3cd4ddab20c768b2f1dab"},
+ {file = "pydantic_core-2.23.3-cp312-none-win32.whl", hash = "sha256:255ec6dcb899c115f1e2a64bc9ebc24cc0e3ab097775755244f77360d1f3c06c"},
+ {file = "pydantic_core-2.23.3-cp312-none-win_amd64.whl", hash = "sha256:40b8441be16c1e940abebed83cd006ddb9e3737a279e339dbd6d31578b802f7b"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:6daaf5b1ba1369a22c8b050b643250e3e5efc6a78366d323294aee54953a4d5f"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d015e63b985a78a3d4ccffd3bdf22b7c20b3bbd4b8227809b3e8e75bc37f9cb2"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3fc572d9b5b5cfe13f8e8a6e26271d5d13f80173724b738557a8c7f3a8a3791"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f6bd91345b5163ee7448bee201ed7dd601ca24f43f439109b0212e296eb5b423"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fc379c73fd66606628b866f661e8785088afe2adaba78e6bbe80796baf708a63"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fbdce4b47592f9e296e19ac31667daed8753c8367ebb34b9a9bd89dacaa299c9"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc3cf31edf405a161a0adad83246568647c54404739b614b1ff43dad2b02e6d5"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8e22b477bf90db71c156f89a55bfe4d25177b81fce4aa09294d9e805eec13855"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:0a0137ddf462575d9bce863c4c95bac3493ba8e22f8c28ca94634b4a1d3e2bb4"},
+ {file = "pydantic_core-2.23.3-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:203171e48946c3164fe7691fc349c79241ff8f28306abd4cad5f4f75ed80bc8d"},
+ {file = "pydantic_core-2.23.3-cp313-none-win32.whl", hash = "sha256:76bdab0de4acb3f119c2a4bff740e0c7dc2e6de7692774620f7452ce11ca76c8"},
+ {file = "pydantic_core-2.23.3-cp313-none-win_amd64.whl", hash = "sha256:37ba321ac2a46100c578a92e9a6aa33afe9ec99ffa084424291d84e456f490c1"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d063c6b9fed7d992bcbebfc9133f4c24b7a7f215d6b102f3e082b1117cddb72c"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6cb968da9a0746a0cf521b2b5ef25fc5a0bee9b9a1a8214e0a1cfaea5be7e8a4"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edbefe079a520c5984e30e1f1f29325054b59534729c25b874a16a5048028d16"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cbaaf2ef20d282659093913da9d402108203f7cb5955020bd8d1ae5a2325d1c4"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fb539d7e5dc4aac345846f290cf504d2fd3c1be26ac4e8b5e4c2b688069ff4cf"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7e6f33503c5495059148cc486867e1d24ca35df5fc064686e631e314d959ad5b"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:04b07490bc2f6f2717b10c3969e1b830f5720b632f8ae2f3b8b1542394c47a8e"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:03795b9e8a5d7fda05f3873efc3f59105e2dcff14231680296b87b80bb327295"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c483dab0f14b8d3f0df0c6c18d70b21b086f74c87ab03c59250dbf6d3c89baba"},
+ {file = "pydantic_core-2.23.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8b2682038e255e94baf2c473dca914a7460069171ff5cdd4080be18ab8a7fd6e"},
+ {file = "pydantic_core-2.23.3-cp38-none-win32.whl", hash = "sha256:f4a57db8966b3a1d1a350012839c6a0099f0898c56512dfade8a1fe5fb278710"},
+ {file = "pydantic_core-2.23.3-cp38-none-win_amd64.whl", hash = "sha256:13dd45ba2561603681a2676ca56006d6dee94493f03d5cadc055d2055615c3ea"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:82da2f4703894134a9f000e24965df73cc103e31e8c31906cc1ee89fde72cbd8"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dd9be0a42de08f4b58a3cc73a123f124f65c24698b95a54c1543065baca8cf0e"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89b731f25c80830c76fdb13705c68fef6a2b6dc494402987c7ea9584fe189f5d"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c6de1ec30c4bb94f3a69c9f5f2182baeda5b809f806676675e9ef6b8dc936f28"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb68b41c3fa64587412b104294b9cbb027509dc2f6958446c502638d481525ef"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c3980f2843de5184656aab58698011b42763ccba11c4a8c35936c8dd6c7068c"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94f85614f2cba13f62c3c6481716e4adeae48e1eaa7e8bac379b9d177d93947a"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:510b7fb0a86dc8f10a8bb43bd2f97beb63cffad1203071dc434dac26453955cd"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1eba2f7ce3e30ee2170410e2171867ea73dbd692433b81a93758ab2de6c64835"},
+ {file = "pydantic_core-2.23.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4b259fd8409ab84b4041b7b3f24dcc41e4696f180b775961ca8142b5b21d0e70"},
+ {file = "pydantic_core-2.23.3-cp39-none-win32.whl", hash = "sha256:40d9bd259538dba2f40963286009bf7caf18b5112b19d2b55b09c14dde6db6a7"},
+ {file = "pydantic_core-2.23.3-cp39-none-win_amd64.whl", hash = "sha256:5a8cd3074a98ee70173a8633ad3c10e00dcb991ecec57263aacb4095c5efb958"},
+ {file = "pydantic_core-2.23.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f399e8657c67313476a121a6944311fab377085ca7f490648c9af97fc732732d"},
+ {file = "pydantic_core-2.23.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:6b5547d098c76e1694ba85f05b595720d7c60d342f24d5aad32c3049131fa5c4"},
+ {file = "pydantic_core-2.23.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0dda0290a6f608504882d9f7650975b4651ff91c85673341789a476b1159f211"},
+ {file = "pydantic_core-2.23.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65b6e5da855e9c55a0c67f4db8a492bf13d8d3316a59999cfbaf98cc6e401961"},
+ {file = "pydantic_core-2.23.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:09e926397f392059ce0afdcac920df29d9c833256354d0c55f1584b0b70cf07e"},
+ {file = "pydantic_core-2.23.3-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:87cfa0ed6b8c5bd6ae8b66de941cece179281239d482f363814d2b986b79cedc"},
+ {file = "pydantic_core-2.23.3-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e61328920154b6a44d98cabcb709f10e8b74276bc709c9a513a8c37a18786cc4"},
+ {file = "pydantic_core-2.23.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ce3317d155628301d649fe5e16a99528d5680af4ec7aa70b90b8dacd2d725c9b"},
+ {file = "pydantic_core-2.23.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e89513f014c6be0d17b00a9a7c81b1c426f4eb9224b15433f3d98c1a071f8433"},
+ {file = "pydantic_core-2.23.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:4f62c1c953d7ee375df5eb2e44ad50ce2f5aff931723b398b8bc6f0ac159791a"},
+ {file = "pydantic_core-2.23.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2718443bc671c7ac331de4eef9b673063b10af32a0bb385019ad61dcf2cc8f6c"},
+ {file = "pydantic_core-2.23.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0d90e08b2727c5d01af1b5ef4121d2f0c99fbee692c762f4d9d0409c9da6541"},
+ {file = "pydantic_core-2.23.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2b676583fc459c64146debea14ba3af54e540b61762dfc0613dc4e98c3f66eeb"},
+ {file = "pydantic_core-2.23.3-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:50e4661f3337977740fdbfbae084ae5693e505ca2b3130a6d4eb0f2281dc43b8"},
+ {file = "pydantic_core-2.23.3-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:68f4cf373f0de6abfe599a38307f4417c1c867ca381c03df27c873a9069cda25"},
+ {file = "pydantic_core-2.23.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:59d52cf01854cb26c46958552a21acb10dd78a52aa34c86f284e66b209db8cab"},
+ {file = "pydantic_core-2.23.3.tar.gz", hash = "sha256:3cb0f65d8b4121c1b015c60104a685feb929a29d7cf204387c7f2688c7974690"},
+]
+
+[package.dependencies]
+typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0"
+
+[[package]]
+name = "pylint"
+version = "3.2.3"
+description = "python code static checker"
+optional = false
+python-versions = ">=3.8.0"
+files = [
+ {file = "pylint-3.2.3-py3-none-any.whl", hash = "sha256:b3d7d2708a3e04b4679e02d99e72329a8b7ee8afb8d04110682278781f889fa8"},
+ {file = "pylint-3.2.3.tar.gz", hash = "sha256:02f6c562b215582386068d52a30f520d84fdbcf2a95fc7e855b816060d048b60"},
+]
+
+[package.dependencies]
+astroid = ">=3.2.2,<=3.3.0-dev0"
+colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
+dill = [
+ {version = ">=0.2", markers = "python_version < \"3.11\""},
+ {version = ">=0.3.7", markers = "python_version >= \"3.12\""},
+ {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""},
+]
+isort = ">=4.2.5,<5.13.0 || >5.13.0,<6"
+mccabe = ">=0.6,<0.8"
+platformdirs = ">=2.2.0"
+tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
+tomlkit = ">=0.10.1"
+typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""}
+
+[package.extras]
+spelling = ["pyenchant (>=3.2,<4.0)"]
+testutils = ["gitpython (>3)"]
+
+[[package]]
+name = "python-dateutil"
+version = "2.8.2"
+description = "Extensions to the standard Python datetime module"
+optional = false
+python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
+files = [
+ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"},
+ {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"},
+]
+
+[package.dependencies]
+six = ">=1.5"
+
+[[package]]
+name = "six"
+version = "1.16.0"
+description = "Python 2 and 3 compatibility utilities"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
+files = [
+ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
+ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
+]
+
+[[package]]
+name = "sniffio"
+version = "1.3.1"
+description = "Sniff out which async library your code is running under"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"},
+ {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"},
+]
+
+[[package]]
+name = "tomli"
+version = "2.0.1"
+description = "A lil' TOML parser"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
+ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+]
+
+[[package]]
+name = "tomlkit"
+version = "0.13.2"
+description = "Style preserving TOML library"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"},
+ {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"},
+]
+
+[[package]]
+name = "types-python-dateutil"
+version = "2.9.0.20240906"
+description = "Typing stubs for python-dateutil"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "types-python-dateutil-2.9.0.20240906.tar.gz", hash = "sha256:9706c3b68284c25adffc47319ecc7947e5bb86b3773f843c73906fd598bc176e"},
+ {file = "types_python_dateutil-2.9.0.20240906-py3-none-any.whl", hash = "sha256:27c8cc2d058ccb14946eebcaaa503088f4f6dbc4fb6093d3d456a49aef2753f6"},
+]
+
+[[package]]
+name = "typing-extensions"
+version = "4.12.2"
+description = "Backported and Experimental Type Hints for Python 3.8+"
+optional = false
+python-versions = ">=3.8"
+files = [
+ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"},
+ {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"},
+]
+
+[[package]]
+name = "typing-inspect"
+version = "0.9.0"
+description = "Runtime inspection utilities for typing module."
+optional = false
+python-versions = "*"
+files = [
+ {file = "typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f"},
+ {file = "typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"},
+]
+
+[package.dependencies]
+mypy-extensions = ">=0.3.0"
+typing-extensions = ">=3.7.4"
+
+[metadata]
+lock-version = "2.0"
+python-versions = "^3.8"
+content-hash = "6bb5f77afb8fcbe7327ccd1fcc33f5c279c6a2582d43be73b69c2a94b836b85d"
diff --git a/bank-feeds/poetry.toml b/bank-feeds/poetry.toml
new file mode 100644
index 000000000..ab1033bd3
--- /dev/null
+++ b/bank-feeds/poetry.toml
@@ -0,0 +1,2 @@
+[virtualenvs]
+in-project = true
diff --git a/bank-feeds/py.typed b/bank-feeds/py.typed
new file mode 100644
index 000000000..3e38f1a92
--- /dev/null
+++ b/bank-feeds/py.typed
@@ -0,0 +1 @@
+# Marker file for PEP 561. The package enables type hints.
diff --git a/bank-feeds/pylintrc b/bank-feeds/pylintrc
index cebe76d49..508003862 100644
--- a/bank-feeds/pylintrc
+++ b/bank-feeds/pylintrc
@@ -59,10 +59,11 @@ ignore-paths=
# Emacs file locks
ignore-patterns=^\.#
-# List of module names for which member attributes should not be checked
-# (useful for modules/projects where namespaces are manipulated during runtime
-# and thus existing member attributes cannot be deduced by static analysis). It
-# supports qualified module names, as well as Unix pattern matching.
+# List of module names for which member attributes should not be checked and
+# will not be imported (useful for modules/projects where namespaces are
+# manipulated during runtime and thus existing member attributes cannot be
+# deduced by static analysis). It supports qualified module names, as well as
+# Unix pattern matching.
ignored-modules=
# Python code to execute, usually for sys.path manipulation such as
@@ -93,6 +94,12 @@ py-version=3.8
# Discover python modules and packages in the file system subtree.
recursive=no
+# Add paths to the list of the source roots. Supports globbing patterns. The
+# source root is an absolute path or a path relative to the current working
+# directory used to determine a package namespace for modules located under the
+# source root.
+source-roots=src
+
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
@@ -180,6 +187,7 @@ good-names=i,
ex,
Run,
_,
+ e,
id
# Good variable names regexes, separated by a comma. If names match any regex,
@@ -224,6 +232,10 @@ no-docstring-rgx=^_
# These decorators are taken in consideration only for invalid-name.
property-classes=abc.abstractproperty
+# Regular expression matching correct type alias names. If left empty, type
+# alias names will be checked with the set naming style.
+typealias-rgx=.*
+
# Regular expression matching correct type variable names. If left empty, type
# variable names will be checked with the set naming style.
#typevar-rgx=
@@ -246,15 +258,12 @@ check-protected-access-in-special-methods=no
defining-attr-methods=__init__,
__new__,
setUp,
+ asyncSetUp,
__post_init__
# List of member names, which should be excluded from the protected access
# warning.
-exclude-protected=_asdict,
- _fields,
- _replace,
- _source,
- _make
+exclude-protected=_asdict,_fields,_replace,_source,_make,os._exit
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
@@ -417,6 +426,8 @@ disable=raw-checker-failed,
suppressed-message,
useless-suppression,
deprecated-pragma,
+ use-implicit-booleaness-not-comparison-to-string,
+ use-implicit-booleaness-not-comparison-to-zero,
use-symbolic-message-instead,
trailing-whitespace,
line-too-long,
@@ -429,7 +440,6 @@ disable=raw-checker-failed,
broad-exception-raised,
too-few-public-methods,
too-many-branches,
- chained-comparison,
duplicate-code,
trailing-newlines,
too-many-public-methods,
@@ -441,13 +451,16 @@ disable=raw-checker-failed,
too-many-nested-blocks,
too-many-boolean-expressions,
no-else-raise,
- bare-except
+ bare-except,
+ broad-exception-caught,
+ fixme,
+ relative-beyond-top-level
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
-enable=c-extension-no-member
+enable=
[METHOD_ARGS]
@@ -493,8 +506,9 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor
# used to format the message information. See doc for all details.
msg-template=
-# Set the output format. Available formats are text, parseable, colorized, json
-# and msvs (visual studio). You can also give a reporter class, e.g.
+# Set the output format. Available formats are: text, parseable, colorized,
+# json2 (improved json format), json (old json format) and msvs (visual
+# studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
#output-format=
@@ -528,8 +542,8 @@ min-similarity-lines=4
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
-# Spelling dictionary name. Available dictionaries: none. To make it work,
-# install the 'python-enchant' package.
+# Spelling dictionary name. No available dictionaries : You need to install
+# both the python package and the system dependency for enchant to work.
spelling-dict=
# List of comma separated words that should be considered directives if they
diff --git a/bank-feeds/pyproject.toml b/bank-feeds/pyproject.toml
new file mode 100644
index 000000000..5dc3009fd
--- /dev/null
+++ b/bank-feeds/pyproject.toml
@@ -0,0 +1,55 @@
+[tool.poetry]
+name = "codat-bankfeeds"
+version = "7.0.0"
+description = "Set up bank feeds from accounts in your application to supported accounting platforms."
+authors = ["Speakeasy",]
+readme = "README-PYPI.md"
+repository = "https://github.com/codatio/client-sdk-python.git"
+packages = [
+ { include = "codat_bankfeeds", from = "src" }
+]
+include = ["py.typed", "src/codat_bankfeeds/py.typed"]
+
+[tool.setuptools.package-data]
+"*" = ["py.typed", "src/codat_bankfeeds/py.typed"]
+
+[virtualenvs]
+in-project = true
+
+[tool.poetry.dependencies]
+python = "^3.8"
+eval-type-backport = "^0.2.0"
+httpx = "^0.27.0"
+jsonpath-python = "^1.0.6"
+pydantic = "~2.9.0"
+python-dateutil = "2.8.2"
+typing-inspect = "^0.9.0"
+
+[tool.poetry.group.dev.dependencies]
+mypy = "==1.10.1"
+pylint = "==3.2.3"
+types-python-dateutil = "^2.9.0.20240316"
+
+[build-system]
+requires = ["poetry-core"]
+build-backend = "poetry.core.masonry.api"
+
+[tool.pytest.ini_options]
+pythonpath = ["src"]
+
+[tool.mypy]
+disable_error_code = "misc"
+
+[[tool.mypy.overrides]]
+module = "typing_inspect"
+ignore_missing_imports = true
+
+[[tool.mypy.overrides]]
+module = "jsonpath"
+ignore_missing_imports = true
+
+[tool.pyright]
+venvPath = "."
+venv = ".venv"
+
+
diff --git a/bank-feeds/scripts/compile.sh b/bank-feeds/scripts/compile.sh
new file mode 100755
index 000000000..fafe635b2
--- /dev/null
+++ b/bank-feeds/scripts/compile.sh
@@ -0,0 +1,85 @@
+#!/usr/bin/env bash
+
+set -o pipefail # Ensure pipeline failures are propagated
+
+# Use temporary files to store outputs and exit statuses
+declare -A output_files
+declare -A status_files
+
+# Function to run a command with temporary output and status files
+run_command() {
+ local cmd="$1"
+ local key="$2"
+ local output_file="$3"
+ local status_file="$4"
+
+ # Run the command and store output and exit status
+ {
+ eval "$cmd"
+ echo $? > "$status_file"
+ } &> "$output_file" &
+}
+
+poetry run python scripts/prepare-readme.py
+
+# Create temporary files for outputs and statuses
+for cmd in compileall pylint mypy pyright; do
+ output_files[$cmd]=$(mktemp)
+ status_files[$cmd]=$(mktemp)
+done
+
+# Collect PIDs for background processes
+declare -a pids
+
+# Run commands in parallel using temporary files
+echo "Running python -m compileall"
+run_command 'poetry run python -m compileall -q . && echo "Success"' 'compileall' "${output_files[compileall]}" "${status_files[compileall]}"
+pids+=($!)
+
+echo "Running pylint"
+run_command 'poetry run pylint src' 'pylint' "${output_files[pylint]}" "${status_files[pylint]}"
+pids+=($!)
+
+echo "Running mypy"
+run_command 'poetry run mypy src' 'mypy' "${output_files[mypy]}" "${status_files[mypy]}"
+pids+=($!)
+
+echo "Running pyright (optional)"
+run_command 'if command -v pyright > /dev/null 2>&1; then pyright src; else echo "pyright not found, skipping"; fi' 'pyright' "${output_files[pyright]}" "${status_files[pyright]}"
+pids+=($!)
+
+# Wait for all processes to complete
+echo "Waiting for processes to complete"
+for pid in "${pids[@]}"; do
+ wait "$pid"
+done
+
+# Print output sequentially and check for failures
+failed=false
+for key in "${!output_files[@]}"; do
+ echo "--- Output from Command: $key ---"
+ echo
+ cat "${output_files[$key]}"
+ echo # Empty line for separation
+ echo "--- End of Output from Command: $key ---"
+ echo
+
+ exit_status=$(cat "${status_files[$key]}")
+ if [ "$exit_status" -ne 0 ]; then
+ echo "Command $key failed with exit status $exit_status" >&2
+ failed=true
+ fi
+done
+
+# Clean up temporary files
+for tmp_file in "${output_files[@]}" "${status_files[@]}"; do
+ rm -f "$tmp_file"
+done
+
+if $failed; then
+ echo "One or more commands failed." >&2
+ exit 1
+else
+ echo "All commands completed successfully."
+ exit 0
+fi
diff --git a/bank-feeds/scripts/prepare-readme.py b/bank-feeds/scripts/prepare-readme.py
new file mode 100644
index 000000000..7c07cddd7
--- /dev/null
+++ b/bank-feeds/scripts/prepare-readme.py
@@ -0,0 +1,33 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+import re
+import shutil
+
+try:
+ with open("README.md", "r") as rh:
+ readme_contents = rh.read()
+ GITHUB_URL = "https://github.com/codatio/client-sdk-python.git"
+ GITHUB_URL = (
+ GITHUB_URL[: -len(".git")] if GITHUB_URL.endswith(".git") else GITHUB_URL
+ )
+ # links on PyPI should have absolute URLs
+ readme_contents = re.sub(
+ r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))",
+ lambda m: m.group(1)
+ + GITHUB_URL
+ + "/blob/master/"
+ + m.group(2)
+ + m.group(3),
+ readme_contents,
+ )
+
+ with open("README-PYPI.md", "w") as wh:
+ wh.write(readme_contents)
+except Exception as e:
+ try:
+ print("Failed to rewrite README.md to README-PYPI.md, copying original instead")
+ print(e)
+ shutil.copyfile("README.md", "README-PYPI.md")
+ except Exception as e:
+ print("Failed to copy README.md to README-PYPI.md")
+ print(e)
diff --git a/bank-feeds/scripts/publish.sh b/bank-feeds/scripts/publish.sh
new file mode 100755
index 000000000..ab45b1f94
--- /dev/null
+++ b/bank-feeds/scripts/publish.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN}
+
+poetry run python scripts/prepare-readme.py
+
+poetry publish --build --skip-existing
diff --git a/bank-feeds/setup.py b/bank-feeds/setup.py
deleted file mode 100644
index 372132715..000000000
--- a/bank-feeds/setup.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-import setuptools
-
-try:
- with open("README.md", "r") as fh:
- long_description = fh.read()
-except FileNotFoundError:
- long_description = ""
-
-setuptools.setup(
- name="codat-bankfeeds",
- version="6.1.1",
- author="Codat",
- description="Set up bank feeds from accounts in your application to supported accounting platforms.",
- long_description=long_description,
- long_description_content_type="text/markdown",
- packages=setuptools.find_packages(where="src"),
- install_requires=[
- "certifi>=2023.7.22",
- "charset-normalizer>=3.2.0",
- "dataclasses-json-speakeasy>=0.5.11",
- "idna>=3.4",
- "jsonpath-python>=1.0.6 ",
- "marshmallow>=3.19.0",
- "mypy-extensions>=1.0.0",
- "packaging>=23.1",
- "python-dateutil>=2.8.2",
- "requests>=2.31.0",
- "six>=1.16.0",
- "typing-inspect>=0.9.0",
- "typing_extensions>=4.7.1",
- "urllib3>=1.26.18",
- ],
- extras_require={
- "dev":["pylint==2.16.2"]
- },
- package_dir={'': 'src'},
- python_requires='>=3.8',
- package_data={"codat-bankfeeds": ["py.typed"]},
-)
diff --git a/bank-feeds/src/codat_bankfeeds/__init__.py b/bank-feeds/src/codat_bankfeeds/__init__.py
new file mode 100644
index 000000000..d8d60c471
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/__init__.py
@@ -0,0 +1,4 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .sdk import *
+from .sdkconfiguration import *
diff --git a/bank-feeds/src/codat_bankfeeds/_hooks/__init__.py b/bank-feeds/src/codat_bankfeeds/_hooks/__init__.py
new file mode 100644
index 000000000..2ee66cdd5
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/_hooks/__init__.py
@@ -0,0 +1,5 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .sdkhooks import *
+from .types import *
+from .registration import *
diff --git a/bank-feeds/src/codat_bankfeeds/_hooks/registration.py b/bank-feeds/src/codat_bankfeeds/_hooks/registration.py
new file mode 100644
index 000000000..cab477877
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/_hooks/registration.py
@@ -0,0 +1,13 @@
+from .types import Hooks
+
+
+# This file is only ever generated once on the first generation and then is free to be modified.
+# Any hooks you wish to add should be registered in the init_hooks function. Feel free to define them
+# in this file or in separate files in the hooks folder.
+
+
+def init_hooks(hooks: Hooks):
+ # pylint: disable=unused-argument
+ """Add hooks by calling hooks.register{sdk_init/before_request/after_success/after_error}Hook
+ with an instance of a hook that implements that specific Hook interface
+ Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance"""
diff --git a/bank-feeds/src/codat_bankfeeds/_hooks/sdkhooks.py b/bank-feeds/src/codat_bankfeeds/_hooks/sdkhooks.py
new file mode 100644
index 000000000..209a30b48
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/_hooks/sdkhooks.py
@@ -0,0 +1,76 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+import httpx
+from .types import (
+ SDKInitHook,
+ BeforeRequestContext,
+ BeforeRequestHook,
+ AfterSuccessContext,
+ AfterSuccessHook,
+ AfterErrorContext,
+ AfterErrorHook,
+ Hooks,
+)
+from .registration import init_hooks
+from typing import List, Optional, Tuple
+from codat_bankfeeds.httpclient import HttpClient
+
+
+class SDKHooks(Hooks):
+ def __init__(self) -> None:
+ self.sdk_init_hooks: List[SDKInitHook] = []
+ self.before_request_hooks: List[BeforeRequestHook] = []
+ self.after_success_hooks: List[AfterSuccessHook] = []
+ self.after_error_hooks: List[AfterErrorHook] = []
+ init_hooks(self)
+
+ def register_sdk_init_hook(self, hook: SDKInitHook) -> None:
+ self.sdk_init_hooks.append(hook)
+
+ def register_before_request_hook(self, hook: BeforeRequestHook) -> None:
+ self.before_request_hooks.append(hook)
+
+ def register_after_success_hook(self, hook: AfterSuccessHook) -> None:
+ self.after_success_hooks.append(hook)
+
+ def register_after_error_hook(self, hook: AfterErrorHook) -> None:
+ self.after_error_hooks.append(hook)
+
+ def sdk_init(self, base_url: str, client: HttpClient) -> Tuple[str, HttpClient]:
+ for hook in self.sdk_init_hooks:
+ base_url, client = hook.sdk_init(base_url, client)
+ return base_url, client
+
+ def before_request(
+ self, hook_ctx: BeforeRequestContext, request: httpx.Request
+ ) -> httpx.Request:
+ for hook in self.before_request_hooks:
+ out = hook.before_request(hook_ctx, request)
+ if isinstance(out, Exception):
+ raise out
+ request = out
+
+ return request
+
+ def after_success(
+ self, hook_ctx: AfterSuccessContext, response: httpx.Response
+ ) -> httpx.Response:
+ for hook in self.after_success_hooks:
+ out = hook.after_success(hook_ctx, response)
+ if isinstance(out, Exception):
+ raise out
+ response = out
+ return response
+
+ def after_error(
+ self,
+ hook_ctx: AfterErrorContext,
+ response: Optional[httpx.Response],
+ error: Optional[Exception],
+ ) -> Tuple[Optional[httpx.Response], Optional[Exception]]:
+ for hook in self.after_error_hooks:
+ result = hook.after_error(hook_ctx, response, error)
+ if isinstance(result, Exception):
+ raise result
+ response, error = result
+ return response, error
diff --git a/bank-feeds/src/codat_bankfeeds/_hooks/types.py b/bank-feeds/src/codat_bankfeeds/_hooks/types.py
new file mode 100644
index 000000000..19d2e388e
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/_hooks/types.py
@@ -0,0 +1,94 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from abc import ABC, abstractmethod
+from codat_bankfeeds.httpclient import HttpClient
+import httpx
+from typing import Any, Callable, List, Optional, Tuple, Union
+
+
+class HookContext:
+ operation_id: str
+ oauth2_scopes: Optional[List[str]] = None
+ security_source: Optional[Union[Any, Callable[[], Any]]] = None
+
+ def __init__(
+ self,
+ operation_id: str,
+ oauth2_scopes: Optional[List[str]],
+ security_source: Optional[Union[Any, Callable[[], Any]]],
+ ):
+ self.operation_id = operation_id
+ self.oauth2_scopes = oauth2_scopes
+ self.security_source = security_source
+
+
+class BeforeRequestContext(HookContext):
+ def __init__(self, hook_ctx: HookContext):
+ super().__init__(
+ hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source
+ )
+
+
+class AfterSuccessContext(HookContext):
+ def __init__(self, hook_ctx: HookContext):
+ super().__init__(
+ hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source
+ )
+
+
+class AfterErrorContext(HookContext):
+ def __init__(self, hook_ctx: HookContext):
+ super().__init__(
+ hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source
+ )
+
+
+class SDKInitHook(ABC):
+ @abstractmethod
+ def sdk_init(self, base_url: str, client: HttpClient) -> Tuple[str, HttpClient]:
+ pass
+
+
+class BeforeRequestHook(ABC):
+ @abstractmethod
+ def before_request(
+ self, hook_ctx: BeforeRequestContext, request: httpx.Request
+ ) -> Union[httpx.Request, Exception]:
+ pass
+
+
+class AfterSuccessHook(ABC):
+ @abstractmethod
+ def after_success(
+ self, hook_ctx: AfterSuccessContext, response: httpx.Response
+ ) -> Union[httpx.Response, Exception]:
+ pass
+
+
+class AfterErrorHook(ABC):
+ @abstractmethod
+ def after_error(
+ self,
+ hook_ctx: AfterErrorContext,
+ response: Optional[httpx.Response],
+ error: Optional[Exception],
+ ) -> Union[Tuple[Optional[httpx.Response], Optional[Exception]], Exception]:
+ pass
+
+
+class Hooks(ABC):
+ @abstractmethod
+ def register_sdk_init_hook(self, hook: SDKInitHook):
+ pass
+
+ @abstractmethod
+ def register_before_request_hook(self, hook: BeforeRequestHook):
+ pass
+
+ @abstractmethod
+ def register_after_success_hook(self, hook: AfterSuccessHook):
+ pass
+
+ @abstractmethod
+ def register_after_error_hook(self, hook: AfterErrorHook):
+ pass
diff --git a/bank-feeds/src/codat_bankfeeds/account_mapping.py b/bank-feeds/src/codat_bankfeeds/account_mapping.py
new file mode 100644
index 000000000..78e533b3b
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/account_mapping.py
@@ -0,0 +1,468 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import HookContext
+from codat_bankfeeds.models import errors, operations, shared
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+from typing import Any, Optional, Union, cast
+
+
+class AccountMapping(BaseSDK):
+ r"""Extra functionality for building an account management UI."""
+
+ def create(
+ self,
+ *,
+ request: Union[
+ operations.CreateBankAccountMappingRequest,
+ operations.CreateBankAccountMappingRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankFeedAccountMappingResponse]:
+ r"""Create bank feed account mapping
+
+ The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).
+
+ A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform).
+
+ To find valid target account options, first call list bank feed account mappings.
+
+ This endpoint is only needed if building an account management UI.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(
+ request, operations.CreateBankAccountMappingRequest
+ )
+ request = cast(operations.CreateBankAccountMappingRequest, request)
+
+ req = self.build_request(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.bank_feed_account_mapping,
+ False,
+ True,
+ "json",
+ Optional[shared.BankFeedAccountMapping],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="create-bank-account-mapping",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.BankFeedAccountMappingResponse]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def create_async(
+ self,
+ *,
+ request: Union[
+ operations.CreateBankAccountMappingRequest,
+ operations.CreateBankAccountMappingRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankFeedAccountMappingResponse]:
+ r"""Create bank feed account mapping
+
+ The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account).
+
+ A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform).
+
+ To find valid target account options, first call list bank feed account mappings.
+
+ This endpoint is only needed if building an account management UI.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(
+ request, operations.CreateBankAccountMappingRequest
+ )
+ request = cast(operations.CreateBankAccountMappingRequest, request)
+
+ req = self.build_request_async(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.bank_feed_account_mapping,
+ False,
+ True,
+ "json",
+ Optional[shared.BankFeedAccountMapping],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="create-bank-account-mapping",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.BankFeedAccountMappingResponse]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def get(
+ self,
+ *,
+ request: Union[
+ operations.GetBankAccountMappingRequest,
+ operations.GetBankAccountMappingRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankFeedMapping]:
+ r"""List bank feed account mappings
+
+ The *List bank account mappings* endpoint returns information about a source bank account and any current or potential target mapping accounts.
+
+ A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform).
+
+ This endpoint is only needed if building an account management UI.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetBankAccountMappingRequest)
+ request = cast(operations.GetBankAccountMappingRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="get-bank-account-mapping",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.BankFeedMapping])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def get_async(
+ self,
+ *,
+ request: Union[
+ operations.GetBankAccountMappingRequest,
+ operations.GetBankAccountMappingRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankFeedMapping]:
+ r"""List bank feed account mappings
+
+ The *List bank account mappings* endpoint returns information about a source bank account and any current or potential target mapping accounts.
+
+ A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform).
+
+ This endpoint is only needed if building an account management UI.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetBankAccountMappingRequest)
+ request = cast(operations.GetBankAccountMappingRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="get-bank-account-mapping",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.BankFeedMapping])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/bank_accounts.py b/bank-feeds/src/codat_bankfeeds/bank_accounts.py
new file mode 100644
index 000000000..9ff0cc6cf
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/bank_accounts.py
@@ -0,0 +1,702 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import HookContext
+from codat_bankfeeds.models import errors, operations, shared
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+from typing import Any, Optional, Union, cast
+
+
+class BankAccounts(BaseSDK):
+ r"""Access bank accounts in an SMBs accounting software."""
+
+ def create(
+ self,
+ *,
+ request: Union[
+ operations.CreateBankAccountRequest,
+ operations.CreateBankAccountRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankAccountCreateResponse]:
+ r"""Create bank account
+
+ The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.
+
+ [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
+
+ **Integration-specific behaviour**
+
+ Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/bank-feeds-api#/operations/get-create-update-bankAccounts-model).
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.CreateBankAccountRequest)
+ request = cast(operations.CreateBankAccountRequest, request)
+
+ req = self.build_request(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/push/bankAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.bank_account_prototype,
+ False,
+ True,
+ "json",
+ Optional[shared.BankAccountPrototype],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="create-bank-account",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.BankAccountCreateResponse]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def create_async(
+ self,
+ *,
+ request: Union[
+ operations.CreateBankAccountRequest,
+ operations.CreateBankAccountRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankAccountCreateResponse]:
+ r"""Create bank account
+
+ The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.
+
+ [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
+
+ **Integration-specific behaviour**
+
+ Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/bank-feeds-api#/operations/get-create-update-bankAccounts-model).
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.CreateBankAccountRequest)
+ request = cast(operations.CreateBankAccountRequest, request)
+
+ req = self.build_request_async(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/push/bankAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.bank_account_prototype,
+ False,
+ True,
+ "json",
+ Optional[shared.BankAccountPrototype],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="create-bank-account",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.BankAccountCreateResponse]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def get_create_model(
+ self,
+ *,
+ request: Union[
+ operations.GetCreateBankAccountsModelRequest,
+ operations.GetCreateBankAccountsModelRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.PushOption]:
+ r"""Get create/update bank account model
+
+ The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company and integration.
+
+ [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
+
+ **Integration-specific behaviour**
+
+ See the *response examples* for integration-specific indicative models.
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(
+ request, operations.GetCreateBankAccountsModelRequest
+ )
+ request = cast(operations.GetCreateBankAccountsModelRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/options/bankAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="get-create-bankAccounts-model",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.PushOption])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def get_create_model_async(
+ self,
+ *,
+ request: Union[
+ operations.GetCreateBankAccountsModelRequest,
+ operations.GetCreateBankAccountsModelRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.PushOption]:
+ r"""Get create/update bank account model
+
+ The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company and integration.
+
+ [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
+
+ **Integration-specific behaviour**
+
+ See the *response examples* for integration-specific indicative models.
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(
+ request, operations.GetCreateBankAccountsModelRequest
+ )
+ request = cast(operations.GetCreateBankAccountsModelRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/options/bankAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="get-create-bankAccounts-model",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.PushOption])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def list(
+ self,
+ *,
+ request: Union[
+ operations.ListBankAccountsRequest,
+ operations.ListBankAccountsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankAccounts]:
+ r"""List bank accounts
+
+ The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.
+
+ [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
+
+ Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/bank-feeds-api#/operations/refresh-company-data).
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListBankAccountsRequest)
+ request = cast(operations.ListBankAccountsRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/data/bankAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="list-bank-accounts",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "409",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.BankAccounts])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "409", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def list_async(
+ self,
+ *,
+ request: Union[
+ operations.ListBankAccountsRequest,
+ operations.ListBankAccountsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankAccounts]:
+ r"""List bank accounts
+
+ The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.
+
+ [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
+
+ Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/bank-feeds-api#/operations/refresh-company-data).
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListBankAccountsRequest)
+ request = cast(operations.ListBankAccountsRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/data/bankAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="list-bank-accounts",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "409",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.BankAccounts])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "409", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/basesdk.py b/bank-feeds/src/codat_bankfeeds/basesdk.py
new file mode 100644
index 000000000..f268f629c
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/basesdk.py
@@ -0,0 +1,339 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .sdkconfiguration import SDKConfiguration
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import (
+ AfterErrorContext,
+ AfterSuccessContext,
+ BeforeRequestContext,
+)
+from codat_bankfeeds.models import errors
+from codat_bankfeeds.utils import RetryConfig, SerializedRequestBody, get_body_content
+import httpx
+from typing import Callable, List, Optional, Tuple
+
+
+class BaseSDK:
+ sdk_configuration: SDKConfiguration
+
+ def __init__(self, sdk_config: SDKConfiguration) -> None:
+ self.sdk_configuration = sdk_config
+
+ def get_url(self, base_url, url_variables):
+ sdk_url, sdk_variables = self.sdk_configuration.get_server_details()
+
+ if base_url is None:
+ base_url = sdk_url
+
+ if url_variables is None:
+ url_variables = sdk_variables
+
+ return utils.template_url(base_url, url_variables)
+
+ def build_request_async(
+ self,
+ method,
+ path,
+ base_url,
+ url_variables,
+ request,
+ request_body_required,
+ request_has_path_params,
+ request_has_query_params,
+ user_agent_header,
+ accept_header_value,
+ _globals=None,
+ security=None,
+ timeout_ms: Optional[int] = None,
+ get_serialized_body: Optional[
+ Callable[[], Optional[SerializedRequestBody]]
+ ] = None,
+ url_override: Optional[str] = None,
+ ) -> httpx.Request:
+ client = self.sdk_configuration.async_client
+ return self.build_request_with_client(
+ client,
+ method,
+ path,
+ base_url,
+ url_variables,
+ request,
+ request_body_required,
+ request_has_path_params,
+ request_has_query_params,
+ user_agent_header,
+ accept_header_value,
+ _globals,
+ security,
+ timeout_ms,
+ get_serialized_body,
+ url_override,
+ )
+
+ def build_request(
+ self,
+ method,
+ path,
+ base_url,
+ url_variables,
+ request,
+ request_body_required,
+ request_has_path_params,
+ request_has_query_params,
+ user_agent_header,
+ accept_header_value,
+ _globals=None,
+ security=None,
+ timeout_ms: Optional[int] = None,
+ get_serialized_body: Optional[
+ Callable[[], Optional[SerializedRequestBody]]
+ ] = None,
+ url_override: Optional[str] = None,
+ ) -> httpx.Request:
+ client = self.sdk_configuration.client
+ return self.build_request_with_client(
+ client,
+ method,
+ path,
+ base_url,
+ url_variables,
+ request,
+ request_body_required,
+ request_has_path_params,
+ request_has_query_params,
+ user_agent_header,
+ accept_header_value,
+ _globals,
+ security,
+ timeout_ms,
+ get_serialized_body,
+ url_override,
+ )
+
+ def build_request_with_client(
+ self,
+ client,
+ method,
+ path,
+ base_url,
+ url_variables,
+ request,
+ request_body_required,
+ request_has_path_params,
+ request_has_query_params,
+ user_agent_header,
+ accept_header_value,
+ _globals=None,
+ security=None,
+ timeout_ms: Optional[int] = None,
+ get_serialized_body: Optional[
+ Callable[[], Optional[SerializedRequestBody]]
+ ] = None,
+ url_override: Optional[str] = None,
+ ) -> httpx.Request:
+ query_params = {}
+
+ url = url_override
+ if url is None:
+ url = utils.generate_url(
+ self.get_url(base_url, url_variables),
+ path,
+ request if request_has_path_params else None,
+ _globals if request_has_path_params else None,
+ )
+
+ query_params = utils.get_query_params(
+ request if request_has_query_params else None,
+ _globals if request_has_query_params else None,
+ )
+
+ headers = utils.get_headers(request, _globals)
+ headers["Accept"] = accept_header_value
+ headers[user_agent_header] = self.sdk_configuration.user_agent
+
+ if security is not None:
+ if callable(security):
+ security = security()
+
+ if security is not None:
+ security_headers, security_query_params = utils.get_security(security)
+ headers = {**headers, **security_headers}
+ query_params = {**query_params, **security_query_params}
+
+ serialized_request_body = SerializedRequestBody("application/octet-stream")
+ if get_serialized_body is not None:
+ rb = get_serialized_body()
+ if request_body_required and rb is None:
+ raise ValueError("request body is required")
+
+ if rb is not None:
+ serialized_request_body = rb
+
+ if (
+ serialized_request_body.media_type is not None
+ and serialized_request_body.media_type
+ not in (
+ "multipart/form-data",
+ "multipart/mixed",
+ )
+ ):
+ headers["content-type"] = serialized_request_body.media_type
+
+ timeout = timeout_ms / 1000 if timeout_ms is not None else None
+
+ return client.build_request(
+ method,
+ url,
+ params=query_params,
+ content=serialized_request_body.content,
+ data=serialized_request_body.data,
+ files=serialized_request_body.files,
+ headers=headers,
+ timeout=timeout,
+ )
+
+ def do_request(
+ self,
+ hook_ctx,
+ request,
+ error_status_codes,
+ stream=False,
+ retry_config: Optional[Tuple[RetryConfig, List[str]]] = None,
+ ) -> httpx.Response:
+ client = self.sdk_configuration.client
+ logger = self.sdk_configuration.debug_logger
+
+ def do():
+ http_res = None
+ try:
+ req = self.sdk_configuration.get_hooks().before_request(
+ BeforeRequestContext(hook_ctx), request
+ )
+ logger.debug(
+ "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
+ req.method,
+ req.url,
+ req.headers,
+ get_body_content(req),
+ )
+ http_res = client.send(req, stream=stream)
+ except Exception as e:
+ _, e = self.sdk_configuration.get_hooks().after_error(
+ AfterErrorContext(hook_ctx), None, e
+ )
+ if e is not None:
+ logger.debug("Request Exception", exc_info=True)
+ raise e
+
+ if http_res is None:
+ logger.debug("Raising no response SDK error")
+ raise errors.SDKError("No response received")
+
+ logger.debug(
+ "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s",
+ http_res.status_code,
+ http_res.url,
+ http_res.headers,
+ "" if stream else http_res.text,
+ )
+
+ if utils.match_status_codes(error_status_codes, http_res.status_code):
+ result, err = self.sdk_configuration.get_hooks().after_error(
+ AfterErrorContext(hook_ctx), http_res, None
+ )
+ if err is not None:
+ logger.debug("Request Exception", exc_info=True)
+ raise err
+ if result is not None:
+ http_res = result
+ else:
+ logger.debug("Raising unexpected SDK error")
+ raise errors.SDKError("Unexpected error occurred")
+
+ return http_res
+
+ if retry_config is not None:
+ http_res = utils.retry(do, utils.Retries(retry_config[0], retry_config[1]))
+ else:
+ http_res = do()
+
+ if not utils.match_status_codes(error_status_codes, http_res.status_code):
+ http_res = self.sdk_configuration.get_hooks().after_success(
+ AfterSuccessContext(hook_ctx), http_res
+ )
+
+ return http_res
+
+ async def do_request_async(
+ self,
+ hook_ctx,
+ request,
+ error_status_codes,
+ stream=False,
+ retry_config: Optional[Tuple[RetryConfig, List[str]]] = None,
+ ) -> httpx.Response:
+ client = self.sdk_configuration.async_client
+ logger = self.sdk_configuration.debug_logger
+
+ async def do():
+ http_res = None
+ try:
+ req = self.sdk_configuration.get_hooks().before_request(
+ BeforeRequestContext(hook_ctx), request
+ )
+ logger.debug(
+ "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
+ req.method,
+ req.url,
+ req.headers,
+ get_body_content(req),
+ )
+ http_res = await client.send(req, stream=stream)
+ except Exception as e:
+ _, e = self.sdk_configuration.get_hooks().after_error(
+ AfterErrorContext(hook_ctx), None, e
+ )
+ if e is not None:
+ logger.debug("Request Exception", exc_info=True)
+ raise e
+
+ if http_res is None:
+ logger.debug("Raising no response SDK error")
+ raise errors.SDKError("No response received")
+
+ logger.debug(
+ "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s",
+ http_res.status_code,
+ http_res.url,
+ http_res.headers,
+ "" if stream else http_res.text,
+ )
+
+ if utils.match_status_codes(error_status_codes, http_res.status_code):
+ result, err = self.sdk_configuration.get_hooks().after_error(
+ AfterErrorContext(hook_ctx), http_res, None
+ )
+ if err is not None:
+ logger.debug("Request Exception", exc_info=True)
+ raise err
+ if result is not None:
+ http_res = result
+ else:
+ logger.debug("Raising unexpected SDK error")
+ raise errors.SDKError("Unexpected error occurred")
+
+ return http_res
+
+ if retry_config is not None:
+ http_res = await utils.retry_async(
+ do, utils.Retries(retry_config[0], retry_config[1])
+ )
+ else:
+ http_res = await do()
+
+ if not utils.match_status_codes(error_status_codes, http_res.status_code):
+ http_res = self.sdk_configuration.get_hooks().after_success(
+ AfterSuccessContext(hook_ctx), http_res
+ )
+
+ return http_res
diff --git a/bank-feeds/src/codat_bankfeeds/companies.py b/bank-feeds/src/codat_bankfeeds/companies.py
new file mode 100644
index 000000000..ad8db4e06
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/companies.py
@@ -0,0 +1,1094 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import HookContext
+from codat_bankfeeds.models import errors, operations, shared
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+from typing import Any, Optional, Union, cast
+
+
+class Companies(BaseSDK):
+ r"""Create and manage your SMB users' companies."""
+
+ def create(
+ self,
+ *,
+ request: Optional[
+ Union[shared.CompanyRequestBody, shared.CompanyRequestBodyTypedDict]
+ ] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Company]:
+ r"""Create company
+
+ Use the *Create company* endpoint to create a new [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) that represents your customer in Codat.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+ If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel) and request is not None:
+ request = utils.unmarshal(request, shared.CompanyRequestBody)
+ request = cast(shared.CompanyRequestBody, request)
+
+ req = self.build_request(
+ method="POST",
+ path="/companies",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request, False, True, "json", Optional[shared.CompanyRequestBody]
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="create-company",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Company])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def create_async(
+ self,
+ *,
+ request: Optional[
+ Union[shared.CompanyRequestBody, shared.CompanyRequestBodyTypedDict]
+ ] = None,
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Company]:
+ r"""Create company
+
+ Use the *Create company* endpoint to create a new [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) that represents your customer in Codat.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+ If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel) and request is not None:
+ request = utils.unmarshal(request, shared.CompanyRequestBody)
+ request = cast(shared.CompanyRequestBody, request)
+
+ req = self.build_request_async(
+ method="POST",
+ path="/companies",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request, False, True, "json", Optional[shared.CompanyRequestBody]
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="create-company",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Company])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def delete(
+ self,
+ *,
+ request: Union[
+ operations.DeleteCompanyRequest, operations.DeleteCompanyRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ):
+ r"""Delete a company
+
+ The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/bank-feeds-api#/schemas/Company), its [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) and any cached data. This operation is irreversible.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.DeleteCompanyRequest)
+ request = cast(operations.DeleteCompanyRequest, request)
+
+ req = self.build_request(
+ method="DELETE",
+ path="/companies/{companyId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="delete-company",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "204", "*"):
+ return
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def delete_async(
+ self,
+ *,
+ request: Union[
+ operations.DeleteCompanyRequest, operations.DeleteCompanyRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ):
+ r"""Delete a company
+
+ The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/bank-feeds-api#/schemas/Company), its [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) and any cached data. This operation is irreversible.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.DeleteCompanyRequest)
+ request = cast(operations.DeleteCompanyRequest, request)
+
+ req = self.build_request_async(
+ method="DELETE",
+ path="/companies/{companyId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="delete-company",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "204", "*"):
+ return
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def get(
+ self,
+ *,
+ request: Union[
+ operations.GetCompanyRequest, operations.GetCompanyRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Company]:
+ r"""Get company
+
+ The *Get company* endpoint returns a single company for a given `companyId`.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetCompanyRequest)
+ request = cast(operations.GetCompanyRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="get-company",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Company])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def get_async(
+ self,
+ *,
+ request: Union[
+ operations.GetCompanyRequest, operations.GetCompanyRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Company]:
+ r"""Get company
+
+ The *Get company* endpoint returns a single company for a given `companyId`.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetCompanyRequest)
+ request = cast(operations.GetCompanyRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="get-company",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Company])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def list(
+ self,
+ *,
+ request: Union[
+ operations.ListCompaniesRequest, operations.ListCompaniesRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Companies]:
+ r"""List companies
+
+ The *List companies* endpoint returns a list of [companies] associated to your instances.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListCompaniesRequest)
+ request = cast(operations.ListCompaniesRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="list-companies",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Companies])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def list_async(
+ self,
+ *,
+ request: Union[
+ operations.ListCompaniesRequest, operations.ListCompaniesRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Companies]:
+ r"""List companies
+
+ The *List companies* endpoint returns a list of [companies] associated to your instances.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListCompaniesRequest)
+ request = cast(operations.ListCompaniesRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=False,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="list-companies",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Companies])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def update(
+ self,
+ *,
+ request: Union[
+ operations.UpdateCompanyRequest, operations.UpdateCompanyRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Company]:
+ r"""Update company
+
+ Use the *Update company* endpoint to update both the name and description of the company.
+ If you use [groups](https://docs.codat.io/bank-feeds-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/bank-feeds-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/bank-feeds-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.UpdateCompanyRequest)
+ request = cast(operations.UpdateCompanyRequest, request)
+
+ req = self.build_request(
+ method="PUT",
+ path="/companies/{companyId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.company_request_body,
+ False,
+ True,
+ "json",
+ Optional[shared.CompanyRequestBody],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="update-company",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Company])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def update_async(
+ self,
+ *,
+ request: Union[
+ operations.UpdateCompanyRequest, operations.UpdateCompanyRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Company]:
+ r"""Update company
+
+ Use the *Update company* endpoint to update both the name and description of the company.
+ If you use [groups](https://docs.codat.io/bank-feeds-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/bank-feeds-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/bank-feeds-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group.
+
+ A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
+ Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.UpdateCompanyRequest)
+ request = cast(operations.UpdateCompanyRequest, request)
+
+ req = self.build_request_async(
+ method="PUT",
+ path="/companies/{companyId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.company_request_body,
+ False,
+ True,
+ "json",
+ Optional[shared.CompanyRequestBody],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="update-company",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Company])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/company_information.py b/bank-feeds/src/codat_bankfeeds/company_information.py
new file mode 100644
index 000000000..8ad96a8be
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/company_information.py
@@ -0,0 +1,228 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import HookContext
+from codat_bankfeeds.models import errors, operations, shared
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+from typing import Any, Optional, Union, cast
+
+
+class CompanyInformation(BaseSDK):
+ r"""Get detailed information about a company from the underlying accounting software."""
+
+ def get(
+ self,
+ *,
+ request: Union[
+ operations.GetCompanyInformationRequest,
+ operations.GetCompanyInformationRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.CompanyInformation]:
+ r"""Get company information
+
+ Use the *Get company information* endpoint to return information about the company available from the underlying accounting software.
+
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetCompanyInformationRequest)
+ request = cast(operations.GetCompanyInformationRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/bankFeeds/info",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="get-company-information",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.CompanyInformation]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def get_async(
+ self,
+ *,
+ request: Union[
+ operations.GetCompanyInformationRequest,
+ operations.GetCompanyInformationRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.CompanyInformation]:
+ r"""Get company information
+
+ Use the *Get company information* endpoint to return information about the company available from the underlying accounting software.
+
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetCompanyInformationRequest)
+ request = cast(operations.GetCompanyInformationRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/bankFeeds/info",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="get-company-information",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.CompanyInformation]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/configuration.py b/bank-feeds/src/codat_bankfeeds/configuration.py
new file mode 100644
index 000000000..b8f04d6f5
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/configuration.py
@@ -0,0 +1,438 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import HookContext
+from codat_bankfeeds.models import errors, operations, shared
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+from typing import Any, Optional, Union, cast
+
+
+class Configuration(BaseSDK):
+ r"""Configure bank feeds for a company."""
+
+ def get(
+ self,
+ *,
+ request: Union[
+ operations.GetConfigurationRequest,
+ operations.GetConfigurationRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Configuration]:
+ r"""Get configuration
+
+ The *Get configuration* endpoint returns the current configuration for a given company ID.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetConfigurationRequest)
+ request = cast(operations.GetConfigurationRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/sync/banking/config",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="get-configuration",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Configuration])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def get_async(
+ self,
+ *,
+ request: Union[
+ operations.GetConfigurationRequest,
+ operations.GetConfigurationRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Configuration]:
+ r"""Get configuration
+
+ The *Get configuration* endpoint returns the current configuration for a given company ID.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetConfigurationRequest)
+ request = cast(operations.GetConfigurationRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/sync/banking/config",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="get-configuration",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Configuration])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def set(
+ self,
+ *,
+ request: Union[
+ operations.SetConfigurationRequest,
+ operations.SetConfigurationRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Configuration]:
+ r"""Set configuration
+
+ Use *Set configuration* endpoint to configure a given company ID.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.SetConfigurationRequest)
+ request = cast(operations.SetConfigurationRequest, request)
+
+ req = self.build_request(
+ method="POST",
+ path="/companies/{companyId}/sync/banking/config",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.configuration,
+ False,
+ True,
+ "json",
+ Optional[shared.Configuration],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="set-configuration",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Configuration])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def set_async(
+ self,
+ *,
+ request: Union[
+ operations.SetConfigurationRequest,
+ operations.SetConfigurationRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Configuration]:
+ r"""Set configuration
+
+ Use *Set configuration* endpoint to configure a given company ID.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.SetConfigurationRequest)
+ request = cast(operations.SetConfigurationRequest, request)
+
+ req = self.build_request_async(
+ method="POST",
+ path="/companies/{companyId}/sync/banking/config",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.configuration,
+ False,
+ True,
+ "json",
+ Optional[shared.Configuration],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="set-configuration",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Configuration])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/connections.py b/bank-feeds/src/codat_bankfeeds/connections.py
new file mode 100644
index 000000000..d8ab0a948
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/connections.py
@@ -0,0 +1,1076 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import HookContext
+from codat_bankfeeds.models import errors, operations, shared
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+from typing import Any, Optional, Union, cast
+
+
+class Connections(BaseSDK):
+ r"""Create new and manage existing data connections for a company."""
+
+ def create(
+ self,
+ *,
+ request: Union[
+ operations.CreateConnectionRequest,
+ operations.CreateConnectionRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Connection]:
+ r"""Create connection
+
+ Creates a connection for the company by providing a valid `platformKey`.
+
+ Use the [List Integrations](https://docs.codat.io/bank-feeds-api#/operations/list-integrations) endpoint to access valid platform keys.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.CreateConnectionRequest)
+ request = cast(operations.CreateConnectionRequest, request)
+
+ req = self.build_request(
+ method="POST",
+ path="/companies/{companyId}/connections",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ True,
+ "json",
+ Optional[operations.CreateConnectionRequestBody],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="create-connection",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def create_async(
+ self,
+ *,
+ request: Union[
+ operations.CreateConnectionRequest,
+ operations.CreateConnectionRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Connection]:
+ r"""Create connection
+
+ Creates a connection for the company by providing a valid `platformKey`.
+
+ Use the [List Integrations](https://docs.codat.io/bank-feeds-api#/operations/list-integrations) endpoint to access valid platform keys.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.CreateConnectionRequest)
+ request = cast(operations.CreateConnectionRequest, request)
+
+ req = self.build_request_async(
+ method="POST",
+ path="/companies/{companyId}/connections",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ True,
+ "json",
+ Optional[operations.CreateConnectionRequestBody],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="create-connection",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def delete(
+ self,
+ *,
+ request: Union[
+ operations.DeleteConnectionRequest,
+ operations.DeleteConnectionRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ):
+ r"""Delete connection
+
+ Revoke and remove a connection from a company.
+ This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.DeleteConnectionRequest)
+ request = cast(operations.DeleteConnectionRequest, request)
+
+ req = self.build_request(
+ method="DELETE",
+ path="/companies/{companyId}/connections/{connectionId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="delete-connection",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "*"):
+ return
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def delete_async(
+ self,
+ *,
+ request: Union[
+ operations.DeleteConnectionRequest,
+ operations.DeleteConnectionRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ):
+ r"""Delete connection
+
+ Revoke and remove a connection from a company.
+ This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.DeleteConnectionRequest)
+ request = cast(operations.DeleteConnectionRequest, request)
+
+ req = self.build_request_async(
+ method="DELETE",
+ path="/companies/{companyId}/connections/{connectionId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="delete-connection",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "*"):
+ return
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def get(
+ self,
+ *,
+ request: Union[
+ operations.GetConnectionRequest, operations.GetConnectionRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Connection]:
+ r"""Get connection
+
+ Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetConnectionRequest)
+ request = cast(operations.GetConnectionRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="get-connection",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def get_async(
+ self,
+ *,
+ request: Union[
+ operations.GetConnectionRequest, operations.GetConnectionRequestTypedDict
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Connection]:
+ r"""Get connection
+
+ Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetConnectionRequest)
+ request = cast(operations.GetConnectionRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="get-connection",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def list(
+ self,
+ *,
+ request: Union[
+ operations.ListConnectionsRequest,
+ operations.ListConnectionsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Connections]:
+ r"""List connections
+
+ List the connections for a company.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListConnectionsRequest)
+ request = cast(operations.ListConnectionsRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/connections",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="list-connections",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Connections])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def list_async(
+ self,
+ *,
+ request: Union[
+ operations.ListConnectionsRequest,
+ operations.ListConnectionsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Connections]:
+ r"""List connections
+
+ List the connections for a company.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListConnectionsRequest)
+ request = cast(operations.ListConnectionsRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/connections",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="list-connections",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Connections])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def unlink(
+ self,
+ *,
+ request: Union[
+ operations.UnlinkConnectionRequest,
+ operations.UnlinkConnectionRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Connection]:
+ r"""Unlink connection
+
+ This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.UnlinkConnectionRequest)
+ request = cast(operations.UnlinkConnectionRequest, request)
+
+ req = self.build_request(
+ method="PATCH",
+ path="/companies/{companyId}/connections/{connectionId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ True,
+ "json",
+ Optional[operations.UnlinkConnectionUpdateConnection],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="unlink-connection",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def unlink_async(
+ self,
+ *,
+ request: Union[
+ operations.UnlinkConnectionRequest,
+ operations.UnlinkConnectionRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.Connection]:
+ r"""Unlink connection
+
+ This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.UnlinkConnectionRequest)
+ request = cast(operations.UnlinkConnectionRequest, request)
+
+ req = self.build_request_async(
+ method="PATCH",
+ path="/companies/{companyId}/connections/{connectionId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ True,
+ "json",
+ Optional[operations.UnlinkConnectionUpdateConnection],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="unlink-connection",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.Connection])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/httpclient.py b/bank-feeds/src/codat_bankfeeds/httpclient.py
new file mode 100644
index 000000000..36b642a0e
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/httpclient.py
@@ -0,0 +1,78 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+# pyright: reportReturnType = false
+from typing_extensions import Protocol, runtime_checkable
+import httpx
+from typing import Any, Optional, Union
+
+
+@runtime_checkable
+class HttpClient(Protocol):
+ def send(
+ self,
+ request: httpx.Request,
+ *,
+ stream: bool = False,
+ auth: Union[
+ httpx._types.AuthTypes, httpx._client.UseClientDefault, None
+ ] = httpx.USE_CLIENT_DEFAULT,
+ follow_redirects: Union[
+ bool, httpx._client.UseClientDefault
+ ] = httpx.USE_CLIENT_DEFAULT,
+ ) -> httpx.Response:
+ pass
+
+ def build_request(
+ self,
+ method: str,
+ url: httpx._types.URLTypes,
+ *,
+ content: Optional[httpx._types.RequestContent] = None,
+ data: Optional[httpx._types.RequestData] = None,
+ files: Optional[httpx._types.RequestFiles] = None,
+ json: Optional[Any] = None,
+ params: Optional[httpx._types.QueryParamTypes] = None,
+ headers: Optional[httpx._types.HeaderTypes] = None,
+ cookies: Optional[httpx._types.CookieTypes] = None,
+ timeout: Union[
+ httpx._types.TimeoutTypes, httpx._client.UseClientDefault
+ ] = httpx.USE_CLIENT_DEFAULT,
+ extensions: Optional[httpx._types.RequestExtensions] = None,
+ ) -> httpx.Request:
+ pass
+
+
+@runtime_checkable
+class AsyncHttpClient(Protocol):
+ async def send(
+ self,
+ request: httpx.Request,
+ *,
+ stream: bool = False,
+ auth: Union[
+ httpx._types.AuthTypes, httpx._client.UseClientDefault, None
+ ] = httpx.USE_CLIENT_DEFAULT,
+ follow_redirects: Union[
+ bool, httpx._client.UseClientDefault
+ ] = httpx.USE_CLIENT_DEFAULT,
+ ) -> httpx.Response:
+ pass
+
+ def build_request(
+ self,
+ method: str,
+ url: httpx._types.URLTypes,
+ *,
+ content: Optional[httpx._types.RequestContent] = None,
+ data: Optional[httpx._types.RequestData] = None,
+ files: Optional[httpx._types.RequestFiles] = None,
+ json: Optional[Any] = None,
+ params: Optional[httpx._types.QueryParamTypes] = None,
+ headers: Optional[httpx._types.HeaderTypes] = None,
+ cookies: Optional[httpx._types.CookieTypes] = None,
+ timeout: Union[
+ httpx._types.TimeoutTypes, httpx._client.UseClientDefault
+ ] = httpx.USE_CLIENT_DEFAULT,
+ extensions: Optional[httpx._types.RequestExtensions] = None,
+ ) -> httpx.Request:
+ pass
diff --git a/bank-feeds/src/codat_bankfeeds/models/errors/__init__.py b/bank-feeds/src/codat_bankfeeds/models/errors/__init__.py
new file mode 100644
index 000000000..f056b05a6
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/errors/__init__.py
@@ -0,0 +1,6 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .errormessage import ErrorMessage, ErrorMessageData
+from .sdkerror import SDKError
+
+__all__ = ["ErrorMessage", "ErrorMessageData", "SDKError"]
diff --git a/bank-feeds/src/codat_bankfeeds/models/errors/errormessage.py b/bank-feeds/src/codat_bankfeeds/models/errors/errormessage.py
new file mode 100644
index 000000000..4fabfed4b
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/errors/errormessage.py
@@ -0,0 +1,50 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds import utils
+from codat_bankfeeds.models.shared import errorvalidation as shared_errorvalidation
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated
+
+
+class ErrorMessageData(BaseModel):
+ can_be_retried: Annotated[Optional[str], pydantic.Field(alias="canBeRetried")] = (
+ None
+ )
+ r"""`True` if the error occurred transiently and can be retried."""
+
+ correlation_id: Annotated[Optional[str], pydantic.Field(alias="correlationId")] = (
+ None
+ )
+ r"""Unique identifier used to propagate to all downstream services and determine the source of the error."""
+
+ detailed_error_code: Annotated[
+ Optional[int], pydantic.Field(alias="detailedErrorCode")
+ ] = None
+ r"""Machine readable error code used to automate processes based on the code returned."""
+
+ error: Optional[str] = None
+ r"""A brief description of the error."""
+
+ service: Optional[str] = None
+ r"""Codat's service the returned the error."""
+
+ status_code: Annotated[Optional[int], pydantic.Field(alias="statusCode")] = None
+ r"""The HTTP status code returned by the error."""
+
+ validation: OptionalNullable[shared_errorvalidation.ErrorValidation] = UNSET
+ r"""A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here."""
+
+
+class ErrorMessage(Exception):
+ r"""The request made is not valid."""
+
+ data: ErrorMessageData
+
+ def __init__(self, data: ErrorMessageData):
+ self.data = data
+
+ def __str__(self) -> str:
+ return utils.marshal_json(self.data, ErrorMessageData)
diff --git a/bank-feeds/src/codat_bankfeeds/models/errors/sdkerror.py b/bank-feeds/src/codat_bankfeeds/models/errors/sdkerror.py
new file mode 100644
index 000000000..03216cbf5
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/errors/sdkerror.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from dataclasses import dataclass
+from typing import Optional
+import httpx
+
+
+@dataclass
+class SDKError(Exception):
+ """Represents an error returned by the API."""
+
+ message: str
+ status_code: int = -1
+ body: str = ""
+ raw_response: Optional[httpx.Response] = None
+
+ def __str__(self):
+ body = ""
+ if len(self.body) > 0:
+ body = f"\n{self.body}"
+
+ return f"{self.message}: Status {self.status_code}{body}"
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/__init__.py b/bank-feeds/src/codat_bankfeeds/models/operations/__init__.py
new file mode 100644
index 000000000..2689d53ba
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/__init__.py
@@ -0,0 +1,160 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .create_bank_account import (
+ CreateBankAccountRequest,
+ CreateBankAccountRequestTypedDict,
+)
+from .create_bank_account_mapping import (
+ CreateBankAccountMappingRequest,
+ CreateBankAccountMappingRequestTypedDict,
+)
+from .create_bank_transactions import (
+ CreateBankTransactionsRequest,
+ CreateBankTransactionsRequestTypedDict,
+)
+from .create_connection import (
+ CreateConnectionRequest,
+ CreateConnectionRequestBody,
+ CreateConnectionRequestBodyTypedDict,
+ CreateConnectionRequestTypedDict,
+)
+from .create_source_account import (
+ CreateSourceAccountRequest,
+ CreateSourceAccountRequestBody,
+ CreateSourceAccountRequestBodyTypedDict,
+ CreateSourceAccountRequestTypedDict,
+ CreateSourceAccountResponseBody,
+ CreateSourceAccountResponseBodyTypedDict,
+)
+from .delete_bank_feed_credentials import (
+ DeleteBankFeedCredentialsRequest,
+ DeleteBankFeedCredentialsRequestTypedDict,
+)
+from .delete_company import DeleteCompanyRequest, DeleteCompanyRequestTypedDict
+from .delete_connection import DeleteConnectionRequest, DeleteConnectionRequestTypedDict
+from .delete_source_account import (
+ DeleteSourceAccountRequest,
+ DeleteSourceAccountRequestTypedDict,
+)
+from .generate_credentials import (
+ GenerateCredentialsRequest,
+ GenerateCredentialsRequestTypedDict,
+)
+from .get_bank_account_mapping import (
+ GetBankAccountMappingRequest,
+ GetBankAccountMappingRequestTypedDict,
+)
+from .get_company import GetCompanyRequest, GetCompanyRequestTypedDict
+from .get_company_information import (
+ GetCompanyInformationRequest,
+ GetCompanyInformationRequestTypedDict,
+)
+from .get_configuration import GetConfigurationRequest, GetConfigurationRequestTypedDict
+from .get_connection import GetConnectionRequest, GetConnectionRequestTypedDict
+from .get_create_bankaccounts_model import (
+ GetCreateBankAccountsModelRequest,
+ GetCreateBankAccountsModelRequestTypedDict,
+)
+from .get_create_operation import (
+ GetCreateOperationRequest,
+ GetCreateOperationRequestTypedDict,
+)
+from .get_last_successful import (
+ GetLastSuccessfulRequest,
+ GetLastSuccessfulRequestTypedDict,
+)
+from .list_bank_accounts import (
+ ListBankAccountsRequest,
+ ListBankAccountsRequestTypedDict,
+)
+from .list_companies import ListCompaniesRequest, ListCompaniesRequestTypedDict
+from .list_connections import ListConnectionsRequest, ListConnectionsRequestTypedDict
+from .list_create_operations import (
+ ListCreateOperationsRequest,
+ ListCreateOperationsRequestTypedDict,
+)
+from .list_source_accounts import (
+ ListSourceAccountsRequest,
+ ListSourceAccountsRequestTypedDict,
+ ListSourceAccountsResponseBody,
+ ListSourceAccountsResponseBodyTypedDict,
+)
+from .set_configuration import SetConfigurationRequest, SetConfigurationRequestTypedDict
+from .unlink_connection import (
+ UnlinkConnectionRequest,
+ UnlinkConnectionRequestTypedDict,
+ UnlinkConnectionUpdateConnection,
+ UnlinkConnectionUpdateConnectionTypedDict,
+)
+from .update_company import UpdateCompanyRequest, UpdateCompanyRequestTypedDict
+from .update_source_account import (
+ UpdateSourceAccountRequest,
+ UpdateSourceAccountRequestTypedDict,
+)
+
+__all__ = [
+ "CreateBankAccountMappingRequest",
+ "CreateBankAccountMappingRequestTypedDict",
+ "CreateBankAccountRequest",
+ "CreateBankAccountRequestTypedDict",
+ "CreateBankTransactionsRequest",
+ "CreateBankTransactionsRequestTypedDict",
+ "CreateConnectionRequest",
+ "CreateConnectionRequestBody",
+ "CreateConnectionRequestBodyTypedDict",
+ "CreateConnectionRequestTypedDict",
+ "CreateSourceAccountRequest",
+ "CreateSourceAccountRequestBody",
+ "CreateSourceAccountRequestBodyTypedDict",
+ "CreateSourceAccountRequestTypedDict",
+ "CreateSourceAccountResponseBody",
+ "CreateSourceAccountResponseBodyTypedDict",
+ "DeleteBankFeedCredentialsRequest",
+ "DeleteBankFeedCredentialsRequestTypedDict",
+ "DeleteCompanyRequest",
+ "DeleteCompanyRequestTypedDict",
+ "DeleteConnectionRequest",
+ "DeleteConnectionRequestTypedDict",
+ "DeleteSourceAccountRequest",
+ "DeleteSourceAccountRequestTypedDict",
+ "GenerateCredentialsRequest",
+ "GenerateCredentialsRequestTypedDict",
+ "GetBankAccountMappingRequest",
+ "GetBankAccountMappingRequestTypedDict",
+ "GetCompanyInformationRequest",
+ "GetCompanyInformationRequestTypedDict",
+ "GetCompanyRequest",
+ "GetCompanyRequestTypedDict",
+ "GetConfigurationRequest",
+ "GetConfigurationRequestTypedDict",
+ "GetConnectionRequest",
+ "GetConnectionRequestTypedDict",
+ "GetCreateBankAccountsModelRequest",
+ "GetCreateBankAccountsModelRequestTypedDict",
+ "GetCreateOperationRequest",
+ "GetCreateOperationRequestTypedDict",
+ "GetLastSuccessfulRequest",
+ "GetLastSuccessfulRequestTypedDict",
+ "ListBankAccountsRequest",
+ "ListBankAccountsRequestTypedDict",
+ "ListCompaniesRequest",
+ "ListCompaniesRequestTypedDict",
+ "ListConnectionsRequest",
+ "ListConnectionsRequestTypedDict",
+ "ListCreateOperationsRequest",
+ "ListCreateOperationsRequestTypedDict",
+ "ListSourceAccountsRequest",
+ "ListSourceAccountsRequestTypedDict",
+ "ListSourceAccountsResponseBody",
+ "ListSourceAccountsResponseBodyTypedDict",
+ "SetConfigurationRequest",
+ "SetConfigurationRequestTypedDict",
+ "UnlinkConnectionRequest",
+ "UnlinkConnectionRequestTypedDict",
+ "UnlinkConnectionUpdateConnection",
+ "UnlinkConnectionUpdateConnectionTypedDict",
+ "UpdateCompanyRequest",
+ "UpdateCompanyRequestTypedDict",
+ "UpdateSourceAccountRequest",
+ "UpdateSourceAccountRequestTypedDict",
+]
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/create_bank_account.py b/bank-feeds/src/codat_bankfeeds/models/operations/create_bank_account.py
new file mode 100644
index 000000000..bcac1d2a1
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/create_bank_account.py
@@ -0,0 +1,56 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.models.shared import (
+ bankaccountprototype as shared_bankaccountprototype,
+)
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import (
+ FieldMetadata,
+ PathParamMetadata,
+ QueryParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class CreateBankAccountRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+ bank_account_prototype: NotRequired[
+ shared_bankaccountprototype.BankAccountPrototypeTypedDict
+ ]
+ timeout_in_minutes: NotRequired[int]
+ r"""Time limit for the push operation to complete before it is timed out."""
+
+
+class CreateBankAccountRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
+
+ bank_account_prototype: Annotated[
+ Optional[shared_bankaccountprototype.BankAccountPrototype],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ] = None
+
+ timeout_in_minutes: Annotated[
+ Optional[int],
+ pydantic.Field(alias="timeoutInMinutes"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Time limit for the push operation to complete before it is timed out."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/create_bank_account_mapping.py b/bank-feeds/src/codat_bankfeeds/models/operations/create_bank_account_mapping.py
new file mode 100644
index 000000000..91cfd1393
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/create_bank_account_mapping.py
@@ -0,0 +1,42 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.models.shared import (
+ bankfeedaccountmapping as shared_bankfeedaccountmapping,
+)
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, RequestMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class CreateBankAccountMappingRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+ bank_feed_account_mapping: NotRequired[
+ shared_bankfeedaccountmapping.BankFeedAccountMappingTypedDict
+ ]
+
+
+class CreateBankAccountMappingRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
+
+ bank_feed_account_mapping: Annotated[
+ Optional[shared_bankfeedaccountmapping.BankFeedAccountMapping],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/create_bank_transactions.py b/bank-feeds/src/codat_bankfeeds/models/operations/create_bank_transactions.py
new file mode 100644
index 000000000..95a5c4491
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/create_bank_transactions.py
@@ -0,0 +1,74 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.models.shared import (
+ createbanktransactions as shared_createbanktransactions,
+)
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import (
+ FieldMetadata,
+ PathParamMetadata,
+ QueryParamMetadata,
+ RequestMetadata,
+)
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class CreateBankTransactionsRequestTypedDict(TypedDict):
+ account_id: str
+ r"""Unique identifier for an account."""
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+ create_bank_transactions: NotRequired[
+ shared_createbanktransactions.CreateBankTransactionsTypedDict
+ ]
+ allow_sync_on_push_complete: NotRequired[bool]
+ r"""Allow a sync upon push completion."""
+ timeout_in_minutes: NotRequired[int]
+ r"""Time limit for the push operation to complete before it is timed out."""
+
+
+class CreateBankTransactionsRequest(BaseModel):
+ account_id: Annotated[
+ str,
+ pydantic.Field(alias="accountId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for an account."""
+
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
+
+ create_bank_transactions: Annotated[
+ Optional[shared_createbanktransactions.CreateBankTransactions],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ] = None
+
+ allow_sync_on_push_complete: Annotated[
+ Optional[bool],
+ pydantic.Field(alias="allowSyncOnPushComplete"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = True
+ r"""Allow a sync upon push completion."""
+
+ timeout_in_minutes: Annotated[
+ Optional[int],
+ pydantic.Field(alias="timeoutInMinutes"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Time limit for the push operation to complete before it is timed out."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/create_connection.py b/bank-feeds/src/codat_bankfeeds/models/operations/create_connection.py
new file mode 100644
index 000000000..2bca161b0
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/create_connection.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, RequestMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class CreateConnectionRequestBodyTypedDict(TypedDict):
+ platform_key: NotRequired[str]
+ r"""A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys."""
+
+
+class CreateConnectionRequestBody(BaseModel):
+ platform_key: Annotated[Optional[str], pydantic.Field(alias="platformKey")] = None
+ r"""A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys."""
+
+
+class CreateConnectionRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ request_body: NotRequired[CreateConnectionRequestBodyTypedDict]
+
+
+class CreateConnectionRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ request_body: Annotated[
+ Optional[CreateConnectionRequestBody],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/create_source_account.py b/bank-feeds/src/codat_bankfeeds/models/operations/create_source_account.py
new file mode 100644
index 000000000..91833088a
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/create_source_account.py
@@ -0,0 +1,65 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.models.shared import (
+ sourceaccount as shared_sourceaccount,
+ sourceaccountv2 as shared_sourceaccountv2,
+)
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, RequestMetadata
+import pydantic
+from typing import Optional, TypedDict, Union
+from typing_extensions import Annotated, NotRequired
+
+
+CreateSourceAccountRequestBodyTypedDict = Union[
+ shared_sourceaccount.SourceAccountTypedDict,
+ shared_sourceaccountv2.SourceAccountV2TypedDict,
+]
+
+
+CreateSourceAccountRequestBody = Union[
+ shared_sourceaccount.SourceAccount, shared_sourceaccountv2.SourceAccountV2
+]
+
+
+class CreateSourceAccountRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+ request_body: NotRequired[CreateSourceAccountRequestBodyTypedDict]
+
+
+class CreateSourceAccountRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
+
+ request_body: Annotated[
+ Optional[CreateSourceAccountRequestBody],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ] = None
+
+
+CreateSourceAccountResponseBodyTypedDict = Union[
+ shared_sourceaccount.SourceAccountTypedDict,
+ shared_sourceaccountv2.SourceAccountV2TypedDict,
+]
+r"""Success"""
+
+
+CreateSourceAccountResponseBody = Union[
+ shared_sourceaccount.SourceAccount, shared_sourceaccountv2.SourceAccountV2
+]
+r"""Success"""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/delete_bank_feed_credentials.py b/bank-feeds/src/codat_bankfeeds/models/operations/delete_bank_feed_credentials.py
new file mode 100644
index 000000000..1d09c2e4c
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/delete_bank_feed_credentials.py
@@ -0,0 +1,31 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class DeleteBankFeedCredentialsRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+
+
+class DeleteBankFeedCredentialsRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/delete_company.py b/bank-feeds/src/codat_bankfeeds/models/operations/delete_company.py
new file mode 100644
index 000000000..2f7c9cfbf
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/delete_company.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class DeleteCompanyRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+
+
+class DeleteCompanyRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/delete_connection.py b/bank-feeds/src/codat_bankfeeds/models/operations/delete_connection.py
new file mode 100644
index 000000000..cad524d52
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/delete_connection.py
@@ -0,0 +1,31 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class DeleteConnectionRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+
+
+class DeleteConnectionRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/delete_source_account.py b/bank-feeds/src/codat_bankfeeds/models/operations/delete_source_account.py
new file mode 100644
index 000000000..8c98da1f3
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/delete_source_account.py
@@ -0,0 +1,40 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class DeleteSourceAccountRequestTypedDict(TypedDict):
+ account_id: str
+ r"""Unique identifier for an account."""
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+
+
+class DeleteSourceAccountRequest(BaseModel):
+ account_id: Annotated[
+ str,
+ pydantic.Field(alias="accountId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for an account."""
+
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/generate_credentials.py b/bank-feeds/src/codat_bankfeeds/models/operations/generate_credentials.py
new file mode 100644
index 000000000..daa42cf8d
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/generate_credentials.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, RequestMetadata
+import io
+import pydantic
+from typing import IO, TypedDict, Union
+from typing_extensions import Annotated
+
+
+class GenerateCredentialsRequestTypedDict(TypedDict):
+ request_body: Union[bytes, IO[bytes], io.BufferedReader]
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+
+
+class GenerateCredentialsRequest(BaseModel):
+ request_body: Annotated[
+ Union[bytes, IO[bytes], io.BufferedReader],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ]
+
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/get_bank_account_mapping.py b/bank-feeds/src/codat_bankfeeds/models/operations/get_bank_account_mapping.py
new file mode 100644
index 000000000..2ea0895dc
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/get_bank_account_mapping.py
@@ -0,0 +1,31 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class GetBankAccountMappingRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+
+
+class GetBankAccountMappingRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/get_company.py b/bank-feeds/src/codat_bankfeeds/models/operations/get_company.py
new file mode 100644
index 000000000..6c52c6d69
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/get_company.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class GetCompanyRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+
+
+class GetCompanyRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/get_company_information.py b/bank-feeds/src/codat_bankfeeds/models/operations/get_company_information.py
new file mode 100644
index 000000000..dd67c774b
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/get_company_information.py
@@ -0,0 +1,31 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class GetCompanyInformationRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+
+
+class GetCompanyInformationRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/get_configuration.py b/bank-feeds/src/codat_bankfeeds/models/operations/get_configuration.py
new file mode 100644
index 000000000..648034072
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/get_configuration.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class GetConfigurationRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+
+
+class GetConfigurationRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/get_connection.py b/bank-feeds/src/codat_bankfeeds/models/operations/get_connection.py
new file mode 100644
index 000000000..42b33a58a
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/get_connection.py
@@ -0,0 +1,31 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class GetConnectionRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+
+
+class GetConnectionRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/get_create_bankaccounts_model.py b/bank-feeds/src/codat_bankfeeds/models/operations/get_create_bankaccounts_model.py
new file mode 100644
index 000000000..62f530987
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/get_create_bankaccounts_model.py
@@ -0,0 +1,31 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class GetCreateBankAccountsModelRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+
+
+class GetCreateBankAccountsModelRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/get_create_operation.py b/bank-feeds/src/codat_bankfeeds/models/operations/get_create_operation.py
new file mode 100644
index 000000000..6547f9df3
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/get_create_operation.py
@@ -0,0 +1,31 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class GetCreateOperationRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ push_operation_key: str
+ r"""Push operation key."""
+
+
+class GetCreateOperationRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ push_operation_key: Annotated[
+ str,
+ pydantic.Field(alias="pushOperationKey"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Push operation key."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/get_last_successful.py b/bank-feeds/src/codat_bankfeeds/models/operations/get_last_successful.py
new file mode 100644
index 000000000..5380d3e06
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/get_last_successful.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class GetLastSuccessfulRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+
+
+class GetLastSuccessfulRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/list_bank_accounts.py b/bank-feeds/src/codat_bankfeeds/models/operations/list_bank_accounts.py
new file mode 100644
index 000000000..c3758689c
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/list_bank_accounts.py
@@ -0,0 +1,65 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ListBankAccountsRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+ order_by: NotRequired[str]
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: NotRequired[int]
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: NotRequired[int]
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: NotRequired[str]
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+class ListBankAccountsRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
+
+ order_by: Annotated[
+ Optional[str],
+ pydantic.Field(alias="orderBy"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+
+ page: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 1
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+
+ page_size: Annotated[
+ Optional[int],
+ pydantic.Field(alias="pageSize"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 100
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+
+ query: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/list_companies.py b/bank-feeds/src/codat_bankfeeds/models/operations/list_companies.py
new file mode 100644
index 000000000..1c6242d3f
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/list_companies.py
@@ -0,0 +1,47 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, QueryParamMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ListCompaniesRequestTypedDict(TypedDict):
+ order_by: NotRequired[str]
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: NotRequired[int]
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: NotRequired[int]
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: NotRequired[str]
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+class ListCompaniesRequest(BaseModel):
+ order_by: Annotated[
+ Optional[str],
+ pydantic.Field(alias="orderBy"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+
+ page: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 1
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+
+ page_size: Annotated[
+ Optional[int],
+ pydantic.Field(alias="pageSize"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 100
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+
+ query: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/list_connections.py b/bank-feeds/src/codat_bankfeeds/models/operations/list_connections.py
new file mode 100644
index 000000000..8f129fb4b
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/list_connections.py
@@ -0,0 +1,56 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ListConnectionsRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ order_by: NotRequired[str]
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: NotRequired[int]
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: NotRequired[int]
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: NotRequired[str]
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+class ListConnectionsRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ order_by: Annotated[
+ Optional[str],
+ pydantic.Field(alias="orderBy"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+
+ page: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 1
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+
+ page_size: Annotated[
+ Optional[int],
+ pydantic.Field(alias="pageSize"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 100
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+
+ query: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/list_create_operations.py b/bank-feeds/src/codat_bankfeeds/models/operations/list_create_operations.py
new file mode 100644
index 000000000..80f7668cb
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/list_create_operations.py
@@ -0,0 +1,56 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ListCreateOperationsRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ order_by: NotRequired[str]
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+ page: NotRequired[int]
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ page_size: NotRequired[int]
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+ query: NotRequired[str]
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
+
+
+class ListCreateOperationsRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ order_by: Annotated[
+ Optional[str],
+ pydantic.Field(alias="orderBy"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
+
+ page: Annotated[
+ Optional[int],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 1
+ r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
+
+ page_size: Annotated[
+ Optional[int],
+ pydantic.Field(alias="pageSize"),
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = 100
+ r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
+
+ query: Annotated[
+ Optional[str],
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+ ] = None
+ r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/list_source_accounts.py b/bank-feeds/src/codat_bankfeeds/models/operations/list_source_accounts.py
new file mode 100644
index 000000000..3ea4e1988
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/list_source_accounts.py
@@ -0,0 +1,49 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.models.shared import (
+ sourceaccount as shared_sourceaccount,
+ sourceaccountv2 as shared_sourceaccountv2,
+)
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata
+import pydantic
+from typing import List, TypedDict, Union
+from typing_extensions import Annotated
+
+
+class ListSourceAccountsRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+
+
+class ListSourceAccountsRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
+
+
+ListSourceAccountsResponseBodyTypedDict = Union[
+ List[shared_sourceaccountv2.SourceAccountV2TypedDict],
+ List[shared_sourceaccount.SourceAccountTypedDict],
+]
+r"""Success"""
+
+
+ListSourceAccountsResponseBody = Union[
+ List[shared_sourceaccountv2.SourceAccountV2],
+ List[shared_sourceaccount.SourceAccount],
+]
+r"""Success"""
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/set_configuration.py b/bank-feeds/src/codat_bankfeeds/models/operations/set_configuration.py
new file mode 100644
index 000000000..2d4ff7166
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/set_configuration.py
@@ -0,0 +1,29 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.models.shared import configuration as shared_configuration
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, RequestMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class SetConfigurationRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ configuration: NotRequired[shared_configuration.ConfigurationTypedDict]
+
+
+class SetConfigurationRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ configuration: Annotated[
+ Optional[shared_configuration.Configuration],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/unlink_connection.py b/bank-feeds/src/codat_bankfeeds/models/operations/unlink_connection.py
new file mode 100644
index 000000000..700d834db
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/unlink_connection.py
@@ -0,0 +1,50 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.models.shared import (
+ dataconnectionstatus as shared_dataconnectionstatus,
+)
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, RequestMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class UnlinkConnectionUpdateConnectionTypedDict(TypedDict):
+ status: NotRequired[shared_dataconnectionstatus.DataConnectionStatus]
+ r"""The current authorization status of the data connection."""
+
+
+class UnlinkConnectionUpdateConnection(BaseModel):
+ status: Optional[shared_dataconnectionstatus.DataConnectionStatus] = None
+ r"""The current authorization status of the data connection."""
+
+
+class UnlinkConnectionRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+ request_body: NotRequired[UnlinkConnectionUpdateConnectionTypedDict]
+
+
+class UnlinkConnectionRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
+
+ request_body: Annotated[
+ Optional[UnlinkConnectionUpdateConnection],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/update_company.py b/bank-feeds/src/codat_bankfeeds/models/operations/update_company.py
new file mode 100644
index 000000000..78aba2e95
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/update_company.py
@@ -0,0 +1,33 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.models.shared import (
+ companyrequestbody as shared_companyrequestbody,
+)
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, RequestMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class UpdateCompanyRequestTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for a company."""
+ company_request_body: NotRequired[
+ shared_companyrequestbody.CompanyRequestBodyTypedDict
+ ]
+
+
+class UpdateCompanyRequest(BaseModel):
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ company_request_body: Annotated[
+ Optional[shared_companyrequestbody.CompanyRequestBody],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/operations/update_source_account.py b/bank-feeds/src/codat_bankfeeds/models/operations/update_source_account.py
new file mode 100644
index 000000000..095cf0f95
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/operations/update_source_account.py
@@ -0,0 +1,47 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.models.shared import sourceaccount as shared_sourceaccount
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, PathParamMetadata, RequestMetadata
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class UpdateSourceAccountRequestTypedDict(TypedDict):
+ account_id: str
+ r"""Unique identifier for an account."""
+ company_id: str
+ r"""Unique identifier for a company."""
+ connection_id: str
+ r"""Unique identifier for a connection."""
+ source_account: NotRequired[shared_sourceaccount.SourceAccountTypedDict]
+
+
+class UpdateSourceAccountRequest(BaseModel):
+ account_id: Annotated[
+ str,
+ pydantic.Field(alias="accountId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for an account."""
+
+ company_id: Annotated[
+ str,
+ pydantic.Field(alias="companyId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a company."""
+
+ connection_id: Annotated[
+ str,
+ pydantic.Field(alias="connectionId"),
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
+ ]
+ r"""Unique identifier for a connection."""
+
+ source_account: Annotated[
+ Optional[shared_sourceaccount.SourceAccount],
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
+ ] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/__init__.py b/bank-feeds/src/codat_bankfeeds/models/shared/__init__.py
new file mode 100644
index 000000000..fc978a2e4
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/__init__.py
@@ -0,0 +1,292 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .accountinfo import AccountInfo, AccountInfoTypedDict
+from .bankaccountcreateresponse import (
+ AccountingBankAccount,
+ AccountingBankAccountTypedDict,
+ BankAccountCreateResponse,
+ BankAccountCreateResponseBankAccountType,
+ BankAccountCreateResponseTypedDict,
+ Metadata,
+ MetadataTypedDict,
+ SupplementalData,
+ SupplementalDataTypedDict,
+)
+from .bankaccountcredentials import (
+ BankAccountCredentials,
+ BankAccountCredentialsTypedDict,
+)
+from .bankaccountoption import BankAccountOption, BankAccountOptionTypedDict
+from .bankaccountprototype import (
+ BankAccountPrototype,
+ BankAccountPrototypeTypedDict,
+ BankAccountType,
+)
+from .bankaccounts import (
+ BankAccounts,
+ BankAccountsAccountingBankAccount,
+ BankAccountsAccountingBankAccountTypedDict,
+ BankAccountsBankAccountType,
+ BankAccountsMetadata,
+ BankAccountsMetadataTypedDict,
+ BankAccountsSupplementalData,
+ BankAccountsSupplementalDataTypedDict,
+ BankAccountsTypedDict,
+)
+from .bankaccountstatus import BankAccountStatus
+from .bankfeedaccountmapping import (
+ BankFeedAccountMapping,
+ BankFeedAccountMappingTypedDict,
+)
+from .bankfeedaccountmappingresponse import (
+ BankFeedAccountMappingResponse,
+ BankFeedAccountMappingResponseTypedDict,
+)
+from .bankfeedmapping import BankFeedMapping, BankFeedMappingTypedDict
+from .banktransactions import (
+ BankTransactionType,
+ BankTransactions,
+ BankTransactionsTypedDict,
+)
+from .clientratelimitreachedwebhook import (
+ ClientRateLimitReachedWebhook,
+ ClientRateLimitReachedWebhookTypedDict,
+)
+from .clientratelimitreachedwebhookdata import (
+ ClientRateLimitReachedWebhookData,
+ ClientRateLimitReachedWebhookDataTypedDict,
+)
+from .clientratelimitresetwebhook import (
+ ClientRateLimitResetWebhook,
+ ClientRateLimitResetWebhookTypedDict,
+)
+from .clientratelimitresetwebhookdata import (
+ ClientRateLimitResetWebhookData,
+ ClientRateLimitResetWebhookDataTypedDict,
+)
+from .clientratelimitwebhook import (
+ ClientRateLimitWebhook,
+ ClientRateLimitWebhookTypedDict,
+)
+from .clientratelimitwebhookpayload import (
+ ClientRateLimitWebhookPayload,
+ ClientRateLimitWebhookPayloadTypedDict,
+)
+from .companies import Companies, CompaniesTypedDict
+from .company import Company, CompanyTypedDict, Tags, TagsTypedDict
+from .companyinformation import CompanyInformation, CompanyInformationTypedDict
+from .companyrequestbody import (
+ CompanyRequestBody,
+ CompanyRequestBodyTypedDict,
+ GroupReference,
+ GroupReferenceTypedDict,
+)
+from .companysyncstatus import CompanySyncStatus, CompanySyncStatusTypedDict
+from .configuration import Configuration, ConfigurationTypedDict
+from .configurationcontactref import (
+ ConfigurationContactRef,
+ ConfigurationContactRefTypedDict,
+)
+from .configurationcustomer import ConfigurationCustomer, ConfigurationCustomerTypedDict
+from .configurationschedule import ConfigurationSchedule, ConfigurationScheduleTypedDict
+from .configurationsupplier import ConfigurationSupplier, ConfigurationSupplierTypedDict
+from .connection import Connection, ConnectionTypedDict, SourceType
+from .connections import Connections, ConnectionsTypedDict
+from .createbanktransactions import (
+ CreateBankTransactions,
+ CreateBankTransactionsTypedDict,
+)
+from .createbanktransactionsresponse import (
+ CreateBankTransactionsResponse,
+ CreateBankTransactionsResponseTypedDict,
+)
+from .dataconnectionerror import (
+ DataConnectionError,
+ DataConnectionErrorTypedDict,
+ ErrorStatus,
+)
+from .dataconnectionstatus import DataConnectionStatus
+from .datatype import DataType
+from .errorvalidation import ErrorValidation, ErrorValidationTypedDict
+from .errorvalidationitem import ErrorValidationItem, ErrorValidationItemTypedDict
+from .halref import HalRef, HalRefTypedDict
+from .links import Links, LinksTypedDict
+from .pushchangetype import PushChangeType
+from .pushfieldvalidation import PushFieldValidation, PushFieldValidationTypedDict
+from .pushoperation import PushOperation, PushOperationTypedDict
+from .pushoperationchange import PushOperationChange, PushOperationChangeTypedDict
+from .pushoperationref import PushOperationRef, PushOperationRefTypedDict
+from .pushoperations import PushOperations, PushOperationsTypedDict
+from .pushoperationstatus import PushOperationStatus
+from .pushoption import PushOption, PushOptionTypedDict
+from .pushoptionchoice import PushOptionChoice, PushOptionChoiceTypedDict
+from .pushoptionproperty import PushOptionProperty, PushOptionPropertyTypedDict
+from .pushoptiontype import PushOptionType
+from .pushvalidationinfo import PushValidationInfo, PushValidationInfoTypedDict
+from .routinginfo import RoutingInfo, RoutingInfoTypedDict, Type
+from .security import Security, SecurityTypedDict
+from .sourceaccount import SourceAccount, SourceAccountTypedDict, Status
+from .sourceaccountv2 import (
+ AccountType,
+ SourceAccountV2,
+ SourceAccountV2Status,
+ SourceAccountV2TypedDict,
+)
+from .sourceaccountwebhook import SourceAccountWebhook, SourceAccountWebhookTypedDict
+from .sourceaccountwebhookpayload import (
+ SourceAccountWebhookPayload,
+ SourceAccountWebhookPayloadTypedDict,
+)
+from .syncasbankfeeds import SyncAsBankFeeds, SyncAsBankFeedsTypedDict
+from .syncasexpenses import SyncAsExpenses, SyncAsExpensesTypedDict
+from .syncconfiguration import SyncConfiguration, SyncConfigurationTypedDict
+from .targetaccountoption import TargetAccountOption, TargetAccountOptionTypedDict
+from .validation import Validation, ValidationTypedDict
+from .validationitem import ValidationItem, ValidationItemTypedDict
+
+__all__ = [
+ "AccountInfo",
+ "AccountInfoTypedDict",
+ "AccountType",
+ "AccountingBankAccount",
+ "AccountingBankAccountTypedDict",
+ "BankAccountCreateResponse",
+ "BankAccountCreateResponseBankAccountType",
+ "BankAccountCreateResponseTypedDict",
+ "BankAccountCredentials",
+ "BankAccountCredentialsTypedDict",
+ "BankAccountOption",
+ "BankAccountOptionTypedDict",
+ "BankAccountPrototype",
+ "BankAccountPrototypeTypedDict",
+ "BankAccountStatus",
+ "BankAccountType",
+ "BankAccounts",
+ "BankAccountsAccountingBankAccount",
+ "BankAccountsAccountingBankAccountTypedDict",
+ "BankAccountsBankAccountType",
+ "BankAccountsMetadata",
+ "BankAccountsMetadataTypedDict",
+ "BankAccountsSupplementalData",
+ "BankAccountsSupplementalDataTypedDict",
+ "BankAccountsTypedDict",
+ "BankFeedAccountMapping",
+ "BankFeedAccountMappingResponse",
+ "BankFeedAccountMappingResponseTypedDict",
+ "BankFeedAccountMappingTypedDict",
+ "BankFeedMapping",
+ "BankFeedMappingTypedDict",
+ "BankTransactionType",
+ "BankTransactions",
+ "BankTransactionsTypedDict",
+ "ClientRateLimitReachedWebhook",
+ "ClientRateLimitReachedWebhookData",
+ "ClientRateLimitReachedWebhookDataTypedDict",
+ "ClientRateLimitReachedWebhookTypedDict",
+ "ClientRateLimitResetWebhook",
+ "ClientRateLimitResetWebhookData",
+ "ClientRateLimitResetWebhookDataTypedDict",
+ "ClientRateLimitResetWebhookTypedDict",
+ "ClientRateLimitWebhook",
+ "ClientRateLimitWebhookPayload",
+ "ClientRateLimitWebhookPayloadTypedDict",
+ "ClientRateLimitWebhookTypedDict",
+ "Companies",
+ "CompaniesTypedDict",
+ "Company",
+ "CompanyInformation",
+ "CompanyInformationTypedDict",
+ "CompanyRequestBody",
+ "CompanyRequestBodyTypedDict",
+ "CompanySyncStatus",
+ "CompanySyncStatusTypedDict",
+ "CompanyTypedDict",
+ "Configuration",
+ "ConfigurationContactRef",
+ "ConfigurationContactRefTypedDict",
+ "ConfigurationCustomer",
+ "ConfigurationCustomerTypedDict",
+ "ConfigurationSchedule",
+ "ConfigurationScheduleTypedDict",
+ "ConfigurationSupplier",
+ "ConfigurationSupplierTypedDict",
+ "ConfigurationTypedDict",
+ "Connection",
+ "ConnectionTypedDict",
+ "Connections",
+ "ConnectionsTypedDict",
+ "CreateBankTransactions",
+ "CreateBankTransactionsResponse",
+ "CreateBankTransactionsResponseTypedDict",
+ "CreateBankTransactionsTypedDict",
+ "DataConnectionError",
+ "DataConnectionErrorTypedDict",
+ "DataConnectionStatus",
+ "DataType",
+ "ErrorStatus",
+ "ErrorValidation",
+ "ErrorValidationItem",
+ "ErrorValidationItemTypedDict",
+ "ErrorValidationTypedDict",
+ "GroupReference",
+ "GroupReferenceTypedDict",
+ "HalRef",
+ "HalRefTypedDict",
+ "Links",
+ "LinksTypedDict",
+ "Metadata",
+ "MetadataTypedDict",
+ "PushChangeType",
+ "PushFieldValidation",
+ "PushFieldValidationTypedDict",
+ "PushOperation",
+ "PushOperationChange",
+ "PushOperationChangeTypedDict",
+ "PushOperationRef",
+ "PushOperationRefTypedDict",
+ "PushOperationStatus",
+ "PushOperationTypedDict",
+ "PushOperations",
+ "PushOperationsTypedDict",
+ "PushOption",
+ "PushOptionChoice",
+ "PushOptionChoiceTypedDict",
+ "PushOptionProperty",
+ "PushOptionPropertyTypedDict",
+ "PushOptionType",
+ "PushOptionTypedDict",
+ "PushValidationInfo",
+ "PushValidationInfoTypedDict",
+ "RoutingInfo",
+ "RoutingInfoTypedDict",
+ "Security",
+ "SecurityTypedDict",
+ "SourceAccount",
+ "SourceAccountTypedDict",
+ "SourceAccountV2",
+ "SourceAccountV2Status",
+ "SourceAccountV2TypedDict",
+ "SourceAccountWebhook",
+ "SourceAccountWebhookPayload",
+ "SourceAccountWebhookPayloadTypedDict",
+ "SourceAccountWebhookTypedDict",
+ "SourceType",
+ "Status",
+ "SupplementalData",
+ "SupplementalDataTypedDict",
+ "SyncAsBankFeeds",
+ "SyncAsBankFeedsTypedDict",
+ "SyncAsExpenses",
+ "SyncAsExpensesTypedDict",
+ "SyncConfiguration",
+ "SyncConfigurationTypedDict",
+ "Tags",
+ "TagsTypedDict",
+ "TargetAccountOption",
+ "TargetAccountOptionTypedDict",
+ "Type",
+ "Validation",
+ "ValidationItem",
+ "ValidationItemTypedDict",
+ "ValidationTypedDict",
+]
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/accountinfo.py b/bank-feeds/src/codat_bankfeeds/models/shared/accountinfo.py
new file mode 100644
index 000000000..3fe9d5e17
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/accountinfo.py
@@ -0,0 +1,100 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from codat_bankfeeds.utils import serialize_decimal, validate_decimal
+from decimal import Decimal
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_serializers import PlainSerializer
+from pydantic.functional_validators import BeforeValidator
+from typing import TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class AccountInfoTypedDict(TypedDict):
+ account_open_date: NotRequired[Nullable[str]]
+ r"""In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
+ ```
+ 2020-10-08
+ ```
+ """
+ available_balance: NotRequired[Nullable[Decimal]]
+ r"""Balance of funds available for use. This includes pending activity."""
+ description: NotRequired[Nullable[str]]
+ r"""Description of the account."""
+ nickname: NotRequired[Nullable[str]]
+ r"""Name given to the account by the user. Used in UIs to assist in account selection."""
+
+
+class AccountInfo(BaseModel):
+ account_open_date: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountOpenDate")
+ ] = UNSET
+ r"""In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
+ ```
+ 2020-10-08
+ ```
+ """
+
+ available_balance: Annotated[
+ Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ],
+ pydantic.Field(alias="availableBalance"),
+ ] = UNSET
+ r"""Balance of funds available for use. This includes pending activity."""
+
+ description: OptionalNullable[str] = UNSET
+ r"""Description of the account."""
+
+ nickname: OptionalNullable[str] = UNSET
+ r"""Name given to the account by the user. Used in UIs to assist in account selection."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "accountOpenDate",
+ "availableBalance",
+ "description",
+ "nickname",
+ ]
+ nullable_fields = [
+ "accountOpenDate",
+ "availableBalance",
+ "description",
+ "nickname",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountcreateresponse.py b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountcreateresponse.py
new file mode 100644
index 000000000..a6a728789
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountcreateresponse.py
@@ -0,0 +1,602 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .bankaccountstatus import BankAccountStatus
+from .datatype import DataType
+from .pushoperationchange import PushOperationChange, PushOperationChangeTypedDict
+from .pushoperationstatus import PushOperationStatus
+from .validation import Validation, ValidationTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from codat_bankfeeds.utils import serialize_decimal, validate_decimal
+from decimal import Decimal
+from enum import Enum
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_serializers import PlainSerializer
+from pydantic.functional_validators import BeforeValidator
+from typing import Any, Dict, List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired, deprecated
+
+
+class BankAccountCreateResponseBankAccountType(str, Enum):
+ r"""The type of transactions and balances on the account.
+ For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
+ For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
+ """
+
+ UNKNOWN = "Unknown"
+ CREDIT = "Credit"
+ DEBIT = "Debit"
+
+
+class MetadataTypedDict(TypedDict):
+ is_deleted: NotRequired[Nullable[bool]]
+ r"""Indicates whether the record has been deleted in the third-party system this record originated from."""
+
+
+class Metadata(BaseModel):
+ is_deleted: Annotated[OptionalNullable[bool], pydantic.Field(alias="isDeleted")] = (
+ UNSET
+ )
+ r"""Indicates whether the record has been deleted in the third-party system this record originated from."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["isDeleted"]
+ nullable_fields = ["isDeleted"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+class SupplementalDataTypedDict(TypedDict):
+ r"""Supplemental data is additional data you can include in our standard data types.
+
+ It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+ """
+
+ content: NotRequired[Nullable[Dict[str, Dict[str, Any]]]]
+
+
+class SupplementalData(BaseModel):
+ r"""Supplemental data is additional data you can include in our standard data types.
+
+ It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+ """
+
+ content: OptionalNullable[Dict[str, Dict[str, Any]]] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["content"]
+ nullable_fields = ["content"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+@deprecated(
+ "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
+)
+class AccountingBankAccountTypedDict(TypedDict):
+ r"""> **Accessing Bank Accounts through Banking API**
+ >
+ > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators.
+ >
+ > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/bank-feeds-api#/schemas/Account)
+
+ > View the coverage for bank accounts in the Data coverage explorer.
+
+ ## Overview
+
+ A list of bank accounts associated with a company and a specific data connection.
+
+ Bank accounts data includes:
+ * The name and ID of the account in the accounting software.
+ * The currency and balance of the account.
+ * The sort code and account number.
+ """
+
+ account_name: NotRequired[Nullable[str]]
+ r"""Name of the bank account in the accounting software."""
+ account_number: NotRequired[Nullable[str]]
+ r"""Account number for the bank account.
+
+ Xero integrations
+ Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
+
+ FreeAgent integrations
+ For Credit accounts, only the last four digits are required. For other types, the field is optional.
+ """
+ account_type: NotRequired[BankAccountCreateResponseBankAccountType]
+ r"""The type of transactions and balances on the account.
+ For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
+ For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
+ """
+ available_balance: NotRequired[Nullable[Decimal]]
+ r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example."""
+ balance: NotRequired[Nullable[Decimal]]
+ r"""Balance of the bank account."""
+ currency: NotRequired[str]
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+ i_ban: NotRequired[Nullable[str]]
+ r"""International bank account number of the account. Often used when making or receiving international payments."""
+ id: NotRequired[str]
+ r"""Identifier for the account, unique for the company in the accounting software."""
+ institution: NotRequired[Nullable[str]]
+ r"""The institution of the bank account."""
+ metadata: NotRequired[MetadataTypedDict]
+ modified_date: NotRequired[str]
+ nominal_code: NotRequired[Nullable[str]]
+ r"""Code used to identify each nominal account for a business."""
+ overdraft_limit: NotRequired[Nullable[Decimal]]
+ r"""Pre-arranged overdraft limit of the account.
+
+ The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
+ """
+ sort_code: NotRequired[Nullable[str]]
+ r"""Sort code for the bank account.
+
+ Xero integrations
+ The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
+ """
+ source_modified_date: NotRequired[str]
+ status: NotRequired[BankAccountStatus]
+ r"""Status of the bank account."""
+ supplemental_data: NotRequired[SupplementalDataTypedDict]
+ r"""Supplemental data is additional data you can include in our standard data types.
+
+ It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+ """
+
+
+@deprecated(
+ "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
+)
+class AccountingBankAccount(BaseModel):
+ r"""> **Accessing Bank Accounts through Banking API**
+ >
+ > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators.
+ >
+ > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/bank-feeds-api#/schemas/Account)
+
+ > View the coverage for bank accounts in the Data coverage explorer.
+
+ ## Overview
+
+ A list of bank accounts associated with a company and a specific data connection.
+
+ Bank accounts data includes:
+ * The name and ID of the account in the accounting software.
+ * The currency and balance of the account.
+ * The sort code and account number.
+ """
+
+ account_name: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountName")
+ ] = UNSET
+ r"""Name of the bank account in the accounting software."""
+
+ account_number: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountNumber")
+ ] = UNSET
+ r"""Account number for the bank account.
+
+ Xero integrations
+ Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
+
+ FreeAgent integrations
+ For Credit accounts, only the last four digits are required. For other types, the field is optional.
+ """
+
+ account_type: Annotated[
+ Optional[BankAccountCreateResponseBankAccountType],
+ pydantic.Field(alias="accountType"),
+ ] = None
+ r"""The type of transactions and balances on the account.
+ For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
+ For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
+ """
+
+ available_balance: Annotated[
+ Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ],
+ pydantic.Field(alias="availableBalance"),
+ ] = UNSET
+ r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example."""
+
+ balance: Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ] = UNSET
+ r"""Balance of the bank account."""
+
+ currency: Optional[str] = None
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+
+ i_ban: Annotated[OptionalNullable[str], pydantic.Field(alias="iBan")] = UNSET
+ r"""International bank account number of the account. Often used when making or receiving international payments."""
+
+ id: Optional[str] = None
+ r"""Identifier for the account, unique for the company in the accounting software."""
+
+ institution: OptionalNullable[str] = UNSET
+ r"""The institution of the bank account."""
+
+ metadata: Optional[Metadata] = None
+
+ modified_date: Annotated[Optional[str], pydantic.Field(alias="modifiedDate")] = None
+
+ nominal_code: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="nominalCode")
+ ] = UNSET
+ r"""Code used to identify each nominal account for a business."""
+
+ overdraft_limit: Annotated[
+ Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ],
+ pydantic.Field(alias="overdraftLimit"),
+ ] = UNSET
+ r"""Pre-arranged overdraft limit of the account.
+
+ The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
+ """
+
+ sort_code: Annotated[OptionalNullable[str], pydantic.Field(alias="sortCode")] = (
+ UNSET
+ )
+ r"""Sort code for the bank account.
+
+ Xero integrations
+ The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
+ """
+
+ source_modified_date: Annotated[
+ Optional[str], pydantic.Field(alias="sourceModifiedDate")
+ ] = None
+
+ status: Optional[BankAccountStatus] = None
+ r"""Status of the bank account."""
+
+ supplemental_data: Annotated[
+ Optional[SupplementalData], pydantic.Field(alias="supplementalData")
+ ] = None
+ r"""Supplemental data is additional data you can include in our standard data types.
+
+ It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+ """
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "accountName",
+ "accountNumber",
+ "accountType",
+ "availableBalance",
+ "balance",
+ "currency",
+ "iBan",
+ "id",
+ "institution",
+ "metadata",
+ "modifiedDate",
+ "nominalCode",
+ "overdraftLimit",
+ "sortCode",
+ "sourceModifiedDate",
+ "status",
+ "supplementalData",
+ ]
+ nullable_fields = [
+ "accountName",
+ "accountNumber",
+ "availableBalance",
+ "balance",
+ "iBan",
+ "institution",
+ "nominalCode",
+ "overdraftLimit",
+ "sortCode",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+class BankAccountCreateResponseTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for your SMB in Codat."""
+ data_connection_key: str
+ r"""Unique identifier for a company's data connection."""
+ push_operation_key: str
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+ requested_on_utc: str
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: PushOperationStatus
+ r"""The current status of the push operation."""
+ status_code: int
+ r"""Push status code."""
+ changes: NotRequired[Nullable[List[PushOperationChangeTypedDict]]]
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+ completed_on_utc: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ data: NotRequired[Nullable[AccountingBankAccountTypedDict]]
+ data_type: NotRequired[DataType]
+ r"""Available data types"""
+ error_message: NotRequired[Nullable[str]]
+ r"""A message about the error."""
+ timeout_in_minutes: NotRequired[Nullable[int]]
+ r"""Number of minutes the push operation must complete within before it times out."""
+ timeout_in_seconds: NotRequired[Nullable[int]]
+ r"""Number of seconds the push operation must complete within before it times out."""
+ validation: NotRequired[ValidationTypedDict]
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+
+class BankAccountCreateResponse(BaseModel):
+ company_id: Annotated[str, pydantic.Field(alias="companyId")]
+ r"""Unique identifier for your SMB in Codat."""
+
+ data_connection_key: Annotated[str, pydantic.Field(alias="dataConnectionKey")]
+ r"""Unique identifier for a company's data connection."""
+
+ push_operation_key: Annotated[str, pydantic.Field(alias="pushOperationKey")]
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+
+ requested_on_utc: Annotated[str, pydantic.Field(alias="requestedOnUtc")]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ status: PushOperationStatus
+ r"""The current status of the push operation."""
+
+ status_code: Annotated[int, pydantic.Field(alias="statusCode")]
+ r"""Push status code."""
+
+ changes: OptionalNullable[List[PushOperationChange]] = UNSET
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+
+ completed_on_utc: Annotated[
+ Optional[str], pydantic.Field(alias="completedOnUtc")
+ ] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ data: OptionalNullable[AccountingBankAccount] = UNSET
+
+ data_type: Annotated[Optional[DataType], pydantic.Field(alias="dataType")] = None
+ r"""Available data types"""
+
+ error_message: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="errorMessage")
+ ] = UNSET
+ r"""A message about the error."""
+
+ timeout_in_minutes: Annotated[
+ OptionalNullable[int], pydantic.Field(alias="timeoutInMinutes")
+ ] = UNSET
+ r"""Number of minutes the push operation must complete within before it times out."""
+
+ timeout_in_seconds: Annotated[
+ OptionalNullable[int],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
+ alias="timeoutInSeconds",
+ ),
+ ] = UNSET
+ r"""Number of seconds the push operation must complete within before it times out."""
+
+ validation: Optional[Validation] = None
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "changes",
+ "completedOnUtc",
+ "data",
+ "dataType",
+ "errorMessage",
+ "timeoutInMinutes",
+ "timeoutInSeconds",
+ "validation",
+ ]
+ nullable_fields = [
+ "changes",
+ "data",
+ "errorMessage",
+ "timeoutInMinutes",
+ "timeoutInSeconds",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountcredentials.py b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountcredentials.py
new file mode 100644
index 000000000..1f9ce0504
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountcredentials.py
@@ -0,0 +1,25 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from typing import Optional, TypedDict
+from typing_extensions import NotRequired
+
+
+class BankAccountCredentialsTypedDict(TypedDict):
+ r"""Result of generate credentials"""
+
+ password: NotRequired[str]
+ r"""Password to enable the bank feeds platform to securely retrieve transactions."""
+ username: NotRequired[str]
+ r"""Username used by the bank feeds platform to retrieve transactions"""
+
+
+class BankAccountCredentials(BaseModel):
+ r"""Result of generate credentials"""
+
+ password: Optional[str] = None
+ r"""Password to enable the bank feeds platform to securely retrieve transactions."""
+
+ username: Optional[str] = None
+ r"""Username used by the bank feeds platform to retrieve transactions"""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountoption.py b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountoption.py
new file mode 100644
index 000000000..49fa8289a
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountoption.py
@@ -0,0 +1,27 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class BankAccountOptionTypedDict(TypedDict):
+ account_type: NotRequired[str]
+ r"""The type of account."""
+ id: NotRequired[str]
+ r"""Unique identifier for the bank account."""
+ name: NotRequired[str]
+ r"""Name of bank account."""
+
+
+class BankAccountOption(BaseModel):
+ account_type: Annotated[Optional[str], pydantic.Field(alias="accountType")] = None
+ r"""The type of account."""
+
+ id: Optional[str] = None
+ r"""Unique identifier for the bank account."""
+
+ name: Optional[str] = None
+ r"""Name of bank account."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountprototype.py b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountprototype.py
new file mode 100644
index 000000000..57025f911
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountprototype.py
@@ -0,0 +1,225 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .bankaccountstatus import BankAccountStatus
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from codat_bankfeeds.utils import serialize_decimal, validate_decimal
+from decimal import Decimal
+from enum import Enum
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_serializers import PlainSerializer
+from pydantic.functional_validators import BeforeValidator
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class BankAccountType(str, Enum):
+ r"""The type of transactions and balances on the account.
+ For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
+ For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
+ """
+
+ UNKNOWN = "Unknown"
+ CREDIT = "Credit"
+ DEBIT = "Debit"
+
+
+class BankAccountPrototypeTypedDict(TypedDict):
+ account_name: NotRequired[Nullable[str]]
+ r"""Name of the bank account in the accounting software."""
+ account_number: NotRequired[Nullable[str]]
+ r"""Account number for the bank account.
+
+ Xero integrations
+ Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
+
+ FreeAgent integrations
+ For Credit accounts, only the last four digits are required. For other types, the field is optional.
+ """
+ account_type: NotRequired[BankAccountType]
+ r"""The type of transactions and balances on the account.
+ For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
+ For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
+ """
+ available_balance: NotRequired[Nullable[Decimal]]
+ r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example."""
+ balance: NotRequired[Nullable[Decimal]]
+ r"""Balance of the bank account."""
+ currency: NotRequired[str]
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+ i_ban: NotRequired[Nullable[str]]
+ r"""International bank account number of the account. Often used when making or receiving international payments."""
+ institution: NotRequired[Nullable[str]]
+ r"""The institution of the bank account."""
+ nominal_code: NotRequired[Nullable[str]]
+ r"""Code used to identify each nominal account for a business."""
+ overdraft_limit: NotRequired[Nullable[Decimal]]
+ r"""Pre-arranged overdraft limit of the account.
+
+ The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
+ """
+ sort_code: NotRequired[Nullable[str]]
+ r"""Sort code for the bank account.
+
+ Xero integrations
+ The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
+ """
+ status: NotRequired[BankAccountStatus]
+ r"""Status of the bank account."""
+
+
+class BankAccountPrototype(BaseModel):
+ account_name: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountName")
+ ] = UNSET
+ r"""Name of the bank account in the accounting software."""
+
+ account_number: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountNumber")
+ ] = UNSET
+ r"""Account number for the bank account.
+
+ Xero integrations
+ Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
+
+ FreeAgent integrations
+ For Credit accounts, only the last four digits are required. For other types, the field is optional.
+ """
+
+ account_type: Annotated[
+ Optional[BankAccountType], pydantic.Field(alias="accountType")
+ ] = None
+ r"""The type of transactions and balances on the account.
+ For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
+ For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
+ """
+
+ available_balance: Annotated[
+ Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ],
+ pydantic.Field(alias="availableBalance"),
+ ] = UNSET
+ r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example."""
+
+ balance: Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ] = UNSET
+ r"""Balance of the bank account."""
+
+ currency: Optional[str] = None
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+
+ i_ban: Annotated[OptionalNullable[str], pydantic.Field(alias="iBan")] = UNSET
+ r"""International bank account number of the account. Often used when making or receiving international payments."""
+
+ institution: OptionalNullable[str] = UNSET
+ r"""The institution of the bank account."""
+
+ nominal_code: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="nominalCode")
+ ] = UNSET
+ r"""Code used to identify each nominal account for a business."""
+
+ overdraft_limit: Annotated[
+ Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ],
+ pydantic.Field(alias="overdraftLimit"),
+ ] = UNSET
+ r"""Pre-arranged overdraft limit of the account.
+
+ The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
+ """
+
+ sort_code: Annotated[OptionalNullable[str], pydantic.Field(alias="sortCode")] = (
+ UNSET
+ )
+ r"""Sort code for the bank account.
+
+ Xero integrations
+ The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
+ """
+
+ status: Optional[BankAccountStatus] = None
+ r"""Status of the bank account."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "accountName",
+ "accountNumber",
+ "accountType",
+ "availableBalance",
+ "balance",
+ "currency",
+ "iBan",
+ "institution",
+ "nominalCode",
+ "overdraftLimit",
+ "sortCode",
+ "status",
+ ]
+ nullable_fields = [
+ "accountName",
+ "accountNumber",
+ "availableBalance",
+ "balance",
+ "iBan",
+ "institution",
+ "nominalCode",
+ "overdraftLimit",
+ "sortCode",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/bankaccounts.py b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccounts.py
new file mode 100644
index 000000000..e5f8aaf1a
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccounts.py
@@ -0,0 +1,412 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .bankaccountstatus import BankAccountStatus
+from .links import Links, LinksTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from codat_bankfeeds.utils import serialize_decimal, validate_decimal
+from decimal import Decimal
+from enum import Enum
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_serializers import PlainSerializer
+from pydantic.functional_validators import BeforeValidator
+from typing import Any, Dict, List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class BankAccountsBankAccountType(str, Enum):
+ r"""The type of transactions and balances on the account.
+ For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
+ For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
+ """
+
+ UNKNOWN = "Unknown"
+ CREDIT = "Credit"
+ DEBIT = "Debit"
+
+
+class BankAccountsMetadataTypedDict(TypedDict):
+ is_deleted: NotRequired[Nullable[bool]]
+ r"""Indicates whether the record has been deleted in the third-party system this record originated from."""
+
+
+class BankAccountsMetadata(BaseModel):
+ is_deleted: Annotated[OptionalNullable[bool], pydantic.Field(alias="isDeleted")] = (
+ UNSET
+ )
+ r"""Indicates whether the record has been deleted in the third-party system this record originated from."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["isDeleted"]
+ nullable_fields = ["isDeleted"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+class BankAccountsSupplementalDataTypedDict(TypedDict):
+ r"""Supplemental data is additional data you can include in our standard data types.
+
+ It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+ """
+
+ content: NotRequired[Nullable[Dict[str, Dict[str, Any]]]]
+
+
+class BankAccountsSupplementalData(BaseModel):
+ r"""Supplemental data is additional data you can include in our standard data types.
+
+ It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+ """
+
+ content: OptionalNullable[Dict[str, Dict[str, Any]]] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["content"]
+ nullable_fields = ["content"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+class BankAccountsAccountingBankAccountTypedDict(TypedDict):
+ r"""> **Accessing Bank Accounts through Banking API**
+ >
+ > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators.
+ >
+ > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/bank-feeds-api#/schemas/Account)
+
+ > View the coverage for bank accounts in the Data coverage explorer.
+
+ ## Overview
+
+ A list of bank accounts associated with a company and a specific data connection.
+
+ Bank accounts data includes:
+ * The name and ID of the account in the accounting software.
+ * The currency and balance of the account.
+ * The sort code and account number.
+ """
+
+ account_name: NotRequired[Nullable[str]]
+ r"""Name of the bank account in the accounting software."""
+ account_number: NotRequired[Nullable[str]]
+ r"""Account number for the bank account.
+
+ Xero integrations
+ Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
+
+ FreeAgent integrations
+ For Credit accounts, only the last four digits are required. For other types, the field is optional.
+ """
+ account_type: NotRequired[BankAccountsBankAccountType]
+ r"""The type of transactions and balances on the account.
+ For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
+ For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
+ """
+ available_balance: NotRequired[Nullable[Decimal]]
+ r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example."""
+ balance: NotRequired[Nullable[Decimal]]
+ r"""Balance of the bank account."""
+ currency: NotRequired[str]
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+ i_ban: NotRequired[Nullable[str]]
+ r"""International bank account number of the account. Often used when making or receiving international payments."""
+ id: NotRequired[str]
+ r"""Identifier for the account, unique for the company in the accounting software."""
+ institution: NotRequired[Nullable[str]]
+ r"""The institution of the bank account."""
+ metadata: NotRequired[BankAccountsMetadataTypedDict]
+ modified_date: NotRequired[str]
+ nominal_code: NotRequired[Nullable[str]]
+ r"""Code used to identify each nominal account for a business."""
+ overdraft_limit: NotRequired[Nullable[Decimal]]
+ r"""Pre-arranged overdraft limit of the account.
+
+ The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
+ """
+ sort_code: NotRequired[Nullable[str]]
+ r"""Sort code for the bank account.
+
+ Xero integrations
+ The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
+ """
+ source_modified_date: NotRequired[str]
+ status: NotRequired[BankAccountStatus]
+ r"""Status of the bank account."""
+ supplemental_data: NotRequired[BankAccountsSupplementalDataTypedDict]
+ r"""Supplemental data is additional data you can include in our standard data types.
+
+ It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+ """
+
+
+class BankAccountsAccountingBankAccount(BaseModel):
+ r"""> **Accessing Bank Accounts through Banking API**
+ >
+ > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators.
+ >
+ > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/bank-feeds-api#/schemas/Account)
+
+ > View the coverage for bank accounts in the Data coverage explorer.
+
+ ## Overview
+
+ A list of bank accounts associated with a company and a specific data connection.
+
+ Bank accounts data includes:
+ * The name and ID of the account in the accounting software.
+ * The currency and balance of the account.
+ * The sort code and account number.
+ """
+
+ account_name: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountName")
+ ] = UNSET
+ r"""Name of the bank account in the accounting software."""
+
+ account_number: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountNumber")
+ ] = UNSET
+ r"""Account number for the bank account.
+
+ Xero integrations
+ Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
+
+ FreeAgent integrations
+ For Credit accounts, only the last four digits are required. For other types, the field is optional.
+ """
+
+ account_type: Annotated[
+ Optional[BankAccountsBankAccountType], pydantic.Field(alias="accountType")
+ ] = None
+ r"""The type of transactions and balances on the account.
+ For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
+ For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
+ """
+
+ available_balance: Annotated[
+ Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ],
+ pydantic.Field(alias="availableBalance"),
+ ] = UNSET
+ r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example."""
+
+ balance: Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ] = UNSET
+ r"""Balance of the bank account."""
+
+ currency: Optional[str] = None
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+
+ i_ban: Annotated[OptionalNullable[str], pydantic.Field(alias="iBan")] = UNSET
+ r"""International bank account number of the account. Often used when making or receiving international payments."""
+
+ id: Optional[str] = None
+ r"""Identifier for the account, unique for the company in the accounting software."""
+
+ institution: OptionalNullable[str] = UNSET
+ r"""The institution of the bank account."""
+
+ metadata: Optional[BankAccountsMetadata] = None
+
+ modified_date: Annotated[Optional[str], pydantic.Field(alias="modifiedDate")] = None
+
+ nominal_code: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="nominalCode")
+ ] = UNSET
+ r"""Code used to identify each nominal account for a business."""
+
+ overdraft_limit: Annotated[
+ Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ],
+ pydantic.Field(alias="overdraftLimit"),
+ ] = UNSET
+ r"""Pre-arranged overdraft limit of the account.
+
+ The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
+ """
+
+ sort_code: Annotated[OptionalNullable[str], pydantic.Field(alias="sortCode")] = (
+ UNSET
+ )
+ r"""Sort code for the bank account.
+
+ Xero integrations
+ The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
+ """
+
+ source_modified_date: Annotated[
+ Optional[str], pydantic.Field(alias="sourceModifiedDate")
+ ] = None
+
+ status: Optional[BankAccountStatus] = None
+ r"""Status of the bank account."""
+
+ supplemental_data: Annotated[
+ Optional[BankAccountsSupplementalData], pydantic.Field(alias="supplementalData")
+ ] = None
+ r"""Supplemental data is additional data you can include in our standard data types.
+
+ It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
+ """
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "accountName",
+ "accountNumber",
+ "accountType",
+ "availableBalance",
+ "balance",
+ "currency",
+ "iBan",
+ "id",
+ "institution",
+ "metadata",
+ "modifiedDate",
+ "nominalCode",
+ "overdraftLimit",
+ "sortCode",
+ "sourceModifiedDate",
+ "status",
+ "supplementalData",
+ ]
+ nullable_fields = [
+ "accountName",
+ "accountNumber",
+ "availableBalance",
+ "balance",
+ "iBan",
+ "institution",
+ "nominalCode",
+ "overdraftLimit",
+ "sortCode",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
+
+
+class BankAccountsTypedDict(TypedDict):
+ links: LinksTypedDict
+ page_number: int
+ r"""Current page number."""
+ page_size: int
+ r"""Number of items to return in results array."""
+ total_results: int
+ r"""Total number of items."""
+ results: NotRequired[List[BankAccountsAccountingBankAccountTypedDict]]
+
+
+class BankAccounts(BaseModel):
+ links: Annotated[Links, pydantic.Field(alias="_links")]
+
+ page_number: Annotated[int, pydantic.Field(alias="pageNumber")]
+ r"""Current page number."""
+
+ page_size: Annotated[int, pydantic.Field(alias="pageSize")]
+ r"""Number of items to return in results array."""
+
+ total_results: Annotated[int, pydantic.Field(alias="totalResults")]
+ r"""Total number of items."""
+
+ results: Optional[List[BankAccountsAccountingBankAccount]] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountstatus.py b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountstatus.py
new file mode 100644
index 000000000..be857f929
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/bankaccountstatus.py
@@ -0,0 +1,13 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+
+class BankAccountStatus(str, Enum):
+ r"""Status of the bank account."""
+
+ UNKNOWN = "Unknown"
+ ACTIVE = "Active"
+ ARCHIVED = "Archived"
+ PENDING = "Pending"
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/bankfeedaccountmapping.py b/bank-feeds/src/codat_bankfeeds/models/shared/bankfeedaccountmapping.py
new file mode 100644
index 000000000..b0c640c74
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/bankfeedaccountmapping.py
@@ -0,0 +1,61 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class BankFeedAccountMappingTypedDict(TypedDict):
+ source_account_id: str
+ r"""Unique ID for the source account"""
+ target_account_id: NotRequired[Nullable[str]]
+ r"""Unique ID for the target account"""
+
+
+class BankFeedAccountMapping(BaseModel):
+ source_account_id: Annotated[str, pydantic.Field(alias="sourceAccountId")]
+ r"""Unique ID for the source account"""
+
+ target_account_id: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="targetAccountId")
+ ] = UNSET
+ r"""Unique ID for the target account"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["targetAccountId"]
+ nullable_fields = ["targetAccountId"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/bankfeedaccountmappingresponse.py b/bank-feeds/src/codat_bankfeeds/models/shared/bankfeedaccountmappingresponse.py
new file mode 100644
index 000000000..f74e98168
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/bankfeedaccountmappingresponse.py
@@ -0,0 +1,77 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class BankFeedAccountMappingResponseTypedDict(TypedDict):
+ r"""The result from POSTing a Bank Account mapping."""
+
+ error: NotRequired[Nullable[str]]
+ r"""Error returned during the post request"""
+ status: NotRequired[Nullable[str]]
+ r"""Status of the POST request."""
+ source_account_id: NotRequired[str]
+ r"""Unique ID for the source account."""
+ target_account_id: NotRequired[Nullable[str]]
+ r"""Unique ID for the target account."""
+
+
+class BankFeedAccountMappingResponse(BaseModel):
+ r"""The result from POSTing a Bank Account mapping."""
+
+ error: Annotated[OptionalNullable[str], pydantic.Field(alias="Error")] = UNSET
+ r"""Error returned during the post request"""
+
+ status: Annotated[OptionalNullable[str], pydantic.Field(alias="Status")] = UNSET
+ r"""Status of the POST request."""
+
+ source_account_id: Annotated[
+ Optional[str], pydantic.Field(alias="sourceAccountId")
+ ] = None
+ r"""Unique ID for the source account."""
+
+ target_account_id: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="targetAccountId")
+ ] = UNSET
+ r"""Unique ID for the target account."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["Error", "Status", "sourceAccountId", "targetAccountId"]
+ nullable_fields = ["Error", "Status", "targetAccountId"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/bankfeedmapping.py b/bank-feeds/src/codat_bankfeeds/models/shared/bankfeedmapping.py
new file mode 100644
index 000000000..ee5d83888
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/bankfeedmapping.py
@@ -0,0 +1,186 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .targetaccountoption import TargetAccountOption, TargetAccountOptionTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class BankFeedMappingTypedDict(TypedDict):
+ r"""A bank feed connection between a source account and a target account, including potential target accounts."""
+
+ feed_start_date: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ source_account_id: NotRequired[str]
+ r"""Unique ID for the source account."""
+ source_account_name: NotRequired[str]
+ r"""Name for the source account."""
+ source_account_number: NotRequired[str]
+ r"""Account number for the source account."""
+ source_balance: NotRequired[str]
+ r"""Balance for the source account."""
+ source_currency: NotRequired[str]
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+ status: NotRequired[str]
+ r"""The status."""
+ target_account_id: NotRequired[Nullable[str]]
+ r"""Unique ID for the target account in the accounting software."""
+ target_account_name: NotRequired[str]
+ r"""Name for the target account in the accounting software."""
+ target_account_options: NotRequired[Nullable[List[TargetAccountOptionTypedDict]]]
+ r"""An array of potential target accounts."""
+
+
+class BankFeedMapping(BaseModel):
+ r"""A bank feed connection between a source account and a target account, including potential target accounts."""
+
+ feed_start_date: Annotated[Optional[str], pydantic.Field(alias="feedStartDate")] = (
+ None
+ )
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ source_account_id: Annotated[
+ Optional[str], pydantic.Field(alias="sourceAccountId")
+ ] = None
+ r"""Unique ID for the source account."""
+
+ source_account_name: Annotated[
+ Optional[str], pydantic.Field(alias="sourceAccountName")
+ ] = None
+ r"""Name for the source account."""
+
+ source_account_number: Annotated[
+ Optional[str], pydantic.Field(alias="sourceAccountNumber")
+ ] = None
+ r"""Account number for the source account."""
+
+ source_balance: Annotated[Optional[str], pydantic.Field(alias="sourceBalance")] = (
+ None
+ )
+ r"""Balance for the source account."""
+
+ source_currency: Annotated[
+ Optional[str], pydantic.Field(alias="sourceCurrency")
+ ] = None
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+
+ status: Optional[str] = None
+ r"""The status."""
+
+ target_account_id: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="targetAccountId")
+ ] = UNSET
+ r"""Unique ID for the target account in the accounting software."""
+
+ target_account_name: Annotated[
+ Optional[str], pydantic.Field(alias="targetAccountName")
+ ] = None
+ r"""Name for the target account in the accounting software."""
+
+ target_account_options: Annotated[
+ OptionalNullable[List[TargetAccountOption]],
+ pydantic.Field(alias="targetAccountOptions"),
+ ] = UNSET
+ r"""An array of potential target accounts."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "feedStartDate",
+ "sourceAccountId",
+ "sourceAccountName",
+ "sourceAccountNumber",
+ "sourceBalance",
+ "sourceCurrency",
+ "status",
+ "targetAccountId",
+ "targetAccountName",
+ "targetAccountOptions",
+ ]
+ nullable_fields = ["targetAccountId", "targetAccountOptions"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/banktransactions.py b/bank-feeds/src/codat_bankfeeds/models/shared/banktransactions.py
new file mode 100644
index 000000000..6ecbf677b
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/banktransactions.py
@@ -0,0 +1,183 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from codat_bankfeeds.utils import serialize_decimal, validate_decimal
+from decimal import Decimal
+from enum import Enum
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_serializers import PlainSerializer
+from pydantic.functional_validators import BeforeValidator
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class BankTransactionType(str, Enum):
+ r"""Type of transaction for the bank statement line."""
+
+ UNKNOWN = "Unknown"
+ CREDIT = "Credit"
+ DEBIT = "Debit"
+ INT = "Int"
+ DIV = "Div"
+ FEE = "Fee"
+ SER_CHG = "SerChg"
+ DEP = "Dep"
+ ATM = "Atm"
+ POS = "Pos"
+ XFER = "Xfer"
+ CHECK = "Check"
+ PAYMENT = "Payment"
+ CASH = "Cash"
+ DIRECT_DEP = "DirectDep"
+ DIRECT_DEBIT = "DirectDebit"
+ REPEAT_PMT = "RepeatPmt"
+ OTHER = "Other"
+
+
+class BankTransactionsTypedDict(TypedDict):
+ amount: Decimal
+ r"""The amount transacted in the bank transaction."""
+ date_: str
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ id: str
+ r"""Identifier for the bank account transaction, unique for the company in the accounting software."""
+ balance: NotRequired[Decimal]
+ r"""The remaining balance in the account with ID `accountId`. This field is optional for QuickBooks Online but is required for Xero, Sage, NetSuite, Exact, and FreeAgent."""
+ counterparty: NotRequired[Nullable[str]]
+ r"""The giving or receiving party such as a person or organization."""
+ description: NotRequired[Nullable[str]]
+ r"""Description of the bank transaction."""
+ reconciled: NotRequired[Nullable[bool]]
+ r"""`True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software."""
+ reference: NotRequired[Nullable[str]]
+ r"""An optional reference to the bank transaction."""
+ transaction_type: NotRequired[Nullable[BankTransactionType]]
+ r"""Type of transaction for the bank statement line."""
+
+
+class BankTransactions(BaseModel):
+ amount: Annotated[
+ Decimal,
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ]
+ r"""The amount transacted in the bank transaction."""
+
+ date_: Annotated[str, pydantic.Field(alias="date")]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ id: str
+ r"""Identifier for the bank account transaction, unique for the company in the accounting software."""
+
+ balance: Annotated[
+ Optional[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ] = None
+ r"""The remaining balance in the account with ID `accountId`. This field is optional for QuickBooks Online but is required for Xero, Sage, NetSuite, Exact, and FreeAgent."""
+
+ counterparty: OptionalNullable[str] = UNSET
+ r"""The giving or receiving party such as a person or organization."""
+
+ description: OptionalNullable[str] = UNSET
+ r"""Description of the bank transaction."""
+
+ reconciled: OptionalNullable[bool] = UNSET
+ r"""`True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software."""
+
+ reference: OptionalNullable[str] = UNSET
+ r"""An optional reference to the bank transaction."""
+
+ transaction_type: Annotated[
+ OptionalNullable[BankTransactionType], pydantic.Field(alias="transactionType")
+ ] = UNSET
+ r"""Type of transaction for the bank statement line."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "balance",
+ "counterparty",
+ "description",
+ "reconciled",
+ "reference",
+ "transactionType",
+ ]
+ nullable_fields = [
+ "counterparty",
+ "description",
+ "reconciled",
+ "reference",
+ "transactionType",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitreachedwebhook.py b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitreachedwebhook.py
new file mode 100644
index 000000000..273c44b89
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitreachedwebhook.py
@@ -0,0 +1,61 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .clientratelimitreachedwebhookdata import (
+ ClientRateLimitReachedWebhookData,
+ ClientRateLimitReachedWebhookDataTypedDict,
+)
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ClientRateLimitReachedWebhookTypedDict(TypedDict):
+ r"""Webhook request body for a client that has reached their rate limit."""
+
+ alert_id: NotRequired[str]
+ r"""Unique identifier of the webhook event."""
+ client_id: NotRequired[str]
+ r"""Unique identifier for your client in Codat."""
+ client_name: NotRequired[str]
+ r"""Name of your client in Codat."""
+ data: NotRequired[ClientRateLimitReachedWebhookDataTypedDict]
+ message: NotRequired[str]
+ r"""A human-readable message about the webhook."""
+ rule_id: NotRequired[str]
+ r"""Unique identifier for the rule."""
+ rule_type: NotRequired[str]
+ r"""The type of rule."""
+
+
+class ClientRateLimitReachedWebhook(BaseModel):
+ r"""Webhook request body for a client that has reached their rate limit."""
+
+ alert_id: Annotated[Optional[str], pydantic.Field(alias="AlertId")] = None
+ r"""Unique identifier of the webhook event."""
+
+ client_id: Annotated[Optional[str], pydantic.Field(alias="ClientId")] = None
+ r"""Unique identifier for your client in Codat."""
+
+ client_name: Annotated[Optional[str], pydantic.Field(alias="ClientName")] = None
+ r"""Name of your client in Codat."""
+
+ data: Annotated[
+ Optional[ClientRateLimitReachedWebhookData], pydantic.Field(alias="Data")
+ ] = None
+
+ message: Annotated[Optional[str], pydantic.Field(alias="Message")] = None
+ r"""A human-readable message about the webhook."""
+
+ rule_id: Annotated[
+ Optional[str],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
+ alias="RuleId",
+ ),
+ ] = None
+ r"""Unique identifier for the rule."""
+
+ rule_type: Annotated[Optional[str], pydantic.Field(alias="RuleType")] = None
+ r"""The type of rule."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitreachedwebhookdata.py b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitreachedwebhookdata.py
new file mode 100644
index 000000000..47b32d5a1
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitreachedwebhookdata.py
@@ -0,0 +1,60 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ClientRateLimitReachedWebhookDataTypedDict(TypedDict):
+ daily_quota: NotRequired[int]
+ r"""The number of available requests per day."""
+ expires_utc: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+
+class ClientRateLimitReachedWebhookData(BaseModel):
+ daily_quota: Annotated[Optional[int], pydantic.Field(alias="DailyQuota")] = None
+ r"""The number of available requests per day."""
+
+ expires_utc: Annotated[Optional[str], pydantic.Field(alias="ExpiresUtc")] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitresetwebhook.py b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitresetwebhook.py
new file mode 100644
index 000000000..f415b9a6d
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitresetwebhook.py
@@ -0,0 +1,61 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .clientratelimitresetwebhookdata import (
+ ClientRateLimitResetWebhookData,
+ ClientRateLimitResetWebhookDataTypedDict,
+)
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ClientRateLimitResetWebhookTypedDict(TypedDict):
+ r"""Webhook request body for a client that has had their rate limit reset."""
+
+ alert_id: NotRequired[str]
+ r"""Unique identifier of the webhook event."""
+ client_id: NotRequired[str]
+ r"""Unique identifier for your client in Codat."""
+ client_name: NotRequired[str]
+ r"""Name of your client in Codat."""
+ data: NotRequired[ClientRateLimitResetWebhookDataTypedDict]
+ message: NotRequired[str]
+ r"""A human-readable message about the webhook."""
+ rule_id: NotRequired[str]
+ r"""Unique identifier for the rule."""
+ rule_type: NotRequired[str]
+ r"""The type of rule."""
+
+
+class ClientRateLimitResetWebhook(BaseModel):
+ r"""Webhook request body for a client that has had their rate limit reset."""
+
+ alert_id: Annotated[Optional[str], pydantic.Field(alias="AlertId")] = None
+ r"""Unique identifier of the webhook event."""
+
+ client_id: Annotated[Optional[str], pydantic.Field(alias="ClientId")] = None
+ r"""Unique identifier for your client in Codat."""
+
+ client_name: Annotated[Optional[str], pydantic.Field(alias="ClientName")] = None
+ r"""Name of your client in Codat."""
+
+ data: Annotated[
+ Optional[ClientRateLimitResetWebhookData], pydantic.Field(alias="Data")
+ ] = None
+
+ message: Annotated[Optional[str], pydantic.Field(alias="Message")] = None
+ r"""A human-readable message about the webhook."""
+
+ rule_id: Annotated[
+ Optional[str],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
+ alias="RuleId",
+ ),
+ ] = None
+ r"""Unique identifier for the rule."""
+
+ rule_type: Annotated[Optional[str], pydantic.Field(alias="RuleType")] = None
+ r"""The type of rule."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitresetwebhookdata.py b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitresetwebhookdata.py
new file mode 100644
index 000000000..365c01981
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitresetwebhookdata.py
@@ -0,0 +1,109 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ClientRateLimitResetWebhookDataTypedDict(TypedDict):
+ daily_quota: NotRequired[int]
+ r"""The number of available requests per day."""
+ expires_utc: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ quota_remaining: NotRequired[Nullable[int]]
+ r"""Total number of requests remaining for your client."""
+ reset_reason: NotRequired[str]
+ r"""The reason for your rate limit quota being reset."""
+
+
+class ClientRateLimitResetWebhookData(BaseModel):
+ daily_quota: Annotated[Optional[int], pydantic.Field(alias="DailyQuota")] = None
+ r"""The number of available requests per day."""
+
+ expires_utc: Annotated[Optional[str], pydantic.Field(alias="ExpiresUtc")] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ quota_remaining: Annotated[
+ OptionalNullable[int], pydantic.Field(alias="QuotaRemaining")
+ ] = UNSET
+ r"""Total number of requests remaining for your client."""
+
+ reset_reason: Annotated[Optional[str], pydantic.Field(alias="ResetReason")] = None
+ r"""The reason for your rate limit quota being reset."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["DailyQuota", "ExpiresUtc", "QuotaRemaining", "ResetReason"]
+ nullable_fields = ["QuotaRemaining"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitwebhook.py b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitwebhook.py
new file mode 100644
index 000000000..c1e3ca687
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitwebhook.py
@@ -0,0 +1,74 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .clientratelimitwebhookpayload import (
+ ClientRateLimitWebhookPayload,
+ ClientRateLimitWebhookPayloadTypedDict,
+)
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ClientRateLimitWebhookTypedDict(TypedDict):
+ event_type: NotRequired[str]
+ r"""The type of event."""
+ generated_date: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ id: NotRequired[str]
+ r"""Unique identifier of the event."""
+ payload: NotRequired[ClientRateLimitWebhookPayloadTypedDict]
+
+
+class ClientRateLimitWebhook(BaseModel):
+ event_type: Annotated[Optional[str], pydantic.Field(alias="eventType")] = None
+ r"""The type of event."""
+
+ generated_date: Annotated[Optional[str], pydantic.Field(alias="generatedDate")] = (
+ None
+ )
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ id: Optional[str] = None
+ r"""Unique identifier of the event."""
+
+ payload: Optional[ClientRateLimitWebhookPayload] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitwebhookpayload.py b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitwebhookpayload.py
new file mode 100644
index 000000000..6b2dcbed3
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/clientratelimitwebhookpayload.py
@@ -0,0 +1,67 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ClientRateLimitWebhookPayloadTypedDict(TypedDict):
+ daily_quota: NotRequired[int]
+ r"""The number of available requests per day."""
+ expiry_date: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ quota_remaining: NotRequired[int]
+ r"""Total number of requests remaining for your client."""
+
+
+class ClientRateLimitWebhookPayload(BaseModel):
+ daily_quota: Annotated[Optional[int], pydantic.Field(alias="dailyQuota")] = None
+ r"""The number of available requests per day."""
+
+ expiry_date: Annotated[Optional[str], pydantic.Field(alias="expiryDate")] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ quota_remaining: Annotated[
+ Optional[int], pydantic.Field(alias="quotaRemaining")
+ ] = None
+ r"""Total number of requests remaining for your client."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/companies.py b/bank-feeds/src/codat_bankfeeds/models/shared/companies.py
new file mode 100644
index 000000000..05eecdc27
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/companies.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .company import Company, CompanyTypedDict
+from .links import Links, LinksTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class CompaniesTypedDict(TypedDict):
+ links: LinksTypedDict
+ page_number: int
+ r"""Current page number."""
+ page_size: int
+ r"""Number of items to return in results array."""
+ total_results: int
+ r"""Total number of items."""
+ results: NotRequired[List[CompanyTypedDict]]
+
+
+class Companies(BaseModel):
+ links: Annotated[Links, pydantic.Field(alias="_links")]
+
+ page_number: Annotated[int, pydantic.Field(alias="pageNumber")]
+ r"""Current page number."""
+
+ page_size: Annotated[int, pydantic.Field(alias="pageSize")]
+ r"""Number of items to return in results array."""
+
+ total_results: Annotated[int, pydantic.Field(alias="totalResults")]
+ r"""Total number of items."""
+
+ results: Optional[List[Company]] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/company.py b/bank-feeds/src/codat_bankfeeds/models/shared/company.py
new file mode 100644
index 000000000..3365afa35
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/company.py
@@ -0,0 +1,202 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .connection import Connection, ConnectionTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class TagsTypedDict(TypedDict):
+ r"""A collection of user-defined key-value pairs that store custom metadata against the company."""
+
+
+class Tags(BaseModel):
+ r"""A collection of user-defined key-value pairs that store custom metadata against the company."""
+
+
+class CompanyTypedDict(TypedDict):
+ r"""In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.
+
+ Typically each company is one of your customers.
+
+ When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company.
+ """
+
+ id: str
+ r"""Unique identifier for your SMB in Codat."""
+ name: str
+ r"""The name of the company"""
+ redirect: str
+ r"""The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company."""
+ created: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ created_by_user_name: NotRequired[Nullable[str]]
+ r"""Name of user that created the company in Codat."""
+ data_connections: NotRequired[List[ConnectionTypedDict]]
+ description: NotRequired[str]
+ r"""Additional information about the company. This can be used to store foreign IDs, references, etc."""
+ last_sync: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ tags: NotRequired[TagsTypedDict]
+ r"""A collection of user-defined key-value pairs that store custom metadata against the company."""
+
+
+class Company(BaseModel):
+ r"""In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.
+
+ Typically each company is one of your customers.
+
+ When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company.
+ """
+
+ id: str
+ r"""Unique identifier for your SMB in Codat."""
+
+ name: str
+ r"""The name of the company"""
+
+ redirect: str
+ r"""The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company."""
+
+ created: Optional[str] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ created_by_user_name: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="createdByUserName")
+ ] = UNSET
+ r"""Name of user that created the company in Codat."""
+
+ data_connections: Annotated[
+ Optional[List[Connection]], pydantic.Field(alias="dataConnections")
+ ] = None
+
+ description: Optional[str] = None
+ r"""Additional information about the company. This can be used to store foreign IDs, references, etc."""
+
+ last_sync: Annotated[Optional[str], pydantic.Field(alias="lastSync")] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ tags: Optional[Tags] = None
+ r"""A collection of user-defined key-value pairs that store custom metadata against the company."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "created",
+ "createdByUserName",
+ "dataConnections",
+ "description",
+ "lastSync",
+ "tags",
+ ]
+ nullable_fields = ["createdByUserName"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/companyinformation.py b/bank-feeds/src/codat_bankfeeds/models/shared/companyinformation.py
new file mode 100644
index 000000000..c44a3edfe
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/companyinformation.py
@@ -0,0 +1,82 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class CompanyInformationTypedDict(TypedDict):
+ r"""Information about the company from the underlying accounting software."""
+
+ base_currency: NotRequired[str]
+ r"""Currency set in the accounting software of the linked company."""
+ company_name: NotRequired[str]
+ r"""Name of the linked company."""
+ multicurrency_enabled: NotRequired[Nullable[bool]]
+ r"""Boolean showing if the organisation has multicurrency enabled"""
+ plan_type: NotRequired[Nullable[str]]
+ r"""Accounting software subscription type such as Trial, Demo, Standard"""
+
+
+class CompanyInformation(BaseModel):
+ r"""Information about the company from the underlying accounting software."""
+
+ base_currency: Annotated[Optional[str], pydantic.Field(alias="baseCurrency")] = None
+ r"""Currency set in the accounting software of the linked company."""
+
+ company_name: Annotated[Optional[str], pydantic.Field(alias="companyName")] = None
+ r"""Name of the linked company."""
+
+ multicurrency_enabled: Annotated[
+ OptionalNullable[bool], pydantic.Field(alias="multicurrencyEnabled")
+ ] = UNSET
+ r"""Boolean showing if the organisation has multicurrency enabled"""
+
+ plan_type: Annotated[OptionalNullable[str], pydantic.Field(alias="planType")] = (
+ UNSET
+ )
+ r"""Accounting software subscription type such as Trial, Demo, Standard"""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "baseCurrency",
+ "companyName",
+ "multicurrencyEnabled",
+ "planType",
+ ]
+ nullable_fields = ["multicurrencyEnabled", "planType"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/companyrequestbody.py b/bank-feeds/src/codat_bankfeeds/models/shared/companyrequestbody.py
new file mode 100644
index 000000000..8140c1fca
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/companyrequestbody.py
@@ -0,0 +1,36 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from typing import List, Optional, TypedDict
+from typing_extensions import NotRequired
+
+
+class GroupReferenceTypedDict(TypedDict):
+ id: NotRequired[str]
+ r"""Unique identifier for the group."""
+
+
+class GroupReference(BaseModel):
+ id: Optional[str] = None
+ r"""Unique identifier for the group."""
+
+
+class CompanyRequestBodyTypedDict(TypedDict):
+ name: str
+ r"""Name of company being connected."""
+ description: NotRequired[str]
+ r"""Additional information about the company. This can be used to store foreign IDs, references, etc."""
+ groups: NotRequired[List[GroupReferenceTypedDict]]
+ r"""Reference to the groups that the company is assigned to."""
+
+
+class CompanyRequestBody(BaseModel):
+ name: str
+ r"""Name of company being connected."""
+
+ description: Optional[str] = None
+ r"""Additional information about the company. This can be used to store foreign IDs, references, etc."""
+
+ groups: Optional[List[GroupReference]] = None
+ r"""Reference to the groups that the company is assigned to."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/companysyncstatus.py b/bank-feeds/src/codat_bankfeeds/models/shared/companysyncstatus.py
new file mode 100644
index 000000000..ca45772af
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/companysyncstatus.py
@@ -0,0 +1,152 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class CompanySyncStatusTypedDict(TypedDict):
+ company_id: NotRequired[Nullable[str]]
+ r"""Unique identifier for your SMB in Codat."""
+ data_pushed: NotRequired[bool]
+ r"""Boolean of whether the sync resulted in data being pushed."""
+ error_message: NotRequired[Nullable[str]]
+ r"""Error message of the sync."""
+ sync_exception_message: NotRequired[Nullable[str]]
+ r"""Exception message of the sync."""
+ sync_id: NotRequired[Nullable[str]]
+ r"""Unique identifier of the sync."""
+ sync_status: NotRequired[Nullable[str]]
+ r"""Text status of the sync."""
+ sync_status_code: NotRequired[int]
+ r"""Status code of the sync."""
+ sync_utc: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+
+class CompanySyncStatus(BaseModel):
+ company_id: Annotated[OptionalNullable[str], pydantic.Field(alias="companyId")] = (
+ UNSET
+ )
+ r"""Unique identifier for your SMB in Codat."""
+
+ data_pushed: Annotated[Optional[bool], pydantic.Field(alias="dataPushed")] = None
+ r"""Boolean of whether the sync resulted in data being pushed."""
+
+ error_message: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="errorMessage")
+ ] = UNSET
+ r"""Error message of the sync."""
+
+ sync_exception_message: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="syncExceptionMessage")
+ ] = UNSET
+ r"""Exception message of the sync."""
+
+ sync_id: Annotated[OptionalNullable[str], pydantic.Field(alias="syncId")] = UNSET
+ r"""Unique identifier of the sync."""
+
+ sync_status: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="syncStatus")
+ ] = UNSET
+ r"""Text status of the sync."""
+
+ sync_status_code: Annotated[
+ Optional[int], pydantic.Field(alias="syncStatusCode")
+ ] = None
+ r"""Status code of the sync."""
+
+ sync_utc: Annotated[Optional[str], pydantic.Field(alias="syncUtc")] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "companyId",
+ "dataPushed",
+ "errorMessage",
+ "syncExceptionMessage",
+ "syncId",
+ "syncStatus",
+ "syncStatusCode",
+ "syncUtc",
+ ]
+ nullable_fields = [
+ "companyId",
+ "errorMessage",
+ "syncExceptionMessage",
+ "syncId",
+ "syncStatus",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/configuration.py b/bank-feeds/src/codat_bankfeeds/models/shared/configuration.py
new file mode 100644
index 000000000..088bd744f
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/configuration.py
@@ -0,0 +1,42 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .configurationschedule import ConfigurationSchedule, ConfigurationScheduleTypedDict
+from .syncconfiguration import SyncConfiguration, SyncConfigurationTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ConfigurationTypedDict(TypedDict):
+ accounting_software_company_name: NotRequired[str]
+ r"""The company name defined in the accounting software."""
+ company_id: NotRequired[str]
+ r"""Unique identifier for your SMB in Codat."""
+ configuration: NotRequired[SyncConfigurationTypedDict]
+ configured: NotRequired[bool]
+ r"""True if the company has been configured."""
+ enabled: NotRequired[bool]
+ r"""Enabled or disable bank feeds."""
+ schedule: NotRequired[ConfigurationScheduleTypedDict]
+
+
+class Configuration(BaseModel):
+ accounting_software_company_name: Annotated[
+ Optional[str], pydantic.Field(alias="accountingSoftwareCompanyName")
+ ] = None
+ r"""The company name defined in the accounting software."""
+
+ company_id: Annotated[Optional[str], pydantic.Field(alias="companyId")] = None
+ r"""Unique identifier for your SMB in Codat."""
+
+ configuration: Optional[SyncConfiguration] = None
+
+ configured: Optional[bool] = None
+ r"""True if the company has been configured."""
+
+ enabled: Optional[bool] = None
+ r"""Enabled or disable bank feeds."""
+
+ schedule: Optional[ConfigurationSchedule] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/configurationcontactref.py b/bank-feeds/src/codat_bankfeeds/models/shared/configurationcontactref.py
new file mode 100644
index 000000000..129a82ce1
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/configurationcontactref.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from typing import Optional, TypedDict
+from typing_extensions import NotRequired
+
+
+class ConfigurationContactRefTypedDict(TypedDict):
+ id: NotRequired[str]
+ r"""Unique identifier for the supplier/customer."""
+ name: NotRequired[str]
+ r"""The supplier/customer's name."""
+
+
+class ConfigurationContactRef(BaseModel):
+ id: Optional[str] = None
+ r"""Unique identifier for the supplier/customer."""
+
+ name: Optional[str] = None
+ r"""The supplier/customer's name."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/configurationcustomer.py b/bank-feeds/src/codat_bankfeeds/models/shared/configurationcustomer.py
new file mode 100644
index 000000000..64e10a542
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/configurationcustomer.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .configurationcontactref import (
+ ConfigurationContactRef,
+ ConfigurationContactRefTypedDict,
+)
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ConfigurationCustomerTypedDict(TypedDict):
+ customer_options: NotRequired[List[ConfigurationContactRefTypedDict]]
+ selected_customer_id: NotRequired[str]
+ r"""Unique identifier for the customer."""
+
+
+class ConfigurationCustomer(BaseModel):
+ customer_options: Annotated[
+ Optional[List[ConfigurationContactRef]], pydantic.Field(alias="customerOptions")
+ ] = None
+
+ selected_customer_id: Annotated[
+ Optional[str], pydantic.Field(alias="selectedCustomerId")
+ ] = None
+ r"""Unique identifier for the customer."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/configurationschedule.py b/bank-feeds/src/codat_bankfeeds/models/shared/configurationschedule.py
new file mode 100644
index 000000000..55d2b18b9
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/configurationschedule.py
@@ -0,0 +1,43 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ConfigurationScheduleTypedDict(TypedDict):
+ frequency_options: NotRequired[List[str]]
+ r"""The available sync frequencies."""
+ selected_frequency: NotRequired[str]
+ r"""The sync frequency."""
+ start_date: NotRequired[str]
+ r"""The datetime in UTC you want to start syncing from."""
+ sync_hour_utc: NotRequired[int]
+ r"""The hour in which the sync is initiated."""
+ time_zone_iana_id: NotRequired[str]
+ r"""The [IANA](https://www.iana.org/time-zones) time zone ID."""
+
+
+class ConfigurationSchedule(BaseModel):
+ frequency_options: Annotated[
+ Optional[List[str]], pydantic.Field(alias="frequencyOptions")
+ ] = None
+ r"""The available sync frequencies."""
+
+ selected_frequency: Annotated[
+ Optional[str], pydantic.Field(alias="selectedFrequency")
+ ] = None
+ r"""The sync frequency."""
+
+ start_date: Annotated[Optional[str], pydantic.Field(alias="startDate")] = None
+ r"""The datetime in UTC you want to start syncing from."""
+
+ sync_hour_utc: Annotated[Optional[int], pydantic.Field(alias="syncHourUtc")] = None
+ r"""The hour in which the sync is initiated."""
+
+ time_zone_iana_id: Annotated[
+ Optional[str], pydantic.Field(alias="timeZoneIanaId")
+ ] = None
+ r"""The [IANA](https://www.iana.org/time-zones) time zone ID."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/configurationsupplier.py b/bank-feeds/src/codat_bankfeeds/models/shared/configurationsupplier.py
new file mode 100644
index 000000000..3cbf73bcc
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/configurationsupplier.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .configurationcontactref import (
+ ConfigurationContactRef,
+ ConfigurationContactRefTypedDict,
+)
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ConfigurationSupplierTypedDict(TypedDict):
+ selected_supplier_id: NotRequired[str]
+ r"""Unique identifier for the supplier."""
+ supplier_options: NotRequired[List[ConfigurationContactRefTypedDict]]
+
+
+class ConfigurationSupplier(BaseModel):
+ selected_supplier_id: Annotated[
+ Optional[str], pydantic.Field(alias="selectedSupplierId")
+ ] = None
+ r"""Unique identifier for the supplier."""
+
+ supplier_options: Annotated[
+ Optional[List[ConfigurationContactRef]], pydantic.Field(alias="supplierOptions")
+ ] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/connection.py b/bank-feeds/src/codat_bankfeeds/models/shared/connection.py
new file mode 100644
index 000000000..0ebcc4722
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/connection.py
@@ -0,0 +1,193 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .dataconnectionerror import DataConnectionError, DataConnectionErrorTypedDict
+from .dataconnectionstatus import DataConnectionStatus
+from codat_bankfeeds.types import BaseModel
+from enum import Enum
+import pydantic
+from typing import Any, Dict, List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class SourceType(str, Enum):
+ r"""The type of platform of the connection."""
+
+ ACCOUNTING = "Accounting"
+ BANKING = "Banking"
+ BANK_FEED = "BankFeed"
+ COMMERCE = "Commerce"
+ EXPENSE = "Expense"
+ OTHER = "Other"
+ UNKNOWN = "Unknown"
+
+
+class ConnectionTypedDict(TypedDict):
+ r"""A connection represents a [company's](https://docs.codat.io/bank-feeds-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.
+
+ A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:
+
+ - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection.
+ - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections.
+ - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections.
+ Any combination of accounting, banking, and commerce data connections is allowed.
+
+ Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview).
+ """
+
+ created: str
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ id: str
+ r"""Unique identifier for a company's data connection."""
+ integration_id: str
+ r"""A Codat ID representing the integration."""
+ integration_key: str
+ r"""A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future."""
+ link_url: str
+ r"""The link URL your customers can use to authorize access to their business application."""
+ platform_name: str
+ r"""Name of integration connected to company."""
+ source_id: str
+ r"""A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`."""
+ source_type: SourceType
+ r"""The type of platform of the connection."""
+ status: DataConnectionStatus
+ r"""The current authorization status of the data connection."""
+ additional_properties: NotRequired[Any]
+ connection_info: NotRequired[Dict[str, str]]
+ data_connection_errors: NotRequired[List[DataConnectionErrorTypedDict]]
+ last_sync: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+
+class Connection(BaseModel):
+ r"""A connection represents a [company's](https://docs.codat.io/bank-feeds-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.
+
+ A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:
+
+ - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection.
+ - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections.
+ - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections.
+ Any combination of accounting, banking, and commerce data connections is allowed.
+
+ Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview).
+ """
+
+ created: str
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ id: str
+ r"""Unique identifier for a company's data connection."""
+
+ integration_id: Annotated[str, pydantic.Field(alias="integrationId")]
+ r"""A Codat ID representing the integration."""
+
+ integration_key: Annotated[str, pydantic.Field(alias="integrationKey")]
+ r"""A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future."""
+
+ link_url: Annotated[str, pydantic.Field(alias="linkUrl")]
+ r"""The link URL your customers can use to authorize access to their business application."""
+
+ platform_name: Annotated[str, pydantic.Field(alias="platformName")]
+ r"""Name of integration connected to company."""
+
+ source_id: Annotated[str, pydantic.Field(alias="sourceId")]
+ r"""A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`."""
+
+ source_type: Annotated[SourceType, pydantic.Field(alias="sourceType")]
+ r"""The type of platform of the connection."""
+
+ status: DataConnectionStatus
+ r"""The current authorization status of the data connection."""
+
+ additional_properties: Annotated[
+ Optional[Any], pydantic.Field(alias="additionalProperties")
+ ] = None
+
+ connection_info: Annotated[
+ Optional[Dict[str, str]], pydantic.Field(alias="connectionInfo")
+ ] = None
+
+ data_connection_errors: Annotated[
+ Optional[List[DataConnectionError]],
+ pydantic.Field(alias="dataConnectionErrors"),
+ ] = None
+
+ last_sync: Annotated[Optional[str], pydantic.Field(alias="lastSync")] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/connections.py b/bank-feeds/src/codat_bankfeeds/models/shared/connections.py
new file mode 100644
index 000000000..5525ea948
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/connections.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .connection import Connection, ConnectionTypedDict
+from .links import Links, LinksTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ConnectionsTypedDict(TypedDict):
+ links: LinksTypedDict
+ page_number: int
+ r"""Current page number."""
+ page_size: int
+ r"""Number of items to return in results array."""
+ total_results: int
+ r"""Total number of items."""
+ results: NotRequired[List[ConnectionTypedDict]]
+
+
+class Connections(BaseModel):
+ links: Annotated[Links, pydantic.Field(alias="_links")]
+
+ page_number: Annotated[int, pydantic.Field(alias="pageNumber")]
+ r"""Current page number."""
+
+ page_size: Annotated[int, pydantic.Field(alias="pageSize")]
+ r"""Number of items to return in results array."""
+
+ total_results: Annotated[int, pydantic.Field(alias="totalResults")]
+ r"""Total number of items."""
+
+ results: Optional[List[Connection]] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/createbanktransactions.py b/bank-feeds/src/codat_bankfeeds/models/shared/createbanktransactions.py
new file mode 100644
index 000000000..81697128e
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/createbanktransactions.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .banktransactions import BankTransactions, BankTransactionsTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import List, TypedDict
+from typing_extensions import Annotated
+
+
+class CreateBankTransactionsTypedDict(TypedDict):
+ account_id: str
+ r"""Unique identifier for a bank account."""
+ transactions: List[BankTransactionsTypedDict]
+
+
+class CreateBankTransactions(BaseModel):
+ account_id: Annotated[str, pydantic.Field(alias="accountId")]
+ r"""Unique identifier for a bank account."""
+
+ transactions: List[BankTransactions]
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/createbanktransactionsresponse.py b/bank-feeds/src/codat_bankfeeds/models/shared/createbanktransactionsresponse.py
new file mode 100644
index 000000000..2524afad3
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/createbanktransactionsresponse.py
@@ -0,0 +1,227 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .createbanktransactions import (
+ CreateBankTransactions,
+ CreateBankTransactionsTypedDict,
+)
+from .datatype import DataType
+from .pushoperationchange import PushOperationChange, PushOperationChangeTypedDict
+from .pushoperationstatus import PushOperationStatus
+from .validation import Validation, ValidationTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class CreateBankTransactionsResponseTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for your SMB in Codat."""
+ data_connection_key: str
+ r"""Unique identifier for a company's data connection."""
+ push_operation_key: str
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+ requested_on_utc: str
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: PushOperationStatus
+ r"""The current status of the push operation."""
+ status_code: int
+ r"""Push status code."""
+ changes: NotRequired[Nullable[List[PushOperationChangeTypedDict]]]
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+ completed_on_utc: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ data: NotRequired[CreateBankTransactionsTypedDict]
+ data_type: NotRequired[DataType]
+ r"""Available data types"""
+ error_message: NotRequired[Nullable[str]]
+ r"""A message about the error."""
+ timeout_in_minutes: NotRequired[Nullable[int]]
+ r"""Number of minutes the push operation must complete within before it times out."""
+ timeout_in_seconds: NotRequired[Nullable[int]]
+ r"""Number of seconds the push operation must complete within before it times out."""
+ validation: NotRequired[ValidationTypedDict]
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+
+class CreateBankTransactionsResponse(BaseModel):
+ company_id: Annotated[str, pydantic.Field(alias="companyId")]
+ r"""Unique identifier for your SMB in Codat."""
+
+ data_connection_key: Annotated[str, pydantic.Field(alias="dataConnectionKey")]
+ r"""Unique identifier for a company's data connection."""
+
+ push_operation_key: Annotated[str, pydantic.Field(alias="pushOperationKey")]
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+
+ requested_on_utc: Annotated[str, pydantic.Field(alias="requestedOnUtc")]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ status: PushOperationStatus
+ r"""The current status of the push operation."""
+
+ status_code: Annotated[int, pydantic.Field(alias="statusCode")]
+ r"""Push status code."""
+
+ changes: OptionalNullable[List[PushOperationChange]] = UNSET
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+
+ completed_on_utc: Annotated[
+ Optional[str], pydantic.Field(alias="completedOnUtc")
+ ] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ data: Optional[CreateBankTransactions] = None
+
+ data_type: Annotated[Optional[DataType], pydantic.Field(alias="dataType")] = None
+ r"""Available data types"""
+
+ error_message: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="errorMessage")
+ ] = UNSET
+ r"""A message about the error."""
+
+ timeout_in_minutes: Annotated[
+ OptionalNullable[int], pydantic.Field(alias="timeoutInMinutes")
+ ] = UNSET
+ r"""Number of minutes the push operation must complete within before it times out."""
+
+ timeout_in_seconds: Annotated[
+ OptionalNullable[int],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
+ alias="timeoutInSeconds",
+ ),
+ ] = UNSET
+ r"""Number of seconds the push operation must complete within before it times out."""
+
+ validation: Optional[Validation] = None
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "changes",
+ "completedOnUtc",
+ "data",
+ "dataType",
+ "errorMessage",
+ "timeoutInMinutes",
+ "timeoutInSeconds",
+ "validation",
+ ]
+ nullable_fields = [
+ "changes",
+ "errorMessage",
+ "timeoutInMinutes",
+ "timeoutInSeconds",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/dataconnectionerror.py b/bank-feeds/src/codat_bankfeeds/models/shared/dataconnectionerror.py
new file mode 100644
index 000000000..77fde6360
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/dataconnectionerror.py
@@ -0,0 +1,174 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from enum import Enum
+import pydantic
+from pydantic import model_serializer
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ErrorStatus(str, Enum):
+ r"""The current status of a transient error. Null statuses indicate that the error is not transient."""
+
+ ACTIVE = "Active"
+ RESOLVED = "Resolved"
+
+
+class DataConnectionErrorTypedDict(TypedDict):
+ error_message: NotRequired[str]
+ r"""A message about a error returned by Codat."""
+ errored_on_utc: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ resolved_on_utc: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: NotRequired[Nullable[ErrorStatus]]
+ r"""The current status of a transient error. Null statuses indicate that the error is not transient."""
+ status_code: NotRequired[str]
+ r"""The HTTP status code returned by the source platform when the error occurred."""
+ status_text: NotRequired[str]
+ r"""A non-numeric status code/text returned by the source platform when the error occurred."""
+
+
+class DataConnectionError(BaseModel):
+ error_message: Annotated[Optional[str], pydantic.Field(alias="errorMessage")] = None
+ r"""A message about a error returned by Codat."""
+
+ errored_on_utc: Annotated[Optional[str], pydantic.Field(alias="erroredOnUtc")] = (
+ None
+ )
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ resolved_on_utc: Annotated[Optional[str], pydantic.Field(alias="resolvedOnUtc")] = (
+ None
+ )
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ status: OptionalNullable[ErrorStatus] = UNSET
+ r"""The current status of a transient error. Null statuses indicate that the error is not transient."""
+
+ status_code: Annotated[Optional[str], pydantic.Field(alias="statusCode")] = None
+ r"""The HTTP status code returned by the source platform when the error occurred."""
+
+ status_text: Annotated[Optional[str], pydantic.Field(alias="statusText")] = None
+ r"""A non-numeric status code/text returned by the source platform when the error occurred."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "errorMessage",
+ "erroredOnUtc",
+ "resolvedOnUtc",
+ "status",
+ "statusCode",
+ "statusText",
+ ]
+ nullable_fields = ["status"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/dataconnectionstatus.py b/bank-feeds/src/codat_bankfeeds/models/shared/dataconnectionstatus.py
new file mode 100644
index 000000000..a97f7be30
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/dataconnectionstatus.py
@@ -0,0 +1,13 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+
+class DataConnectionStatus(str, Enum):
+ r"""The current authorization status of the data connection."""
+
+ PENDING_AUTH = "PendingAuth"
+ LINKED = "Linked"
+ UNLINKED = "Unlinked"
+ DEAUTHORIZED = "Deauthorized"
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/datatype.py b/bank-feeds/src/codat_bankfeeds/models/shared/datatype.py
new file mode 100644
index 000000000..e0aff6fb8
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/datatype.py
@@ -0,0 +1,52 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+
+class DataType(str, Enum):
+ r"""Available data types"""
+
+ ACCOUNT_TRANSACTIONS = "accountTransactions"
+ BALANCE_SHEET = "balanceSheet"
+ BANK_ACCOUNTS = "bankAccounts"
+ BANK_TRANSACTIONS = "bankTransactions"
+ BILL_CREDIT_NOTES = "billCreditNotes"
+ BILL_PAYMENTS = "billPayments"
+ BILLS = "bills"
+ CASH_FLOW_STATEMENT = "cashFlowStatement"
+ CHART_OF_ACCOUNTS = "chartOfAccounts"
+ COMPANY = "company"
+ CREDIT_NOTES = "creditNotes"
+ CUSTOMERS = "customers"
+ DIRECT_COSTS = "directCosts"
+ DIRECT_INCOMES = "directIncomes"
+ INVOICES = "invoices"
+ ITEM_RECEIPTS = "itemReceipts"
+ ITEMS = "items"
+ JOURNAL_ENTRIES = "journalEntries"
+ JOURNALS = "journals"
+ PAYMENT_METHODS = "paymentMethods"
+ PAYMENTS = "payments"
+ PROFIT_AND_LOSS = "profitAndLoss"
+ PURCHASE_ORDERS = "purchaseOrders"
+ SALES_ORDERS = "salesOrders"
+ SUPPLIERS = "suppliers"
+ TAX_RATES = "taxRates"
+ TRACKING_CATEGORIES = "trackingCategories"
+ TRANSFERS = "transfers"
+ BANKING_ACCOUNT_BALANCES = "banking-accountBalances"
+ BANKING_ACCOUNTS = "banking-accounts"
+ BANKING_TRANSACTION_CATEGORIES = "banking-transactionCategories"
+ BANKING_TRANSACTIONS = "banking-transactions"
+ COMMERCE_COMPANY_INFO = "commerce-companyInfo"
+ COMMERCE_CUSTOMERS = "commerce-customers"
+ COMMERCE_DISPUTES = "commerce-disputes"
+ COMMERCE_LOCATIONS = "commerce-locations"
+ COMMERCE_ORDERS = "commerce-orders"
+ COMMERCE_PAYMENT_METHODS = "commerce-paymentMethods"
+ COMMERCE_PAYMENTS = "commerce-payments"
+ COMMERCE_PRODUCT_CATEGORIES = "commerce-productCategories"
+ COMMERCE_PRODUCTS = "commerce-products"
+ COMMERCE_TAX_COMPONENTS = "commerce-taxComponents"
+ COMMERCE_TRANSACTIONS = "commerce-transactions"
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/errorvalidation.py b/bank-feeds/src/codat_bankfeeds/models/shared/errorvalidation.py
new file mode 100644
index 000000000..5af37b8ab
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/errorvalidation.py
@@ -0,0 +1,59 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .errorvalidationitem import ErrorValidationItem, ErrorValidationItemTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import List, TypedDict
+from typing_extensions import NotRequired
+
+
+class ErrorValidationTypedDict(TypedDict):
+ r"""A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here."""
+
+ errors: NotRequired[Nullable[List[ErrorValidationItemTypedDict]]]
+ warnings: NotRequired[Nullable[List[ErrorValidationItemTypedDict]]]
+
+
+class ErrorValidation(BaseModel):
+ r"""A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here."""
+
+ errors: OptionalNullable[List[ErrorValidationItem]] = UNSET
+
+ warnings: OptionalNullable[List[ErrorValidationItem]] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["errors", "warnings"]
+ nullable_fields = ["errors", "warnings"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/errorvalidationitem.py b/bank-feeds/src/codat_bankfeeds/models/shared/errorvalidationitem.py
new file mode 100644
index 000000000..edbc57faf
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/errorvalidationitem.py
@@ -0,0 +1,66 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ErrorValidationItemTypedDict(TypedDict):
+ item_id: NotRequired[Nullable[str]]
+ r"""Unique identifier for a validation item."""
+ message: NotRequired[Nullable[str]]
+ r"""A message outlining validation item's issue."""
+ validator_name: NotRequired[Nullable[str]]
+ r"""Name of validator."""
+
+
+class ErrorValidationItem(BaseModel):
+ item_id: Annotated[OptionalNullable[str], pydantic.Field(alias="itemId")] = UNSET
+ r"""Unique identifier for a validation item."""
+
+ message: OptionalNullable[str] = UNSET
+ r"""A message outlining validation item's issue."""
+
+ validator_name: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="validatorName")
+ ] = UNSET
+ r"""Name of validator."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["itemId", "message", "validatorName"]
+ nullable_fields = ["itemId", "message", "validatorName"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/halref.py b/bank-feeds/src/codat_bankfeeds/models/shared/halref.py
new file mode 100644
index 000000000..8c42402a6
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/halref.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from typing import Optional, TypedDict
+from typing_extensions import NotRequired
+
+
+class HalRefTypedDict(TypedDict):
+ href: NotRequired[str]
+ r"""Uri hypertext reference."""
+
+
+class HalRef(BaseModel):
+ href: Optional[str] = None
+ r"""Uri hypertext reference."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/links.py b/bank-feeds/src/codat_bankfeeds/models/shared/links.py
new file mode 100644
index 000000000..9dcdeb83f
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/links.py
@@ -0,0 +1,25 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .halref import HalRef, HalRefTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class LinksTypedDict(TypedDict):
+ current: HalRefTypedDict
+ self_: HalRefTypedDict
+ next: NotRequired[HalRefTypedDict]
+ previous: NotRequired[HalRefTypedDict]
+
+
+class Links(BaseModel):
+ current: HalRef
+
+ self_: Annotated[HalRef, pydantic.Field(alias="self")]
+
+ next: Optional[HalRef] = None
+
+ previous: Optional[HalRef] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushchangetype.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushchangetype.py
new file mode 100644
index 000000000..76371e9e3
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushchangetype.py
@@ -0,0 +1,14 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+
+class PushChangeType(str, Enum):
+ r"""Type of change being applied to record in third party platform."""
+
+ UNKNOWN = "Unknown"
+ CREATED = "Created"
+ MODIFIED = "Modified"
+ DELETED = "Deleted"
+ ATTACHMENT_UPLOADED = "AttachmentUploaded"
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushfieldvalidation.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushfieldvalidation.py
new file mode 100644
index 000000000..c410000ed
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushfieldvalidation.py
@@ -0,0 +1,63 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import Optional, TypedDict
+from typing_extensions import NotRequired
+
+
+class PushFieldValidationTypedDict(TypedDict):
+ details: str
+ r"""Details on the validation issue."""
+ field: NotRequired[str]
+ r"""Field name that resulted in the validation issue."""
+ ref: NotRequired[Nullable[str]]
+ r"""Unique reference identifier for the validation issue."""
+
+
+class PushFieldValidation(BaseModel):
+ details: str
+ r"""Details on the validation issue."""
+
+ field: Optional[str] = None
+ r"""Field name that resulted in the validation issue."""
+
+ ref: OptionalNullable[str] = UNSET
+ r"""Unique reference identifier for the validation issue."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["field", "ref"]
+ nullable_fields = ["ref"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushoperation.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperation.py
new file mode 100644
index 000000000..d0956fae9
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperation.py
@@ -0,0 +1,219 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .datatype import DataType
+from .pushoperationchange import PushOperationChange, PushOperationChangeTypedDict
+from .pushoperationstatus import PushOperationStatus
+from .validation import Validation, ValidationTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class PushOperationTypedDict(TypedDict):
+ company_id: str
+ r"""Unique identifier for your SMB in Codat."""
+ data_connection_key: str
+ r"""Unique identifier for a company's data connection."""
+ push_operation_key: str
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+ requested_on_utc: str
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ status: PushOperationStatus
+ r"""The current status of the push operation."""
+ status_code: int
+ r"""Push status code."""
+ changes: NotRequired[Nullable[List[PushOperationChangeTypedDict]]]
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+ completed_on_utc: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ data_type: NotRequired[DataType]
+ r"""Available data types"""
+ error_message: NotRequired[Nullable[str]]
+ r"""A message about the error."""
+ timeout_in_minutes: NotRequired[Nullable[int]]
+ r"""Number of minutes the push operation must complete within before it times out."""
+ timeout_in_seconds: NotRequired[Nullable[int]]
+ r"""Number of seconds the push operation must complete within before it times out."""
+ validation: NotRequired[ValidationTypedDict]
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+
+class PushOperation(BaseModel):
+ company_id: Annotated[str, pydantic.Field(alias="companyId")]
+ r"""Unique identifier for your SMB in Codat."""
+
+ data_connection_key: Annotated[str, pydantic.Field(alias="dataConnectionKey")]
+ r"""Unique identifier for a company's data connection."""
+
+ push_operation_key: Annotated[str, pydantic.Field(alias="pushOperationKey")]
+ r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
+
+ requested_on_utc: Annotated[str, pydantic.Field(alias="requestedOnUtc")]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ status: PushOperationStatus
+ r"""The current status of the push operation."""
+
+ status_code: Annotated[int, pydantic.Field(alias="statusCode")]
+ r"""Push status code."""
+
+ changes: OptionalNullable[List[PushOperationChange]] = UNSET
+ r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
+
+ completed_on_utc: Annotated[
+ Optional[str], pydantic.Field(alias="completedOnUtc")
+ ] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ data_type: Annotated[Optional[DataType], pydantic.Field(alias="dataType")] = None
+ r"""Available data types"""
+
+ error_message: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="errorMessage")
+ ] = UNSET
+ r"""A message about the error."""
+
+ timeout_in_minutes: Annotated[
+ OptionalNullable[int], pydantic.Field(alias="timeoutInMinutes")
+ ] = UNSET
+ r"""Number of minutes the push operation must complete within before it times out."""
+
+ timeout_in_seconds: Annotated[
+ OptionalNullable[int],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
+ alias="timeoutInSeconds",
+ ),
+ ] = UNSET
+ r"""Number of seconds the push operation must complete within before it times out."""
+
+ validation: Optional[Validation] = None
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "changes",
+ "completedOnUtc",
+ "dataType",
+ "errorMessage",
+ "timeoutInMinutes",
+ "timeoutInSeconds",
+ "validation",
+ ]
+ nullable_fields = [
+ "changes",
+ "errorMessage",
+ "timeoutInMinutes",
+ "timeoutInSeconds",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushoperationchange.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperationchange.py
new file mode 100644
index 000000000..2bd41d1cd
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperationchange.py
@@ -0,0 +1,68 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .pushchangetype import PushChangeType
+from .pushoperationref import PushOperationRef, PushOperationRefTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class PushOperationChangeTypedDict(TypedDict):
+ attachment_id: NotRequired[Nullable[str]]
+ r"""Unique identifier for the attachment created otherwise null."""
+ record_ref: NotRequired[PushOperationRefTypedDict]
+ type: NotRequired[PushChangeType]
+ r"""Type of change being applied to record in third party platform."""
+
+
+class PushOperationChange(BaseModel):
+ attachment_id: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="attachmentId")
+ ] = UNSET
+ r"""Unique identifier for the attachment created otherwise null."""
+
+ record_ref: Annotated[
+ Optional[PushOperationRef], pydantic.Field(alias="recordRef")
+ ] = None
+
+ type: Optional[PushChangeType] = None
+ r"""Type of change being applied to record in third party platform."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["attachmentId", "recordRef", "type"]
+ nullable_fields = ["attachmentId"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushoperationref.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperationref.py
new file mode 100644
index 000000000..305dadf85
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperationref.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .datatype import DataType
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class PushOperationRefTypedDict(TypedDict):
+ data_type: NotRequired[DataType]
+ r"""Available data types"""
+ id: NotRequired[str]
+ r"""Unique identifier for a push operation."""
+
+
+class PushOperationRef(BaseModel):
+ data_type: Annotated[Optional[DataType], pydantic.Field(alias="dataType")] = None
+ r"""Available data types"""
+
+ id: Optional[str] = None
+ r"""Unique identifier for a push operation."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushoperations.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperations.py
new file mode 100644
index 000000000..ae62e7c7a
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperations.py
@@ -0,0 +1,35 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .links import Links, LinksTypedDict
+from .pushoperation import PushOperation, PushOperationTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class PushOperationsTypedDict(TypedDict):
+ links: LinksTypedDict
+ page_number: int
+ r"""Current page number."""
+ page_size: int
+ r"""Number of items to return in results array."""
+ total_results: int
+ r"""Total number of items."""
+ results: NotRequired[List[PushOperationTypedDict]]
+
+
+class PushOperations(BaseModel):
+ links: Annotated[Links, pydantic.Field(alias="_links")]
+
+ page_number: Annotated[int, pydantic.Field(alias="pageNumber")]
+ r"""Current page number."""
+
+ page_size: Annotated[int, pydantic.Field(alias="pageSize")]
+ r"""Number of items to return in results array."""
+
+ total_results: Annotated[int, pydantic.Field(alias="totalResults")]
+ r"""Total number of items."""
+
+ results: Optional[List[PushOperation]] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushoperationstatus.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperationstatus.py
new file mode 100644
index 000000000..09fa8b1f2
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushoperationstatus.py
@@ -0,0 +1,13 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+
+class PushOperationStatus(str, Enum):
+ r"""The current status of the push operation."""
+
+ PENDING = "Pending"
+ FAILED = "Failed"
+ SUCCESS = "Success"
+ TIMED_OUT = "TimedOut"
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushoption.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushoption.py
new file mode 100644
index 000000000..e62ceb714
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushoption.py
@@ -0,0 +1,82 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .pushoptionchoice import PushOptionChoice, PushOptionChoiceTypedDict
+from .pushoptionproperty import PushOptionProperty, PushOptionPropertyTypedDict
+from .pushoptiontype import PushOptionType
+from .pushvalidationinfo import PushValidationInfo, PushValidationInfoTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class PushOptionTypedDict(TypedDict):
+ display_name: str
+ r"""The property's display name."""
+ required: bool
+ r"""The property is required if `True`."""
+ type: PushOptionType
+ r"""The option type."""
+ description: NotRequired[str]
+ r"""A description of the property."""
+ options: NotRequired[Nullable[List[PushOptionChoiceTypedDict]]]
+ properties: NotRequired[Nullable[Dict[str, PushOptionPropertyTypedDict]]]
+ validation: NotRequired[PushValidationInfoTypedDict]
+
+
+class PushOption(BaseModel):
+ display_name: Annotated[str, pydantic.Field(alias="displayName")]
+ r"""The property's display name."""
+
+ required: bool
+ r"""The property is required if `True`."""
+
+ type: PushOptionType
+ r"""The option type."""
+
+ description: Optional[str] = None
+ r"""A description of the property."""
+
+ options: OptionalNullable[List[PushOptionChoice]] = UNSET
+
+ properties: OptionalNullable[Dict[str, PushOptionProperty]] = UNSET
+
+ validation: Optional[PushValidationInfo] = None
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["description", "options", "properties", "validation"]
+ nullable_fields = ["options", "properties"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushoptionchoice.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushoptionchoice.py
new file mode 100644
index 000000000..b3e7566e3
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushoptionchoice.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .pushoptiontype import PushOptionType
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class PushOptionChoiceTypedDict(TypedDict):
+ description: NotRequired[str]
+ r"""A description of the property."""
+ display_name: NotRequired[str]
+ r"""The property's display name."""
+ required: NotRequired[bool]
+ r"""The property is required if `True`."""
+ type: NotRequired[PushOptionType]
+ r"""The option type."""
+ value: NotRequired[str]
+ r"""Allowed value for field."""
+
+
+class PushOptionChoice(BaseModel):
+ description: Optional[str] = None
+ r"""A description of the property."""
+
+ display_name: Annotated[Optional[str], pydantic.Field(alias="displayName")] = None
+ r"""The property's display name."""
+
+ required: Optional[bool] = None
+ r"""The property is required if `True`."""
+
+ type: Optional[PushOptionType] = None
+ r"""The option type."""
+
+ value: Optional[str] = None
+ r"""Allowed value for field."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushoptionproperty.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushoptionproperty.py
new file mode 100644
index 000000000..abed00758
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushoptionproperty.py
@@ -0,0 +1,81 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .pushoptionchoice import PushOptionChoice, PushOptionChoiceTypedDict
+from .pushoptiontype import PushOptionType
+from .pushvalidationinfo import PushValidationInfo, PushValidationInfoTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import Dict, List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class PushOptionPropertyTypedDict(TypedDict):
+ description: str
+ r"""A description of the property."""
+ display_name: str
+ r"""The property's display name."""
+ required: bool
+ r"""The property is required if `True`."""
+ type: PushOptionType
+ r"""The option type."""
+ options: NotRequired[Nullable[List[PushOptionChoiceTypedDict]]]
+ properties: NotRequired[Nullable[Dict[str, PushOptionPropertyTypedDict]]]
+ validation: NotRequired[PushValidationInfoTypedDict]
+
+
+class PushOptionProperty(BaseModel):
+ description: str
+ r"""A description of the property."""
+
+ display_name: Annotated[str, pydantic.Field(alias="displayName")]
+ r"""The property's display name."""
+
+ required: bool
+ r"""The property is required if `True`."""
+
+ type: PushOptionType
+ r"""The option type."""
+
+ options: OptionalNullable[List[PushOptionChoice]] = UNSET
+
+ properties: OptionalNullable[Dict[str, PushOptionProperty]] = UNSET
+
+ validation: Optional[PushValidationInfo] = None
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["options", "properties", "validation"]
+ nullable_fields = ["options", "properties"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushoptiontype.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushoptiontype.py
new file mode 100644
index 000000000..c9c246f2a
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushoptiontype.py
@@ -0,0 +1,17 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+
+class PushOptionType(str, Enum):
+ r"""The option type."""
+
+ ARRAY = "Array"
+ OBJECT = "Object"
+ STRING = "String"
+ NUMBER = "Number"
+ BOOLEAN = "Boolean"
+ DATE_TIME = "DateTime"
+ FILE = "File"
+ MULTI_PART = "MultiPart"
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/pushvalidationinfo.py b/bank-feeds/src/codat_bankfeeds/models/shared/pushvalidationinfo.py
new file mode 100644
index 000000000..a4befe7cf
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/pushvalidationinfo.py
@@ -0,0 +1,55 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .pushfieldvalidation import PushFieldValidation, PushFieldValidationTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import List, TypedDict
+from typing_extensions import NotRequired
+
+
+class PushValidationInfoTypedDict(TypedDict):
+ information: NotRequired[Nullable[List[PushFieldValidationTypedDict]]]
+ warnings: NotRequired[Nullable[List[PushFieldValidationTypedDict]]]
+
+
+class PushValidationInfo(BaseModel):
+ information: OptionalNullable[List[PushFieldValidation]] = UNSET
+
+ warnings: OptionalNullable[List[PushFieldValidation]] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["information", "warnings"]
+ nullable_fields = ["information", "warnings"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/routinginfo.py b/bank-feeds/src/codat_bankfeeds/models/shared/routinginfo.py
new file mode 100644
index 000000000..3ef7c75c7
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/routinginfo.py
@@ -0,0 +1,84 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from enum import Enum
+import pydantic
+from pydantic import model_serializer
+from typing import TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class Type(str, Enum):
+ r"""The type of routing number."""
+
+ RTN = "rtn"
+ ABA = "aba"
+ SWIFT = "swift"
+ BSB = "bsb"
+ IBAN = "iban"
+ NZ2 = "nz2"
+ TRNO = "trno"
+ SORTCODE = "sortcode"
+ BLZ = "blz"
+ IFSC = "ifsc"
+ BANKCODE = "bankcode"
+ APCA = "apca"
+ CLABE = "clabe"
+
+
+class RoutingInfoTypedDict(TypedDict):
+ r"""Routing information for the bank. This does not include account number."""
+
+ bank_code: NotRequired[Nullable[str]]
+ r"""The numeric identifier of the routing number"""
+ type: NotRequired[Nullable[Type]]
+ r"""The type of routing number."""
+
+
+class RoutingInfo(BaseModel):
+ r"""Routing information for the bank. This does not include account number."""
+
+ bank_code: Annotated[OptionalNullable[str], pydantic.Field(alias="bankCode")] = (
+ UNSET
+ )
+ r"""The numeric identifier of the routing number"""
+
+ type: OptionalNullable[Type] = Type.BANKCODE
+ r"""The type of routing number."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["bankCode", "type"]
+ nullable_fields = ["bankCode", "type"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/security.py b/bank-feeds/src/codat_bankfeeds/models/shared/security.py
new file mode 100644
index 000000000..7e575580f
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/security.py
@@ -0,0 +1,25 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import BaseModel
+from codat_bankfeeds.utils import FieldMetadata, SecurityMetadata
+from typing import TypedDict
+from typing_extensions import Annotated
+
+
+class SecurityTypedDict(TypedDict):
+ auth_header: str
+
+
+class Security(BaseModel):
+ auth_header: Annotated[
+ str,
+ FieldMetadata(
+ security=SecurityMetadata(
+ scheme=True,
+ scheme_type="apiKey",
+ sub_type="header",
+ field_name="Authorization",
+ )
+ ),
+ ]
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccount.py b/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccount.py
new file mode 100644
index 000000000..05a0971cd
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccount.py
@@ -0,0 +1,239 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from codat_bankfeeds.utils import serialize_decimal, validate_decimal
+from decimal import Decimal
+from enum import Enum
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_serializers import PlainSerializer
+from pydantic.functional_validators import BeforeValidator
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class Status(str, Enum):
+ r"""Status of the source account."""
+
+ PENDING = "pending"
+ CONNECTED = "connected"
+ CONNECTING = "connecting"
+ DISCONNECTED = "disconnected"
+ UNKNOWN = "unknown"
+
+
+class SourceAccountTypedDict(TypedDict):
+ r"""The target bank account in a supported accounting software for ingestion into a bank feed."""
+
+ id: str
+ r"""Unique ID for the bank account."""
+ account_name: NotRequired[Nullable[str]]
+ r"""The bank account name."""
+ account_number: NotRequired[Nullable[str]]
+ r"""The account number."""
+ account_type: NotRequired[Nullable[str]]
+ r"""The type of bank account e.g. Credit."""
+ balance: NotRequired[Nullable[Decimal]]
+ r"""The latest balance for the bank account."""
+ currency: NotRequired[str]
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+ feed_start_date: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ modified_date: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ sort_code: NotRequired[Nullable[str]]
+ r"""The sort code."""
+ status: NotRequired[Nullable[Status]]
+ r"""Status of the source account."""
+
+
+class SourceAccount(BaseModel):
+ r"""The target bank account in a supported accounting software for ingestion into a bank feed."""
+
+ id: str
+ r"""Unique ID for the bank account."""
+
+ account_name: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountName")
+ ] = UNSET
+ r"""The bank account name."""
+
+ account_number: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountNumber")
+ ] = UNSET
+ r"""The account number."""
+
+ account_type: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountType")
+ ] = UNSET
+ r"""The type of bank account e.g. Credit."""
+
+ balance: Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ] = UNSET
+ r"""The latest balance for the bank account."""
+
+ currency: Optional[str] = None
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+
+ feed_start_date: Annotated[Optional[str], pydantic.Field(alias="feedStartDate")] = (
+ None
+ )
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ modified_date: Annotated[Optional[str], pydantic.Field(alias="modifiedDate")] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ sort_code: Annotated[OptionalNullable[str], pydantic.Field(alias="sortCode")] = (
+ UNSET
+ )
+ r"""The sort code."""
+
+ status: OptionalNullable[Status] = UNSET
+ r"""Status of the source account."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "accountName",
+ "accountNumber",
+ "accountType",
+ "balance",
+ "currency",
+ "feedStartDate",
+ "modifiedDate",
+ "sortCode",
+ "status",
+ ]
+ nullable_fields = [
+ "accountName",
+ "accountNumber",
+ "accountType",
+ "balance",
+ "sortCode",
+ "status",
+ ]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccountv2.py b/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccountv2.py
new file mode 100644
index 000000000..711d70677
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccountv2.py
@@ -0,0 +1,209 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .accountinfo import AccountInfo, AccountInfoTypedDict
+from .routinginfo import RoutingInfo, RoutingInfoTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from codat_bankfeeds.utils import serialize_decimal, validate_decimal
+from decimal import Decimal
+from enum import Enum
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_serializers import PlainSerializer
+from pydantic.functional_validators import BeforeValidator
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class AccountType(str, Enum):
+ r"""The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard."""
+
+ CHECKING = "checking"
+ SAVINGS = "savings"
+ LOAN = "loan"
+ CREDIT_CARD = "creditCard"
+ PREPAID_CARD = "prepaidCard"
+
+
+class SourceAccountV2Status(str, Enum):
+ r"""Status of the source account."""
+
+ PENDING = "pending"
+ CONNECTED = "connected"
+ CONNECTING = "connecting"
+ DISCONNECTED = "disconnected"
+ UNKNOWN = "unknown"
+
+
+class SourceAccountV2TypedDict(TypedDict):
+ r"""The target bank account in a supported accounting software for ingestion into a bank feed."""
+
+ account_name: str
+ r"""The bank account name."""
+ account_number: str
+ r"""The account number."""
+ account_type: AccountType
+ r"""The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard."""
+ balance: Decimal
+ r"""The latest balance for the bank account."""
+ currency: str
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+ id: str
+ r"""Unique ID for the bank account."""
+ account_info: NotRequired[Nullable[AccountInfoTypedDict]]
+ feed_start_date: NotRequired[Nullable[str]]
+ r"""In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
+ ```
+ 2020-10-08
+ ```
+ """
+ modified_date: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ routing_info: NotRequired[RoutingInfoTypedDict]
+ r"""Routing information for the bank. This does not include account number."""
+ status: NotRequired[Nullable[SourceAccountV2Status]]
+ r"""Status of the source account."""
+
+
+class SourceAccountV2(BaseModel):
+ r"""The target bank account in a supported accounting software for ingestion into a bank feed."""
+
+ account_name: Annotated[str, pydantic.Field(alias="accountName")]
+ r"""The bank account name."""
+
+ account_number: Annotated[str, pydantic.Field(alias="accountNumber")]
+ r"""The account number."""
+
+ account_type: Annotated[AccountType, pydantic.Field(alias="accountType")]
+ r"""The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard."""
+
+ balance: Annotated[
+ Decimal,
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ]
+ r"""The latest balance for the bank account."""
+
+ currency: str
+ r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+
+ ## Unknown currencies
+
+ In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+
+ There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ """
+
+ id: str
+ r"""Unique ID for the bank account."""
+
+ account_info: Annotated[
+ OptionalNullable[AccountInfo], pydantic.Field(alias="accountInfo")
+ ] = UNSET
+
+ feed_start_date: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="feedStartDate")
+ ] = UNSET
+ r"""In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example:
+ ```
+ 2020-10-08
+ ```
+ """
+
+ modified_date: Annotated[Optional[str], pydantic.Field(alias="modifiedDate")] = None
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ routing_info: Annotated[
+ Optional[RoutingInfo], pydantic.Field(alias="routingInfo")
+ ] = None
+ r"""Routing information for the bank. This does not include account number."""
+
+ status: OptionalNullable[SourceAccountV2Status] = UNSET
+ r"""Status of the source account."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = [
+ "accountInfo",
+ "feedStartDate",
+ "modifiedDate",
+ "routingInfo",
+ "status",
+ ]
+ nullable_fields = ["accountInfo", "feedStartDate", "status"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccountwebhook.py b/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccountwebhook.py
new file mode 100644
index 000000000..51515c810
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccountwebhook.py
@@ -0,0 +1,74 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .sourceaccountwebhookpayload import (
+ SourceAccountWebhookPayload,
+ SourceAccountWebhookPayloadTypedDict,
+)
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class SourceAccountWebhookTypedDict(TypedDict):
+ event_type: NotRequired[str]
+ r"""The type of event."""
+ generated_date: NotRequired[str]
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+ id: NotRequired[str]
+ r"""Unique identifier of the event."""
+ payload: NotRequired[SourceAccountWebhookPayloadTypedDict]
+
+
+class SourceAccountWebhook(BaseModel):
+ event_type: Annotated[Optional[str], pydantic.Field(alias="eventType")] = None
+ r"""The type of event."""
+
+ generated_date: Annotated[Optional[str], pydantic.Field(alias="generatedDate")] = (
+ None
+ )
+ r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
+
+ ```
+ 2020-10-08T22:40:50Z
+ 2021-01-01T00:00:00
+ ```
+
+
+
+ When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+
+ - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ - Unqualified local time: `2021-11-15T01:00:00`
+ - UTC time offsets: `2021-11-15T01:00:00-05:00`
+
+ > Time zones
+ >
+ > Not all dates from Codat will contain information about time zones.
+ > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ """
+
+ id: Optional[str] = None
+ r"""Unique identifier of the event."""
+
+ payload: Optional[SourceAccountWebhookPayload] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccountwebhookpayload.py b/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccountwebhookpayload.py
new file mode 100644
index 000000000..e92ee3bc4
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/sourceaccountwebhookpayload.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .sourceaccount import SourceAccount, SourceAccountTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class SourceAccountWebhookPayloadTypedDict(TypedDict):
+ company_id: NotRequired[str]
+ r"""Unique identifier for your SMB in Codat."""
+ connection_id: NotRequired[str]
+ r"""Unique identifier for a company's data connection."""
+ source_account: NotRequired[SourceAccountTypedDict]
+ r"""The target bank account in a supported accounting software for ingestion into a bank feed."""
+
+
+class SourceAccountWebhookPayload(BaseModel):
+ company_id: Annotated[Optional[str], pydantic.Field(alias="companyId")] = None
+ r"""Unique identifier for your SMB in Codat."""
+
+ connection_id: Annotated[Optional[str], pydantic.Field(alias="connectionId")] = None
+ r"""Unique identifier for a company's data connection."""
+
+ source_account: Annotated[
+ Optional[SourceAccount], pydantic.Field(alias="sourceAccount")
+ ] = None
+ r"""The target bank account in a supported accounting software for ingestion into a bank feed."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/syncasbankfeeds.py b/bank-feeds/src/codat_bankfeeds/models/shared/syncasbankfeeds.py
new file mode 100644
index 000000000..83345c541
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/syncasbankfeeds.py
@@ -0,0 +1,30 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .bankaccountoption import BankAccountOption, BankAccountOptionTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class SyncAsBankFeedsTypedDict(TypedDict):
+ bank_account_options: NotRequired[List[BankAccountOptionTypedDict]]
+ enable_sync: NotRequired[bool]
+ r"""True if bank feeds sync is enabled."""
+ selected_bank_account_id: NotRequired[str]
+ r"""The bank account ID being synced."""
+
+
+class SyncAsBankFeeds(BaseModel):
+ bank_account_options: Annotated[
+ Optional[List[BankAccountOption]], pydantic.Field(alias="bankAccountOptions")
+ ] = None
+
+ enable_sync: Annotated[Optional[bool], pydantic.Field(alias="enableSync")] = None
+ r"""True if bank feeds sync is enabled."""
+
+ selected_bank_account_id: Annotated[
+ Optional[str], pydantic.Field(alias="selectedBankAccountId")
+ ] = None
+ r"""The bank account ID being synced."""
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/syncasexpenses.py b/bank-feeds/src/codat_bankfeeds/models/shared/syncasexpenses.py
new file mode 100644
index 000000000..f79dde8cb
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/syncasexpenses.py
@@ -0,0 +1,38 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .bankaccountoption import BankAccountOption, BankAccountOptionTypedDict
+from .configurationcustomer import ConfigurationCustomer, ConfigurationCustomerTypedDict
+from .configurationsupplier import ConfigurationSupplier, ConfigurationSupplierTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import List, Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class SyncAsExpensesTypedDict(TypedDict):
+ bank_account_options: NotRequired[List[BankAccountOptionTypedDict]]
+ customer: NotRequired[ConfigurationCustomerTypedDict]
+ enable_sync: NotRequired[bool]
+ r"""True if expense sync is enabled."""
+ selected_bank_account_id: NotRequired[str]
+ r"""The bank account ID being synced."""
+ supplier: NotRequired[ConfigurationSupplierTypedDict]
+
+
+class SyncAsExpenses(BaseModel):
+ bank_account_options: Annotated[
+ Optional[List[BankAccountOption]], pydantic.Field(alias="bankAccountOptions")
+ ] = None
+
+ customer: Optional[ConfigurationCustomer] = None
+
+ enable_sync: Annotated[Optional[bool], pydantic.Field(alias="enableSync")] = None
+ r"""True if expense sync is enabled."""
+
+ selected_bank_account_id: Annotated[
+ Optional[str], pydantic.Field(alias="selectedBankAccountId")
+ ] = None
+ r"""The bank account ID being synced."""
+
+ supplier: Optional[ConfigurationSupplier] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/syncconfiguration.py b/bank-feeds/src/codat_bankfeeds/models/shared/syncconfiguration.py
new file mode 100644
index 000000000..47438ccd3
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/syncconfiguration.py
@@ -0,0 +1,24 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .syncasbankfeeds import SyncAsBankFeeds, SyncAsBankFeedsTypedDict
+from .syncasexpenses import SyncAsExpenses, SyncAsExpensesTypedDict
+from codat_bankfeeds.types import BaseModel
+import pydantic
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class SyncConfigurationTypedDict(TypedDict):
+ sync_as_bank_feeds: NotRequired[SyncAsBankFeedsTypedDict]
+ sync_as_expenses: NotRequired[SyncAsExpensesTypedDict]
+
+
+class SyncConfiguration(BaseModel):
+ sync_as_bank_feeds: Annotated[
+ Optional[SyncAsBankFeeds], pydantic.Field(alias="syncAsBankFeeds")
+ ] = None
+
+ sync_as_expenses: Annotated[
+ Optional[SyncAsExpenses], pydantic.Field(alias="syncAsExpenses")
+ ] = None
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/targetaccountoption.py b/bank-feeds/src/codat_bankfeeds/models/shared/targetaccountoption.py
new file mode 100644
index 000000000..80b25d029
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/targetaccountoption.py
@@ -0,0 +1,86 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from codat_bankfeeds.utils import serialize_decimal, validate_decimal
+from decimal import Decimal
+import pydantic
+from pydantic import model_serializer
+from pydantic.functional_serializers import PlainSerializer
+from pydantic.functional_validators import BeforeValidator
+from typing import Optional, TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class TargetAccountOptionTypedDict(TypedDict):
+ account_number: NotRequired[Nullable[str]]
+ r"""The account number of the account."""
+ balance: NotRequired[Nullable[Decimal]]
+ r"""The balance of the account."""
+ id: NotRequired[str]
+ r"""Id of the target account."""
+ name: NotRequired[Nullable[str]]
+ r"""Name of the target account."""
+ sort_code: NotRequired[Nullable[str]]
+ r"""The sort code of the account."""
+
+
+class TargetAccountOption(BaseModel):
+ account_number: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="accountNumber")
+ ] = UNSET
+ r"""The account number of the account."""
+
+ balance: Annotated[
+ OptionalNullable[Decimal],
+ BeforeValidator(validate_decimal),
+ PlainSerializer(serialize_decimal(False)),
+ ] = UNSET
+ r"""The balance of the account."""
+
+ id: Optional[str] = None
+ r"""Id of the target account."""
+
+ name: OptionalNullable[str] = UNSET
+ r"""Name of the target account."""
+
+ sort_code: Annotated[OptionalNullable[str], pydantic.Field(alias="sortCode")] = (
+ UNSET
+ )
+ r"""The sort code of the account."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["accountNumber", "balance", "id", "name", "sortCode"]
+ nullable_fields = ["accountNumber", "balance", "name", "sortCode"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/validation.py b/bank-feeds/src/codat_bankfeeds/models/shared/validation.py
new file mode 100644
index 000000000..6141c4f5a
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/validation.py
@@ -0,0 +1,59 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .validationitem import ValidationItem, ValidationItemTypedDict
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+from pydantic import model_serializer
+from typing import List, TypedDict
+from typing_extensions import NotRequired
+
+
+class ValidationTypedDict(TypedDict):
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+ errors: NotRequired[Nullable[List[ValidationItemTypedDict]]]
+ warnings: NotRequired[Nullable[List[ValidationItemTypedDict]]]
+
+
+class Validation(BaseModel):
+ r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
+
+ errors: OptionalNullable[List[ValidationItem]] = UNSET
+
+ warnings: OptionalNullable[List[ValidationItem]] = UNSET
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["errors", "warnings"]
+ nullable_fields = ["errors", "warnings"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/models/shared/validationitem.py b/bank-feeds/src/codat_bankfeeds/models/shared/validationitem.py
new file mode 100644
index 000000000..cfa04cc4d
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/models/shared/validationitem.py
@@ -0,0 +1,66 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from codat_bankfeeds.types import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UNSET,
+ UNSET_SENTINEL,
+)
+import pydantic
+from pydantic import model_serializer
+from typing import TypedDict
+from typing_extensions import Annotated, NotRequired
+
+
+class ValidationItemTypedDict(TypedDict):
+ item_id: NotRequired[Nullable[str]]
+ r"""Unique identifier for a validation item."""
+ message: NotRequired[Nullable[str]]
+ r"""A message outlining validation item's issue."""
+ validator_name: NotRequired[Nullable[str]]
+ r"""Name of validator."""
+
+
+class ValidationItem(BaseModel):
+ item_id: Annotated[OptionalNullable[str], pydantic.Field(alias="itemId")] = UNSET
+ r"""Unique identifier for a validation item."""
+
+ message: OptionalNullable[str] = UNSET
+ r"""A message outlining validation item's issue."""
+
+ validator_name: Annotated[
+ OptionalNullable[str], pydantic.Field(alias="validatorName")
+ ] = UNSET
+ r"""Name of validator."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = ["itemId", "message", "validatorName"]
+ nullable_fields = ["itemId", "message", "validatorName"]
+ null_default_fields = []
+
+ serialized = handler(self)
+
+ m = {}
+
+ for n, f in self.model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k)
+ serialized.pop(k, None)
+
+ optional_nullable = k in optional_fields and k in nullable_fields
+ is_set = (
+ self.__pydantic_fields_set__.intersection({n})
+ or k in null_default_fields
+ ) # pylint: disable=no-member
+
+ if val is not None and val != UNSET_SENTINEL:
+ m[k] = val
+ elif val != UNSET_SENTINEL and (
+ not k in optional_fields or (optional_nullable and is_set)
+ ):
+ m[k] = val
+
+ return m
diff --git a/bank-feeds/src/codat_bankfeeds/py.typed b/bank-feeds/src/codat_bankfeeds/py.typed
new file mode 100644
index 000000000..3e38f1a92
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/py.typed
@@ -0,0 +1 @@
+# Marker file for PEP 561. The package enables type hints.
diff --git a/bank-feeds/src/codat_bankfeeds/sdk.py b/bank-feeds/src/codat_bankfeeds/sdk.py
new file mode 100644
index 000000000..1bc2e6120
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/sdk.py
@@ -0,0 +1,147 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from .httpclient import AsyncHttpClient, HttpClient
+from .sdkconfiguration import SDKConfiguration
+from .utils.logger import Logger, get_default_logger
+from .utils.retries import RetryConfig
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import SDKHooks
+from codat_bankfeeds.account_mapping import AccountMapping
+from codat_bankfeeds.bank_accounts import BankAccounts
+from codat_bankfeeds.companies import Companies
+from codat_bankfeeds.company_information import CompanyInformation
+from codat_bankfeeds.configuration import Configuration
+from codat_bankfeeds.connections import Connections
+from codat_bankfeeds.models import shared
+from codat_bankfeeds.source_accounts import SourceAccounts
+from codat_bankfeeds.sync import Sync
+from codat_bankfeeds.transactions import Transactions
+from codat_bankfeeds.types import OptionalNullable, UNSET
+import httpx
+from typing import Callable, Dict, Optional, Union
+
+
+class CodatBankFeeds(BaseSDK):
+ r"""Bank Feeds API: Bank Feeds API enables your SMB users to set up bank feeds from accounts in your application to supported accounting software.
+
+ A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting software.
+
+ [Explore product](https://docs.codat.io/bank-feeds-api/overview) | [See OpenAPI spec](https://github.com/codatio/oas)
+
+ ---
+
+ ## Endpoints
+
+ | Endpoints | Description |
+ | :- |:- |
+ | Companies | Create and manage your SMB users' companies. |
+ | Connections | Create new and manage existing data connections for a company. |
+ | Source accounts | Provide and manage lists of source bank accounts. |
+ | Account mapping | Extra functionality for building an account management UI. |
+ | Company information | Get detailed information about a company from the underlying platform. |
+ | Transactions | Create new bank account transactions for a company's connections, and see previous operations. |
+
+ """
+
+ companies: Companies
+ r"""Create and manage your SMB users' companies."""
+ connections: Connections
+ r"""Create new and manage existing data connections for a company."""
+ account_mapping: AccountMapping
+ r"""Extra functionality for building an account management UI."""
+ company_information: CompanyInformation
+ r"""Get detailed information about a company from the underlying accounting software."""
+ source_accounts: SourceAccounts
+ r"""Provide and manage lists of source bank accounts."""
+ bank_accounts: BankAccounts
+ r"""Access bank accounts in an SMBs accounting software."""
+ transactions: Transactions
+ r"""Create new bank account transactions for a company's connections, and see previous operations."""
+ configuration: Configuration
+ r"""Configure bank feeds for a company."""
+ sync: Sync
+ r"""Monitor the status of data syncs."""
+
+ def __init__(
+ self,
+ security: Union[shared.Security, Callable[[], shared.Security]],
+ server_idx: Optional[int] = None,
+ server_url: Optional[str] = None,
+ url_params: Optional[Dict[str, str]] = None,
+ client: Optional[HttpClient] = None,
+ async_client: Optional[AsyncHttpClient] = None,
+ retry_config: OptionalNullable[RetryConfig] = UNSET,
+ timeout_ms: Optional[int] = None,
+ debug_logger: Optional[Logger] = None,
+ ) -> None:
+ r"""Instantiates the SDK configuring it with the provided parameters.
+
+ :param security: The security details required for authentication
+ :param server_idx: The index of the server to use for all methods
+ :param server_url: The server URL to use for all methods
+ :param url_params: Parameters to optionally template the server URL with
+ :param client: The HTTP client to use for all synchronous methods
+ :param async_client: The Async HTTP client to use for all asynchronous methods
+ :param retry_config: The retry configuration to use for all supported methods
+ :param timeout_ms: Optional request timeout applied to each operation in milliseconds
+ """
+ if client is None:
+ client = httpx.Client()
+
+ assert issubclass(
+ type(client), HttpClient
+ ), "The provided client must implement the HttpClient protocol."
+
+ if async_client is None:
+ async_client = httpx.AsyncClient()
+
+ if debug_logger is None:
+ debug_logger = get_default_logger()
+
+ assert issubclass(
+ type(async_client), AsyncHttpClient
+ ), "The provided async_client must implement the AsyncHttpClient protocol."
+
+ if server_url is not None:
+ if url_params is not None:
+ server_url = utils.template_url(server_url, url_params)
+
+ BaseSDK.__init__(
+ self,
+ SDKConfiguration(
+ client=client,
+ async_client=async_client,
+ security=security,
+ server_url=server_url,
+ server_idx=server_idx,
+ retry_config=retry_config,
+ timeout_ms=timeout_ms,
+ debug_logger=debug_logger,
+ ),
+ )
+
+ hooks = SDKHooks()
+
+ current_server_url, *_ = self.sdk_configuration.get_server_details()
+ server_url, self.sdk_configuration.client = hooks.sdk_init(
+ current_server_url, self.sdk_configuration.client
+ )
+ if current_server_url != server_url:
+ self.sdk_configuration.server_url = server_url
+
+ # pylint: disable=protected-access
+ self.sdk_configuration.__dict__["_hooks"] = hooks
+
+ self._init_sdks()
+
+ def _init_sdks(self):
+ self.companies = Companies(self.sdk_configuration)
+ self.connections = Connections(self.sdk_configuration)
+ self.account_mapping = AccountMapping(self.sdk_configuration)
+ self.company_information = CompanyInformation(self.sdk_configuration)
+ self.source_accounts = SourceAccounts(self.sdk_configuration)
+ self.bank_accounts = BankAccounts(self.sdk_configuration)
+ self.transactions = Transactions(self.sdk_configuration)
+ self.configuration = Configuration(self.sdk_configuration)
+ self.sync = Sync(self.sdk_configuration)
diff --git a/bank-feeds/src/codat_bankfeeds/sdkconfiguration.py b/bank-feeds/src/codat_bankfeeds/sdkconfiguration.py
new file mode 100644
index 000000000..91d6ff6af
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/sdkconfiguration.py
@@ -0,0 +1,48 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from ._hooks import SDKHooks
+from .httpclient import AsyncHttpClient, HttpClient
+from .utils import Logger, RetryConfig, remove_suffix
+from codat_bankfeeds.models import shared
+from codat_bankfeeds.types import OptionalNullable, UNSET
+from dataclasses import dataclass
+from pydantic import Field
+from typing import Callable, Dict, Optional, Tuple, Union
+
+
+SERVERS = [
+ "https://api.codat.io",
+ # Production
+]
+"""Contains the list of servers available to the SDK"""
+
+
+@dataclass
+class SDKConfiguration:
+ client: HttpClient
+ async_client: AsyncHttpClient
+ debug_logger: Logger
+ security: Optional[Union[shared.Security, Callable[[], shared.Security]]] = None
+ server_url: Optional[str] = ""
+ server_idx: Optional[int] = 0
+ language: str = "python"
+ openapi_doc_version: str = "3.0.0"
+ sdk_version: str = "7.0.0"
+ gen_version: str = "2.415.6"
+ user_agent: str = "speakeasy-sdk/python 7.0.0 2.415.6 3.0.0 codat-bankfeeds"
+ retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
+ timeout_ms: Optional[int] = None
+
+ def __post_init__(self):
+ self._hooks = SDKHooks()
+
+ def get_server_details(self) -> Tuple[str, Dict[str, str]]:
+ if self.server_url is not None and self.server_url:
+ return remove_suffix(self.server_url, "/"), {}
+ if self.server_idx is None:
+ self.server_idx = 0
+
+ return SERVERS[self.server_idx], {}
+
+ def get_hooks(self) -> SDKHooks:
+ return self._hooks
diff --git a/bank-feeds/src/codat_bankfeeds/source_accounts.py b/bank-feeds/src/codat_bankfeeds/source_accounts.py
new file mode 100644
index 000000000..e7f102027
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/source_accounts.py
@@ -0,0 +1,1395 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import HookContext
+from codat_bankfeeds.models import errors, operations, shared
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+import io
+from typing import Any, IO, Optional, Union, cast
+
+
+class SourceAccounts(BaseSDK):
+ r"""Provide and manage lists of source bank accounts."""
+
+ def create(
+ self,
+ *,
+ request: Union[
+ operations.CreateSourceAccountRequest,
+ operations.CreateSourceAccountRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[operations.CreateSourceAccountResponseBody]:
+ r"""Create source account
+
+ The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
+
+ #### Account mapping variability
+
+ The method of mapping the source account to the target account varies depending on the accounting software your company uses.
+
+ #### Mapping options:
+
+ 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
+ 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
+ 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
+
+ ### Integration-specific behaviour
+
+ | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
+ | --------------------- | ----------- | ---------------- | --------------------------- |
+ | Xero | ✅ | ✅ | |
+ | FreeAgent | ✅ | ✅ | |
+ | Oracle NetSuite | ✅ | ✅ | |
+ | Exact Online (NL) | ✅ | ✅ | |
+ | QuickBooks Online | | | ✅ |
+ | Sage | | | ✅ |
+
+ > ### Versioning
+ > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.CreateSourceAccountRequest)
+ request = cast(operations.CreateSourceAccountRequest, request)
+
+ req = self.build_request(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ True,
+ "json",
+ Optional[operations.CreateSourceAccountRequestBody],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="create-source-account",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[operations.CreateSourceAccountResponseBody]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def create_async(
+ self,
+ *,
+ request: Union[
+ operations.CreateSourceAccountRequest,
+ operations.CreateSourceAccountRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[operations.CreateSourceAccountResponseBody]:
+ r"""Create source account
+
+ The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
+
+ #### Account mapping variability
+
+ The method of mapping the source account to the target account varies depending on the accounting software your company uses.
+
+ #### Mapping options:
+
+ 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
+ 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
+ 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
+
+ ### Integration-specific behaviour
+
+ | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
+ | --------------------- | ----------- | ---------------- | --------------------------- |
+ | Xero | ✅ | ✅ | |
+ | FreeAgent | ✅ | ✅ | |
+ | Oracle NetSuite | ✅ | ✅ | |
+ | Exact Online (NL) | ✅ | ✅ | |
+ | QuickBooks Online | | | ✅ |
+ | Sage | | | ✅ |
+
+ > ### Versioning
+ > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.CreateSourceAccountRequest)
+ request = cast(operations.CreateSourceAccountRequest, request)
+
+ req = self.build_request_async(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ True,
+ "json",
+ Optional[operations.CreateSourceAccountRequestBody],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="create-source-account",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[operations.CreateSourceAccountResponseBody]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def delete(
+ self,
+ *,
+ request: Union[
+ operations.DeleteSourceAccountRequest,
+ operations.DeleteSourceAccountRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ):
+ r"""Delete source account
+
+ The _Delete source account_ endpoint enables you to remove a source account.
+
+ Removing a source account will also remove any mapping between the source bank feed bank accounts and the target bankfeed bank account.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.DeleteSourceAccountRequest)
+ request = cast(operations.DeleteSourceAccountRequest, request)
+
+ req = self.build_request(
+ method="DELETE",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="delete-source-account",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "204", "*"):
+ return
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def delete_async(
+ self,
+ *,
+ request: Union[
+ operations.DeleteSourceAccountRequest,
+ operations.DeleteSourceAccountRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ):
+ r"""Delete source account
+
+ The _Delete source account_ endpoint enables you to remove a source account.
+
+ Removing a source account will also remove any mapping between the source bank feed bank accounts and the target bankfeed bank account.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.DeleteSourceAccountRequest)
+ request = cast(operations.DeleteSourceAccountRequest, request)
+
+ req = self.build_request_async(
+ method="DELETE",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="delete-source-account",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "204", "*"):
+ return
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def delete_credentials(
+ self,
+ *,
+ request: Union[
+ operations.DeleteBankFeedCredentialsRequest,
+ operations.DeleteBankFeedCredentialsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ):
+ r"""Delete all source account credentials
+
+ The _Delete Bank Account Credentials_ endpoint serves as a comprehensive mechanism for revoking all existing authorization credentials that a company employs to establish its Bank Feed connection.
+
+ In cases where multiple credential sets have been generated, a single API call to this endpoint revokes all of them.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(
+ request, operations.DeleteBankFeedCredentialsRequest
+ )
+ request = cast(operations.DeleteBankFeedCredentialsRequest, request)
+
+ req = self.build_request(
+ method="DELETE",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="delete-bank-feed-credentials",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "204", "*"):
+ return
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def delete_credentials_async(
+ self,
+ *,
+ request: Union[
+ operations.DeleteBankFeedCredentialsRequest,
+ operations.DeleteBankFeedCredentialsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ):
+ r"""Delete all source account credentials
+
+ The _Delete Bank Account Credentials_ endpoint serves as a comprehensive mechanism for revoking all existing authorization credentials that a company employs to establish its Bank Feed connection.
+
+ In cases where multiple credential sets have been generated, a single API call to this endpoint revokes all of them.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(
+ request, operations.DeleteBankFeedCredentialsRequest
+ )
+ request = cast(operations.DeleteBankFeedCredentialsRequest, request)
+
+ req = self.build_request_async(
+ method="DELETE",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="delete-bank-feed-credentials",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "204", "*"):
+ return
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def generate_credentials(
+ self,
+ *,
+ request: Union[
+ operations.GenerateCredentialsRequest,
+ operations.GenerateCredentialsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankAccountCredentials]:
+ r"""Generate source account credentials
+
+ The _Generate Bank Account Credentials_ endpoint can be used to generate credentials for QuickBooks Online to use for authentication of the Bank Feed in their portal, each time this is used a new set of credentials will be generated.
+
+ The old credentials will still be valid until the revoke credentials endpoint is used, which will revoke all credentials associated to the data connection.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GenerateCredentialsRequest)
+ request = cast(operations.GenerateCredentialsRequest, request)
+
+ req = self.build_request(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ False,
+ "json",
+ Union[bytes, IO[bytes], io.BufferedReader],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="generate-credentials",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.BankAccountCredentials]
+ )
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def generate_credentials_async(
+ self,
+ *,
+ request: Union[
+ operations.GenerateCredentialsRequest,
+ operations.GenerateCredentialsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.BankAccountCredentials]:
+ r"""Generate source account credentials
+
+ The _Generate Bank Account Credentials_ endpoint can be used to generate credentials for QuickBooks Online to use for authentication of the Bank Feed in their portal, each time this is used a new set of credentials will be generated.
+
+ The old credentials will still be valid until the revoke credentials endpoint is used, which will revoke all credentials associated to the data connection.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GenerateCredentialsRequest)
+ request = cast(operations.GenerateCredentialsRequest, request)
+
+ req = self.build_request_async(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=True,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.request_body,
+ False,
+ False,
+ "json",
+ Union[bytes, IO[bytes], io.BufferedReader],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="generate-credentials",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.BankAccountCredentials]
+ )
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def list(
+ self,
+ *,
+ request: Union[
+ operations.ListSourceAccountsRequest,
+ operations.ListSourceAccountsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[operations.ListSourceAccountsResponseBody]:
+ r"""List source accounts
+
+ The _List source accounts_ endpoint returns a list of [source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) for a given company's connection.
+
+ [source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) are the bank's bank account within Codat's domain from which transactions are synced into the accounting platform.
+
+ > ### Versioning
+ > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListSourceAccountsRequest)
+ request = cast(operations.ListSourceAccountsRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="list-source-accounts",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[operations.ListSourceAccountsResponseBody]
+ )
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def list_async(
+ self,
+ *,
+ request: Union[
+ operations.ListSourceAccountsRequest,
+ operations.ListSourceAccountsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[operations.ListSourceAccountsResponseBody]:
+ r"""List source accounts
+
+ The _List source accounts_ endpoint returns a list of [source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) for a given company's connection.
+
+ [source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) are the bank's bank account within Codat's domain from which transactions are synced into the accounting platform.
+
+ > ### Versioning
+ > If you are integrating the Bank Feeds API with Codat after August 1, 2024, please use the v2 version of the API, as detailed in the schema below. For integrations completed before August 1, 2024, select the v1 version from the schema dropdown below.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListSourceAccountsRequest)
+ request = cast(operations.ListSourceAccountsRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="list-source-accounts",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[operations.ListSourceAccountsResponseBody]
+ )
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def update(
+ self,
+ *,
+ request: Union[
+ operations.UpdateSourceAccountRequest,
+ operations.UpdateSourceAccountRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.SourceAccount]:
+ r"""Update source account
+
+ The _Update source account_ endpoint updates a single source account for a single data connection connected to a single company.
+
+ ### Tips and pitfalls
+
+ * This endpoint only updates the `accountName` field.
+ * Updates made here apply exclusively to source accounts and will not affect target accounts in the accounting software.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.UpdateSourceAccountRequest)
+ request = cast(operations.UpdateSourceAccountRequest, request)
+
+ req = self.build_request(
+ method="PATCH",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.source_account,
+ False,
+ True,
+ "json",
+ Optional[shared.SourceAccount],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="update-source-account",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.SourceAccount])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def update_async(
+ self,
+ *,
+ request: Union[
+ operations.UpdateSourceAccountRequest,
+ operations.UpdateSourceAccountRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.SourceAccount]:
+ r"""Update source account
+
+ The _Update source account_ endpoint updates a single source account for a single data connection connected to a single company.
+
+ ### Tips and pitfalls
+
+ * This endpoint only updates the `accountName` field.
+ * Updates made here apply exclusively to source accounts and will not affect target accounts in the accounting software.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.UpdateSourceAccountRequest)
+ request = cast(operations.UpdateSourceAccountRequest, request)
+
+ req = self.build_request_async(
+ method="PATCH",
+ path="/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.source_account,
+ False,
+ True,
+ "json",
+ Optional[shared.SourceAccount],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="update-source-account",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.SourceAccount])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/sync.py b/bank-feeds/src/codat_bankfeeds/sync.py
new file mode 100644
index 000000000..64ed32329
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/sync.py
@@ -0,0 +1,222 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import HookContext
+from codat_bankfeeds.models import errors, operations, shared
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+from typing import Any, Optional, Union, cast
+
+
+class Sync(BaseSDK):
+ r"""Monitor the status of data syncs."""
+
+ def get_last_successful_sync(
+ self,
+ *,
+ request: Union[
+ operations.GetLastSuccessfulRequest,
+ operations.GetLastSuccessfulRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.CompanySyncStatus]:
+ r"""Get last successful sync
+
+ Use the _Get last successful sync_ endpoint to obtain the status information for the company's [most recent successful sync](https://docs.codat.io/bank-feeds-api#/schemas/CompanySyncStatus).
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetLastSuccessfulRequest)
+ request = cast(operations.GetLastSuccessfulRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/sync/banking/syncs/lastSuccessful/status",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="get-last-successful",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.CompanySyncStatus]
+ )
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def get_last_successful_sync_async(
+ self,
+ *,
+ request: Union[
+ operations.GetLastSuccessfulRequest,
+ operations.GetLastSuccessfulRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.CompanySyncStatus]:
+ r"""Get last successful sync
+
+ Use the _Get last successful sync_ endpoint to obtain the status information for the company's [most recent successful sync](https://docs.codat.io/bank-feeds-api#/schemas/CompanySyncStatus).
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetLastSuccessfulRequest)
+ request = cast(operations.GetLastSuccessfulRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/sync/banking/syncs/lastSuccessful/status",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="get-last-successful",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.CompanySyncStatus]
+ )
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/transactions.py b/bank-feeds/src/codat_bankfeeds/transactions.py
new file mode 100644
index 000000000..5a2811b68
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/transactions.py
@@ -0,0 +1,670 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basesdk import BaseSDK
+from codat_bankfeeds import utils
+from codat_bankfeeds._hooks import HookContext
+from codat_bankfeeds.models import errors, operations, shared
+from codat_bankfeeds.types import BaseModel, OptionalNullable, UNSET
+from typing import Any, Optional, Union, cast
+
+
+class Transactions(BaseSDK):
+ r"""Create new bank account transactions for a company's connections, and see previous operations."""
+
+ def create(
+ self,
+ *,
+ request: Union[
+ operations.CreateBankTransactionsRequest,
+ operations.CreateBankTransactionsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.CreateBankTransactionsResponse]:
+ r"""Create bank transactions
+
+ The *Create bank transactions* endpoint creates new [bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company's connection.
+
+ [Bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of monetary amounts that have moved in and out of an SMB's bank account.
+
+ **Integration-specific behaviour**
+
+ Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/bank-feeds-api#/operations/get-create-bankTransactions-model).
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support creating a bank account transactions.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.CreateBankTransactionsRequest)
+ request = cast(operations.CreateBankTransactionsRequest, request)
+
+ req = self.build_request(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.create_bank_transactions,
+ False,
+ True,
+ "json",
+ Optional[shared.CreateBankTransactions],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="create-bank-transactions",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.CreateBankTransactionsResponse]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def create_async(
+ self,
+ *,
+ request: Union[
+ operations.CreateBankTransactionsRequest,
+ operations.CreateBankTransactionsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.CreateBankTransactionsResponse]:
+ r"""Create bank transactions
+
+ The *Create bank transactions* endpoint creates new [bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company's connection.
+
+ [Bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of monetary amounts that have moved in and out of an SMB's bank account.
+
+ **Integration-specific behaviour**
+
+ Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/bank-feeds-api#/operations/get-create-bankTransactions-model).
+
+ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support creating a bank account transactions.
+
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.CreateBankTransactionsRequest)
+ request = cast(operations.CreateBankTransactionsRequest, request)
+
+ req = self.build_request_async(
+ method="POST",
+ path="/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ get_serialized_body=lambda: utils.serialize_request_body(
+ request.create_bank_transactions,
+ False,
+ True,
+ "json",
+ Optional[shared.CreateBankTransactions],
+ ),
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="create-bank-transactions",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(
+ http_res.text, Optional[shared.CreateBankTransactionsResponse]
+ )
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def get_create_operation(
+ self,
+ *,
+ request: Union[
+ operations.GetCreateOperationRequest,
+ operations.GetCreateOperationRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.PushOperation]:
+ r"""Get create operation
+
+ Retrieve push operation.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetCreateOperationRequest)
+ request = cast(operations.GetCreateOperationRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/push/{pushOperationKey}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="get-create-operation",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.PushOperation])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def get_create_operation_async(
+ self,
+ *,
+ request: Union[
+ operations.GetCreateOperationRequest,
+ operations.GetCreateOperationRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.PushOperation]:
+ r"""Get create operation
+
+ Retrieve push operation.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.GetCreateOperationRequest)
+ request = cast(operations.GetCreateOperationRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/push/{pushOperationKey}",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="get-create-operation",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.PushOperation])
+ if utils.match_response(
+ http_res,
+ ["401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ def list_create_operations(
+ self,
+ *,
+ request: Union[
+ operations.ListCreateOperationsRequest,
+ operations.ListCreateOperationsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.PushOperations]:
+ r"""List create operations
+
+ List create operations.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListCreateOperationsRequest)
+ request = cast(operations.ListCreateOperationsRequest, request)
+
+ req = self.build_request(
+ method="GET",
+ path="/companies/{companyId}/push",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = self.do_request(
+ hook_ctx=HookContext(
+ operation_id="list-create-operations",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.PushOperations])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
+
+ async def list_create_operations_async(
+ self,
+ *,
+ request: Union[
+ operations.ListCreateOperationsRequest,
+ operations.ListCreateOperationsRequestTypedDict,
+ ],
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
+ server_url: Optional[str] = None,
+ timeout_ms: Optional[int] = None,
+ ) -> Optional[shared.PushOperations]:
+ r"""List create operations
+
+ List create operations.
+
+ :param request: The request object to send.
+ :param retries: Override the default retry configuration for this method
+ :param server_url: Override the default server URL for this method
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
+ """
+ base_url = None
+ url_variables = None
+ if timeout_ms is None:
+ timeout_ms = self.sdk_configuration.timeout_ms
+
+ if server_url is not None:
+ base_url = server_url
+
+ if not isinstance(request, BaseModel):
+ request = utils.unmarshal(request, operations.ListCreateOperationsRequest)
+ request = cast(operations.ListCreateOperationsRequest, request)
+
+ req = self.build_request_async(
+ method="GET",
+ path="/companies/{companyId}/push",
+ base_url=base_url,
+ url_variables=url_variables,
+ request=request,
+ request_body_required=False,
+ request_has_path_params=True,
+ request_has_query_params=True,
+ user_agent_header="user-agent",
+ accept_header_value="application/json",
+ security=self.sdk_configuration.security,
+ timeout_ms=timeout_ms,
+ )
+
+ if retries == UNSET:
+ if self.sdk_configuration.retry_config is not UNSET:
+ retries = self.sdk_configuration.retry_config
+ else:
+ retries = utils.RetryConfig(
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
+ )
+
+ retry_config = None
+ if isinstance(retries, utils.RetryConfig):
+ retry_config = (retries, ["408", "429", "5XX"])
+
+ http_res = await self.do_request_async(
+ hook_ctx=HookContext(
+ operation_id="list-create-operations",
+ oauth2_scopes=[],
+ security_source=self.sdk_configuration.security,
+ ),
+ request=req,
+ error_status_codes=[
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "429",
+ "4XX",
+ "500",
+ "503",
+ "5XX",
+ ],
+ retry_config=retry_config,
+ )
+
+ data: Any = None
+ if utils.match_response(http_res, "200", "application/json"):
+ return utils.unmarshal_json(http_res.text, Optional[shared.PushOperations])
+ if utils.match_response(
+ http_res,
+ ["400", "401", "402", "403", "404", "429", "500", "503"],
+ "application/json",
+ ):
+ data = utils.unmarshal_json(http_res.text, errors.ErrorMessageData)
+ raise errors.ErrorMessage(data=data)
+ if utils.match_response(http_res, ["4XX", "5XX"], "*"):
+ raise errors.SDKError(
+ "API error occurred", http_res.status_code, http_res.text, http_res
+ )
+
+ content_type = http_res.headers.get("Content-Type")
+ raise errors.SDKError(
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
+ http_res.status_code,
+ http_res.text,
+ http_res,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/types/__init__.py b/bank-feeds/src/codat_bankfeeds/types/__init__.py
new file mode 100644
index 000000000..fc76fe0c5
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/types/__init__.py
@@ -0,0 +1,21 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .basemodel import (
+ BaseModel,
+ Nullable,
+ OptionalNullable,
+ UnrecognizedInt,
+ UnrecognizedStr,
+ UNSET,
+ UNSET_SENTINEL,
+)
+
+__all__ = [
+ "BaseModel",
+ "Nullable",
+ "OptionalNullable",
+ "UnrecognizedInt",
+ "UnrecognizedStr",
+ "UNSET",
+ "UNSET_SENTINEL",
+]
diff --git a/bank-feeds/src/codat_bankfeeds/types/basemodel.py b/bank-feeds/src/codat_bankfeeds/types/basemodel.py
new file mode 100644
index 000000000..a6187efa6
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/types/basemodel.py
@@ -0,0 +1,39 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from pydantic import ConfigDict, model_serializer
+from pydantic import BaseModel as PydanticBaseModel
+from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union, NewType
+from typing_extensions import TypeAliasType, TypeAlias
+
+
+class BaseModel(PydanticBaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True, arbitrary_types_allowed=True, protected_namespaces=()
+ )
+
+
+class Unset(BaseModel):
+ @model_serializer(mode="plain")
+ def serialize_model(self):
+ return UNSET_SENTINEL
+
+ def __bool__(self) -> Literal[False]:
+ return False
+
+
+UNSET = Unset()
+UNSET_SENTINEL = "~?~unset~?~sentinel~?~"
+
+
+T = TypeVar("T")
+if TYPE_CHECKING:
+ Nullable: TypeAlias = Union[T, None]
+ OptionalNullable: TypeAlias = Union[Optional[Nullable[T]], Unset]
+else:
+ Nullable = TypeAliasType("Nullable", Union[T, None], type_params=(T,))
+ OptionalNullable = TypeAliasType(
+ "OptionalNullable", Union[Optional[Nullable[T]], Unset], type_params=(T,)
+ )
+
+UnrecognizedInt = NewType("UnrecognizedInt", int)
+UnrecognizedStr = NewType("UnrecognizedStr", str)
diff --git a/bank-feeds/src/codat_bankfeeds/utils/__init__.py b/bank-feeds/src/codat_bankfeeds/utils/__init__.py
new file mode 100644
index 000000000..6c26aeb9c
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/__init__.py
@@ -0,0 +1,89 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from .annotations import get_discriminator
+from .enums import OpenEnumMeta
+from .headers import get_headers, get_response_headers
+from .metadata import (
+ FieldMetadata,
+ find_metadata,
+ FormMetadata,
+ HeaderMetadata,
+ MultipartFormMetadata,
+ PathParamMetadata,
+ QueryParamMetadata,
+ RequestMetadata,
+ SecurityMetadata,
+)
+from .queryparams import get_query_params
+from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig
+from .requestbodies import serialize_request_body, SerializedRequestBody
+from .security import get_security
+from .serializers import (
+ get_pydantic_model,
+ marshal_json,
+ unmarshal,
+ unmarshal_json,
+ serialize_decimal,
+ serialize_float,
+ serialize_int,
+ stream_to_text,
+ validate_decimal,
+ validate_float,
+ validate_int,
+ validate_open_enum,
+)
+from .url import generate_url, template_url, remove_suffix
+from .values import (
+ get_global_from_env,
+ match_content_type,
+ match_status_codes,
+ match_response,
+)
+from .logger import Logger, get_body_content, get_default_logger
+
+__all__ = [
+ "BackoffStrategy",
+ "FieldMetadata",
+ "find_metadata",
+ "FormMetadata",
+ "generate_url",
+ "get_body_content",
+ "get_default_logger",
+ "get_discriminator",
+ "get_global_from_env",
+ "get_headers",
+ "get_pydantic_model",
+ "get_query_params",
+ "get_response_headers",
+ "get_security",
+ "HeaderMetadata",
+ "Logger",
+ "marshal_json",
+ "match_content_type",
+ "match_status_codes",
+ "match_response",
+ "MultipartFormMetadata",
+ "OpenEnumMeta",
+ "PathParamMetadata",
+ "QueryParamMetadata",
+ "remove_suffix",
+ "Retries",
+ "retry",
+ "retry_async",
+ "RetryConfig",
+ "RequestMetadata",
+ "SecurityMetadata",
+ "serialize_decimal",
+ "serialize_float",
+ "serialize_int",
+ "serialize_request_body",
+ "SerializedRequestBody",
+ "stream_to_text",
+ "template_url",
+ "unmarshal",
+ "unmarshal_json",
+ "validate_decimal",
+ "validate_float",
+ "validate_int",
+ "validate_open_enum",
+]
diff --git a/bank-feeds/src/codat_bankfeeds/utils/annotations.py b/bank-feeds/src/codat_bankfeeds/utils/annotations.py
new file mode 100644
index 000000000..0d17472b3
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/annotations.py
@@ -0,0 +1,19 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from typing import Any
+
+def get_discriminator(model: Any, fieldname: str, key: str) -> str:
+ if isinstance(model, dict):
+ try:
+ return f'{model.get(key)}'
+ except AttributeError as e:
+ raise ValueError(f'Could not find discriminator key {key} in {model}') from e
+
+ if hasattr(model, fieldname):
+ return f'{getattr(model, fieldname)}'
+
+ fieldname = fieldname.upper()
+ if hasattr(model, fieldname):
+ return f'{getattr(model, fieldname)}'
+
+ raise ValueError(f'Could not find discriminator field {fieldname} in {model}')
diff --git a/bank-feeds/src/codat_bankfeeds/utils/enums.py b/bank-feeds/src/codat_bankfeeds/utils/enums.py
new file mode 100644
index 000000000..c650b10cb
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/enums.py
@@ -0,0 +1,34 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+import enum
+
+
+class OpenEnumMeta(enum.EnumMeta):
+ def __call__(
+ cls, value, names=None, *, module=None, qualname=None, type=None, start=1
+ ):
+ # The `type` kwarg also happens to be a built-in that pylint flags as
+ # redeclared. Safe to ignore this lint rule with this scope.
+ # pylint: disable=redefined-builtin
+
+ if names is not None:
+ return super().__call__(
+ value,
+ names=names,
+ module=module,
+ qualname=qualname,
+ type=type,
+ start=start,
+ )
+
+ try:
+ return super().__call__(
+ value,
+ names=names, # pyright: ignore[reportArgumentType]
+ module=module,
+ qualname=qualname,
+ type=type,
+ start=start,
+ )
+ except ValueError:
+ return value
diff --git a/bank-feeds/src/codat_bankfeeds/utils/eventstreaming.py b/bank-feeds/src/codat_bankfeeds/utils/eventstreaming.py
new file mode 100644
index 000000000..553b386b3
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/eventstreaming.py
@@ -0,0 +1,178 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+import re
+import json
+from typing import Callable, TypeVar, Optional, Generator, AsyncGenerator, Tuple
+import httpx
+
+T = TypeVar("T")
+
+
+class ServerEvent:
+ id: Optional[str] = None
+ event: Optional[str] = None
+ data: Optional[str] = None
+ retry: Optional[int] = None
+
+
+MESSAGE_BOUNDARIES = [
+ b"\r\n\r\n",
+ b"\n\n",
+ b"\r\r",
+]
+
+
+async def stream_events_async(
+ response: httpx.Response,
+ decoder: Callable[[str], T],
+ sentinel: Optional[str] = None,
+) -> AsyncGenerator[T, None]:
+ buffer = bytearray()
+ position = 0
+ discard = False
+ async for chunk in response.aiter_bytes():
+ # We've encountered the sentinel value and should no longer process
+ # incoming data. Instead we throw new data away until the server closes
+ # the connection.
+ if discard:
+ continue
+
+ buffer += chunk
+ for i in range(position, len(buffer)):
+ char = buffer[i : i + 1]
+ seq: Optional[bytes] = None
+ if char in [b"\r", b"\n"]:
+ for boundary in MESSAGE_BOUNDARIES:
+ seq = _peek_sequence(i, buffer, boundary)
+ if seq is not None:
+ break
+ if seq is None:
+ continue
+
+ block = buffer[position:i]
+ position = i + len(seq)
+ event, discard = _parse_event(block, decoder, sentinel)
+ if event is not None:
+ yield event
+
+ if position > 0:
+ buffer = buffer[position:]
+ position = 0
+
+ event, discard = _parse_event(buffer, decoder, sentinel)
+ if event is not None:
+ yield event
+
+
+def stream_events(
+ response: httpx.Response,
+ decoder: Callable[[str], T],
+ sentinel: Optional[str] = None,
+) -> Generator[T, None, None]:
+ buffer = bytearray()
+ position = 0
+ discard = False
+ for chunk in response.iter_bytes():
+ # We've encountered the sentinel value and should no longer process
+ # incoming data. Instead we throw new data away until the server closes
+ # the connection.
+ if discard:
+ continue
+
+ buffer += chunk
+ for i in range(position, len(buffer)):
+ char = buffer[i : i + 1]
+ seq: Optional[bytes] = None
+ if char in [b"\r", b"\n"]:
+ for boundary in MESSAGE_BOUNDARIES:
+ seq = _peek_sequence(i, buffer, boundary)
+ if seq is not None:
+ break
+ if seq is None:
+ continue
+
+ block = buffer[position:i]
+ position = i + len(seq)
+ event, discard = _parse_event(block, decoder, sentinel)
+ if event is not None:
+ yield event
+
+ if position > 0:
+ buffer = buffer[position:]
+ position = 0
+
+ event, discard = _parse_event(buffer, decoder, sentinel)
+ if event is not None:
+ yield event
+
+
+def _parse_event(
+ raw: bytearray, decoder: Callable[[str], T], sentinel: Optional[str] = None
+) -> Tuple[Optional[T], bool]:
+ block = raw.decode()
+ lines = re.split(r"\r?\n|\r", block)
+ publish = False
+ event = ServerEvent()
+ data = ""
+ for line in lines:
+ if not line:
+ continue
+
+ delim = line.find(":")
+ if delim <= 0:
+ continue
+
+ field = line[0:delim]
+ value = line[delim + 1 :] if delim < len(line) - 1 else ""
+ if len(value) and value[0] == " ":
+ value = value[1:]
+
+ if field == "event":
+ event.event = value
+ publish = True
+ elif field == "data":
+ data += value + "\n"
+ publish = True
+ elif field == "id":
+ event.id = value
+ publish = True
+ elif field == "retry":
+ event.retry = int(value) if value.isdigit() else None
+ publish = True
+
+ if sentinel and data == f"{sentinel}\n":
+ return None, True
+
+ if data:
+ data = data[:-1]
+ event.data = data
+
+ data_is_primitive = (
+ data.isnumeric() or data == "true" or data == "false" or data == "null"
+ )
+ data_is_json = (
+ data.startswith("{") or data.startswith("[") or data.startswith('"')
+ )
+
+ if data_is_primitive or data_is_json:
+ try:
+ event.data = json.loads(data)
+ except Exception:
+ pass
+
+ out = None
+ if publish:
+ out = decoder(json.dumps(event.__dict__))
+
+ return out, False
+
+
+def _peek_sequence(position: int, buffer: bytearray, sequence: bytes):
+ if len(sequence) > (len(buffer) - position):
+ return None
+
+ for i, seq in enumerate(sequence):
+ if buffer[position + i] != seq:
+ return None
+
+ return sequence
diff --git a/bank-feeds/src/codat_bankfeeds/utils/forms.py b/bank-feeds/src/codat_bankfeeds/utils/forms.py
new file mode 100644
index 000000000..9f5a731e9
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/forms.py
@@ -0,0 +1,208 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from typing import (
+ Any,
+ Dict,
+ get_type_hints,
+ List,
+ Tuple,
+)
+from pydantic import BaseModel
+from pydantic.fields import FieldInfo
+
+from .serializers import marshal_json
+
+from .metadata import (
+ FormMetadata,
+ MultipartFormMetadata,
+ find_field_metadata,
+)
+from .values import _is_set, _val_to_string
+
+
+def _populate_form(
+ field_name: str,
+ explode: bool,
+ obj: Any,
+ delimiter: str,
+ form: Dict[str, List[str]],
+):
+ if not _is_set(obj):
+ return form
+
+ if isinstance(obj, BaseModel):
+ items = []
+
+ obj_fields: Dict[str, FieldInfo] = obj.__class__.model_fields
+ for name in obj_fields:
+ obj_field = obj_fields[name]
+ obj_field_name = obj_field.alias if obj_field.alias is not None else name
+ if obj_field_name == "":
+ continue
+
+ val = getattr(obj, name)
+ if not _is_set(val):
+ continue
+
+ if explode:
+ form[obj_field_name] = [_val_to_string(val)]
+ else:
+ items.append(f"{obj_field_name}{delimiter}{_val_to_string(val)}")
+
+ if len(items) > 0:
+ form[field_name] = [delimiter.join(items)]
+ elif isinstance(obj, Dict):
+ items = []
+ for key, value in obj.items():
+ if not _is_set(value):
+ continue
+
+ if explode:
+ form[key] = [_val_to_string(value)]
+ else:
+ items.append(f"{key}{delimiter}{_val_to_string(value)}")
+
+ if len(items) > 0:
+ form[field_name] = [delimiter.join(items)]
+ elif isinstance(obj, List):
+ items = []
+
+ for value in obj:
+ if not _is_set(value):
+ continue
+
+ if explode:
+ if not field_name in form:
+ form[field_name] = []
+ form[field_name].append(_val_to_string(value))
+ else:
+ items.append(_val_to_string(value))
+
+ if len(items) > 0:
+ form[field_name] = [delimiter.join([str(item) for item in items])]
+ else:
+ form[field_name] = [_val_to_string(obj)]
+
+ return form
+
+
+def serialize_multipart_form(
+ media_type: str, request: Any
+) -> Tuple[str, Dict[str, Any], Dict[str, Any]]:
+ form: Dict[str, Any] = {}
+ files: Dict[str, Any] = {}
+
+ if not isinstance(request, BaseModel):
+ raise TypeError("invalid request body type")
+
+ request_fields: Dict[str, FieldInfo] = request.__class__.model_fields
+ request_field_types = get_type_hints(request.__class__)
+
+ for name in request_fields:
+ field = request_fields[name]
+
+ val = getattr(request, name)
+ if not _is_set(val):
+ continue
+
+ field_metadata = find_field_metadata(field, MultipartFormMetadata)
+ if not field_metadata:
+ continue
+
+ f_name = field.alias if field.alias is not None else name
+
+ if field_metadata.file:
+ file_fields: Dict[str, FieldInfo] = val.__class__.model_fields
+
+ file_name = ""
+ field_name = ""
+ content = None
+ content_type = None
+
+ for file_field_name in file_fields:
+ file_field = file_fields[file_field_name]
+
+ file_metadata = find_field_metadata(file_field, MultipartFormMetadata)
+ if file_metadata is None:
+ continue
+
+ if file_metadata.content:
+ content = getattr(val, file_field_name, None)
+ elif file_field_name == "content_type":
+ content_type = getattr(val, file_field_name, None)
+ else:
+ field_name = (
+ file_field.alias
+ if file_field.alias is not None
+ else file_field_name
+ )
+ file_name = getattr(val, file_field_name)
+
+ if field_name == "" or file_name == "" or content is None:
+ raise ValueError("invalid multipart/form-data file")
+
+ if content_type is not None:
+ files[field_name] = (file_name, content, content_type)
+ else:
+ files[field_name] = (file_name, content)
+ elif field_metadata.json:
+ files[f_name] = (
+ None,
+ marshal_json(val, request_field_types[name]),
+ "application/json",
+ )
+ else:
+ if isinstance(val, List):
+ values = []
+
+ for value in val:
+ if not _is_set(value):
+ continue
+ values.append(_val_to_string(value))
+
+ form[f_name + "[]"] = values
+ else:
+ form[f_name] = _val_to_string(val)
+ return media_type, form, files
+
+
+def serialize_form_data(data: Any) -> Dict[str, Any]:
+ form: Dict[str, List[str]] = {}
+
+ if isinstance(data, BaseModel):
+ data_fields: Dict[str, FieldInfo] = data.__class__.model_fields
+ data_field_types = get_type_hints(data.__class__)
+ for name in data_fields:
+ field = data_fields[name]
+
+ val = getattr(data, name)
+ if not _is_set(val):
+ continue
+
+ metadata = find_field_metadata(field, FormMetadata)
+ if metadata is None:
+ continue
+
+ f_name = field.alias if field.alias is not None else name
+
+ if metadata.json:
+ form[f_name] = [marshal_json(val, data_field_types[name])]
+ else:
+ if metadata.style == "form":
+ _populate_form(
+ f_name,
+ metadata.explode,
+ val,
+ ",",
+ form,
+ )
+ else:
+ raise ValueError(f"Invalid form style for field {name}")
+ elif isinstance(data, Dict):
+ for key, value in data.items():
+ if _is_set(value):
+ form[key] = [_val_to_string(value)]
+ else:
+ raise TypeError(f"Invalid request body type {type(data)} for form data")
+
+ return form
diff --git a/bank-feeds/src/codat_bankfeeds/utils/headers.py b/bank-feeds/src/codat_bankfeeds/utils/headers.py
new file mode 100644
index 000000000..37864cbbb
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/headers.py
@@ -0,0 +1,136 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from typing import (
+ Any,
+ Dict,
+ List,
+ Optional,
+)
+from httpx import Headers
+from pydantic import BaseModel
+from pydantic.fields import FieldInfo
+
+from .metadata import (
+ HeaderMetadata,
+ find_field_metadata,
+)
+
+from .values import _is_set, _populate_from_globals, _val_to_string
+
+
+def get_headers(headers_params: Any, gbls: Optional[Any] = None) -> Dict[str, str]:
+ headers: Dict[str, str] = {}
+
+ globals_already_populated = []
+ if _is_set(headers_params):
+ globals_already_populated = _populate_headers(headers_params, gbls, headers, [])
+ if _is_set(gbls):
+ _populate_headers(gbls, None, headers, globals_already_populated)
+
+ return headers
+
+
+def _populate_headers(
+ headers_params: Any,
+ gbls: Any,
+ header_values: Dict[str, str],
+ skip_fields: List[str],
+) -> List[str]:
+ globals_already_populated: List[str] = []
+
+ if not isinstance(headers_params, BaseModel):
+ return globals_already_populated
+
+ param_fields: Dict[str, FieldInfo] = headers_params.__class__.model_fields
+ for name in param_fields:
+ if name in skip_fields:
+ continue
+
+ field = param_fields[name]
+ f_name = field.alias if field.alias is not None else name
+
+ metadata = find_field_metadata(field, HeaderMetadata)
+ if metadata is None:
+ continue
+
+ value, global_found = _populate_from_globals(
+ name, getattr(headers_params, name), HeaderMetadata, gbls
+ )
+ if global_found:
+ globals_already_populated.append(name)
+ value = _serialize_header(metadata.explode, value)
+
+ if value != "":
+ header_values[f_name] = value
+
+ return globals_already_populated
+
+
+def _serialize_header(explode: bool, obj: Any) -> str:
+ if not _is_set(obj):
+ return ""
+
+ if isinstance(obj, BaseModel):
+ items = []
+ obj_fields: Dict[str, FieldInfo] = obj.__class__.model_fields
+ for name in obj_fields:
+ obj_field = obj_fields[name]
+ obj_param_metadata = find_field_metadata(obj_field, HeaderMetadata)
+
+ if not obj_param_metadata:
+ continue
+
+ f_name = obj_field.alias if obj_field.alias is not None else name
+
+ val = getattr(obj, name)
+ if not _is_set(val):
+ continue
+
+ if explode:
+ items.append(f"{f_name}={_val_to_string(val)}")
+ else:
+ items.append(f_name)
+ items.append(_val_to_string(val))
+
+ if len(items) > 0:
+ return ",".join(items)
+ elif isinstance(obj, Dict):
+ items = []
+
+ for key, value in obj.items():
+ if not _is_set(value):
+ continue
+
+ if explode:
+ items.append(f"{key}={_val_to_string(value)}")
+ else:
+ items.append(key)
+ items.append(_val_to_string(value))
+
+ if len(items) > 0:
+ return ",".join([str(item) for item in items])
+ elif isinstance(obj, List):
+ items = []
+
+ for value in obj:
+ if not _is_set(value):
+ continue
+
+ items.append(_val_to_string(value))
+
+ if len(items) > 0:
+ return ",".join(items)
+ elif _is_set(obj):
+ return f"{_val_to_string(obj)}"
+
+ return ""
+
+
+def get_response_headers(headers: Headers) -> Dict[str, List[str]]:
+ res: Dict[str, List[str]] = {}
+ for k, v in headers.items():
+ if not k in res:
+ res[k] = []
+
+ res[k].append(v)
+ return res
diff --git a/bank-feeds/src/codat_bankfeeds/utils/logger.py b/bank-feeds/src/codat_bankfeeds/utils/logger.py
new file mode 100644
index 000000000..b661aff65
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/logger.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+import httpx
+from typing import Any, Protocol
+
+
+class Logger(Protocol):
+ def debug(self, msg: str, *args: Any, **kwargs: Any) -> None:
+ pass
+
+
+class NoOpLogger:
+ def debug(self, msg: str, *args: Any, **kwargs: Any) -> None:
+ pass
+
+
+def get_body_content(req: httpx.Request) -> str:
+ return "" if not hasattr(req, "_content") else str(req.content)
+
+
+def get_default_logger() -> Logger:
+ return NoOpLogger()
diff --git a/bank-feeds/src/codat_bankfeeds/utils/metadata.py b/bank-feeds/src/codat_bankfeeds/utils/metadata.py
new file mode 100644
index 000000000..173b3e5ce
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/metadata.py
@@ -0,0 +1,118 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from typing import Optional, Type, TypeVar, Union
+from dataclasses import dataclass
+from pydantic.fields import FieldInfo
+
+
+T = TypeVar("T")
+
+
+@dataclass
+class SecurityMetadata:
+ option: bool = False
+ scheme: bool = False
+ scheme_type: Optional[str] = None
+ sub_type: Optional[str] = None
+ field_name: Optional[str] = None
+
+ def get_field_name(self, default: str) -> str:
+ return self.field_name or default
+
+
+@dataclass
+class ParamMetadata:
+ serialization: Optional[str] = None
+ style: str = "simple"
+ explode: bool = False
+
+
+@dataclass
+class PathParamMetadata(ParamMetadata):
+ pass
+
+
+@dataclass
+class QueryParamMetadata(ParamMetadata):
+ style: str = "form"
+ explode: bool = True
+
+
+@dataclass
+class HeaderMetadata(ParamMetadata):
+ pass
+
+
+@dataclass
+class RequestMetadata:
+ media_type: str = "application/octet-stream"
+
+
+@dataclass
+class MultipartFormMetadata:
+ file: bool = False
+ content: bool = False
+ json: bool = False
+
+
+@dataclass
+class FormMetadata:
+ json: bool = False
+ style: str = "form"
+ explode: bool = True
+
+
+class FieldMetadata:
+ security: Optional[SecurityMetadata] = None
+ path: Optional[PathParamMetadata] = None
+ query: Optional[QueryParamMetadata] = None
+ header: Optional[HeaderMetadata] = None
+ request: Optional[RequestMetadata] = None
+ form: Optional[FormMetadata] = None
+ multipart: Optional[MultipartFormMetadata] = None
+
+ def __init__(
+ self,
+ security: Optional[SecurityMetadata] = None,
+ path: Optional[Union[PathParamMetadata, bool]] = None,
+ query: Optional[Union[QueryParamMetadata, bool]] = None,
+ header: Optional[Union[HeaderMetadata, bool]] = None,
+ request: Optional[Union[RequestMetadata, bool]] = None,
+ form: Optional[Union[FormMetadata, bool]] = None,
+ multipart: Optional[Union[MultipartFormMetadata, bool]] = None,
+ ):
+ self.security = security
+ self.path = PathParamMetadata() if isinstance(path, bool) else path
+ self.query = QueryParamMetadata() if isinstance(query, bool) else query
+ self.header = HeaderMetadata() if isinstance(header, bool) else header
+ self.request = RequestMetadata() if isinstance(request, bool) else request
+ self.form = FormMetadata() if isinstance(form, bool) else form
+ self.multipart = (
+ MultipartFormMetadata() if isinstance(multipart, bool) else multipart
+ )
+
+
+def find_field_metadata(field_info: FieldInfo, metadata_type: Type[T]) -> Optional[T]:
+ metadata = find_metadata(field_info, FieldMetadata)
+ if not metadata:
+ return None
+
+ fields = metadata.__dict__
+
+ for field in fields:
+ if isinstance(fields[field], metadata_type):
+ return fields[field]
+
+ return None
+
+
+def find_metadata(field_info: FieldInfo, metadata_type: Type[T]) -> Optional[T]:
+ metadata = field_info.metadata
+ if not metadata:
+ return None
+
+ for md in metadata:
+ if isinstance(md, metadata_type):
+ return md
+
+ return None
diff --git a/bank-feeds/src/codat_bankfeeds/utils/queryparams.py b/bank-feeds/src/codat_bankfeeds/utils/queryparams.py
new file mode 100644
index 000000000..37a6e7f9a
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/queryparams.py
@@ -0,0 +1,205 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from typing import (
+ Any,
+ Dict,
+ get_type_hints,
+ List,
+ Optional,
+)
+
+from pydantic import BaseModel
+from pydantic.fields import FieldInfo
+
+from .metadata import (
+ QueryParamMetadata,
+ find_field_metadata,
+)
+from .values import (
+ _get_serialized_params,
+ _is_set,
+ _populate_from_globals,
+ _val_to_string,
+)
+from .forms import _populate_form
+
+
+def get_query_params(
+ query_params: Any,
+ gbls: Optional[Any] = None,
+) -> Dict[str, List[str]]:
+ params: Dict[str, List[str]] = {}
+
+ globals_already_populated = _populate_query_params(query_params, gbls, params, [])
+ if _is_set(gbls):
+ _populate_query_params(gbls, None, params, globals_already_populated)
+
+ return params
+
+
+def _populate_query_params(
+ query_params: Any,
+ gbls: Any,
+ query_param_values: Dict[str, List[str]],
+ skip_fields: List[str],
+) -> List[str]:
+ globals_already_populated: List[str] = []
+
+ if not isinstance(query_params, BaseModel):
+ return globals_already_populated
+
+ param_fields: Dict[str, FieldInfo] = query_params.__class__.model_fields
+ param_field_types = get_type_hints(query_params.__class__)
+ for name in param_fields:
+ if name in skip_fields:
+ continue
+
+ field = param_fields[name]
+
+ metadata = find_field_metadata(field, QueryParamMetadata)
+ if not metadata:
+ continue
+
+ value = getattr(query_params, name) if _is_set(query_params) else None
+
+ value, global_found = _populate_from_globals(
+ name, value, QueryParamMetadata, gbls
+ )
+ if global_found:
+ globals_already_populated.append(name)
+
+ f_name = field.alias if field.alias is not None else name
+ serialization = metadata.serialization
+ if serialization is not None:
+ serialized_parms = _get_serialized_params(
+ metadata, f_name, value, param_field_types[name]
+ )
+ for key, value in serialized_parms.items():
+ if key in query_param_values:
+ query_param_values[key].extend(value)
+ else:
+ query_param_values[key] = [value]
+ else:
+ style = metadata.style
+ if style == "deepObject":
+ _populate_deep_object_query_params(f_name, value, query_param_values)
+ elif style == "form":
+ _populate_delimited_query_params(
+ metadata, f_name, value, ",", query_param_values
+ )
+ elif style == "pipeDelimited":
+ _populate_delimited_query_params(
+ metadata, f_name, value, "|", query_param_values
+ )
+ else:
+ raise NotImplementedError(
+ f"query param style {style} not yet supported"
+ )
+
+ return globals_already_populated
+
+
+def _populate_deep_object_query_params(
+ field_name: str,
+ obj: Any,
+ params: Dict[str, List[str]],
+):
+ if not _is_set(obj):
+ return
+
+ if isinstance(obj, BaseModel):
+ _populate_deep_object_query_params_basemodel(field_name, obj, params)
+ elif isinstance(obj, Dict):
+ _populate_deep_object_query_params_dict(field_name, obj, params)
+
+
+def _populate_deep_object_query_params_basemodel(
+ prior_params_key: str,
+ obj: Any,
+ params: Dict[str, List[str]],
+):
+ if not _is_set(obj) or not isinstance(obj, BaseModel):
+ return
+
+ obj_fields: Dict[str, FieldInfo] = obj.__class__.model_fields
+ for name in obj_fields:
+ obj_field = obj_fields[name]
+
+ f_name = obj_field.alias if obj_field.alias is not None else name
+
+ params_key = f"{prior_params_key}[{f_name}]"
+
+ obj_param_metadata = find_field_metadata(obj_field, QueryParamMetadata)
+ if not _is_set(obj_param_metadata):
+ continue
+
+ obj_val = getattr(obj, name)
+ if not _is_set(obj_val):
+ continue
+
+ if isinstance(obj_val, BaseModel):
+ _populate_deep_object_query_params_basemodel(params_key, obj_val, params)
+ elif isinstance(obj_val, Dict):
+ _populate_deep_object_query_params_dict(params_key, obj_val, params)
+ elif isinstance(obj_val, List):
+ _populate_deep_object_query_params_list(params_key, obj_val, params)
+ else:
+ params[params_key] = [_val_to_string(obj_val)]
+
+
+def _populate_deep_object_query_params_dict(
+ prior_params_key: str,
+ value: Dict,
+ params: Dict[str, List[str]],
+):
+ if not _is_set(value):
+ return
+
+ for key, val in value.items():
+ if not _is_set(val):
+ continue
+
+ params_key = f"{prior_params_key}[{key}]"
+
+ if isinstance(val, BaseModel):
+ _populate_deep_object_query_params_basemodel(params_key, val, params)
+ elif isinstance(val, Dict):
+ _populate_deep_object_query_params_dict(params_key, val, params)
+ elif isinstance(val, List):
+ _populate_deep_object_query_params_list(params_key, val, params)
+ else:
+ params[params_key] = [_val_to_string(val)]
+
+
+def _populate_deep_object_query_params_list(
+ params_key: str,
+ value: List,
+ params: Dict[str, List[str]],
+):
+ if not _is_set(value):
+ return
+
+ for val in value:
+ if not _is_set(val):
+ continue
+
+ if params.get(params_key) is None:
+ params[params_key] = []
+
+ params[params_key].append(_val_to_string(val))
+
+
+def _populate_delimited_query_params(
+ metadata: QueryParamMetadata,
+ field_name: str,
+ obj: Any,
+ delimiter: str,
+ query_param_values: Dict[str, List[str]],
+):
+ _populate_form(
+ field_name,
+ metadata.explode,
+ obj,
+ delimiter,
+ query_param_values,
+ )
diff --git a/bank-feeds/src/codat_bankfeeds/utils/requestbodies.py b/bank-feeds/src/codat_bankfeeds/utils/requestbodies.py
new file mode 100644
index 000000000..4f586ae79
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/requestbodies.py
@@ -0,0 +1,66 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+import io
+from dataclasses import dataclass
+import re
+from typing import (
+ Any,
+ Optional,
+)
+
+from .forms import serialize_form_data, serialize_multipart_form
+
+from .serializers import marshal_json
+
+SERIALIZATION_METHOD_TO_CONTENT_TYPE = {
+ "json": "application/json",
+ "form": "application/x-www-form-urlencoded",
+ "multipart": "multipart/form-data",
+ "raw": "application/octet-stream",
+ "string": "text/plain",
+}
+
+
+@dataclass
+class SerializedRequestBody:
+ media_type: str
+ content: Optional[Any] = None
+ data: Optional[Any] = None
+ files: Optional[Any] = None
+
+
+def serialize_request_body(
+ request_body: Any,
+ nullable: bool,
+ optional: bool,
+ serialization_method: str,
+ request_body_type,
+) -> Optional[SerializedRequestBody]:
+ if request_body is None:
+ if not nullable and optional:
+ return None
+
+ media_type = SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method]
+
+ serialized_request_body = SerializedRequestBody(media_type)
+
+ if re.match(r"(application|text)\/.*?\+*json.*", media_type) is not None:
+ serialized_request_body.content = marshal_json(request_body, request_body_type)
+ elif re.match(r"multipart\/.*", media_type) is not None:
+ (
+ serialized_request_body.media_type,
+ serialized_request_body.data,
+ serialized_request_body.files,
+ ) = serialize_multipart_form(media_type, request_body)
+ elif re.match(r"application\/x-www-form-urlencoded.*", media_type) is not None:
+ serialized_request_body.data = serialize_form_data(request_body)
+ elif isinstance(request_body, (bytes, bytearray, io.BytesIO, io.BufferedReader)):
+ serialized_request_body.content = request_body
+ elif isinstance(request_body, str):
+ serialized_request_body.content = request_body
+ else:
+ raise TypeError(
+ f"invalid request body type {type(request_body)} for mediaType {media_type}"
+ )
+
+ return serialized_request_body
diff --git a/bank-feeds/src/codat_bankfeeds/utils/retries.py b/bank-feeds/src/codat_bankfeeds/utils/retries.py
new file mode 100644
index 000000000..4d6086716
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/retries.py
@@ -0,0 +1,217 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+import asyncio
+import random
+import time
+from typing import List
+
+import httpx
+
+
+class BackoffStrategy:
+ initial_interval: int
+ max_interval: int
+ exponent: float
+ max_elapsed_time: int
+
+ def __init__(
+ self,
+ initial_interval: int,
+ max_interval: int,
+ exponent: float,
+ max_elapsed_time: int,
+ ):
+ self.initial_interval = initial_interval
+ self.max_interval = max_interval
+ self.exponent = exponent
+ self.max_elapsed_time = max_elapsed_time
+
+
+class RetryConfig:
+ strategy: str
+ backoff: BackoffStrategy
+ retry_connection_errors: bool
+
+ def __init__(
+ self, strategy: str, backoff: BackoffStrategy, retry_connection_errors: bool
+ ):
+ self.strategy = strategy
+ self.backoff = backoff
+ self.retry_connection_errors = retry_connection_errors
+
+
+class Retries:
+ config: RetryConfig
+ status_codes: List[str]
+
+ def __init__(self, config: RetryConfig, status_codes: List[str]):
+ self.config = config
+ self.status_codes = status_codes
+
+
+class TemporaryError(Exception):
+ response: httpx.Response
+
+ def __init__(self, response: httpx.Response):
+ self.response = response
+
+
+class PermanentError(Exception):
+ inner: Exception
+
+ def __init__(self, inner: Exception):
+ self.inner = inner
+
+
+def retry(func, retries: Retries):
+ if retries.config.strategy == "backoff":
+
+ def do_request() -> httpx.Response:
+ res: httpx.Response
+ try:
+ res = func()
+
+ for code in retries.status_codes:
+ if "X" in code.upper():
+ code_range = int(code[0])
+
+ status_major = res.status_code / 100
+
+ if code_range <= status_major < code_range + 1:
+ raise TemporaryError(res)
+ else:
+ parsed_code = int(code)
+
+ if res.status_code == parsed_code:
+ raise TemporaryError(res)
+ except httpx.ConnectError as exception:
+ if retries.config.retry_connection_errors:
+ raise
+
+ raise PermanentError(exception) from exception
+ except httpx.TimeoutException as exception:
+ if retries.config.retry_connection_errors:
+ raise
+
+ raise PermanentError(exception) from exception
+ except TemporaryError:
+ raise
+ except Exception as exception:
+ raise PermanentError(exception) from exception
+
+ return res
+
+ return retry_with_backoff(
+ do_request,
+ retries.config.backoff.initial_interval,
+ retries.config.backoff.max_interval,
+ retries.config.backoff.exponent,
+ retries.config.backoff.max_elapsed_time,
+ )
+
+ return func()
+
+
+async def retry_async(func, retries: Retries):
+ if retries.config.strategy == "backoff":
+
+ async def do_request() -> httpx.Response:
+ res: httpx.Response
+ try:
+ res = await func()
+
+ for code in retries.status_codes:
+ if "X" in code.upper():
+ code_range = int(code[0])
+
+ status_major = res.status_code / 100
+
+ if code_range <= status_major < code_range + 1:
+ raise TemporaryError(res)
+ else:
+ parsed_code = int(code)
+
+ if res.status_code == parsed_code:
+ raise TemporaryError(res)
+ except httpx.ConnectError as exception:
+ if retries.config.retry_connection_errors:
+ raise
+
+ raise PermanentError(exception) from exception
+ except httpx.TimeoutException as exception:
+ if retries.config.retry_connection_errors:
+ raise
+
+ raise PermanentError(exception) from exception
+ except TemporaryError:
+ raise
+ except Exception as exception:
+ raise PermanentError(exception) from exception
+
+ return res
+
+ return await retry_with_backoff_async(
+ do_request,
+ retries.config.backoff.initial_interval,
+ retries.config.backoff.max_interval,
+ retries.config.backoff.exponent,
+ retries.config.backoff.max_elapsed_time,
+ )
+
+ return await func()
+
+
+def retry_with_backoff(
+ func,
+ initial_interval=500,
+ max_interval=60000,
+ exponent=1.5,
+ max_elapsed_time=3600000,
+):
+ start = round(time.time() * 1000)
+ retries = 0
+
+ while True:
+ try:
+ return func()
+ except PermanentError as exception:
+ raise exception.inner
+ except Exception as exception: # pylint: disable=broad-exception-caught
+ now = round(time.time() * 1000)
+ if now - start > max_elapsed_time:
+ if isinstance(exception, TemporaryError):
+ return exception.response
+
+ raise
+ sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
+ sleep = min(sleep, max_interval / 1000)
+ time.sleep(sleep)
+ retries += 1
+
+
+async def retry_with_backoff_async(
+ func,
+ initial_interval=500,
+ max_interval=60000,
+ exponent=1.5,
+ max_elapsed_time=3600000,
+):
+ start = round(time.time() * 1000)
+ retries = 0
+
+ while True:
+ try:
+ return await func()
+ except PermanentError as exception:
+ raise exception.inner
+ except Exception as exception: # pylint: disable=broad-exception-caught
+ now = round(time.time() * 1000)
+ if now - start > max_elapsed_time:
+ if isinstance(exception, TemporaryError):
+ return exception.response
+
+ raise
+ sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
+ sleep = min(sleep, max_interval / 1000)
+ await asyncio.sleep(sleep)
+ retries += 1
diff --git a/bank-feeds/src/codat_bankfeeds/utils/security.py b/bank-feeds/src/codat_bankfeeds/utils/security.py
new file mode 100644
index 000000000..295a3f400
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/security.py
@@ -0,0 +1,174 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+import base64
+from typing import (
+ Any,
+ Dict,
+ List,
+ Tuple,
+)
+from pydantic import BaseModel
+from pydantic.fields import FieldInfo
+
+from .metadata import (
+ SecurityMetadata,
+ find_field_metadata,
+)
+
+
+def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]:
+ headers: Dict[str, str] = {}
+ query_params: Dict[str, List[str]] = {}
+
+ if security is None:
+ return headers, query_params
+
+ if not isinstance(security, BaseModel):
+ raise TypeError("security must be a pydantic model")
+
+ sec_fields: Dict[str, FieldInfo] = security.__class__.model_fields
+ for name in sec_fields:
+ sec_field = sec_fields[name]
+
+ value = getattr(security, name)
+ if value is None:
+ continue
+
+ metadata = find_field_metadata(sec_field, SecurityMetadata)
+ if metadata is None:
+ continue
+ if metadata.option:
+ _parse_security_option(headers, query_params, value)
+ return headers, query_params
+ if metadata.scheme:
+ # Special case for basic auth or custom auth which could be a flattened model
+ if metadata.sub_type in ["basic", "custom"] and not isinstance(
+ value, BaseModel
+ ):
+ _parse_security_scheme(headers, query_params, metadata, name, security)
+ else:
+ _parse_security_scheme(headers, query_params, metadata, name, value)
+
+ return headers, query_params
+
+
+def _parse_security_option(
+ headers: Dict[str, str], query_params: Dict[str, List[str]], option: Any
+):
+ if not isinstance(option, BaseModel):
+ raise TypeError("security option must be a pydantic model")
+
+ opt_fields: Dict[str, FieldInfo] = option.__class__.model_fields
+ for name in opt_fields:
+ opt_field = opt_fields[name]
+
+ metadata = find_field_metadata(opt_field, SecurityMetadata)
+ if metadata is None or not metadata.scheme:
+ continue
+ _parse_security_scheme(
+ headers, query_params, metadata, name, getattr(option, name)
+ )
+
+
+def _parse_security_scheme(
+ headers: Dict[str, str],
+ query_params: Dict[str, List[str]],
+ scheme_metadata: SecurityMetadata,
+ field_name: str,
+ scheme: Any,
+):
+ scheme_type = scheme_metadata.scheme_type
+ sub_type = scheme_metadata.sub_type
+
+ if isinstance(scheme, BaseModel):
+ if scheme_type == "http":
+ if sub_type == "basic":
+ _parse_basic_auth_scheme(headers, scheme)
+ return
+ if sub_type == "custom":
+ return
+
+ scheme_fields: Dict[str, FieldInfo] = scheme.__class__.model_fields
+ for name in scheme_fields:
+ scheme_field = scheme_fields[name]
+
+ metadata = find_field_metadata(scheme_field, SecurityMetadata)
+ if metadata is None or metadata.field_name is None:
+ continue
+
+ value = getattr(scheme, name)
+
+ _parse_security_scheme_value(
+ headers, query_params, scheme_metadata, metadata, name, value
+ )
+ else:
+ _parse_security_scheme_value(
+ headers, query_params, scheme_metadata, scheme_metadata, field_name, scheme
+ )
+
+
+def _parse_security_scheme_value(
+ headers: Dict[str, str],
+ query_params: Dict[str, List[str]],
+ scheme_metadata: SecurityMetadata,
+ security_metadata: SecurityMetadata,
+ field_name: str,
+ value: Any,
+):
+ scheme_type = scheme_metadata.scheme_type
+ sub_type = scheme_metadata.sub_type
+
+ header_name = security_metadata.get_field_name(field_name)
+
+ if scheme_type == "apiKey":
+ if sub_type == "header":
+ headers[header_name] = value
+ elif sub_type == "query":
+ query_params[header_name] = [value]
+ else:
+ raise ValueError("sub type {sub_type} not supported")
+ elif scheme_type == "openIdConnect":
+ headers[header_name] = _apply_bearer(value)
+ elif scheme_type == "oauth2":
+ if sub_type != "client_credentials":
+ headers[header_name] = _apply_bearer(value)
+ elif scheme_type == "http":
+ if sub_type == "bearer":
+ headers[header_name] = _apply_bearer(value)
+ elif sub_type == "custom":
+ return
+ else:
+ raise ValueError("sub type {sub_type} not supported")
+ else:
+ raise ValueError("scheme type {scheme_type} not supported")
+
+
+def _apply_bearer(token: str) -> str:
+ return token.lower().startswith("bearer ") and token or f"Bearer {token}"
+
+
+def _parse_basic_auth_scheme(headers: Dict[str, str], scheme: Any):
+ username = ""
+ password = ""
+
+ if not isinstance(scheme, BaseModel):
+ raise TypeError("basic auth scheme must be a pydantic model")
+
+ scheme_fields: Dict[str, FieldInfo] = scheme.__class__.model_fields
+ for name in scheme_fields:
+ scheme_field = scheme_fields[name]
+
+ metadata = find_field_metadata(scheme_field, SecurityMetadata)
+ if metadata is None or metadata.field_name is None:
+ continue
+
+ field_name = metadata.field_name
+ value = getattr(scheme, name)
+
+ if field_name == "username":
+ username = value
+ if field_name == "password":
+ password = value
+
+ data = f"{username}:{password}".encode()
+ headers["Authorization"] = f"Basic {base64.b64encode(data).decode()}"
diff --git a/bank-feeds/src/codat_bankfeeds/utils/serializers.py b/bank-feeds/src/codat_bankfeeds/utils/serializers.py
new file mode 100644
index 000000000..85d57f436
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/serializers.py
@@ -0,0 +1,190 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from decimal import Decimal
+import json
+from typing import Any, Dict, List, Union, get_args
+import httpx
+from typing_extensions import get_origin
+from pydantic import ConfigDict, create_model
+from pydantic_core import from_json
+from typing_inspect import is_optional_type
+
+from ..types.basemodel import BaseModel, Nullable, OptionalNullable, Unset
+
+
+def serialize_decimal(as_str: bool):
+ def serialize(d):
+ if is_optional_type(type(d)) and d is None:
+ return None
+ if isinstance(d, Unset):
+ return d
+
+ if not isinstance(d, Decimal):
+ raise ValueError("Expected Decimal object")
+
+ return str(d) if as_str else float(d)
+
+ return serialize
+
+
+def validate_decimal(d):
+ if d is None:
+ return None
+
+ if isinstance(d, (Decimal, Unset)):
+ return d
+
+ if not isinstance(d, (str, int, float)):
+ raise ValueError("Expected string, int or float")
+
+ return Decimal(str(d))
+
+
+def serialize_float(as_str: bool):
+ def serialize(f):
+ if is_optional_type(type(f)) and f is None:
+ return None
+ if isinstance(f, Unset):
+ return f
+
+ if not isinstance(f, float):
+ raise ValueError("Expected float")
+
+ return str(f) if as_str else f
+
+ return serialize
+
+
+def validate_float(f):
+ if f is None:
+ return None
+
+ if isinstance(f, (float, Unset)):
+ return f
+
+ if not isinstance(f, str):
+ raise ValueError("Expected string")
+
+ return float(f)
+
+
+def serialize_int(as_str: bool):
+ def serialize(i):
+ if is_optional_type(type(i)) and i is None:
+ return None
+ if isinstance(i, Unset):
+ return i
+
+ if not isinstance(i, int):
+ raise ValueError("Expected int")
+
+ return str(i) if as_str else i
+
+ return serialize
+
+
+def validate_int(b):
+ if b is None:
+ return None
+
+ if isinstance(b, (int, Unset)):
+ return b
+
+ if not isinstance(b, str):
+ raise ValueError("Expected string")
+
+ return int(b)
+
+
+def validate_open_enum(is_int: bool):
+ def validate(e):
+ if e is None:
+ return None
+
+ if isinstance(e, Unset):
+ return e
+
+ if is_int:
+ if not isinstance(e, int):
+ raise ValueError("Expected int")
+ else:
+ if not isinstance(e, str):
+ raise ValueError("Expected string")
+
+ return e
+
+ return validate
+
+
+def unmarshal_json(raw, typ: Any) -> Any:
+ return unmarshal(from_json(raw), typ)
+
+
+def unmarshal(val, typ: Any) -> Any:
+ unmarshaller = create_model(
+ "Unmarshaller",
+ body=(typ, ...),
+ __config__=ConfigDict(populate_by_name=True, arbitrary_types_allowed=True),
+ )
+
+ m = unmarshaller(body=val)
+
+ # pyright: ignore[reportAttributeAccessIssue]
+ return m.body # type: ignore
+
+
+def marshal_json(val, typ):
+ if is_nullable(typ) and val is None:
+ return "null"
+
+ marshaller = create_model(
+ "Marshaller",
+ body=(typ, ...),
+ __config__=ConfigDict(populate_by_name=True, arbitrary_types_allowed=True),
+ )
+
+ m = marshaller(body=val)
+
+ d = m.model_dump(by_alias=True, mode="json", exclude_none=True)
+
+ if len(d) == 0:
+ return ""
+
+ return json.dumps(d[next(iter(d))], separators=(",", ":"), sort_keys=True)
+
+
+def is_nullable(field):
+ origin = get_origin(field)
+ if origin is Nullable or origin is OptionalNullable:
+ return True
+
+ if not origin is Union or type(None) not in get_args(field):
+ return False
+
+ for arg in get_args(field):
+ if get_origin(arg) is Nullable or get_origin(arg) is OptionalNullable:
+ return True
+
+ return False
+
+
+def stream_to_text(stream: httpx.Response) -> str:
+ return "".join(stream.iter_text())
+
+
+def get_pydantic_model(data: Any, typ: Any) -> Any:
+ if not _contains_pydantic_model(data):
+ return unmarshal(data, typ)
+
+ return data
+
+
+def _contains_pydantic_model(data: Any) -> bool:
+ if isinstance(data, BaseModel):
+ return True
+ if isinstance(data, List):
+ return any(_contains_pydantic_model(item) for item in data)
+ if isinstance(data, Dict):
+ return any(_contains_pydantic_model(value) for value in data.values())
+
+ return False
diff --git a/bank-feeds/src/codat_bankfeeds/utils/url.py b/bank-feeds/src/codat_bankfeeds/utils/url.py
new file mode 100644
index 000000000..c78ccbae4
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/url.py
@@ -0,0 +1,155 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from decimal import Decimal
+from typing import (
+ Any,
+ Dict,
+ get_type_hints,
+ List,
+ Optional,
+ Union,
+ get_args,
+ get_origin,
+)
+from pydantic import BaseModel
+from pydantic.fields import FieldInfo
+
+from .metadata import (
+ PathParamMetadata,
+ find_field_metadata,
+)
+from .values import (
+ _get_serialized_params,
+ _is_set,
+ _populate_from_globals,
+ _val_to_string,
+)
+
+
+def generate_url(
+ server_url: str,
+ path: str,
+ path_params: Any,
+ gbls: Optional[Any] = None,
+) -> str:
+ path_param_values: Dict[str, str] = {}
+
+ globals_already_populated = _populate_path_params(
+ path_params, gbls, path_param_values, []
+ )
+ if _is_set(gbls):
+ _populate_path_params(gbls, None, path_param_values, globals_already_populated)
+
+ for key, value in path_param_values.items():
+ path = path.replace("{" + key + "}", value, 1)
+
+ return remove_suffix(server_url, "/") + path
+
+
+def _populate_path_params(
+ path_params: Any,
+ gbls: Any,
+ path_param_values: Dict[str, str],
+ skip_fields: List[str],
+) -> List[str]:
+ globals_already_populated: List[str] = []
+
+ if not isinstance(path_params, BaseModel):
+ return globals_already_populated
+
+ path_param_fields: Dict[str, FieldInfo] = path_params.__class__.model_fields
+ path_param_field_types = get_type_hints(path_params.__class__)
+ for name in path_param_fields:
+ if name in skip_fields:
+ continue
+
+ field = path_param_fields[name]
+
+ param_metadata = find_field_metadata(field, PathParamMetadata)
+ if param_metadata is None:
+ continue
+
+ param = getattr(path_params, name) if _is_set(path_params) else None
+ param, global_found = _populate_from_globals(
+ name, param, PathParamMetadata, gbls
+ )
+ if global_found:
+ globals_already_populated.append(name)
+
+ if not _is_set(param):
+ continue
+
+ f_name = field.alias if field.alias is not None else name
+ serialization = param_metadata.serialization
+ if serialization is not None:
+ serialized_params = _get_serialized_params(
+ param_metadata, f_name, param, path_param_field_types[name]
+ )
+ for key, value in serialized_params.items():
+ path_param_values[key] = value
+ else:
+ pp_vals: List[str] = []
+ if param_metadata.style == "simple":
+ if isinstance(param, List):
+ for pp_val in param:
+ if not _is_set(pp_val):
+ continue
+ pp_vals.append(_val_to_string(pp_val))
+ path_param_values[f_name] = ",".join(pp_vals)
+ elif isinstance(param, Dict):
+ for pp_key in param:
+ if not _is_set(param[pp_key]):
+ continue
+ if param_metadata.explode:
+ pp_vals.append(f"{pp_key}={_val_to_string(param[pp_key])}")
+ else:
+ pp_vals.append(f"{pp_key},{_val_to_string(param[pp_key])}")
+ path_param_values[f_name] = ",".join(pp_vals)
+ elif not isinstance(param, (str, int, float, complex, bool, Decimal)):
+ param_fields: Dict[str, FieldInfo] = param.__class__.model_fields
+ for name in param_fields:
+ param_field = param_fields[name]
+
+ param_value_metadata = find_field_metadata(
+ param_field, PathParamMetadata
+ )
+ if param_value_metadata is None:
+ continue
+
+ param_name = (
+ param_field.alias if param_field.alias is not None else name
+ )
+
+ param_field_val = getattr(param, name)
+ if not _is_set(param_field_val):
+ continue
+ if param_metadata.explode:
+ pp_vals.append(
+ f"{param_name}={_val_to_string(param_field_val)}"
+ )
+ else:
+ pp_vals.append(
+ f"{param_name},{_val_to_string(param_field_val)}"
+ )
+ path_param_values[f_name] = ",".join(pp_vals)
+ elif _is_set(param):
+ path_param_values[f_name] = _val_to_string(param)
+
+ return globals_already_populated
+
+
+def is_optional(field):
+ return get_origin(field) is Union and type(None) in get_args(field)
+
+
+def template_url(url_with_params: str, params: Dict[str, str]) -> str:
+ for key, value in params.items():
+ url_with_params = url_with_params.replace("{" + key + "}", value)
+
+ return url_with_params
+
+
+def remove_suffix(input_string, suffix):
+ if suffix and input_string.endswith(suffix):
+ return input_string[: -len(suffix)]
+ return input_string
diff --git a/bank-feeds/src/codat_bankfeeds/utils/values.py b/bank-feeds/src/codat_bankfeeds/utils/values.py
new file mode 100644
index 000000000..2b4b68321
--- /dev/null
+++ b/bank-feeds/src/codat_bankfeeds/utils/values.py
@@ -0,0 +1,134 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from datetime import datetime
+from enum import Enum
+from email.message import Message
+import os
+from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union
+
+from httpx import Response
+from pydantic import BaseModel
+from pydantic.fields import FieldInfo
+
+from ..types.basemodel import Unset
+
+from .serializers import marshal_json
+
+from .metadata import ParamMetadata, find_field_metadata
+
+
+def match_content_type(content_type: str, pattern: str) -> bool:
+ if pattern in (content_type, "*", "*/*"):
+ return True
+
+ msg = Message()
+ msg["content-type"] = content_type
+ media_type = msg.get_content_type()
+
+ if media_type == pattern:
+ return True
+
+ parts = media_type.split("/")
+ if len(parts) == 2:
+ if pattern in (f"{parts[0]}/*", f"*/{parts[1]}"):
+ return True
+
+ return False
+
+
+def match_status_codes(status_codes: List[str], status_code: int) -> bool:
+ if "default" in status_codes:
+ return True
+
+ for code in status_codes:
+ if code == str(status_code):
+ return True
+
+ if code.endswith("XX") and code.startswith(str(status_code)[:1]):
+ return True
+ return False
+
+
+T = TypeVar("T")
+
+
+def get_global_from_env(
+ value: Optional[T], env_key: str, type_cast: Callable[[str], T]
+) -> Optional[T]:
+ if value is not None:
+ return value
+ env_value = os.getenv(env_key)
+ if env_value is not None:
+ try:
+ return type_cast(env_value)
+ except ValueError:
+ pass
+ return None
+
+
+def match_response(
+ response: Response, code: Union[str, List[str]], content_type: str
+) -> bool:
+ codes = code if isinstance(code, list) else [code]
+ return match_status_codes(codes, response.status_code) and match_content_type(
+ response.headers.get("content-type", "application/octet-stream"), content_type
+ )
+
+
+def _populate_from_globals(
+ param_name: str, value: Any, param_metadata_type: type, gbls: Any
+) -> Tuple[Any, bool]:
+ if gbls is None:
+ return value, False
+
+ if not isinstance(gbls, BaseModel):
+ raise TypeError("globals must be a pydantic model")
+
+ global_fields: Dict[str, FieldInfo] = gbls.__class__.model_fields
+ found = False
+ for name in global_fields:
+ field = global_fields[name]
+ if name is not param_name:
+ continue
+
+ found = True
+
+ if value is not None:
+ return value, True
+
+ global_value = getattr(gbls, name)
+
+ param_metadata = find_field_metadata(field, param_metadata_type)
+ if param_metadata is None:
+ return value, True
+
+ return global_value, True
+
+ return value, found
+
+
+def _val_to_string(val) -> str:
+ if isinstance(val, bool):
+ return str(val).lower()
+ if isinstance(val, datetime):
+ return str(val.isoformat().replace("+00:00", "Z"))
+ if isinstance(val, Enum):
+ return str(val.value)
+
+ return str(val)
+
+
+def _get_serialized_params(
+ metadata: ParamMetadata, field_name: str, obj: Any, typ: type
+) -> Dict[str, str]:
+ params: Dict[str, str] = {}
+
+ serialization = metadata.serialization
+ if serialization == "json":
+ params[field_name] = marshal_json(obj, typ)
+
+ return params
+
+
+def _is_set(value: Any) -> bool:
+ return value is not None and not isinstance(value, Unset)
diff --git a/bank-feeds/src/codatbankfeeds/__init__.py b/bank-feeds/src/codatbankfeeds/__init__.py
deleted file mode 100644
index e6c0deeb6..000000000
--- a/bank-feeds/src/codatbankfeeds/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .sdk import *
-from .sdkconfiguration import *
diff --git a/bank-feeds/src/codatbankfeeds/account_mapping.py b/bank-feeds/src/codatbankfeeds/account_mapping.py
deleted file mode 100644
index 9db7a8d73..000000000
--- a/bank-feeds/src/codatbankfeeds/account_mapping.py
+++ /dev/null
@@ -1,140 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .sdkconfiguration import SDKConfiguration
-from codatbankfeeds import utils
-from codatbankfeeds.models import errors, operations, shared
-from typing import Optional
-
-class AccountMapping:
- r"""Bank feed bank account mapping."""
- sdk_configuration: SDKConfiguration
-
- def __init__(self, sdk_config: SDKConfiguration) -> None:
- self.sdk_configuration = sdk_config
-
-
-
- def create(self, request: operations.CreateBankAccountMappingRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBankAccountMappingResponse:
- r"""Create bank feed account mapping
- The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting platform (target account).
-
- A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform).
-
- To find valid target account options, first call list bank feed account mappings.
-
- This endpoint is only needed if building an account management UI.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.CreateBankAccountMappingRequest, base_url, '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.CreateBankAccountMappingRequest, "zero", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('POST', url, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.CreateBankAccountMappingResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.BankFeedAccountMappingResponse])
- res.bank_feed_account_mapping_response = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def get(self, request: operations.GetBankAccountMappingRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBankAccountMappingResponse:
- r"""List bank feed account mappings
- The *List bank account mappings* endpoint returns information about a source bank account and any current or potential target mapping accounts.
-
- A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end users account in the underlying platform).
-
- This endpoint is only needed if building an account management UI.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.GetBankAccountMappingRequest, base_url, '/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.GetBankAccountMappingResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.BankFeedMapping])
- res.bank_feed_mapping = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
\ No newline at end of file
diff --git a/bank-feeds/src/codatbankfeeds/bank_accounts.py b/bank-feeds/src/codatbankfeeds/bank_accounts.py
deleted file mode 100644
index 782d18e84..000000000
--- a/bank-feeds/src/codatbankfeeds/bank_accounts.py
+++ /dev/null
@@ -1,208 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .sdkconfiguration import SDKConfiguration
-from codatbankfeeds import utils
-from codatbankfeeds.models import errors, operations, shared
-from typing import Optional
-
-class BankAccounts:
- r"""Access bank accounts in an SMBs accounting platform."""
- sdk_configuration: SDKConfiguration
-
- def __init__(self, sdk_config: SDKConfiguration) -> None:
- self.sdk_configuration = sdk_config
-
-
-
- def create(self, request: operations.CreateBankAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBankAccountResponse:
- r"""Create bank account
- The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.
-
- [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
-
- **Integration-specific behaviour**
-
- Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/bank-feeds-api#/operations/get-create-update-bankAccounts-model).
-
- Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.CreateBankAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bankAccounts', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.CreateBankAccountRequest, "bank_account_prototype", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- query_params = utils.get_query_params(operations.CreateBankAccountRequest, request)
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('POST', url, params=query_params, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.CreateBankAccountResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.BankAccountCreateResponse])
- res.bank_account_create_response = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def get_create_model(self, request: operations.GetCreateBankAccountsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateBankAccountsModelResponse:
- r"""Get create/update bank account model
- The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company and integration.
-
- [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
-
- **Integration-specific behaviour**
-
- See the *response examples* for integration-specific indicative models.
-
- Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.GetCreateBankAccountsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/bankAccounts', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.GetCreateBankAccountsModelResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption])
- res.push_option = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def list(self, request: operations.ListBankAccountsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBankAccountsResponse:
- r"""List bank accounts
- The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.
-
- [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
-
- Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/bank-feeds-api#/operations/refresh-company-data).
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.ListBankAccountsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bankAccounts', request)
- headers = {}
- query_params = utils.get_query_params(operations.ListBankAccountsRequest, request)
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, params=query_params, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.ListBankAccountsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.BankAccounts])
- res.bank_accounts = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 404, 409, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
\ No newline at end of file
diff --git a/bank-feeds/src/codatbankfeeds/companies.py b/bank-feeds/src/codatbankfeeds/companies.py
deleted file mode 100644
index 18f573d15..000000000
--- a/bank-feeds/src/codatbankfeeds/companies.py
+++ /dev/null
@@ -1,316 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .sdkconfiguration import SDKConfiguration
-from codatbankfeeds import utils
-from codatbankfeeds.models import errors, operations, shared
-from typing import Optional
-
-class Companies:
- r"""Create and manage your Codat companies."""
- sdk_configuration: SDKConfiguration
-
- def __init__(self, sdk_config: SDKConfiguration) -> None:
- self.sdk_configuration = sdk_config
-
-
-
- def create(self, request: Optional[shared.CompanyRequestBody], retries: Optional[utils.RetryConfig] = None) -> operations.CreateCompanyResponse:
- r"""Create company
- Use the *Create company* endpoint to create a new [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) that represents your customer in Codat.
-
- A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
- Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
-
- If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = base_url + '/companies'
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, Optional[shared.CompanyRequestBody], "request", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('POST', url, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.CreateCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Company])
- res.company = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def delete(self, request: operations.DeleteCompanyRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteCompanyResponse:
- r"""Delete a company
- The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/bank-feeds-api#/schemas/Company), its [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) and any cached data. This operation is irreversible.
-
- A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
- Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.DeleteCompanyRequest, base_url, '/companies/{companyId}', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('DELETE', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.DeleteCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 204:
- pass
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def get(self, request: operations.GetCompanyRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCompanyResponse:
- r"""Get company
- The *Get company* endpoint returns a single company for a given `companyId`.
-
- A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
- Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.GetCompanyRequest, base_url, '/companies/{companyId}', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.GetCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Company])
- res.company = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def list(self, request: operations.ListCompaniesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCompaniesResponse:
- r"""List companies
- The *List companies* endpoint returns a list of [companies] associated to your instances.
-
- A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
- Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = base_url + '/companies'
- headers = {}
- query_params = utils.get_query_params(operations.ListCompaniesRequest, request)
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, params=query_params, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.ListCompaniesResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Companies])
- res.companies = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def update(self, request: operations.UpdateCompanyRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateCompanyResponse:
- r"""Update company
- Use the *Update company* endpoint to update both the name and description of the company.
- If you use [groups](https://docs.codat.io/bank-feeds-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/bank-feeds-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/bank-feeds-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group.
-
- A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
- Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.UpdateCompanyRequest, base_url, '/companies/{companyId}', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.UpdateCompanyRequest, "company_request_body", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('PUT', url, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.UpdateCompanyResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Company])
- res.company = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
\ No newline at end of file
diff --git a/bank-feeds/src/codatbankfeeds/configuration.py b/bank-feeds/src/codatbankfeeds/configuration.py
deleted file mode 100644
index e0ac49406..000000000
--- a/bank-feeds/src/codatbankfeeds/configuration.py
+++ /dev/null
@@ -1,130 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .sdkconfiguration import SDKConfiguration
-from codatbankfeeds import utils
-from codatbankfeeds.models import errors, operations, shared
-from typing import Optional
-
-class Configuration:
- r"""Configure bank feeds for a company."""
- sdk_configuration: SDKConfiguration
-
- def __init__(self, sdk_config: SDKConfiguration) -> None:
- self.sdk_configuration = sdk_config
-
-
-
- def get(self, request: operations.GetConfigurationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetConfigurationResponse:
- r"""Get configuration
- The *Get configuration* endpoint returns the current configuration for a given company ID.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.GetConfigurationRequest, base_url, '/companies/{companyId}/sync/banking/config', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.GetConfigurationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Configuration])
- res.configuration = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def set(self, request: operations.SetConfigurationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.SetConfigurationResponse:
- r"""Set configuration
- Use *Set configuration* endpoint to configure a given company ID.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.SetConfigurationRequest, base_url, '/companies/{companyId}/sync/banking/config', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.SetConfigurationRequest, "configuration", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('POST', url, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.SetConfigurationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Configuration])
- res.configuration = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
\ No newline at end of file
diff --git a/bank-feeds/src/codatbankfeeds/connections.py b/bank-feeds/src/codatbankfeeds/connections.py
deleted file mode 100644
index 8c8daf7ec..000000000
--- a/bank-feeds/src/codatbankfeeds/connections.py
+++ /dev/null
@@ -1,301 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .sdkconfiguration import SDKConfiguration
-from codatbankfeeds import utils
-from codatbankfeeds.models import errors, operations, shared
-from typing import Optional
-
-class Connections:
- r"""Manage your companies' data connections."""
- sdk_configuration: SDKConfiguration
-
- def __init__(self, sdk_config: SDKConfiguration) -> None:
- self.sdk_configuration = sdk_config
-
-
-
- def create(self, request: operations.CreateConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateConnectionResponse:
- r"""Create connection
- Creates a connection for the company by providing a valid `platformKey`.
-
- Use the [List Integrations](https://docs.codat.io/bank-feeds-api#/operations/list-integrations) endpoint to access valid platform keys.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.CreateConnectionRequest, base_url, '/companies/{companyId}/connections', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.CreateConnectionRequest, "request_body", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('POST', url, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.CreateConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Connection])
- res.connection = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def delete(self, request: operations.DeleteConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteConnectionResponse:
- r"""Delete connection
- Revoke and remove a connection from a company.
- This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.DeleteConnectionRequest, base_url, '/companies/{companyId}/connections/{connectionId}', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('DELETE', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.DeleteConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- pass
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def get(self, request: operations.GetConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetConnectionResponse:
- r"""Get connection
- Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.GetConnectionRequest, base_url, '/companies/{companyId}/connections/{connectionId}', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.GetConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Connection])
- res.connection = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def list(self, request: operations.ListConnectionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListConnectionsResponse:
- r"""List connections
- List the connections for a company.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.ListConnectionsRequest, base_url, '/companies/{companyId}/connections', request)
- headers = {}
- query_params = utils.get_query_params(operations.ListConnectionsRequest, request)
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, params=query_params, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.ListConnectionsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Connections])
- res.connections = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def unlink(self, request: operations.UnlinkConnectionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UnlinkConnectionResponse:
- r"""Unlink connection
- This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.UnlinkConnectionRequest, base_url, '/companies/{companyId}/connections/{connectionId}', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.UnlinkConnectionRequest, "request_body", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('PATCH', url, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.UnlinkConnectionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.Connection])
- res.connection = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
\ No newline at end of file
diff --git a/bank-feeds/src/codatbankfeeds/models/__init__.py b/bank-feeds/src/codatbankfeeds/models/__init__.py
deleted file mode 100644
index 722bb9982..000000000
--- a/bank-feeds/src/codatbankfeeds/models/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-
-# package
diff --git a/bank-feeds/src/codatbankfeeds/models/errors/__init__.py b/bank-feeds/src/codatbankfeeds/models/errors/__init__.py
deleted file mode 100644
index bf15fd116..000000000
--- a/bank-feeds/src/codatbankfeeds/models/errors/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .errormessage import *
-from .sdkerror import *
-
-__all__ = ["ErrorMessage","SDKError"]
diff --git a/bank-feeds/src/codatbankfeeds/models/errors/errormessage.py b/bank-feeds/src/codatbankfeeds/models/errors/errormessage.py
deleted file mode 100644
index 159532128..000000000
--- a/bank-feeds/src/codatbankfeeds/models/errors/errormessage.py
+++ /dev/null
@@ -1,34 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from ...models.shared import errorvalidation as shared_errorvalidation
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-
-@dataclasses.dataclass
-class ErrorMessage(Exception):
- r"""The request made is not valid."""
- UNSET='__SPEAKEASY_UNSET__'
- can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }})
- r"""`True` if the error occurred transiently and can be retried."""
- correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier used to propagate to all downstream services and determine the source of the error."""
- detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }})
- r"""Machine readable error code used to automate processes based on the code returned."""
- error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }})
- r"""A brief description of the error."""
- service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }})
- r"""Codat's service the returned the error."""
- status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }})
- r"""The HTTP status code returned by the error."""
- validation: Optional[shared_errorvalidation.ErrorValidation] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is ErrorMessage.UNSET }})
- r"""A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here."""
-
-
- def __str__(self) -> str:
- return utils.marshal_json(self, type(self))
diff --git a/bank-feeds/src/codatbankfeeds/models/errors/sdkerror.py b/bank-feeds/src/codatbankfeeds/models/errors/sdkerror.py
deleted file mode 100644
index 6bb02bbd6..000000000
--- a/bank-feeds/src/codatbankfeeds/models/errors/sdkerror.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-import requests as requests_http
-
-
-class SDKError(Exception):
- """Represents an error returned by the API."""
- message: str
- status_code: int
- body: str
- raw_response: requests_http.Response
-
- def __init__(self, message: str, status_code: int, body: str, raw_response: requests_http.Response):
- self.message = message
- self.status_code = status_code
- self.body = body
- self.raw_response = raw_response
-
- def __str__(self):
- body = ''
- if len(self.body) > 0:
- body = f'\n{self.body}'
-
- return f'{self.message}: Status {self.status_code}{body}'
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/__init__.py b/bank-feeds/src/codatbankfeeds/models/operations/__init__.py
deleted file mode 100644
index be219e88a..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/__init__.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .create_bank_account import *
-from .create_bank_account_mapping import *
-from .create_bank_transactions import *
-from .create_company import *
-from .create_connection import *
-from .create_source_account import *
-from .delete_bank_feed_credentials import *
-from .delete_company import *
-from .delete_connection import *
-from .delete_source_account import *
-from .generate_credentials import *
-from .get_bank_account_mapping import *
-from .get_company import *
-from .get_configuration import *
-from .get_connection import *
-from .get_create_bankaccounts_model import *
-from .get_create_operation import *
-from .list_bank_accounts import *
-from .list_companies import *
-from .list_connections import *
-from .list_create_operations import *
-from .list_source_accounts import *
-from .set_configuration import *
-from .unlink_connection import *
-from .update_company import *
-from .update_source_account import *
-
-__all__ = ["CreateBankAccountMappingRequest","CreateBankAccountMappingResponse","CreateBankAccountRequest","CreateBankAccountResponse","CreateBankTransactionsRequest","CreateBankTransactionsResponse","CreateCompanyResponse","CreateConnectionRequest","CreateConnectionRequestBody","CreateConnectionResponse","CreateSourceAccountRequest","CreateSourceAccountResponse","DeleteBankFeedCredentialsRequest","DeleteBankFeedCredentialsResponse","DeleteCompanyRequest","DeleteCompanyResponse","DeleteConnectionRequest","DeleteConnectionResponse","DeleteSourceAccountRequest","DeleteSourceAccountResponse","GenerateCredentialsRequest","GenerateCredentialsResponse","GetBankAccountMappingRequest","GetBankAccountMappingResponse","GetCompanyRequest","GetCompanyResponse","GetConfigurationRequest","GetConfigurationResponse","GetConnectionRequest","GetConnectionResponse","GetCreateBankAccountsModelRequest","GetCreateBankAccountsModelResponse","GetCreateOperationRequest","GetCreateOperationResponse","ListBankAccountsRequest","ListBankAccountsResponse","ListCompaniesRequest","ListCompaniesResponse","ListConnectionsRequest","ListConnectionsResponse","ListCreateOperationsRequest","ListCreateOperationsResponse","ListSourceAccountsRequest","ListSourceAccountsResponse","SetConfigurationRequest","SetConfigurationResponse","UnlinkConnectionRequest","UnlinkConnectionResponse","UnlinkConnectionUpdateConnection","UpdateCompanyRequest","UpdateCompanyResponse","UpdateSourceAccountRequest","UpdateSourceAccountResponse"]
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_bank_account.py b/bank-feeds/src/codatbankfeeds/models/operations/create_bank_account.py
deleted file mode 100644
index a24a660bc..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/create_bank_account.py
+++ /dev/null
@@ -1,35 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import bankaccountcreateresponse as shared_bankaccountcreateresponse
-from ...models.shared import bankaccountprototype as shared_bankaccountprototype
-from typing import Optional
-
-
-@dataclasses.dataclass
-class CreateBankAccountRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
- bank_account_prototype: Optional[shared_bankaccountprototype.BankAccountPrototype] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
- timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timeoutInMinutes', 'style': 'form', 'explode': True }})
- r"""Time limit for the push operation to complete before it is timed out."""
-
-
-
-
-@dataclasses.dataclass
-class CreateBankAccountResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- bank_account_create_response: Optional[shared_bankaccountcreateresponse.BankAccountCreateResponse] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_bank_account_mapping.py b/bank-feeds/src/codatbankfeeds/models/operations/create_bank_account_mapping.py
deleted file mode 100644
index 13e54362b..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/create_bank_account_mapping.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import bankfeedaccountmappingresponse as shared_bankfeedaccountmappingresponse
-from ...models.shared import zero as shared_zero
-from typing import Optional
-
-
-@dataclasses.dataclass
-class CreateBankAccountMappingRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
- zero: Optional[shared_zero.Zero] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
-
-
-
-
-@dataclasses.dataclass
-class CreateBankAccountMappingResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- bank_feed_account_mapping_response: Optional[shared_bankfeedaccountmappingresponse.BankFeedAccountMappingResponse] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_bank_transactions.py b/bank-feeds/src/codatbankfeeds/models/operations/create_bank_transactions.py
deleted file mode 100644
index 5e5d70d49..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/create_bank_transactions.py
+++ /dev/null
@@ -1,39 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import createbanktransactions as shared_createbanktransactions
-from ...models.shared import createbanktransactionsresponse as shared_createbanktransactionsresponse
-from typing import Optional
-
-
-@dataclasses.dataclass
-class CreateBankTransactionsRequest:
- account_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'accountId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for an account."""
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
- create_bank_transactions: Optional[shared_createbanktransactions.CreateBankTransactions] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
- allow_sync_on_push_complete: Optional[bool] = dataclasses.field(default=True, metadata={'query_param': { 'field_name': 'allowSyncOnPushComplete', 'style': 'form', 'explode': True }})
- r"""Allow a sync upon push completion."""
- timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'timeoutInMinutes', 'style': 'form', 'explode': True }})
- r"""Time limit for the push operation to complete before it is timed out."""
-
-
-
-
-@dataclasses.dataclass
-class CreateBankTransactionsResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- create_bank_transactions_response: Optional[shared_createbanktransactionsresponse.CreateBankTransactionsResponse] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_company.py b/bank-feeds/src/codatbankfeeds/models/operations/create_company.py
deleted file mode 100644
index d7751fcaf..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/create_company.py
+++ /dev/null
@@ -1,21 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import company as shared_company
-from typing import Optional
-
-
-@dataclasses.dataclass
-class CreateCompanyResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- company: Optional[shared_company.Company] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_connection.py b/bank-feeds/src/codatbankfeeds/models/operations/create_connection.py
deleted file mode 100644
index 7c72e3ca2..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/create_connection.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import connection as shared_connection
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class CreateConnectionRequestBody:
- platform_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platformKey'), 'exclude': lambda f: f is None }})
- r"""A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys."""
-
-
-
-
-@dataclasses.dataclass
-class CreateConnectionRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- request_body: Optional[CreateConnectionRequestBody] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
-
-
-
-
-@dataclasses.dataclass
-class CreateConnectionResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- connection: Optional[shared_connection.Connection] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_source_account.py b/bank-feeds/src/codatbankfeeds/models/operations/create_source_account.py
deleted file mode 100644
index ab9553c9c..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/create_source_account.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import sourceaccount as shared_sourceaccount
-from typing import Optional
-
-
-@dataclasses.dataclass
-class CreateSourceAccountRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
- source_account: Optional[shared_sourceaccount.SourceAccount] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
-
-
-
-
-@dataclasses.dataclass
-class CreateSourceAccountResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- source_account: Optional[shared_sourceaccount.SourceAccount] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/delete_bank_feed_credentials.py b/bank-feeds/src/codatbankfeeds/models/operations/delete_bank_feed_credentials.py
deleted file mode 100644
index 327594c3f..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/delete_bank_feed_credentials.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-
-
-@dataclasses.dataclass
-class DeleteBankFeedCredentialsRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
-
-
-
-
-@dataclasses.dataclass
-class DeleteBankFeedCredentialsResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/delete_company.py b/bank-feeds/src/codatbankfeeds/models/operations/delete_company.py
deleted file mode 100644
index e544df054..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/delete_company.py
+++ /dev/null
@@ -1,25 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-
-
-@dataclasses.dataclass
-class DeleteCompanyRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
-
-
-
-
-@dataclasses.dataclass
-class DeleteCompanyResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/delete_connection.py b/bank-feeds/src/codatbankfeeds/models/operations/delete_connection.py
deleted file mode 100644
index f6a77abb5..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/delete_connection.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-
-
-@dataclasses.dataclass
-class DeleteConnectionRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
-
-
-
-
-@dataclasses.dataclass
-class DeleteConnectionResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/delete_source_account.py b/bank-feeds/src/codatbankfeeds/models/operations/delete_source_account.py
deleted file mode 100644
index 1d2713c85..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/delete_source_account.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-
-
-@dataclasses.dataclass
-class DeleteSourceAccountRequest:
- account_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'accountId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for an account."""
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
-
-
-
-
-@dataclasses.dataclass
-class DeleteSourceAccountResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/generate_credentials.py b/bank-feeds/src/codatbankfeeds/models/operations/generate_credentials.py
deleted file mode 100644
index a06ed040f..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/generate_credentials.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import bankaccountcredentials as shared_bankaccountcredentials
-from typing import Optional
-
-
-@dataclasses.dataclass
-class GenerateCredentialsRequest:
- request_body: bytes = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }})
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
-
-
-
-
-@dataclasses.dataclass
-class GenerateCredentialsResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- bank_account_credentials: Optional[shared_bankaccountcredentials.BankAccountCredentials] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/get_bank_account_mapping.py b/bank-feeds/src/codatbankfeeds/models/operations/get_bank_account_mapping.py
deleted file mode 100644
index d38d39f50..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/get_bank_account_mapping.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import bankfeedmapping as shared_bankfeedmapping
-from typing import Optional
-
-
-@dataclasses.dataclass
-class GetBankAccountMappingRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
-
-
-
-
-@dataclasses.dataclass
-class GetBankAccountMappingResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- bank_feed_mapping: Optional[shared_bankfeedmapping.BankFeedMapping] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/get_company.py b/bank-feeds/src/codatbankfeeds/models/operations/get_company.py
deleted file mode 100644
index 65e6aba22..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/get_company.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import company as shared_company
-from typing import Optional
-
-
-@dataclasses.dataclass
-class GetCompanyRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
-
-
-
-
-@dataclasses.dataclass
-class GetCompanyResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- company: Optional[shared_company.Company] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/get_configuration.py b/bank-feeds/src/codatbankfeeds/models/operations/get_configuration.py
deleted file mode 100644
index b30c82e51..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/get_configuration.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import configuration as shared_configuration
-from typing import Optional
-
-
-@dataclasses.dataclass
-class GetConfigurationRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
-
-
-
-
-@dataclasses.dataclass
-class GetConfigurationResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- configuration: Optional[shared_configuration.Configuration] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/get_connection.py b/bank-feeds/src/codatbankfeeds/models/operations/get_connection.py
deleted file mode 100644
index 083a24ed2..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/get_connection.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import connection as shared_connection
-from typing import Optional
-
-
-@dataclasses.dataclass
-class GetConnectionRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
-
-
-
-
-@dataclasses.dataclass
-class GetConnectionResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- connection: Optional[shared_connection.Connection] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/get_create_bankaccounts_model.py b/bank-feeds/src/codatbankfeeds/models/operations/get_create_bankaccounts_model.py
deleted file mode 100644
index cc905025b..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/get_create_bankaccounts_model.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import pushoption as shared_pushoption
-from typing import Optional
-
-
-@dataclasses.dataclass
-class GetCreateBankAccountsModelRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
-
-
-
-
-@dataclasses.dataclass
-class GetCreateBankAccountsModelResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/get_create_operation.py b/bank-feeds/src/codatbankfeeds/models/operations/get_create_operation.py
deleted file mode 100644
index 67856d917..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/get_create_operation.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import pushoperation as shared_pushoperation
-from typing import Optional
-
-
-@dataclasses.dataclass
-class GetCreateOperationRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- push_operation_key: str = dataclasses.field(metadata={'path_param': { 'field_name': 'pushOperationKey', 'style': 'simple', 'explode': False }})
- r"""Push operation key."""
-
-
-
-
-@dataclasses.dataclass
-class GetCreateOperationResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- push_operation: Optional[shared_pushoperation.PushOperation] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/list_bank_accounts.py b/bank-feeds/src/codatbankfeeds/models/operations/list_bank_accounts.py
deleted file mode 100644
index 5732677a9..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/list_bank_accounts.py
+++ /dev/null
@@ -1,39 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import bankaccounts as shared_bankaccounts
-from typing import Optional
-
-
-@dataclasses.dataclass
-class ListBankAccountsRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
- order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
- r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
- page: Optional[int] = dataclasses.field(default=1, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
- r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
- page_size: Optional[int] = dataclasses.field(default=100, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
- r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
- query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
- r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
-
-
-
-
-@dataclasses.dataclass
-class ListBankAccountsResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- bank_accounts: Optional[shared_bankaccounts.BankAccounts] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/list_companies.py b/bank-feeds/src/codatbankfeeds/models/operations/list_companies.py
deleted file mode 100644
index 41f52fdfb..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/list_companies.py
+++ /dev/null
@@ -1,35 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import companies as shared_companies
-from typing import Optional
-
-
-@dataclasses.dataclass
-class ListCompaniesRequest:
- order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
- r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
- page: Optional[int] = dataclasses.field(default=1, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
- r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
- page_size: Optional[int] = dataclasses.field(default=100, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
- r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
- query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
- r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
-
-
-
-
-@dataclasses.dataclass
-class ListCompaniesResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- companies: Optional[shared_companies.Companies] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/list_connections.py b/bank-feeds/src/codatbankfeeds/models/operations/list_connections.py
deleted file mode 100644
index e4665b548..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/list_connections.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import connections as shared_connections
-from typing import Optional
-
-
-@dataclasses.dataclass
-class ListConnectionsRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
- r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
- page: Optional[int] = dataclasses.field(default=1, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
- r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
- page_size: Optional[int] = dataclasses.field(default=100, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
- r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
- query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
- r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
-
-
-
-
-@dataclasses.dataclass
-class ListConnectionsResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- connections: Optional[shared_connections.Connections] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/list_create_operations.py b/bank-feeds/src/codatbankfeeds/models/operations/list_create_operations.py
deleted file mode 100644
index a529e693d..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/list_create_operations.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import pushoperations as shared_pushoperations
-from typing import Optional
-
-
-@dataclasses.dataclass
-class ListCreateOperationsRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- order_by: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'orderBy', 'style': 'form', 'explode': True }})
- r"""Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results)."""
- page: Optional[int] = dataclasses.field(default=1, metadata={'query_param': { 'field_name': 'page', 'style': 'form', 'explode': True }})
- r"""Page number. [Read more](https://docs.codat.io/using-the-api/paging)."""
- page_size: Optional[int] = dataclasses.field(default=100, metadata={'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': True }})
- r"""Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging)."""
- query: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'query', 'style': 'form', 'explode': True }})
- r"""Codat query string. [Read more](https://docs.codat.io/using-the-api/querying)."""
-
-
-
-
-@dataclasses.dataclass
-class ListCreateOperationsResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- push_operations: Optional[shared_pushoperations.PushOperations] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/list_source_accounts.py b/bank-feeds/src/codatbankfeeds/models/operations/list_source_accounts.py
deleted file mode 100644
index bcf856199..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/list_source_accounts.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import sourceaccount as shared_sourceaccount
-from typing import List, Optional
-
-
-@dataclasses.dataclass
-class ListSourceAccountsRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
-
-
-
-
-@dataclasses.dataclass
-class ListSourceAccountsResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- source_accounts: Optional[List[shared_sourceaccount.SourceAccount]] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/set_configuration.py b/bank-feeds/src/codatbankfeeds/models/operations/set_configuration.py
deleted file mode 100644
index 851dee513..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/set_configuration.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import configuration as shared_configuration
-from typing import Optional
-
-
-@dataclasses.dataclass
-class SetConfigurationRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- configuration: Optional[shared_configuration.Configuration] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
-
-
-
-
-@dataclasses.dataclass
-class SetConfigurationResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- configuration: Optional[shared_configuration.Configuration] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/unlink_connection.py b/bank-feeds/src/codatbankfeeds/models/operations/unlink_connection.py
deleted file mode 100644
index 137e64dee..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/unlink_connection.py
+++ /dev/null
@@ -1,44 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import connection as shared_connection
-from ...models.shared import dataconnectionstatus as shared_dataconnectionstatus
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class UnlinkConnectionUpdateConnection:
- status: Optional[shared_dataconnectionstatus.DataConnectionStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }})
- r"""The current authorization status of the data connection."""
-
-
-
-
-@dataclasses.dataclass
-class UnlinkConnectionRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
- request_body: Optional[UnlinkConnectionUpdateConnection] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
-
-
-
-
-@dataclasses.dataclass
-class UnlinkConnectionResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- connection: Optional[shared_connection.Connection] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/update_company.py b/bank-feeds/src/codatbankfeeds/models/operations/update_company.py
deleted file mode 100644
index 4eae4a4d0..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/update_company.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import company as shared_company
-from ...models.shared import companyrequestbody as shared_companyrequestbody
-from typing import Optional
-
-
-@dataclasses.dataclass
-class UpdateCompanyRequest:
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- company_request_body: Optional[shared_companyrequestbody.CompanyRequestBody] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
-
-
-
-
-@dataclasses.dataclass
-class UpdateCompanyResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- company: Optional[shared_company.Company] = dataclasses.field(default=None)
- r"""OK"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/operations/update_source_account.py b/bank-feeds/src/codatbankfeeds/models/operations/update_source_account.py
deleted file mode 100644
index ff99cc6db..000000000
--- a/bank-feeds/src/codatbankfeeds/models/operations/update_source_account.py
+++ /dev/null
@@ -1,34 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-from ...models.shared import sourceaccount as shared_sourceaccount
-from typing import Optional
-
-
-@dataclasses.dataclass
-class UpdateSourceAccountRequest:
- account_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'accountId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for an account."""
- company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a company."""
- connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }})
- r"""Unique identifier for a connection."""
- source_account: Optional[shared_sourceaccount.SourceAccount] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
-
-
-
-
-@dataclasses.dataclass
-class UpdateSourceAccountResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
- source_account: Optional[shared_sourceaccount.SourceAccount] = dataclasses.field(default=None)
- r"""Success"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/__init__.py b/bank-feeds/src/codatbankfeeds/models/shared/__init__.py
deleted file mode 100644
index cdfcc4d4c..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/__init__.py
+++ /dev/null
@@ -1,57 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .bankaccountcreateresponse import *
-from .bankaccountcredentials import *
-from .bankaccountoption import *
-from .bankaccountprototype import *
-from .bankaccounts import *
-from .bankfeedaccountmappingresponse import *
-from .bankfeedmapping import *
-from .banktransactions import *
-from .clientratelimitreachedwebhook import *
-from .clientratelimitreachedwebhookdata import *
-from .clientratelimitresetwebhook import *
-from .clientratelimitresetwebhookdata import *
-from .companies import *
-from .company import *
-from .companyrequestbody import *
-from .configuration import *
-from .configurationcontactref import *
-from .configurationcustomer import *
-from .configurationschedule import *
-from .configurationsupplier import *
-from .connection import *
-from .connections import *
-from .createbanktransactions import *
-from .createbanktransactionsresponse import *
-from .dataconnectionerror import *
-from .dataconnectionstatus import *
-from .datatype import *
-from .errorvalidation import *
-from .errorvalidationitem import *
-from .halref import *
-from .items import *
-from .links import *
-from .pushchangetype import *
-from .pushfieldvalidation import *
-from .pushoperation import *
-from .pushoperationchange import *
-from .pushoperationref import *
-from .pushoperations import *
-from .pushoperationstatus import *
-from .pushoption import *
-from .pushoptionchoice import *
-from .pushoptionproperty import *
-from .pushoptiontype import *
-from .pushvalidationinfo import *
-from .security import *
-from .sourceaccount import *
-from .syncasbankfeeds import *
-from .syncasexpenses import *
-from .syncconfiguration import *
-from .targetaccountoption import *
-from .validation import *
-from .validationitem import *
-from .zero import *
-
-__all__ = ["AccountingBankAccount","BankAccountCreateResponse","BankAccountCreateResponseBankAccountType","BankAccountCredentials","BankAccountOption","BankAccountPrototype","BankAccountType","BankAccounts","BankAccountsAccountingBankAccount","BankAccountsBankAccountType","BankAccountsMetadata","BankAccountsSupplementalData","BankFeedAccountMappingResponse","BankFeedMapping","BankTransactionType","BankTransactions","ClientRateLimitReachedWebhook","ClientRateLimitReachedWebhookData","ClientRateLimitResetWebhook","ClientRateLimitResetWebhookData","Companies","Company","CompanyRequestBody","Configuration","ConfigurationContactRef","ConfigurationCustomer","ConfigurationSchedule","ConfigurationSupplier","Connection","Connections","CreateBankTransactions","CreateBankTransactionsResponse","DataConnectionError","DataConnectionStatus","DataType","ErrorValidation","ErrorValidationItem","GroupReference","HalRef","Items","Links","Metadata","PushChangeType","PushFieldValidation","PushOperation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperations","PushOption","PushOptionChoice","PushOptionProperty","PushOptionType","PushValidationInfo","Security","SourceAccount","SourceType","SupplementalData","SyncAsBankFeeds","SyncAsExpenses","SyncConfiguration","TargetAccountOption","Validation","ValidationItem","Zero"]
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankaccountcreateresponse.py b/bank-feeds/src/codatbankfeeds/models/shared/bankaccountcreateresponse.py
deleted file mode 100644
index 5989d938c..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/bankaccountcreateresponse.py
+++ /dev/null
@@ -1,204 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .datatype import DataType
-from .pushoperationchange import PushOperationChange
-from .pushoperationstatus import PushOperationStatus
-from .validation import Validation
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from decimal import Decimal
-from enum import Enum
-from typing import Any, Dict, List, Optional
-
-class BankAccountCreateResponseBankAccountType(str, Enum):
- r"""The type of transactions and balances on the account.
- For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
- For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
- """
- UNKNOWN = 'Unknown'
- CREDIT = 'Credit'
- DEBIT = 'Debit'
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Metadata:
- UNSET='__SPEAKEASY_UNSET__'
- is_deleted: Optional[bool] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isDeleted'), 'exclude': lambda f: f is Metadata.UNSET }})
- r"""Indicates whether the record has been deleted in the third-party system this record originated from."""
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class SupplementalData:
- r"""Supplemental data is additional data you can include in our standard data types.
-
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
- """
- UNSET='__SPEAKEASY_UNSET__'
- content: Optional[Dict[str, Dict[str, Any]]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is SupplementalData.UNSET }})
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class AccountingBankAccount:
- r"""> **Accessing Bank Accounts through Banking API**
- >
- > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators.
- >
- > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/bank-feeds-api#/schemas/Account)
-
- > View the coverage for bank accounts in the Data coverage explorer.
-
- ## Overview
-
- A list of bank accounts associated with a company and a specific data connection.
-
- Bank accounts data includes:
- * The name and ID of the account in the accounting platform.
- * The currency and balance of the account.
- * The sort code and account number.
-
- Deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
- """
- UNSET='__SPEAKEASY_UNSET__'
- account_name: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountName'), 'exclude': lambda f: f is AccountingBankAccount.UNSET }})
- r"""Name of the bank account in the accounting platform."""
- account_number: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountNumber'), 'exclude': lambda f: f is AccountingBankAccount.UNSET }})
- r"""Account number for the bank account.
-
- Xero integrations
- Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
-
- FreeAgent integrations
- For Credit accounts, only the last four digits are required. For other types, the field is optional.
- """
- account_type: Optional[BankAccountCreateResponseBankAccountType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountType'), 'exclude': lambda f: f is None }})
- r"""The type of transactions and balances on the account.
- For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
- For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
- """
- available_balance: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('availableBalance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is AccountingBankAccount.UNSET }})
- r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example."""
- balance: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is AccountingBankAccount.UNSET }})
- r"""Balance of the bank account."""
- currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }})
- r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
-
- ## Unknown currencies
-
- In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
-
- There are only a very small number of edge cases where this currency code is returned by the Codat system.
- """
- i_ban: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('iBan'), 'exclude': lambda f: f is AccountingBankAccount.UNSET }})
- r"""International bank account number of the account. Often used when making or receiving international payments."""
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- r"""Identifier for the account, unique for the company in the accounting platform."""
- institution: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('institution'), 'exclude': lambda f: f is AccountingBankAccount.UNSET }})
- r"""The institution of the bank account."""
- metadata: Optional[Metadata] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is None }})
- modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }})
- nominal_code: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nominalCode'), 'exclude': lambda f: f is AccountingBankAccount.UNSET }})
- r"""Code used to identify each nominal account for a business."""
- overdraft_limit: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('overdraftLimit'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is AccountingBankAccount.UNSET }})
- r"""Pre-arranged overdraft limit of the account.
-
- The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
- """
- sort_code: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sortCode'), 'exclude': lambda f: f is AccountingBankAccount.UNSET }})
- r"""Sort code for the bank account.
-
- Xero integrations
- The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
- """
- source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }})
- supplemental_data: Optional[SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }})
- r"""Supplemental data is additional data you can include in our standard data types.
-
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
- """
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankAccountCreateResponse:
- UNSET='__SPEAKEASY_UNSET__'
- company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
- r"""Unique identifier for your SMB in Codat."""
- data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }})
- r"""Unique identifier for a company's data connection."""
- push_operation_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushOperationKey') }})
- r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
- requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- status: PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
- r"""The current status of the push operation."""
- status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }})
- r"""Push status code."""
- changes: Optional[List[PushOperationChange]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is BankAccountCreateResponse.UNSET }})
- r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
- completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- data: Optional[AccountingBankAccount] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is BankAccountCreateResponse.UNSET }})
- data_type: Optional[DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
- r"""Available Data types"""
- error_message: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is BankAccountCreateResponse.UNSET }})
- r"""A message about the error."""
- timeout_in_minutes: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is BankAccountCreateResponse.UNSET }})
- r"""Number of minutes the push operation must complete within before it times out."""
- timeout_in_seconds: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is BankAccountCreateResponse.UNSET }})
- r"""Number of seconds the push operation must complete within before it times out.
-
- Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
- """
- validation: Optional[Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
- r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankaccountcredentials.py b/bank-feeds/src/codatbankfeeds/models/shared/bankaccountcredentials.py
deleted file mode 100644
index b41abeb07..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/bankaccountcredentials.py
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankAccountCredentials:
- r"""Result of generate credentials"""
- password: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('password'), 'exclude': lambda f: f is None }})
- r"""Password to enable the bank feeds platform to securely retrieve transactions."""
- username: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('username'), 'exclude': lambda f: f is None }})
- r"""Username used by the bank feeds platform to retrieve transactions"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankaccountoption.py b/bank-feeds/src/codatbankfeeds/models/shared/bankaccountoption.py
deleted file mode 100644
index 17e088f98..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/bankaccountoption.py
+++ /dev/null
@@ -1,20 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankAccountOption:
- account_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountType'), 'exclude': lambda f: f is None }})
- r"""The type of account."""
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for the bank account."""
- name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }})
- r"""Name of bank account."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankaccountprototype.py b/bank-feeds/src/codatbankfeeds/models/shared/bankaccountprototype.py
deleted file mode 100644
index 8bb8ce613..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/bankaccountprototype.py
+++ /dev/null
@@ -1,72 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from decimal import Decimal
-from enum import Enum
-from typing import Optional
-
-class BankAccountType(str, Enum):
- r"""The type of transactions and balances on the account.
- For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
- For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
- """
- UNKNOWN = 'Unknown'
- CREDIT = 'Credit'
- DEBIT = 'Debit'
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankAccountPrototype:
- UNSET='__SPEAKEASY_UNSET__'
- account_name: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountName'), 'exclude': lambda f: f is BankAccountPrototype.UNSET }})
- r"""Name of the bank account in the accounting platform."""
- account_number: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountNumber'), 'exclude': lambda f: f is BankAccountPrototype.UNSET }})
- r"""Account number for the bank account.
-
- Xero integrations
- Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
-
- FreeAgent integrations
- For Credit accounts, only the last four digits are required. For other types, the field is optional.
- """
- account_type: Optional[BankAccountType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountType'), 'exclude': lambda f: f is None }})
- r"""The type of transactions and balances on the account.
- For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
- For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
- """
- available_balance: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('availableBalance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is BankAccountPrototype.UNSET }})
- r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example."""
- balance: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is BankAccountPrototype.UNSET }})
- r"""Balance of the bank account."""
- currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }})
- r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
-
- ## Unknown currencies
-
- In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
-
- There are only a very small number of edge cases where this currency code is returned by the Codat system.
- """
- i_ban: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('iBan'), 'exclude': lambda f: f is BankAccountPrototype.UNSET }})
- r"""International bank account number of the account. Often used when making or receiving international payments."""
- institution: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('institution'), 'exclude': lambda f: f is BankAccountPrototype.UNSET }})
- r"""The institution of the bank account."""
- nominal_code: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nominalCode'), 'exclude': lambda f: f is BankAccountPrototype.UNSET }})
- r"""Code used to identify each nominal account for a business."""
- overdraft_limit: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('overdraftLimit'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is BankAccountPrototype.UNSET }})
- r"""Pre-arranged overdraft limit of the account.
-
- The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
- """
- sort_code: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sortCode'), 'exclude': lambda f: f is BankAccountPrototype.UNSET }})
- r"""Sort code for the bank account.
-
- Xero integrations
- The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
- """
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankaccounts.py b/bank-feeds/src/codatbankfeeds/models/shared/bankaccounts.py
deleted file mode 100644
index 740461e14..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/bankaccounts.py
+++ /dev/null
@@ -1,138 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .links import Links
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from decimal import Decimal
-from enum import Enum
-from typing import Any, Dict, List, Optional
-
-class BankAccountsBankAccountType(str, Enum):
- r"""The type of transactions and balances on the account.
- For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
- For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
- """
- UNKNOWN = 'Unknown'
- CREDIT = 'Credit'
- DEBIT = 'Debit'
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankAccountsMetadata:
- UNSET='__SPEAKEASY_UNSET__'
- is_deleted: Optional[bool] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isDeleted'), 'exclude': lambda f: f is BankAccountsMetadata.UNSET }})
- r"""Indicates whether the record has been deleted in the third-party system this record originated from."""
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankAccountsSupplementalData:
- r"""Supplemental data is additional data you can include in our standard data types.
-
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
- """
- UNSET='__SPEAKEASY_UNSET__'
- content: Optional[Dict[str, Dict[str, Any]]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is BankAccountsSupplementalData.UNSET }})
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankAccountsAccountingBankAccount:
- r"""> **Accessing Bank Accounts through Banking API**
- >
- > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators.
- >
- > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/bank-feeds-api#/schemas/Account)
-
- > View the coverage for bank accounts in the Data coverage explorer.
-
- ## Overview
-
- A list of bank accounts associated with a company and a specific data connection.
-
- Bank accounts data includes:
- * The name and ID of the account in the accounting platform.
- * The currency and balance of the account.
- * The sort code and account number.
- """
- UNSET='__SPEAKEASY_UNSET__'
- account_name: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountName'), 'exclude': lambda f: f is BankAccountsAccountingBankAccount.UNSET }})
- r"""Name of the bank account in the accounting platform."""
- account_number: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountNumber'), 'exclude': lambda f: f is BankAccountsAccountingBankAccount.UNSET }})
- r"""Account number for the bank account.
-
- Xero integrations
- Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.
-
- FreeAgent integrations
- For Credit accounts, only the last four digits are required. For other types, the field is optional.
- """
- account_type: Optional[BankAccountsBankAccountType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountType'), 'exclude': lambda f: f is None }})
- r"""The type of transactions and balances on the account.
- For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
- For Debit accounts, positive balances are assets, and positive transactions **increase** assets.
- """
- available_balance: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('availableBalance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is BankAccountsAccountingBankAccount.UNSET }})
- r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example."""
- balance: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is BankAccountsAccountingBankAccount.UNSET }})
- r"""Balance of the bank account."""
- currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }})
- r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
-
- ## Unknown currencies
-
- In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
-
- There are only a very small number of edge cases where this currency code is returned by the Codat system.
- """
- i_ban: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('iBan'), 'exclude': lambda f: f is BankAccountsAccountingBankAccount.UNSET }})
- r"""International bank account number of the account. Often used when making or receiving international payments."""
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- r"""Identifier for the account, unique for the company in the accounting platform."""
- institution: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('institution'), 'exclude': lambda f: f is BankAccountsAccountingBankAccount.UNSET }})
- r"""The institution of the bank account."""
- metadata: Optional[BankAccountsMetadata] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is None }})
- modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }})
- nominal_code: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nominalCode'), 'exclude': lambda f: f is BankAccountsAccountingBankAccount.UNSET }})
- r"""Code used to identify each nominal account for a business."""
- overdraft_limit: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('overdraftLimit'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is BankAccountsAccountingBankAccount.UNSET }})
- r"""Pre-arranged overdraft limit of the account.
-
- The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`.
- """
- sort_code: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sortCode'), 'exclude': lambda f: f is BankAccountsAccountingBankAccount.UNSET }})
- r"""Sort code for the bank account.
-
- Xero integrations
- The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated.
- """
- source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }})
- supplemental_data: Optional[BankAccountsSupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }})
- r"""Supplemental data is additional data you can include in our standard data types.
-
- It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.
- """
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankAccounts:
- links: Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
- page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
- r"""Current page number."""
- page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
- r"""Number of items to return in results array."""
- total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
- r"""Total number of items."""
- results: Optional[List[BankAccountsAccountingBankAccount]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankfeedaccountmappingresponse.py b/bank-feeds/src/codatbankfeeds/models/shared/bankfeedaccountmappingresponse.py
deleted file mode 100644
index ebe5a5990..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/bankfeedaccountmappingresponse.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankFeedAccountMappingResponse:
- r"""The result from POSTing a Bank Account mapping."""
- UNSET='__SPEAKEASY_UNSET__'
- error: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Error'), 'exclude': lambda f: f is BankFeedAccountMappingResponse.UNSET }})
- r"""Error returned during the post request"""
- status: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Status'), 'exclude': lambda f: f is BankFeedAccountMappingResponse.UNSET }})
- r"""Status of the POST request."""
- source_account_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceAccountId'), 'exclude': lambda f: f is None }})
- r"""Unique ID for the source account."""
- target_account_id: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('targetAccountId'), 'exclude': lambda f: f is BankFeedAccountMappingResponse.UNSET }})
- r"""Unique ID for the target account."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankfeedmapping.py b/bank-feeds/src/codatbankfeeds/models/shared/bankfeedmapping.py
deleted file mode 100644
index 487a50ecb..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/bankfeedmapping.py
+++ /dev/null
@@ -1,63 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .targetaccountoption import TargetAccountOption
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankFeedMapping:
- r"""A bank feed connection between a source account and a target account, including potential target accounts."""
- UNSET='__SPEAKEASY_UNSET__'
- feed_start_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('feedStartDate'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- source_account_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceAccountId'), 'exclude': lambda f: f is None }})
- r"""Unique ID for the source account."""
- source_account_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceAccountName'), 'exclude': lambda f: f is None }})
- r"""Name for the source account."""
- source_account_number: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceAccountNumber'), 'exclude': lambda f: f is None }})
- r"""Account number for the source account."""
- source_balance: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceBalance'), 'exclude': lambda f: f is None }})
- r"""Balance for the source account."""
- source_currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceCurrency'), 'exclude': lambda f: f is None }})
- r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
-
- ## Unknown currencies
-
- In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
-
- There are only a very small number of edge cases where this currency code is returned by the Codat system.
- """
- status: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }})
- r"""The status."""
- target_account_id: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('targetAccountId'), 'exclude': lambda f: f is BankFeedMapping.UNSET }})
- r"""Unique ID for the target account in the accounting platform."""
- target_account_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('targetAccountName'), 'exclude': lambda f: f is None }})
- r"""Name for the target account in the accounting platform."""
- target_account_options: Optional[List[TargetAccountOption]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('targetAccountOptions'), 'exclude': lambda f: f is BankFeedMapping.UNSET }})
- r"""An array of potential target accounts."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/banktransactions.py b/bank-feeds/src/codatbankfeeds/models/shared/banktransactions.py
deleted file mode 100644
index c7d391898..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/banktransactions.py
+++ /dev/null
@@ -1,75 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from decimal import Decimal
-from enum import Enum
-from typing import Optional
-
-class BankTransactionType(str, Enum):
- r"""Type of transaction for the bank statement line."""
- UNKNOWN = 'Unknown'
- CREDIT = 'Credit'
- DEBIT = 'Debit'
- INT = 'Int'
- DIV = 'Div'
- FEE = 'Fee'
- SER_CHG = 'SerChg'
- DEP = 'Dep'
- ATM = 'Atm'
- POS = 'Pos'
- XFER = 'Xfer'
- CHECK = 'Check'
- PAYMENT = 'Payment'
- CASH = 'Cash'
- DIRECT_DEP = 'DirectDep'
- DIRECT_DEBIT = 'DirectDebit'
- REPEAT_PMT = 'RepeatPmt'
- OTHER = 'Other'
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class BankTransactions:
- UNSET='__SPEAKEASY_UNSET__'
- amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
- r"""The amount transacted in the bank transaction."""
- balance: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }})
- r"""The remaining balance in the account with ID `accountId`."""
- counterparty: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('counterparty'), 'exclude': lambda f: f is BankTransactions.UNSET }})
- r"""The giving or receiving party such as a person or organization."""
- date_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('date'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- description: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is BankTransactions.UNSET }})
- r"""Description of the bank transaction."""
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- r"""Identifier for the bank account transaction, unique for the company in the accounting platform."""
- reconciled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reconciled'), 'exclude': lambda f: f is None }})
- r"""`True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting platform."""
- reference: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference'), 'exclude': lambda f: f is BankTransactions.UNSET }})
- r"""An optional reference to the bank transaction."""
- transaction_type: Optional[BankTransactionType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transactionType'), 'exclude': lambda f: f is None }})
- r"""Type of transaction for the bank statement line."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhook.py b/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhook.py
deleted file mode 100644
index 2b8e8ead0..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhook.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .clientratelimitreachedwebhookdata import ClientRateLimitReachedWebhookData
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ClientRateLimitReachedWebhook:
- r"""Webhook request body for a client that has reached their rate limit."""
- alert_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('AlertId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier of the webhook event."""
- client_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ClientId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for your client in Codat."""
- client_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ClientName'), 'exclude': lambda f: f is None }})
- r"""Name of your client in Codat."""
- data: Optional[ClientRateLimitReachedWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }})
- message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Message'), 'exclude': lambda f: f is None }})
- r"""A human readable message about the webhook."""
- rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('RuleId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for the rule."""
- rule_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('RuleType'), 'exclude': lambda f: f is None }})
- r"""The type of rule."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhookdata.py b/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhookdata.py
deleted file mode 100644
index 83a10878a..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhookdata.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ClientRateLimitReachedWebhookData:
- daily_quota: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('DailyQuota'), 'exclude': lambda f: f is None }})
- r"""The number of available requests per day."""
- expires_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ExpiresUtc'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhook.py b/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhook.py
deleted file mode 100644
index aa8d8ab77..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhook.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .clientratelimitresetwebhookdata import ClientRateLimitResetWebhookData
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ClientRateLimitResetWebhook:
- r"""Webhook request body for a client that has had their rate limit reset."""
- alert_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('AlertId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier of the webhook event."""
- client_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ClientId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for your client in Codat."""
- client_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ClientName'), 'exclude': lambda f: f is None }})
- r"""Name of your client in Codat."""
- data: Optional[ClientRateLimitResetWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }})
- message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Message'), 'exclude': lambda f: f is None }})
- r"""A human readable message about the webhook."""
- rule_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('RuleId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for the rule."""
- rule_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('RuleType'), 'exclude': lambda f: f is None }})
- r"""The type of rule."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhookdata.py b/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhookdata.py
deleted file mode 100644
index de693da81..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhookdata.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ClientRateLimitResetWebhookData:
- UNSET='__SPEAKEASY_UNSET__'
- daily_quota: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('DailyQuota'), 'exclude': lambda f: f is None }})
- r"""The number of available requests per day."""
- expires_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ExpiresUtc'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- quota_remaining: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('QuotaRemaining'), 'exclude': lambda f: f is ClientRateLimitResetWebhookData.UNSET }})
- r"""Total number of request remaining for your client."""
- reset_reason: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ResetReason'), 'exclude': lambda f: f is None }})
- r"""The reason for your rate limit quota being reset."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/companies.py b/bank-feeds/src/codatbankfeeds/models/shared/companies.py
deleted file mode 100644
index 4cb76bc61..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/companies.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .company import Company
-from .links import Links
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Companies:
- links: Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
- page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
- r"""Current page number."""
- page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
- r"""Number of items to return in results array."""
- total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
- r"""Total number of items."""
- results: Optional[List[Company]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/company.py b/bank-feeds/src/codatbankfeeds/models/shared/company.py
deleted file mode 100644
index ac9ed67f9..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/company.py
+++ /dev/null
@@ -1,90 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .connection import Connection
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class GroupReference:
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for the group."""
-
-
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Company:
- r"""In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.
-
- Typically each company is one of your customers.
-
- When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company.
- """
- id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
- r"""Unique identifier for your SMB in Codat."""
- name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
- r"""The name of the company"""
- redirect: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('redirect') }})
- r"""The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company."""
- created: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- created_by_user_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdByUserName'), 'exclude': lambda f: f is None }})
- r"""Name of user that created the company in Codat."""
- data_connections: Optional[List[Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnections'), 'exclude': lambda f: f is None }})
- description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }})
- r"""Additional information about the company. This can be used to store foreign IDs, references, etc."""
- groups: Optional[List[GroupReference]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('groups'), 'exclude': lambda f: f is None }})
- r"""An array of groups the company has been assigned to."""
- last_sync: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastSync'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- platform: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platform'), 'exclude': lambda f: f is None }})
- r"""`platformKeys` name used when creating the company.
-
- Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
- """
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/companyrequestbody.py b/bank-feeds/src/codatbankfeeds/models/shared/companyrequestbody.py
deleted file mode 100644
index 79b8e2a22..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/companyrequestbody.py
+++ /dev/null
@@ -1,21 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .items import Items
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class CompanyRequestBody:
- name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
- r"""Name of company being connected."""
- description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }})
- r"""Additional information about the company. This can be used to store foreign IDs, references, etc."""
- groups: Optional[List[Items]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('groups'), 'exclude': lambda f: f is None }})
- r"""Reference to the groups that the company is assigned to."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/configuration.py b/bank-feeds/src/codatbankfeeds/models/shared/configuration.py
deleted file mode 100644
index 8746eeee9..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/configuration.py
+++ /dev/null
@@ -1,26 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .configurationschedule import ConfigurationSchedule
-from .syncconfiguration import SyncConfiguration
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Configuration:
- accounting_software_company_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountingSoftwareCompanyName'), 'exclude': lambda f: f is None }})
- r"""The company name defined in the accounting platform."""
- company_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for your SMB in Codat."""
- configuration: Optional[SyncConfiguration] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('configuration'), 'exclude': lambda f: f is None }})
- configured: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('configured'), 'exclude': lambda f: f is None }})
- r"""True if the company has been configured."""
- enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enabled'), 'exclude': lambda f: f is None }})
- r"""Enabled or disable bank feeds."""
- schedule: Optional[ConfigurationSchedule] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('schedule'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/configurationcontactref.py b/bank-feeds/src/codatbankfeeds/models/shared/configurationcontactref.py
deleted file mode 100644
index a90f5411f..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/configurationcontactref.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ConfigurationContactRef:
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for the supplier/customer."""
- name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }})
- r"""The supplier/customer's name."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/configurationcustomer.py b/bank-feeds/src/codatbankfeeds/models/shared/configurationcustomer.py
deleted file mode 100644
index 4c08b4366..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/configurationcustomer.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .configurationcontactref import ConfigurationContactRef
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ConfigurationCustomer:
- customer_options: Optional[List[ConfigurationContactRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerOptions'), 'exclude': lambda f: f is None }})
- selected_customer_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedCustomerId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for the customer."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/configurationschedule.py b/bank-feeds/src/codatbankfeeds/models/shared/configurationschedule.py
deleted file mode 100644
index a40c173f6..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/configurationschedule.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ConfigurationSchedule:
- frequency_options: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('frequencyOptions'), 'exclude': lambda f: f is None }})
- r"""The available sync frequencies."""
- selected_frequency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedFrequency'), 'exclude': lambda f: f is None }})
- r"""The sync frequency."""
- start_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('startDate'), 'exclude': lambda f: f is None }})
- r"""The datetime in UTC you want to start syncing from."""
- sync_hour_utc: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('syncHourUtc'), 'exclude': lambda f: f is None }})
- r"""The hour in which the sync is initiated."""
- time_zone_iana_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeZoneIanaId'), 'exclude': lambda f: f is None }})
- r"""The [IANA](https://www.iana.org/time-zones) time zone ID."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/configurationsupplier.py b/bank-feeds/src/codatbankfeeds/models/shared/configurationsupplier.py
deleted file mode 100644
index 777fcf8bd..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/configurationsupplier.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .configurationcontactref import ConfigurationContactRef
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ConfigurationSupplier:
- selected_supplier_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedSupplierId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for the supplier."""
- supplier_options: Optional[List[ConfigurationContactRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierOptions'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/connection.py b/bank-feeds/src/codatbankfeeds/models/shared/connection.py
deleted file mode 100644
index e8caf95cf..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/connection.py
+++ /dev/null
@@ -1,99 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .dataconnectionerror import DataConnectionError
-from .dataconnectionstatus import DataConnectionStatus
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from enum import Enum
-from typing import Any, Dict, List, Optional
-
-class SourceType(str, Enum):
- r"""The type of platform of the connection."""
- ACCOUNTING = 'Accounting'
- BANKING = 'Banking'
- BANK_FEED = 'BankFeed'
- COMMERCE = 'Commerce'
- EXPENSE = 'Expense'
- OTHER = 'Other'
- UNKNOWN = 'Unknown'
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Connection:
- r"""A connection represents a [company's](https://docs.codat.io/bank-feeds-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.
-
- A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:
-
- - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection.
- - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections.
- - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections.
- Any combination of accounting, banking, and commerce data connections is allowed.
-
- Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview).
- """
- created: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created') }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
- r"""Unique identifier for a company's data connection."""
- integration_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('integrationId') }})
- r"""A Codat ID representing the integration."""
- integration_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('integrationKey') }})
- r"""A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future."""
- link_url: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('linkUrl') }})
- r"""The link URL your customers can use to authorize access to their business application."""
- platform_name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('platformName') }})
- r"""Name of integration connected to company."""
- source_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceId') }})
- r"""A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`."""
- source_type: SourceType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceType') }})
- r"""The type of platform of the connection."""
- status: DataConnectionStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
- r"""The current authorization status of the data connection."""
- additional_properties: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalProperties'), 'exclude': lambda f: f is None }})
- connection_info: Optional[Dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('connectionInfo'), 'exclude': lambda f: f is None }})
- data_connection_errors: Optional[List[DataConnectionError]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionErrors'), 'exclude': lambda f: f is None }})
- last_sync: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastSync'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/connections.py b/bank-feeds/src/codatbankfeeds/models/shared/connections.py
deleted file mode 100644
index e4b16c223..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/connections.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .connection import Connection
-from .links import Links
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Connections:
- links: Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
- page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
- r"""Current page number."""
- page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
- r"""Number of items to return in results array."""
- total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
- r"""Total number of items."""
- results: Optional[List[Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactions.py b/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactions.py
deleted file mode 100644
index 70d410ee5..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactions.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .banktransactions import BankTransactions
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class CreateBankTransactions:
- account_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountId'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for a bank account."""
- transactions: Optional[List[BankTransactions]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transactions'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactionsresponse.py b/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactionsresponse.py
deleted file mode 100644
index ef4ab90f1..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactionsresponse.py
+++ /dev/null
@@ -1,88 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .createbanktransactions import CreateBankTransactions
-from .datatype import DataType
-from .pushoperationchange import PushOperationChange
-from .pushoperationstatus import PushOperationStatus
-from .validation import Validation
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class CreateBankTransactionsResponse:
- UNSET='__SPEAKEASY_UNSET__'
- company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
- r"""Unique identifier for your SMB in Codat."""
- data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }})
- r"""Unique identifier for a company's data connection."""
- push_operation_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushOperationKey') }})
- r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
- requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- status: PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
- r"""The current status of the push operation."""
- status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }})
- r"""Push status code."""
- changes: Optional[List[PushOperationChange]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is CreateBankTransactionsResponse.UNSET }})
- r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
- completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- data: Optional[CreateBankTransactions] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }})
- data_type: Optional[DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
- r"""Available Data types"""
- error_message: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is CreateBankTransactionsResponse.UNSET }})
- r"""A message about the error."""
- timeout_in_minutes: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is CreateBankTransactionsResponse.UNSET }})
- r"""Number of minutes the push operation must complete within before it times out."""
- timeout_in_seconds: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is CreateBankTransactionsResponse.UNSET }})
- r"""Number of seconds the push operation must complete within before it times out.
-
- Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
- """
- validation: Optional[Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
- r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/dataconnectionerror.py b/bank-feeds/src/codatbankfeeds/models/shared/dataconnectionerror.py
deleted file mode 100644
index 5ebeb17d0..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/dataconnectionerror.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class DataConnectionError:
- error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }})
- r"""A brief message about the error."""
- errored_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('erroredOnUtc'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- status_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }})
- r"""The HTTP status code returned by the error."""
- status_text: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusText'), 'exclude': lambda f: f is None }})
- r"""A non-numeric status code/text."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/dataconnectionstatus.py b/bank-feeds/src/codatbankfeeds/models/shared/dataconnectionstatus.py
deleted file mode 100644
index 377013d42..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/dataconnectionstatus.py
+++ /dev/null
@@ -1,11 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-from enum import Enum
-
-class DataConnectionStatus(str, Enum):
- r"""The current authorization status of the data connection."""
- PENDING_AUTH = 'PendingAuth'
- LINKED = 'Linked'
- UNLINKED = 'Unlinked'
- DEAUTHORIZED = 'Deauthorized'
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/datatype.py b/bank-feeds/src/codatbankfeeds/models/shared/datatype.py
deleted file mode 100644
index df149bcf0..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/datatype.py
+++ /dev/null
@@ -1,50 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-from enum import Enum
-
-class DataType(str, Enum):
- r"""Available Data types"""
- ACCOUNT_TRANSACTIONS = 'accountTransactions'
- BALANCE_SHEET = 'balanceSheet'
- BANK_ACCOUNTS = 'bankAccounts'
- BANK_TRANSACTIONS = 'bankTransactions'
- BILL_CREDIT_NOTES = 'billCreditNotes'
- BILL_PAYMENTS = 'billPayments'
- BILLS = 'bills'
- CASH_FLOW_STATEMENT = 'cashFlowStatement'
- CHART_OF_ACCOUNTS = 'chartOfAccounts'
- COMPANY = 'company'
- CREDIT_NOTES = 'creditNotes'
- CUSTOMERS = 'customers'
- DIRECT_COSTS = 'directCosts'
- DIRECT_INCOMES = 'directIncomes'
- INVOICES = 'invoices'
- ITEM_RECEIPTS = 'itemReceipts'
- ITEMS = 'items'
- JOURNAL_ENTRIES = 'journalEntries'
- JOURNALS = 'journals'
- PAYMENT_METHODS = 'paymentMethods'
- PAYMENTS = 'payments'
- PROFIT_AND_LOSS = 'profitAndLoss'
- PURCHASE_ORDERS = 'purchaseOrders'
- SALES_ORDERS = 'salesOrders'
- SUPPLIERS = 'suppliers'
- TAX_RATES = 'taxRates'
- TRACKING_CATEGORIES = 'trackingCategories'
- TRANSFERS = 'transfers'
- BANKING_ACCOUNT_BALANCES = 'banking-accountBalances'
- BANKING_ACCOUNTS = 'banking-accounts'
- BANKING_TRANSACTION_CATEGORIES = 'banking-transactionCategories'
- BANKING_TRANSACTIONS = 'banking-transactions'
- COMMERCE_COMPANY_INFO = 'commerce-companyInfo'
- COMMERCE_CUSTOMERS = 'commerce-customers'
- COMMERCE_DISPUTES = 'commerce-disputes'
- COMMERCE_LOCATIONS = 'commerce-locations'
- COMMERCE_ORDERS = 'commerce-orders'
- COMMERCE_PAYMENT_METHODS = 'commerce-paymentMethods'
- COMMERCE_PAYMENTS = 'commerce-payments'
- COMMERCE_PRODUCT_CATEGORIES = 'commerce-productCategories'
- COMMERCE_PRODUCTS = 'commerce-products'
- COMMERCE_TAX_COMPONENTS = 'commerce-taxComponents'
- COMMERCE_TRANSACTIONS = 'commerce-transactions'
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/errorvalidation.py b/bank-feeds/src/codatbankfeeds/models/shared/errorvalidation.py
deleted file mode 100644
index 63fbbba75..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/errorvalidation.py
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .errorvalidationitem import ErrorValidationItem
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ErrorValidation:
- r"""A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here."""
- UNSET='__SPEAKEASY_UNSET__'
- errors: Optional[List[ErrorValidationItem]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is ErrorValidation.UNSET }})
- warnings: Optional[List[ErrorValidationItem]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings'), 'exclude': lambda f: f is ErrorValidation.UNSET }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/errorvalidationitem.py b/bank-feeds/src/codatbankfeeds/models/shared/errorvalidationitem.py
deleted file mode 100644
index 7a0ce9b00..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/errorvalidationitem.py
+++ /dev/null
@@ -1,21 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ErrorValidationItem:
- UNSET='__SPEAKEASY_UNSET__'
- item_id: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemId'), 'exclude': lambda f: f is ErrorValidationItem.UNSET }})
- r"""Unique identifier for a validation item."""
- message: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is ErrorValidationItem.UNSET }})
- r"""A message outlining validation item's issue."""
- validator_name: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validatorName'), 'exclude': lambda f: f is ErrorValidationItem.UNSET }})
- r"""Name of validator."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/halref.py b/bank-feeds/src/codatbankfeeds/models/shared/halref.py
deleted file mode 100644
index 10c5c3fe1..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/halref.py
+++ /dev/null
@@ -1,16 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class HalRef:
- href: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('href'), 'exclude': lambda f: f is None }})
- r"""Uri hypertext reference."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/items.py b/bank-feeds/src/codatbankfeeds/models/shared/items.py
deleted file mode 100644
index fdc4168dd..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/items.py
+++ /dev/null
@@ -1,16 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Items:
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for the group."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/links.py b/bank-feeds/src/codatbankfeeds/models/shared/links.py
deleted file mode 100644
index f18176ef6..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/links.py
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .halref import HalRef
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Links:
- current: HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('current') }})
- self_: HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('self') }})
- next: Optional[HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('next'), 'exclude': lambda f: f is None }})
- previous: Optional[HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('previous'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushchangetype.py b/bank-feeds/src/codatbankfeeds/models/shared/pushchangetype.py
deleted file mode 100644
index 55cd1990f..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushchangetype.py
+++ /dev/null
@@ -1,12 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-from enum import Enum
-
-class PushChangeType(str, Enum):
- r"""Type of change being applied to record in third party platform."""
- UNKNOWN = 'Unknown'
- CREATED = 'Created'
- MODIFIED = 'Modified'
- DELETED = 'Deleted'
- ATTACHMENT_UPLOADED = 'AttachmentUploaded'
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushfieldvalidation.py b/bank-feeds/src/codatbankfeeds/models/shared/pushfieldvalidation.py
deleted file mode 100644
index 38d51cc63..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushfieldvalidation.py
+++ /dev/null
@@ -1,21 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class PushFieldValidation:
- UNSET='__SPEAKEASY_UNSET__'
- details: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('details') }})
- r"""Details on the validation issue."""
- field: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('field'), 'exclude': lambda f: f is None }})
- r"""Field name that resulted in the validation issue."""
- ref: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ref'), 'exclude': lambda f: f is PushFieldValidation.UNSET }})
- r"""Unique reference identifier for the validation issue."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoperation.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoperation.py
deleted file mode 100644
index ec094ed64..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushoperation.py
+++ /dev/null
@@ -1,86 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .datatype import DataType
-from .pushoperationchange import PushOperationChange
-from .pushoperationstatus import PushOperationStatus
-from .validation import Validation
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class PushOperation:
- UNSET='__SPEAKEASY_UNSET__'
- company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }})
- r"""Unique identifier for your SMB in Codat."""
- data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }})
- r"""Unique identifier for a company's data connection."""
- push_operation_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pushOperationKey') }})
- r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted."""
- requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- status: PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
- r"""The current status of the push operation."""
- status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }})
- r"""Push status code."""
- changes: Optional[List[PushOperationChange]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is PushOperation.UNSET }})
- r"""Contains a single entry that communicates which record has changed and the manner in which it changed."""
- completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- data_type: Optional[DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
- r"""Available Data types"""
- error_message: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is PushOperation.UNSET }})
- r"""A message about the error."""
- timeout_in_minutes: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is PushOperation.UNSET }})
- r"""Number of minutes the push operation must complete within before it times out."""
- timeout_in_seconds: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is PushOperation.UNSET }})
- r"""Number of seconds the push operation must complete within before it times out.
-
- Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
- """
- validation: Optional[Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
- r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoperationchange.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoperationchange.py
deleted file mode 100644
index 73a45452a..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushoperationchange.py
+++ /dev/null
@@ -1,22 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .pushchangetype import PushChangeType
-from .pushoperationref import PushOperationRef
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class PushOperationChange:
- UNSET='__SPEAKEASY_UNSET__'
- attachment_id: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('attachmentId'), 'exclude': lambda f: f is PushOperationChange.UNSET }})
- r"""Unique identifier for the attachment created otherwise null."""
- record_ref: Optional[PushOperationRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }})
- type: Optional[PushChangeType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }})
- r"""Type of change being applied to record in third party platform."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoperationref.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoperationref.py
deleted file mode 100644
index 8b34cafc5..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushoperationref.py
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .datatype import DataType
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class PushOperationRef:
- data_type: Optional[DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }})
- r"""Available Data types"""
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- r"""Unique identifier for a push operation."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoperations.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoperations.py
deleted file mode 100644
index 9188a63c8..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushoperations.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .links import Links
-from .pushoperation import PushOperation
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class PushOperations:
- links: Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }})
- page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }})
- r"""Current page number."""
- page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
- r"""Number of items to return in results array."""
- total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }})
- r"""Total number of items."""
- results: Optional[List[PushOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoperationstatus.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoperationstatus.py
deleted file mode 100644
index 5b3fabf24..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushoperationstatus.py
+++ /dev/null
@@ -1,11 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-from enum import Enum
-
-class PushOperationStatus(str, Enum):
- r"""The current status of the push operation."""
- PENDING = 'Pending'
- FAILED = 'Failed'
- SUCCESS = 'Success'
- TIMED_OUT = 'TimedOut'
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoption.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoption.py
deleted file mode 100644
index f337293f9..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushoption.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .pushoptionchoice import PushOptionChoice
-from .pushoptionproperty import PushOptionProperty
-from .pushoptiontype import PushOptionType
-from .pushvalidationinfo import PushValidationInfo
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Dict, List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class PushOption:
- UNSET='__SPEAKEASY_UNSET__'
- display_name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('displayName') }})
- r"""The property's display name."""
- required: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('required') }})
- r"""The property is required if `True`."""
- type: PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
- r"""The option type."""
- description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }})
- r"""A description of the property."""
- options: Optional[List[PushOptionChoice]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('options'), 'exclude': lambda f: f is PushOption.UNSET }})
- properties: Optional[Dict[str, PushOptionProperty]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('properties'), 'exclude': lambda f: f is PushOption.UNSET }})
- validation: Optional[PushValidationInfo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoptionchoice.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoptionchoice.py
deleted file mode 100644
index b255ecbac..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushoptionchoice.py
+++ /dev/null
@@ -1,25 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .pushoptiontype import PushOptionType
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class PushOptionChoice:
- description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }})
- r"""A description of the property."""
- display_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('displayName'), 'exclude': lambda f: f is None }})
- r"""The property's display name."""
- required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('required'), 'exclude': lambda f: f is None }})
- r"""The property is required if `True`."""
- type: Optional[PushOptionType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }})
- r"""The option type."""
- value: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('value'), 'exclude': lambda f: f is None }})
- r"""Allowed value for field."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoptionproperty.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoptionproperty.py
deleted file mode 100644
index 45b83c36f..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushoptionproperty.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .pushoptionchoice import PushOptionChoice
-from .pushoptiontype import PushOptionType
-from .pushvalidationinfo import PushValidationInfo
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Dict, List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class PushOptionProperty:
- UNSET='__SPEAKEASY_UNSET__'
- description: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description') }})
- r"""A description of the property."""
- display_name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('displayName') }})
- r"""The property's display name."""
- required: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('required') }})
- r"""The property is required if `True`."""
- type: PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
- r"""The option type."""
- options: Optional[List[PushOptionChoice]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('options'), 'exclude': lambda f: f is PushOptionProperty.UNSET }})
- properties: Optional[Dict[str, PushOptionProperty]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('properties'), 'exclude': lambda f: f is PushOptionProperty.UNSET }})
- validation: Optional[PushValidationInfo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoptiontype.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoptiontype.py
deleted file mode 100644
index f069e2d84..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushoptiontype.py
+++ /dev/null
@@ -1,15 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-from enum import Enum
-
-class PushOptionType(str, Enum):
- r"""The option type."""
- ARRAY = 'Array'
- OBJECT = 'Object'
- STRING = 'String'
- NUMBER = 'Number'
- BOOLEAN = 'Boolean'
- DATE_TIME = 'DateTime'
- FILE = 'File'
- MULTI_PART = 'MultiPart'
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushvalidationinfo.py b/bank-feeds/src/codatbankfeeds/models/shared/pushvalidationinfo.py
deleted file mode 100644
index 0358fc9d3..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/pushvalidationinfo.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .pushfieldvalidation import PushFieldValidation
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class PushValidationInfo:
- UNSET='__SPEAKEASY_UNSET__'
- information: Optional[List[PushFieldValidation]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('information'), 'exclude': lambda f: f is PushValidationInfo.UNSET }})
- warnings: Optional[List[PushFieldValidation]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings'), 'exclude': lambda f: f is PushValidationInfo.UNSET }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/security.py b/bank-feeds/src/codatbankfeeds/models/shared/security.py
deleted file mode 100644
index 1d57f5faa..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/security.py
+++ /dev/null
@@ -1,11 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-
-
-@dataclasses.dataclass
-class Security:
- auth_header: str = dataclasses.field(metadata={'security': { 'scheme': True, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'Authorization' }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/sourceaccount.py b/bank-feeds/src/codatbankfeeds/models/shared/sourceaccount.py
deleted file mode 100644
index 46fc673b7..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/sourceaccount.py
+++ /dev/null
@@ -1,82 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from decimal import Decimal
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class SourceAccount:
- r"""The target bank account in a supported accounting package for ingestion into a bank feed."""
- UNSET='__SPEAKEASY_UNSET__'
- id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
- r"""Unique ID for the bank account."""
- account_name: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountName'), 'exclude': lambda f: f is SourceAccount.UNSET }})
- r"""The bank account name."""
- account_number: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountNumber'), 'exclude': lambda f: f is SourceAccount.UNSET }})
- r"""The account number."""
- account_type: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountType'), 'exclude': lambda f: f is SourceAccount.UNSET }})
- r"""The type of bank account e.g. Credit."""
- balance: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is SourceAccount.UNSET }})
- r"""The latest balance for the bank account."""
- currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }})
- r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
-
- ## Unknown currencies
-
- In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
-
- There are only a very small number of edge cases where this currency code is returned by the Codat system.
- """
- feed_start_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('feedStartDate'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- sort_code: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sortCode'), 'exclude': lambda f: f is SourceAccount.UNSET }})
- r"""The sort code."""
- status: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is SourceAccount.UNSET }})
- r"""Status of the source account."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/syncasbankfeeds.py b/bank-feeds/src/codatbankfeeds/models/shared/syncasbankfeeds.py
deleted file mode 100644
index f9c045231..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/syncasbankfeeds.py
+++ /dev/null
@@ -1,20 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .bankaccountoption import BankAccountOption
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class SyncAsBankFeeds:
- bank_account_options: Optional[List[BankAccountOption]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccountOptions'), 'exclude': lambda f: f is None }})
- enable_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enableSync'), 'exclude': lambda f: f is None }})
- r"""True if bank feeds sync is enabled."""
- selected_bank_account_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedBankAccountId'), 'exclude': lambda f: f is None }})
- r"""The bank account ID being synced."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/syncasexpenses.py b/bank-feeds/src/codatbankfeeds/models/shared/syncasexpenses.py
deleted file mode 100644
index a508df976..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/syncasexpenses.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .bankaccountoption import BankAccountOption
-from .configurationcustomer import ConfigurationCustomer
-from .configurationsupplier import ConfigurationSupplier
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class SyncAsExpenses:
- bank_account_options: Optional[List[BankAccountOption]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccountOptions'), 'exclude': lambda f: f is None }})
- customer: Optional[ConfigurationCustomer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customer'), 'exclude': lambda f: f is None }})
- enable_sync: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enableSync'), 'exclude': lambda f: f is None }})
- r"""True if expense sync is enabled."""
- selected_bank_account_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedBankAccountId'), 'exclude': lambda f: f is None }})
- r"""The bank account ID being synced."""
- supplier: Optional[ConfigurationSupplier] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplier'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/syncconfiguration.py b/bank-feeds/src/codatbankfeeds/models/shared/syncconfiguration.py
deleted file mode 100644
index a661818a3..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/syncconfiguration.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .syncasbankfeeds import SyncAsBankFeeds
-from .syncasexpenses import SyncAsExpenses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class SyncConfiguration:
- sync_as_bank_feeds: Optional[SyncAsBankFeeds] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('syncAsBankFeeds'), 'exclude': lambda f: f is None }})
- sync_as_expenses: Optional[SyncAsExpenses] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('syncAsExpenses'), 'exclude': lambda f: f is None }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/targetaccountoption.py b/bank-feeds/src/codatbankfeeds/models/shared/targetaccountoption.py
deleted file mode 100644
index f15f6e7e7..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/targetaccountoption.py
+++ /dev/null
@@ -1,26 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from decimal import Decimal
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class TargetAccountOption:
- UNSET='__SPEAKEASY_UNSET__'
- account_number: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountNumber'), 'exclude': lambda f: f is TargetAccountOption.UNSET }})
- r"""The account number of the account."""
- balance: Optional[Decimal] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is TargetAccountOption.UNSET }})
- r"""The balance of the account."""
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- r"""Id of the target account."""
- name: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is TargetAccountOption.UNSET }})
- r"""Name of the target account."""
- sort_code: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sortCode'), 'exclude': lambda f: f is TargetAccountOption.UNSET }})
- r"""The sort code of the account."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/validation.py b/bank-feeds/src/codatbankfeeds/models/shared/validation.py
deleted file mode 100644
index 65c78fbe1..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/validation.py
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from .validationitem import ValidationItem
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import List, Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Validation:
- r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here."""
- UNSET='__SPEAKEASY_UNSET__'
- errors: Optional[List[ValidationItem]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors'), 'exclude': lambda f: f is Validation.UNSET }})
- warnings: Optional[List[ValidationItem]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings'), 'exclude': lambda f: f is Validation.UNSET }})
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/validationitem.py b/bank-feeds/src/codatbankfeeds/models/shared/validationitem.py
deleted file mode 100644
index f513260fd..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/validationitem.py
+++ /dev/null
@@ -1,21 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class ValidationItem:
- UNSET='__SPEAKEASY_UNSET__'
- item_id: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemId'), 'exclude': lambda f: f is ValidationItem.UNSET }})
- r"""Unique identifier for a validation item."""
- message: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is ValidationItem.UNSET }})
- r"""A message outlining validation item's issue."""
- validator_name: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validatorName'), 'exclude': lambda f: f is ValidationItem.UNSET }})
- r"""Name of validator."""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/shared/zero.py b/bank-feeds/src/codatbankfeeds/models/shared/zero.py
deleted file mode 100644
index 820ad038a..000000000
--- a/bank-feeds/src/codatbankfeeds/models/shared/zero.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-from codatbankfeeds import utils
-from dataclasses_json import Undefined, dataclass_json
-from typing import Optional
-
-
-@dataclass_json(undefined=Undefined.EXCLUDE)
-@dataclasses.dataclass
-class Zero:
- r"""A bank feed connection between a source account and a target account."""
- UNSET='__SPEAKEASY_UNSET__'
- feed_start_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('feedStartDate'), 'exclude': lambda f: f is None }})
- r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
-
- ```
- 2020-10-08T22:40:50Z
- 2021-01-01T00:00:00
- ```
-
-
-
- When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
-
- - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- - Unqualified local time: `2021-11-15T01:00:00`
- - UTC time offsets: `2021-11-15T01:00:00-05:00`
-
- > Time zones
- >
- > Not all dates from Codat will contain information about time zones.
- > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
- """
- source_account_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceAccountId'), 'exclude': lambda f: f is None }})
- r"""Unique ID for the source account"""
- target_account_id: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('targetAccountId'), 'exclude': lambda f: f is Zero.UNSET }})
- r"""Unique ID for the target account"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/webhooks/__init__.py b/bank-feeds/src/codatbankfeeds/models/webhooks/__init__.py
deleted file mode 100644
index 5731c1dfd..000000000
--- a/bank-feeds/src/codatbankfeeds/models/webhooks/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .client_rate_limit_reached import *
-from .client_rate_limit_reset import *
-
-__all__ = ["ClientRateLimitReachedResponse","ClientRateLimitResetResponse"]
diff --git a/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reached.py b/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reached.py
deleted file mode 100644
index 6f8ec4867..000000000
--- a/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reached.py
+++ /dev/null
@@ -1,17 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-
-
-@dataclasses.dataclass
-class ClientRateLimitReachedResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reset.py b/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reset.py
deleted file mode 100644
index ecc722470..000000000
--- a/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reset.py
+++ /dev/null
@@ -1,17 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from __future__ import annotations
-import dataclasses
-import requests as requests_http
-
-
-@dataclasses.dataclass
-class ClientRateLimitResetResponse:
- content_type: str = dataclasses.field()
- r"""HTTP response content type for this operation"""
- status_code: int = dataclasses.field()
- r"""HTTP response status code for this operation"""
- raw_response: requests_http.Response = dataclasses.field()
- r"""Raw HTTP response; suitable for custom response parsing"""
-
-
diff --git a/bank-feeds/src/codatbankfeeds/sdk.py b/bank-feeds/src/codatbankfeeds/sdk.py
deleted file mode 100644
index 022b59a54..000000000
--- a/bank-feeds/src/codatbankfeeds/sdk.py
+++ /dev/null
@@ -1,94 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-import requests as requests_http
-from .account_mapping import AccountMapping
-from .bank_accounts import BankAccounts
-from .companies import Companies
-from .configuration import Configuration
-from .connections import Connections
-from .sdkconfiguration import SDKConfiguration
-from .source_accounts import SourceAccounts
-from .transactions import Transactions
-from codatbankfeeds import utils
-from codatbankfeeds.models import shared
-from typing import Callable, Dict, Union
-
-class CodatBankFeeds:
- r"""Bank Feeds API: Bank Feeds API enables your SMB users to set up bank feeds from accounts in your application to supported accounting platforms.
-
- A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting package.
-
- [Explore product](https://docs.codat.io/bank-feeds-api/overview) | [See OpenAPI spec](https://github.com/codatio/oas)
-
- ---
-
- ## Endpoints
-
- | Endpoints | Description |
- | :- | :- |
- | Companies | Create and manage your SMB users' companies. |
- | Connections | Create new and manage existing data connections for a company. |
- | Source accounts | Provide and manage lists of source bank accounts. |
- | Transactions | Create new bank account transactions for a company's connections, and see previous operations. |
- | Account mapping | Extra functionality for building an account management UI |
- """
- companies: Companies
- r"""Create and manage your Codat companies."""
- connections: Connections
- r"""Manage your companies' data connections."""
- account_mapping: AccountMapping
- r"""Bank feed bank account mapping."""
- source_accounts: SourceAccounts
- r"""Source accounts act as a bridge to bank accounts in accounting software."""
- bank_accounts: BankAccounts
- r"""Access bank accounts in an SMBs accounting platform."""
- transactions: Transactions
- r"""Transactions represent debits and credits from a source account."""
- configuration: Configuration
- r"""Configure bank feeds for a company."""
-
- sdk_configuration: SDKConfiguration
-
- def __init__(self,
- security: Union[shared.Security,Callable[[], shared.Security]] = None,
- server_idx: int = None,
- server_url: str = None,
- url_params: Dict[str, str] = None,
- client: requests_http.Session = None,
- retry_config: utils.RetryConfig = None
- ) -> None:
- """Instantiates the SDK configuring it with the provided parameters.
-
- :param security: The security details required for authentication
- :type security: Union[shared.Security,Callable[[], shared.Security]]
- :param server_idx: The index of the server to use for all operations
- :type server_idx: int
- :param server_url: The server URL to use for all operations
- :type server_url: str
- :param url_params: Parameters to optionally template the server URL with
- :type url_params: Dict[str, str]
- :param client: The requests.Session HTTP client to use for all operations
- :type client: requests_http.Session
- :param retry_config: The utils.RetryConfig to use globally
- :type retry_config: utils.RetryConfig
- """
- if client is None:
- client = requests_http.Session()
-
- if server_url is not None:
- if url_params is not None:
- server_url = utils.template_url(server_url, url_params)
-
- self.sdk_configuration = SDKConfiguration(client, security, server_url, server_idx, retry_config=retry_config)
-
- self._init_sdks()
-
- def _init_sdks(self):
- self.companies = Companies(self.sdk_configuration)
- self.connections = Connections(self.sdk_configuration)
- self.account_mapping = AccountMapping(self.sdk_configuration)
- self.source_accounts = SourceAccounts(self.sdk_configuration)
- self.bank_accounts = BankAccounts(self.sdk_configuration)
- self.transactions = Transactions(self.sdk_configuration)
- self.configuration = Configuration(self.sdk_configuration)
-
\ No newline at end of file
diff --git a/bank-feeds/src/codatbankfeeds/sdkconfiguration.py b/bank-feeds/src/codatbankfeeds/sdkconfiguration.py
deleted file mode 100644
index 17ea2db49..000000000
--- a/bank-feeds/src/codatbankfeeds/sdkconfiguration.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-
-import requests as requests_http
-from .utils import utils
-from .utils.retries import RetryConfig
-from codatbankfeeds.models import shared
-from dataclasses import dataclass
-from typing import Callable, Dict, Tuple, Union
-
-
-SERVERS = [
- 'https://api.codat.io',
- # Production
-]
-"""Contains the list of servers available to the SDK"""
-
-@dataclass
-class SDKConfiguration:
- client: requests_http.Session
- security: Union[shared.Security,Callable[[], shared.Security]] = None
- server_url: str = ''
- server_idx: int = 0
- language: str = 'python'
- openapi_doc_version: str = '3.0.0'
- sdk_version: str = '6.1.1'
- gen_version: str = '2.257.2'
- user_agent: str = 'speakeasy-sdk/python 6.1.1 2.257.2 3.0.0 codat-bankfeeds'
- retry_config: RetryConfig = None
-
- def get_server_details(self) -> Tuple[str, Dict[str, str]]:
- if self.server_url:
- return utils.remove_suffix(self.server_url, '/'), {}
- if self.server_idx is None:
- self.server_idx = 0
-
- return SERVERS[self.server_idx], {}
diff --git a/bank-feeds/src/codatbankfeeds/source_accounts.py b/bank-feeds/src/codatbankfeeds/source_accounts.py
deleted file mode 100644
index f186d5798..000000000
--- a/bank-feeds/src/codatbankfeeds/source_accounts.py
+++ /dev/null
@@ -1,383 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .sdkconfiguration import SDKConfiguration
-from codatbankfeeds import utils
-from codatbankfeeds.models import errors, operations, shared
-from typing import List, Optional
-
-class SourceAccounts:
- r"""Source accounts act as a bridge to bank accounts in accounting software."""
- sdk_configuration: SDKConfiguration
-
- def __init__(self, sdk_config: SDKConfiguration) -> None:
- self.sdk_configuration = sdk_config
-
-
-
- def create(self, request: operations.CreateSourceAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateSourceAccountResponse:
- r"""Create source account
- The _Create Source Account_ endpoint allows you to create a representation of a bank account within Codat's domain. The company can then map the source account to an existing or new target account in their accounting software.
-
- #### Account mapping variability
-
- The method of mapping the source account to the target account varies depending on the accounting package your company uses.
-
- #### Mapping options:
-
- 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience.
- 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping.
- 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself.
-
- ### Integration-specific behaviour
-
- | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping |
- | --------------------- | ----------- | ---------------- | --------------------------- |
- | Xero | ✅ | ✅ | |
- | FreeAgent | ✅ | ✅ | |
- | Oracle NetSuite | ✅ | ✅ | |
- | Exact Online (NL) | ✅ | ✅ | |
- | QuickBooks Online | | | ✅ |
- | Sage | | | ✅ |
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.CreateSourceAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.CreateSourceAccountRequest, "source_account", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('POST', url, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.CreateSourceAccountResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.SourceAccount])
- res.source_account = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def delete(self, request: operations.DeleteSourceAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteSourceAccountResponse:
- r"""Delete source account
- The _Delete source account_ endpoint enables you to remove a source account.
-
- Removing a source account will also remove any mapping between the source bank feed bank accounts and the target bankfeed bank account.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.DeleteSourceAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('DELETE', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.DeleteSourceAccountResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 204:
- pass
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def delete_credentials(self, request: operations.DeleteBankFeedCredentialsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteBankFeedCredentialsResponse:
- r"""Delete all source account credentials
- The _Delete Bank Account Credentials_ endpoint serves as a comprehensive mechanism for revoking all existing authorization credentials that a company employs to establish its Bank Feed connection.
-
- In cases where multiple credential sets have been generated, a single API call to this endpoint revokes all of them.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.DeleteBankFeedCredentialsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('DELETE', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.DeleteBankFeedCredentialsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 204:
- pass
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def generate_credentials(self, request: operations.GenerateCredentialsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GenerateCredentialsResponse:
- r"""Generate source account credentials
- The _Generate Bank Account Credentials_ endpoint can be used to generate credentials for QuickBooks Online to use for authentication of the Bank Feed in their portal, each time this is used a new set of credentials will be generated.
-
- The old credentials will still be valid until the revoke credentials endpoint is used, which will revoke all credentials associated to the data connection.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.GenerateCredentialsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.GenerateCredentialsRequest, "request_body", False, False, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- if data is None and form is None:
- raise Exception('request body is required')
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('POST', url, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.GenerateCredentialsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.BankAccountCredentials])
- res.bank_account_credentials = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def list(self, request: operations.ListSourceAccountsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSourceAccountsResponse:
- r"""List source accounts
- The _List source accounts_ endpoint returns a list of [source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) for a given company's connection.
-
- [source accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankFeedAccount) are the bank's bank account within Codat's domain from which transactions are synced into the accounting platform.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.ListSourceAccountsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.ListSourceAccountsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[List[shared.SourceAccount]])
- res.source_accounts = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def update(self, request: operations.UpdateSourceAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateSourceAccountResponse:
- r"""Update source account
- The _Update source account_ endpoint updates a single source account for a single data connection connected to a single company.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.UpdateSourceAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.UpdateSourceAccountRequest, "source_account", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('PATCH', url, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.UpdateSourceAccountResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.SourceAccount])
- res.source_account = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
\ No newline at end of file
diff --git a/bank-feeds/src/codatbankfeeds/transactions.py b/bank-feeds/src/codatbankfeeds/transactions.py
deleted file mode 100644
index 116547101..000000000
--- a/bank-feeds/src/codatbankfeeds/transactions.py
+++ /dev/null
@@ -1,196 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .sdkconfiguration import SDKConfiguration
-from codatbankfeeds import utils
-from codatbankfeeds.models import errors, operations, shared
-from typing import Optional
-
-class Transactions:
- r"""Transactions represent debits and credits from a source account."""
- sdk_configuration: SDKConfiguration
-
- def __init__(self, sdk_config: SDKConfiguration) -> None:
- self.sdk_configuration = sdk_config
-
-
-
- def create(self, request: operations.CreateBankTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBankTransactionsResponse:
- r"""Create bank transactions
- The *Create bank transactions* endpoint creates new [bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company's connection.
-
- [Bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of monetary amounts that have moved in and out of an SMB's bank account.
-
- **Integration-specific behaviour**
-
- Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/bank-feeds-api#/operations/get-create-bankTransactions-model).
-
- Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support creating a bank account transactions.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.CreateBankTransactionsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions', request)
- headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, operations.CreateBankTransactionsRequest, "create_bank_transactions", False, True, 'json')
- if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
- headers['content-type'] = req_content_type
- query_params = utils.get_query_params(operations.CreateBankTransactionsRequest, request)
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('POST', url, params=query_params, data=data, files=form, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.CreateBankTransactionsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.CreateBankTransactionsResponse])
- res.create_bank_transactions_response = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def get_create_operation(self, request: operations.GetCreateOperationRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateOperationResponse:
- r"""Get create operation
- Retrieve push operation.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.GetCreateOperationRequest, base_url, '/companies/{companyId}/push/{pushOperationKey}', request)
- headers = {}
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.GetCreateOperationResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.PushOperation])
- res.push_operation = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
-
- def list_create_operations(self, request: operations.ListCreateOperationsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCreateOperationsResponse:
- r"""List create operations
- List create operations.
- """
- base_url = utils.template_url(*self.sdk_configuration.get_server_details())
-
- url = utils.generate_url(operations.ListCreateOperationsRequest, base_url, '/companies/{companyId}/push', request)
- headers = {}
- query_params = utils.get_query_params(operations.ListCreateOperationsRequest, request)
- headers['Accept'] = 'application/json'
- headers['user-agent'] = self.sdk_configuration.user_agent
-
- if callable(self.sdk_configuration.security):
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
- else:
- client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
-
- global_retry_config = self.sdk_configuration.retry_config
- retry_config = retries
- if retry_config is None:
- if global_retry_config:
- retry_config = global_retry_config
- else:
- retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True)
-
- def do_request():
- return client.request('GET', url, params=query_params, headers=headers)
-
- http_res = utils.retry(do_request, utils.Retries(retry_config, [
- '408',
- '429',
- '5XX'
- ]))
- content_type = http_res.headers.get('Content-Type')
-
- res = operations.ListCreateOperationsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
-
- if http_res.status_code == 200:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[shared.PushOperations])
- res.push_operations = out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code in [400, 401, 402, 403, 404, 429, 500, 503]:
- if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, errors.ErrorMessage)
- out.raw_response = http_res
- raise out
- else:
- raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
- elif http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
- raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
-
- return res
-
-
\ No newline at end of file
diff --git a/bank-feeds/src/codatbankfeeds/utils/__init__.py b/bank-feeds/src/codatbankfeeds/utils/__init__.py
deleted file mode 100644
index 94b739857..000000000
--- a/bank-feeds/src/codatbankfeeds/utils/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-from .retries import *
-from .utils import *
diff --git a/bank-feeds/src/codatbankfeeds/utils/retries.py b/bank-feeds/src/codatbankfeeds/utils/retries.py
deleted file mode 100644
index 8eba09407..000000000
--- a/bank-feeds/src/codatbankfeeds/utils/retries.py
+++ /dev/null
@@ -1,120 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-import random
-import time
-from typing import List
-
-import requests
-
-
-class BackoffStrategy:
- initial_interval: int
- max_interval: int
- exponent: float
- max_elapsed_time: int
-
- def __init__(self, initial_interval: int, max_interval: int, exponent: float, max_elapsed_time: int):
- self.initial_interval = initial_interval
- self.max_interval = max_interval
- self.exponent = exponent
- self.max_elapsed_time = max_elapsed_time
-
-
-class RetryConfig:
- strategy: str
- backoff: BackoffStrategy
- retry_connection_errors: bool
-
- def __init__(self, strategy: str, backoff: BackoffStrategy, retry_connection_errors: bool):
- self.strategy = strategy
- self.backoff = backoff
- self.retry_connection_errors = retry_connection_errors
-
-
-class Retries:
- config: RetryConfig
- status_codes: List[str]
-
- def __init__(self, config: RetryConfig, status_codes: List[str]):
- self.config = config
- self.status_codes = status_codes
-
-
-class TemporaryError(Exception):
- response: requests.Response
-
- def __init__(self, response: requests.Response):
- self.response = response
-
-
-class PermanentError(Exception):
- inner: Exception
-
- def __init__(self, inner: Exception):
- self.inner = inner
-
-
-def retry(func, retries: Retries):
- if retries.config.strategy == 'backoff':
- def do_request():
- res: requests.Response
- try:
- res = func()
-
- for code in retries.status_codes:
- if "X" in code.upper():
- code_range = int(code[0])
-
- status_major = res.status_code / 100
-
- if status_major >= code_range and status_major < code_range + 1:
- raise TemporaryError(res)
- else:
- parsed_code = int(code)
-
- if res.status_code == parsed_code:
- raise TemporaryError(res)
- except requests.exceptions.ConnectionError as exception:
- if retries.config.config.retry_connection_errors:
- raise
-
- raise PermanentError(exception) from exception
- except requests.exceptions.Timeout as exception:
- if retries.config.config.retry_connection_errors:
- raise
-
- raise PermanentError(exception) from exception
- except TemporaryError:
- raise
- except Exception as exception:
- raise PermanentError(exception) from exception
-
- return res
-
- return retry_with_backoff(do_request, retries.config.backoff.initial_interval, retries.config.backoff.max_interval, retries.config.backoff.exponent, retries.config.backoff.max_elapsed_time)
-
- return func()
-
-
-def retry_with_backoff(func, initial_interval=500, max_interval=60000, exponent=1.5, max_elapsed_time=3600000):
- start = round(time.time()*1000)
- retries = 0
-
- while True:
- try:
- return func()
- except PermanentError as exception:
- raise exception.inner
- except Exception as exception: # pylint: disable=broad-exception-caught
- now = round(time.time()*1000)
- if now - start > max_elapsed_time:
- if isinstance(exception, TemporaryError):
- return exception.response
-
- raise
- sleep = ((initial_interval/1000) *
- exponent**retries + random.uniform(0, 1))
- if sleep > max_interval/1000:
- sleep = max_interval/1000
- time.sleep(sleep)
- retries += 1
diff --git a/bank-feeds/src/codatbankfeeds/utils/utils.py b/bank-feeds/src/codatbankfeeds/utils/utils.py
deleted file mode 100644
index 52434025e..000000000
--- a/bank-feeds/src/codatbankfeeds/utils/utils.py
+++ /dev/null
@@ -1,897 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-import base64
-import json
-import re
-import sys
-from dataclasses import Field, dataclass, fields, is_dataclass, make_dataclass
-from datetime import date, datetime
-from decimal import Decimal
-from email.message import Message
-from enum import Enum
-from typing import (Any, Callable, Dict, List, Optional, Tuple, Union,
- get_args, get_origin)
-from xmlrpc.client import boolean
-from typing_inspect import is_optional_type
-import dateutil.parser
-import requests
-from dataclasses_json import DataClassJsonMixin
-
-
-class SecurityClient:
- client: requests.Session
- query_params: Dict[str, str] = {}
-
- def __init__(self, client: requests.Session):
- self.client = client
-
- def request(self, method, url, **kwargs):
- params = kwargs.get('params', {})
- kwargs["params"] = {**self.query_params, **params}
-
- return self.client.request(method, url, **kwargs)
-
-
-def configure_security_client(client: requests.Session, security: dataclass):
- client = SecurityClient(client)
-
- if security is None:
- return client
-
- sec_fields: Tuple[Field, ...] = fields(security)
- for sec_field in sec_fields:
- value = getattr(security, sec_field.name)
- if value is None:
- continue
-
- metadata = sec_field.metadata.get('security')
- if metadata is None:
- continue
- if metadata.get('option'):
- _parse_security_option(client, value)
- return client
- if metadata.get('scheme'):
- # Special case for basic auth which could be a flattened struct
- if metadata.get("sub_type") == "basic" and not is_dataclass(value):
- _parse_security_scheme(client, metadata, security)
- else:
- _parse_security_scheme(client, metadata, value)
-
- return client
-
-
-def _parse_security_option(client: SecurityClient, option: dataclass):
- opt_fields: Tuple[Field, ...] = fields(option)
- for opt_field in opt_fields:
- metadata = opt_field.metadata.get('security')
- if metadata is None or metadata.get('scheme') is None:
- continue
- _parse_security_scheme(
- client, metadata, getattr(option, opt_field.name))
-
-
-def _parse_security_scheme(client: SecurityClient, scheme_metadata: Dict, scheme: any):
- scheme_type = scheme_metadata.get('type')
- sub_type = scheme_metadata.get('sub_type')
-
- if is_dataclass(scheme):
- if scheme_type == 'http' and sub_type == 'basic':
- _parse_basic_auth_scheme(client, scheme)
- return
-
- scheme_fields: Tuple[Field, ...] = fields(scheme)
- for scheme_field in scheme_fields:
- metadata = scheme_field.metadata.get('security')
- if metadata is None or metadata.get('field_name') is None:
- continue
-
- value = getattr(scheme, scheme_field.name)
-
- _parse_security_scheme_value(
- client, scheme_metadata, metadata, value)
- else:
- _parse_security_scheme_value(
- client, scheme_metadata, scheme_metadata, scheme)
-
-
-def _parse_security_scheme_value(client: SecurityClient, scheme_metadata: Dict, security_metadata: Dict, value: any):
- scheme_type = scheme_metadata.get('type')
- sub_type = scheme_metadata.get('sub_type')
-
- header_name = security_metadata.get('field_name')
-
- if scheme_type == "apiKey":
- if sub_type == 'header':
- client.client.headers[header_name] = value
- elif sub_type == 'query':
- client.query_params[header_name] = value
- elif sub_type == 'cookie':
- client.client.cookies[header_name] = value
- else:
- raise Exception('not supported')
- elif scheme_type == "openIdConnect":
- client.client.headers[header_name] = _apply_bearer(value)
- elif scheme_type == 'oauth2':
- client.client.headers[header_name] = _apply_bearer(value)
- elif scheme_type == 'http':
- if sub_type == 'bearer':
- client.client.headers[header_name] = _apply_bearer(value)
- else:
- raise Exception('not supported')
- else:
- raise Exception('not supported')
-
-
-def _apply_bearer(token: str) -> str:
- return token.lower().startswith('bearer ') and token or f'Bearer {token}'
-
-
-def _parse_basic_auth_scheme(client: SecurityClient, scheme: dataclass):
- username = ""
- password = ""
-
- scheme_fields: Tuple[Field, ...] = fields(scheme)
- for scheme_field in scheme_fields:
- metadata = scheme_field.metadata.get('security')
- if metadata is None or metadata.get('field_name') is None:
- continue
-
- field_name = metadata.get('field_name')
- value = getattr(scheme, scheme_field.name)
-
- if field_name == 'username':
- username = value
- if field_name == 'password':
- password = value
-
- data = f'{username}:{password}'.encode()
- client.client.headers['Authorization'] = f'Basic {base64.b64encode(data).decode()}'
-
-
-def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass,
- gbls: Dict[str, Dict[str, Dict[str, Any]]] = None) -> str:
- path_param_fields: Tuple[Field, ...] = fields(clazz)
- for field in path_param_fields:
- request_metadata = field.metadata.get('request')
- if request_metadata is not None:
- continue
-
- param_metadata = field.metadata.get('path_param')
- if param_metadata is None:
- continue
-
- param = getattr(
- path_params, field.name) if path_params is not None else None
- param = _populate_from_globals(
- field.name, param, 'pathParam', gbls)
-
- if param is None:
- continue
-
- f_name = param_metadata.get("field_name", field.name)
- serialization = param_metadata.get('serialization', '')
- if serialization != '':
- serialized_params = _get_serialized_params(
- param_metadata, field.type, f_name, param)
- for key, value in serialized_params.items():
- path = path.replace(
- '{' + key + '}', value, 1)
- else:
- if param_metadata.get('style', 'simple') == 'simple':
- if isinstance(param, List):
- pp_vals: List[str] = []
- for pp_val in param:
- if pp_val is None:
- continue
- pp_vals.append(_val_to_string(pp_val))
- path = path.replace(
- '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
- elif isinstance(param, Dict):
- pp_vals: List[str] = []
- for pp_key in param:
- if param[pp_key] is None:
- continue
- if param_metadata.get('explode'):
- pp_vals.append(
- f"{pp_key}={_val_to_string(param[pp_key])}")
- else:
- pp_vals.append(
- f"{pp_key},{_val_to_string(param[pp_key])}")
- path = path.replace(
- '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
- elif not isinstance(param, (str, int, float, complex, bool, Decimal)):
- pp_vals: List[str] = []
- param_fields: Tuple[Field, ...] = fields(param)
- for param_field in param_fields:
- param_value_metadata = param_field.metadata.get(
- 'path_param')
- if not param_value_metadata:
- continue
-
- parm_name = param_value_metadata.get(
- 'field_name', field.name)
-
- param_field_val = getattr(param, param_field.name)
- if param_field_val is None:
- continue
- if param_metadata.get('explode'):
- pp_vals.append(
- f"{parm_name}={_val_to_string(param_field_val)}")
- else:
- pp_vals.append(
- f"{parm_name},{_val_to_string(param_field_val)}")
- path = path.replace(
- '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1)
- else:
- path = path.replace(
- '{' + param_metadata.get('field_name', field.name) + '}', _val_to_string(param), 1)
-
- return remove_suffix(server_url, '/') + path
-
-
-def is_optional(field):
- return get_origin(field) is Union and type(None) in get_args(field)
-
-
-def template_url(url_with_params: str, params: Dict[str, str]) -> str:
- for key, value in params.items():
- url_with_params = url_with_params.replace(
- '{' + key + '}', value)
-
- return url_with_params
-
-
-def get_query_params(clazz: type, query_params: dataclass, gbls: Dict[str, Dict[str, Dict[str, Any]]] = None) -> Dict[
- str, List[str]]:
- params: Dict[str, List[str]] = {}
-
- param_fields: Tuple[Field, ...] = fields(clazz)
- for field in param_fields:
- request_metadata = field.metadata.get('request')
- if request_metadata is not None:
- continue
-
- metadata = field.metadata.get('query_param')
- if not metadata:
- continue
-
- param_name = field.name
- value = getattr(
- query_params, param_name) if query_params is not None else None
-
- value = _populate_from_globals(param_name, value, 'queryParam', gbls)
-
- f_name = metadata.get("field_name")
- serialization = metadata.get('serialization', '')
- if serialization != '':
- serialized_parms = _get_serialized_params(metadata, field.type, f_name, value)
- for key, value in serialized_parms.items():
- if key in params:
- params[key].extend(value)
- else:
- params[key] = [value]
- else:
- style = metadata.get('style', 'form')
- if style == 'deepObject':
- params = {**params, **_get_deep_object_query_params(
- metadata, f_name, value)}
- elif style == 'form':
- params = {**params, **_get_delimited_query_params(
- metadata, f_name, value, ",")}
- elif style == 'pipeDelimited':
- params = {**params, **_get_delimited_query_params(
- metadata, f_name, value, "|")}
- else:
- raise Exception('not yet implemented')
- return params
-
-
-def get_headers(headers_params: dataclass) -> Dict[str, str]:
- if headers_params is None:
- return {}
-
- headers: Dict[str, str] = {}
-
- param_fields: Tuple[Field, ...] = fields(headers_params)
- for field in param_fields:
- metadata = field.metadata.get('header')
- if not metadata:
- continue
-
- value = _serialize_header(metadata.get(
- 'explode', False), getattr(headers_params, field.name))
-
- if value != '':
- headers[metadata.get('field_name', field.name)] = value
-
- return headers
-
-
-def _get_serialized_params(metadata: Dict, field_type: type, field_name: str, obj: any) -> Dict[str, str]:
- params: Dict[str, str] = {}
-
- serialization = metadata.get('serialization', '')
- if serialization == 'json':
- params[metadata.get("field_name", field_name)] = marshal_json(obj, field_type)
-
- return params
-
-
-def _get_deep_object_query_params(metadata: Dict, field_name: str, obj: any) -> Dict[str, List[str]]:
- params: Dict[str, List[str]] = {}
-
- if obj is None:
- return params
-
- if is_dataclass(obj):
- obj_fields: Tuple[Field, ...] = fields(obj)
- for obj_field in obj_fields:
- obj_param_metadata = obj_field.metadata.get('query_param')
- if not obj_param_metadata:
- continue
-
- obj_val = getattr(obj, obj_field.name)
- if obj_val is None:
- continue
-
- if isinstance(obj_val, List):
- for val in obj_val:
- if val is None:
- continue
-
- if params.get(
- f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]') is None:
- params[
- f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [
- ]
-
- params[
- f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'].append(
- _val_to_string(val))
- else:
- params[
- f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [
- _val_to_string(obj_val)]
- elif isinstance(obj, Dict):
- for key, value in obj.items():
- if value is None:
- continue
-
- if isinstance(value, List):
- for val in value:
- if val is None:
- continue
-
- if params.get(f'{metadata.get("field_name", field_name)}[{key}]') is None:
- params[f'{metadata.get("field_name", field_name)}[{key}]'] = [
- ]
-
- params[
- f'{metadata.get("field_name", field_name)}[{key}]'].append(_val_to_string(val))
- else:
- params[f'{metadata.get("field_name", field_name)}[{key}]'] = [
- _val_to_string(value)]
- return params
-
-
-def _get_query_param_field_name(obj_field: Field) -> str:
- obj_param_metadata = obj_field.metadata.get('query_param')
-
- if not obj_param_metadata:
- return ""
-
- return obj_param_metadata.get("field_name", obj_field.name)
-
-
-def _get_delimited_query_params(metadata: Dict, field_name: str, obj: any, delimiter: str) -> Dict[
- str, List[str]]:
- return _populate_form(field_name, metadata.get("explode", True), obj, _get_query_param_field_name, delimiter)
-
-
-SERIALIZATION_METHOD_TO_CONTENT_TYPE = {
- 'json': 'application/json',
- 'form': 'application/x-www-form-urlencoded',
- 'multipart': 'multipart/form-data',
- 'raw': 'application/octet-stream',
- 'string': 'text/plain',
-}
-
-
-def serialize_request_body(request: dataclass, request_type: type, request_field_name: str, nullable: bool, optional: bool, serialization_method: str, encoder=None) -> Tuple[
- str, any, any]:
- if request is None:
- if not nullable and optional:
- return None, None, None
-
- if not is_dataclass(request) or not hasattr(request, request_field_name):
- return serialize_content_type(request_field_name, request_type, SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method],
- request, encoder)
-
- request_val = getattr(request, request_field_name)
-
- if request_val is None:
- if not nullable and optional:
- return None, None, None
-
- request_fields: Tuple[Field, ...] = fields(request)
- request_metadata = None
-
- for field in request_fields:
- if field.name == request_field_name:
- request_metadata = field.metadata.get('request')
- break
-
- if request_metadata is None:
- raise Exception('invalid request type')
-
- return serialize_content_type(request_field_name, request_type, request_metadata.get('media_type', 'application/octet-stream'),
- request_val)
-
-
-def serialize_content_type(field_name: str, request_type: any, media_type: str, request: dataclass, encoder=None) -> Tuple[str, any, List[List[any]]]:
- if re.match(r'(application|text)\/.*?\+*json.*', media_type) is not None:
- return media_type, marshal_json(request, request_type, encoder), None
- if re.match(r'multipart\/.*', media_type) is not None:
- return serialize_multipart_form(media_type, request)
- if re.match(r'application\/x-www-form-urlencoded.*', media_type) is not None:
- return media_type, serialize_form_data(field_name, request), None
- if isinstance(request, (bytes, bytearray)):
- return media_type, request, None
- if isinstance(request, str):
- return media_type, request, None
-
- raise Exception(
- f"invalid request body type {type(request)} for mediaType {media_type}")
-
-
-def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str, any, List[List[any]]]:
- form: List[List[any]] = []
- request_fields = fields(request)
-
- for field in request_fields:
- val = getattr(request, field.name)
- if val is None:
- continue
-
- field_metadata = field.metadata.get('multipart_form')
- if not field_metadata:
- continue
-
- if field_metadata.get("file") is True:
- file_fields = fields(val)
-
- file_name = ""
- field_name = ""
- content = bytes()
-
- for file_field in file_fields:
- file_metadata = file_field.metadata.get('multipart_form')
- if file_metadata is None:
- continue
-
- if file_metadata.get("content") is True:
- content = getattr(val, file_field.name)
- else:
- field_name = file_metadata.get(
- "field_name", file_field.name)
- file_name = getattr(val, file_field.name)
- if field_name == "" or file_name == "" or content == bytes():
- raise Exception('invalid multipart/form-data file')
-
- form.append([field_name, [file_name, content]])
- elif field_metadata.get("json") is True:
- to_append = [field_metadata.get("field_name", field.name), [
- None, marshal_json(val, field.type), "application/json"]]
- form.append(to_append)
- else:
- field_name = field_metadata.get(
- "field_name", field.name)
- if isinstance(val, List):
- for value in val:
- if value is None:
- continue
- form.append(
- [field_name + "[]", [None, _val_to_string(value)]])
- else:
- form.append([field_name, [None, _val_to_string(val)]])
- return media_type, None, form
-
-
-def serialize_dict(original: Dict, explode: bool, field_name, existing: Optional[Dict[str, List[str]]]) -> Dict[
- str, List[str]]:
- if existing is None:
- existing = []
-
- if explode is True:
- for key, val in original.items():
- if key not in existing:
- existing[key] = []
- existing[key].append(val)
- else:
- temp = []
- for key, val in original.items():
- temp.append(str(key))
- temp.append(str(val))
- if field_name not in existing:
- existing[field_name] = []
- existing[field_name].append(",".join(temp))
- return existing
-
-
-def serialize_form_data(field_name: str, data: dataclass) -> Dict[str, any]:
- form: Dict[str, List[str]] = {}
-
- if is_dataclass(data):
- for field in fields(data):
- val = getattr(data, field.name)
- if val is None:
- continue
-
- metadata = field.metadata.get('form')
- if metadata is None:
- continue
-
- field_name = metadata.get('field_name', field.name)
-
- if metadata.get('json'):
- form[field_name] = [marshal_json(val, field.type)]
- else:
- if metadata.get('style', 'form') == 'form':
- form = {**form, **_populate_form(
- field_name, metadata.get('explode', True), val, _get_form_field_name, ",")}
- else:
- raise Exception(
- f'Invalid form style for field {field.name}')
- elif isinstance(data, Dict):
- for key, value in data.items():
- form[key] = [_val_to_string(value)]
- else:
- raise Exception(f'Invalid request body type for field {field_name}')
-
- return form
-
-
-def _get_form_field_name(obj_field: Field) -> str:
- obj_param_metadata = obj_field.metadata.get('form')
-
- if not obj_param_metadata:
- return ""
-
- return obj_param_metadata.get("field_name", obj_field.name)
-
-
-def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_func: Callable, delimiter: str) -> \
- Dict[str, List[str]]:
- params: Dict[str, List[str]] = {}
-
- if obj is None:
- return params
-
- if is_dataclass(obj):
- items = []
-
- obj_fields: Tuple[Field, ...] = fields(obj)
- for obj_field in obj_fields:
- obj_field_name = get_field_name_func(obj_field)
- if obj_field_name == '':
- continue
-
- val = getattr(obj, obj_field.name)
- if val is None:
- continue
-
- if explode:
- params[obj_field_name] = [_val_to_string(val)]
- else:
- items.append(
- f'{obj_field_name}{delimiter}{_val_to_string(val)}')
-
- if len(items) > 0:
- params[field_name] = [delimiter.join(items)]
- elif isinstance(obj, Dict):
- items = []
- for key, value in obj.items():
- if value is None:
- continue
-
- if explode:
- params[key] = _val_to_string(value)
- else:
- items.append(f'{key}{delimiter}{_val_to_string(value)}')
-
- if len(items) > 0:
- params[field_name] = [delimiter.join(items)]
- elif isinstance(obj, List):
- items = []
-
- for value in obj:
- if value is None:
- continue
-
- if explode:
- if not field_name in params:
- params[field_name] = []
- params[field_name].append(_val_to_string(value))
- else:
- items.append(_val_to_string(value))
-
- if len(items) > 0:
- params[field_name] = [delimiter.join(
- [str(item) for item in items])]
- else:
- params[field_name] = [_val_to_string(obj)]
-
- return params
-
-
-def _serialize_header(explode: bool, obj: any) -> str:
- if obj is None:
- return ''
-
- if is_dataclass(obj):
- items = []
- obj_fields: Tuple[Field, ...] = fields(obj)
- for obj_field in obj_fields:
- obj_param_metadata = obj_field.metadata.get('header')
-
- if not obj_param_metadata:
- continue
-
- obj_field_name = obj_param_metadata.get(
- 'field_name', obj_field.name)
- if obj_field_name == '':
- continue
-
- val = getattr(obj, obj_field.name)
- if val is None:
- continue
-
- if explode:
- items.append(
- f'{obj_field_name}={_val_to_string(val)}')
- else:
- items.append(obj_field_name)
- items.append(_val_to_string(val))
-
- if len(items) > 0:
- return ','.join(items)
- elif isinstance(obj, Dict):
- items = []
-
- for key, value in obj.items():
- if value is None:
- continue
-
- if explode:
- items.append(f'{key}={_val_to_string(value)}')
- else:
- items.append(key)
- items.append(_val_to_string(value))
-
- if len(items) > 0:
- return ','.join([str(item) for item in items])
- elif isinstance(obj, List):
- items = []
-
- for value in obj:
- if value is None:
- continue
-
- items.append(_val_to_string(value))
-
- if len(items) > 0:
- return ','.join(items)
- else:
- return f'{_val_to_string(obj)}'
-
- return ''
-
-
-def unmarshal_json(data, typ, decoder=None):
- unmarshal = make_dataclass('Unmarshal', [('res', typ)],
- bases=(DataClassJsonMixin,))
- json_dict = json.loads(data)
- try:
- out = unmarshal.from_dict({"res": json_dict})
- except AttributeError as attr_err:
- raise AttributeError(
- f'unable to unmarshal {data} as {typ} - {attr_err}') from attr_err
-
- return out.res if decoder is None else decoder(out.res)
-
-
-def marshal_json(val, typ, encoder=None):
- if not is_optional_type(typ) and val is None:
- raise ValueError(f"Could not marshal None into non-optional type: {typ}")
-
- marshal = make_dataclass('Marshal', [('res', typ)],
- bases=(DataClassJsonMixin,))
- marshaller = marshal(res=val)
- json_dict = marshaller.to_dict()
- val = json_dict["res"] if encoder is None else encoder(json_dict["res"])
-
- return json.dumps(val, separators=(',', ':'), sort_keys=True)
-
-
-def match_content_type(content_type: str, pattern: str) -> boolean:
- if pattern in (content_type, "*", "*/*"):
- return True
-
- msg = Message()
- msg['content-type'] = content_type
- media_type = msg.get_content_type()
-
- if media_type == pattern:
- return True
-
- parts = media_type.split("/")
- if len(parts) == 2:
- if pattern in (f'{parts[0]}/*', f'*/{parts[1]}'):
- return True
-
- return False
-
-
-def datetimeisoformat(optional: bool):
- def isoformatoptional(val):
- if optional and val is None:
- return None
- return _val_to_string(val)
-
- return isoformatoptional
-
-
-def dateisoformat(optional: bool):
- def isoformatoptional(val):
- if optional and val is None:
- return None
- return date.isoformat(val)
-
- return isoformatoptional
-
-
-def datefromisoformat(date_str: str):
- return dateutil.parser.parse(date_str).date()
-
-
-def bigintencoder(optional: bool):
- def bigintencode(val: int):
- if optional and val is None:
- return None
- return str(val)
-
- return bigintencode
-
-
-def bigintdecoder(val):
- if isinstance(val, float):
- raise ValueError(f"{val} is a float")
- return int(val)
-
-
-def decimalencoder(optional: bool, as_str: bool):
- def decimalencode(val: Decimal):
- if optional and val is None:
- return None
-
- if as_str:
- return str(val)
-
- return float(val)
-
- return decimalencode
-
-
-def decimaldecoder(val):
- return Decimal(str(val))
-
-
-def map_encoder(optional: bool, value_encoder: Callable):
- def map_encode(val: Dict):
- if optional and val is None:
- return None
-
- encoded = {}
- for key, value in val.items():
- encoded[key] = value_encoder(value)
-
- return encoded
-
- return map_encode
-
-
-def map_decoder(value_decoder: Callable):
- def map_decode(val: Dict):
- decoded = {}
- for key, value in val.items():
- decoded[key] = value_decoder(value)
-
- return decoded
-
- return map_decode
-
-
-def list_encoder(optional: bool, value_encoder: Callable):
- def list_encode(val: List):
- if optional and val is None:
- return None
-
- encoded = []
- for value in val:
- encoded.append(value_encoder(value))
-
- return encoded
-
- return list_encode
-
-
-def list_decoder(value_decoder: Callable):
- def list_decode(val: List):
- decoded = []
- for value in val:
- decoded.append(value_decoder(value))
-
- return decoded
-
- return list_decode
-
-def union_encoder(all_encoders: Dict[str, Callable]):
- def selective_encoder(val: any):
- if type(val) in all_encoders:
- return all_encoders[type(val)](val)
- return val
- return selective_encoder
-
-def union_decoder(all_decoders: List[Callable]):
- def selective_decoder(val: any):
- decoded = val
- for decoder in all_decoders:
- try:
- decoded = decoder(val)
- break
- except (TypeError, ValueError):
- continue
- return decoded
- return selective_decoder
-
-def get_field_name(name):
- def override(_, _field_name=name):
- return _field_name
-
- return override
-
-
-def _val_to_string(val):
- if isinstance(val, bool):
- return str(val).lower()
- if isinstance(val, datetime):
- return val.isoformat().replace('+00:00', 'Z')
- if isinstance(val, Enum):
- return str(val.value)
-
- return str(val)
-
-
-def _populate_from_globals(param_name: str, value: any, param_type: str, gbls: Dict[str, Dict[str, Dict[str, Any]]]):
- if value is None and gbls is not None:
- if 'parameters' in gbls:
- if param_type in gbls['parameters']:
- if param_name in gbls['parameters'][param_type]:
- global_value = gbls['parameters'][param_type][param_name]
- if global_value is not None:
- value = global_value
-
- return value
-
-
-def decoder_with_discriminator(field_name):
- def decode_fx(obj):
- kls = getattr(sys.modules['sdk.models.shared'], obj[field_name])
- return unmarshal_json(json.dumps(obj), kls)
- return decode_fx
-
-
-def remove_suffix(input_string, suffix):
- if suffix and input_string.endswith(suffix):
- return input_string[:-len(suffix)]
- return input_string
diff --git a/bank-feeds/tests/helpers.py b/bank-feeds/tests/helpers.py
deleted file mode 100644
index b3d095040..000000000
--- a/bank-feeds/tests/helpers.py
+++ /dev/null
@@ -1,61 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-
-import re
-
-
-def sort_query_parameters(url):
- parts = url.split("?")
-
- if len(parts) == 1:
- return url
-
- query = parts[1]
- params = query.split("&")
-
- params.sort(key=lambda x: x.split('=')[0])
-
- return parts[0] + "?" + "&".join(params)
-
-
-def sort_serialized_maps(inp: any, regex: str, delim: str):
-
- def sort_map(m):
- entire_match = m.group(0)
-
- groups = m.groups()
-
- for group in groups:
- pairs = []
- if '=' in group:
- pairs = group.split(delim)
-
- pairs.sort(key=lambda x: x.split('=')[0])
- else:
- values = group.split(delim)
-
- if len(values) == 1:
- pairs = values
- else:
- pairs = [''] * int(len(values)/2)
- # loop though every 2nd item
- for i in range(0, len(values), 2):
- pairs[int(i/2)] = values[i] + delim + values[i+1]
-
- pairs.sort(key=lambda x: x.split(delim)[0])
-
- entire_match = entire_match.replace(group, delim.join(pairs))
-
- return entire_match
-
- if isinstance(inp, str):
- return re.sub(regex, sort_map, inp)
- elif isinstance(inp, list):
- for i, v in enumerate(inp):
- inp[i] = sort_serialized_maps(v, regex, delim)
- return inp
- elif isinstance(inp, dict):
- for k, v in inp.items():
- inp[k] = sort_serialized_maps(v, regex, delim)
- return inp
- else:
- raise Exception("Unsupported type")