diff --git a/bank-feeds/.gitattributes b/bank-feeds/.gitattributes old mode 100755 new mode 100644 diff --git a/bank-feeds/README.md b/bank-feeds/README.md index 793c10e76..30efeae01 100755 --- a/bank-feeds/README.md +++ b/bank-feeds/README.md @@ -14,9 +14,11 @@ pip install codat-bankfeeds ## Example Usage +### Example + ```python import codatbankfeeds -from codatbankfeeds.models import operations, shared +from codatbankfeeds.models import shared s = codatbankfeeds.CodatBankFeeds( security=shared.Security( @@ -24,17 +26,14 @@ s = codatbankfeeds.CodatBankFeeds( ), ) -req = operations.CreateBankAccountMappingRequest( - request_body=operations.CreateBankAccountMappingBankFeedAccountMapping( - feed_start_date='2022-10-23T00:00:00.000Z', - ), - company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', ) -res = s.account_mapping.create(req) +res = s.companies.create(req) -if res.bank_feed_account_mapping_response is not None: +if res.company is not None: # handle response pass ``` @@ -44,11 +43,6 @@ if res.bank_feed_account_mapping_response is not None: ## Available Resources and Operations -### [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 - ### [companies](docs/sdks/companies/README.md) * [create](docs/sdks/companies/README.md#create) - Create company @@ -65,6 +59,11 @@ if res.bank_feed_account_mapping_response 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 @@ -89,6 +88,232 @@ if res.bank_feed_account_mapping_response is not None: + + + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +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 codatbankfeeds.utils import BackoffStrategy, RetryConfig + +s = codatbankfeeds.CodatBankFeeds( + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = s.companies.create(req, + RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False)) + +if res.company is not None: + # handle response + pass +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization: +```python +import codatbankfeeds +from codatbankfeeds.models import shared +from codatbankfeeds.utils import BackoffStrategy, RetryConfig + +s = codatbankfeeds.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( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = s.companies.create(req) + +if res.company is not None: + # handle response + pass +``` + + + + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type. + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | + +### Example + +```python +import codatbankfeeds +from codatbankfeeds.models import shared + +s = codatbankfeeds.CodatBankFeeds( + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = None +try: + res = s.companies.create(req) +except (errors.ErrorMessage) as e: + print(e) # handle exception + +except (errors.SDKError) as e: + print(e) # handle exception + + +if res.company is not None: + # handle response + pass +``` + + + + + + +## Server Selection + +### Select Server by Index + +You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | Variables | +| - | ------ | --------- | +| 0 | `https://api.codat.io` | None | + +#### Example + +```python +import codatbankfeeds +from codatbankfeeds.models import shared + +s = codatbankfeeds.CodatBankFeeds( + server_idx=0, + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = s.companies.create(req) + +if res.company is not None: + # handle response + pass +``` + + +### Override Server URL Per-Client + +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 + +s = codatbankfeeds.CodatBankFeeds( + server_url="https://api.codat.io", + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = s.companies.create(req) + +if res.company is not None: + # handle response + pass +``` + + + + + +## 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. + +For example, you could specify a header for every request that this sdk makes as follows: +```python +import codatbankfeeds +import requests + +http_client = requests.Session() +http_client.headers.update({'x-custom-header': 'someValue'}) +s = codatbankfeeds.CodatBankFeeds(client: http_client) +``` + + + + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| ------------- | ------------- | ------------- | +| `auth_header` | apiKey | API key | + +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 + +s = codatbankfeeds.CodatBankFeeds( + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', +) + +res = s.companies.create(req) + +if res.company is not None: + # handle response + pass +``` + + diff --git a/bank-feeds/RELEASES.md b/bank-feeds/RELEASES.md index 544193aba..732828df5 100644 --- a/bank-feeds/RELEASES.md +++ b/bank-feeds/RELEASES.md @@ -728,4 +728,14 @@ Based on: ### Generated - [python v4.0.0] bank-feeds ### Releases -- [PyPI v4.0.0] https://pypi.org/project/codat-bankfeeds/4.0.0 - bank-feeds \ No newline at end of file +- [PyPI v4.0.0] https://pypi.org/project/codat-bankfeeds/4.0.0 - bank-feeds + +## 2023-11-21 11:18:56 +### Changes +Based on: +- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml +- Speakeasy CLI 1.121.3 (2.195.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v5.0.0] bank-feeds +### Releases +- [PyPI v5.0.0] https://pypi.org/project/codat-bankfeeds/5.0.0 - bank-feeds \ No newline at end of file diff --git a/bank-feeds/USAGE.md b/bank-feeds/USAGE.md old mode 100755 new mode 100644 index cacc0c47e..1f0569074 --- a/bank-feeds/USAGE.md +++ b/bank-feeds/USAGE.md @@ -1,9 +1,7 @@ - - ```python import codatbankfeeds -from codatbankfeeds.models import operations, shared +from codatbankfeeds.models import shared s = codatbankfeeds.CodatBankFeeds( security=shared.Security( @@ -11,17 +9,14 @@ s = codatbankfeeds.CodatBankFeeds( ), ) -req = operations.CreateBankAccountMappingRequest( - request_body=operations.CreateBankAccountMappingBankFeedAccountMapping( - feed_start_date='2022-10-23T00:00:00.000Z', - ), - company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', +req = shared.CompanyRequestBody( + description='Requested early access to the new financing scheme.', + name='Bank of Dave', ) -res = s.account_mapping.create(req) +res = s.companies.create(req) -if res.bank_feed_account_mapping_response is not None: +if res.company is not None: # handle response pass ``` diff --git a/bank-feeds/docs/models/shared/errormessage.md b/bank-feeds/docs/models/errors/errormessage.md old mode 100755 new mode 100644 similarity index 98% rename from bank-feeds/docs/models/shared/errormessage.md rename to bank-feeds/docs/models/errors/errormessage.md index 2d1289c0d..fb7116941 --- a/bank-feeds/docs/models/shared/errormessage.md +++ b/bank-feeds/docs/models/errors/errormessage.md @@ -1,5 +1,7 @@ # ErrorMessage +Your `query` parameter was not correctly formed + ## Fields diff --git a/bank-feeds/docs/models/operations/createbankaccountmappingrequest.md b/bank-feeds/docs/models/operations/createbankaccountmappingrequest.md old mode 100755 new mode 100644 index 279b53e9c..0c4b9ef31 --- 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 | -| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| `request_body` | [Optional[CreateBankAccountMappingBankFeedAccountMapping]](../../models/operations/createbankaccountmappingbankfeedaccountmapping.md) | :heavy_minus_sign: | 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 | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `zero` | [Optional[shared.Zero]](../../models/shared/zero.md) | :heavy_minus_sign: | 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/createbankaccountmappingresponse.md b/bank-feeds/docs/models/operations/createbankaccountmappingresponse.md old mode 100755 new mode 100644 index e4722f35d..0bef7cc37 --- a/bank-feeds/docs/models/operations/createbankaccountmappingresponse.md +++ b/bank-feeds/docs/models/operations/createbankaccountmappingresponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `bank_feed_account_mapping_response` | [Optional[shared.BankFeedAccountMappingResponse]](../../models/shared/bankfeedaccountmappingresponse.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/createbanktransactionsrequest.md b/bank-feeds/docs/models/operations/createbanktransactionsrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/createbanktransactionsresponse.md b/bank-feeds/docs/models/operations/createbanktransactionsresponse.md old mode 100755 new mode 100644 index 7b8d425fd..a13aa9b51 --- a/bank-feeds/docs/models/operations/createbanktransactionsresponse.md +++ b/bank-feeds/docs/models/operations/createbanktransactionsresponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `create_bank_transactions_response` | [Optional[shared.CreateBankTransactionsResponse]](../../models/shared/createbanktransactionsresponse.md) | :heavy_minus_sign: | Success | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/createcompanyresponse.md b/bank-feeds/docs/models/operations/createcompanyresponse.md old mode 100755 new mode 100644 index b780d6bc9..509542849 --- a/bank-feeds/docs/models/operations/createcompanyresponse.md +++ b/bank-feeds/docs/models/operations/createcompanyresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/createconnectionrequest.md b/bank-feeds/docs/models/operations/createconnectionrequest.md old mode 100755 new mode 100644 index b315a6d5e..0998495bf --- a/bank-feeds/docs/models/operations/createconnectionrequest.md +++ b/bank-feeds/docs/models/operations/createconnectionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `request_body` | [Optional[CreateConnectionRequestBody]](../../models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | | -| `company_id` | *str* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `request_body` | [Optional[operations.CreateConnectionRequestBody]](../../models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | | +| `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/createconnectionrequestbody.md b/bank-feeds/docs/models/operations/createconnectionrequestbody.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/createconnectionresponse.md b/bank-feeds/docs/models/operations/createconnectionresponse.md old mode 100755 new mode 100644 index 6cf898dc4..4f38451fa --- a/bank-feeds/docs/models/operations/createconnectionresponse.md +++ b/bank-feeds/docs/models/operations/createconnectionresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/createsourceaccountrequest.md b/bank-feeds/docs/models/operations/createsourceaccountrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/createsourceaccountresponse.md b/bank-feeds/docs/models/operations/createsourceaccountresponse.md old mode 100755 new mode 100644 index 28e400823..224c14ac4 --- a/bank-feeds/docs/models/operations/createsourceaccountresponse.md +++ b/bank-feeds/docs/models/operations/createsourceaccountresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `source_account` | [Optional[shared.SourceAccount]](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/deletebankfeedcredentialsrequest.md b/bank-feeds/docs/models/operations/deletebankfeedcredentialsrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md b/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md old mode 100755 new mode 100644 index 2ecfa0793..611c3cdf9 --- a/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md +++ b/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/deletecompanyrequest.md b/bank-feeds/docs/models/operations/deletecompanyrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/deletecompanyresponse.md b/bank-feeds/docs/models/operations/deletecompanyresponse.md old mode 100755 new mode 100644 index f3f21c2cb..7dfc00111 --- a/bank-feeds/docs/models/operations/deletecompanyresponse.md +++ b/bank-feeds/docs/models/operations/deletecompanyresponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/deleteconnectionrequest.md b/bank-feeds/docs/models/operations/deleteconnectionrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/deleteconnectionresponse.md b/bank-feeds/docs/models/operations/deleteconnectionresponse.md old mode 100755 new mode 100644 index 30889c508..373abf82a --- a/bank-feeds/docs/models/operations/deleteconnectionresponse.md +++ b/bank-feeds/docs/models/operations/deleteconnectionresponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/deletesourceaccountrequest.md b/bank-feeds/docs/models/operations/deletesourceaccountrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/deletesourceaccountresponse.md b/bank-feeds/docs/models/operations/deletesourceaccountresponse.md old mode 100755 new mode 100644 index a85f3e450..a83c619be --- a/bank-feeds/docs/models/operations/deletesourceaccountresponse.md +++ b/bank-feeds/docs/models/operations/deletesourceaccountresponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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 old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/generatecredentialsresponse.md b/bank-feeds/docs/models/operations/generatecredentialsresponse.md old mode 100755 new mode 100644 index b03fb6b42..e61e0e2f4 --- a/bank-feeds/docs/models/operations/generatecredentialsresponse.md +++ b/bank-feeds/docs/models/operations/generatecredentialsresponse.md @@ -7,6 +7,5 @@ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `bank_account_credentials` | [Optional[shared.BankAccountCredentials]](../../models/shared/bankaccountcredentials.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/getbankaccountmappingrequest.md b/bank-feeds/docs/models/operations/getbankaccountmappingrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md b/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md old mode 100755 new mode 100644 index e017cb452..2c3fb445c --- a/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md +++ b/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `bank_feed_mapping` | [Optional[shared.BankFeedMapping]](../../models/shared/bankfeedmapping.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/getcompanyrequest.md b/bank-feeds/docs/models/operations/getcompanyrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/getcompanyresponse.md b/bank-feeds/docs/models/operations/getcompanyresponse.md old mode 100755 new mode 100644 index 2f82e6ca0..98fd19b23 --- a/bank-feeds/docs/models/operations/getcompanyresponse.md +++ b/bank-feeds/docs/models/operations/getcompanyresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/getconnectionrequest.md b/bank-feeds/docs/models/operations/getconnectionrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/getconnectionresponse.md b/bank-feeds/docs/models/operations/getconnectionresponse.md old mode 100755 new mode 100644 index c308aece1..4dd62a7a6 --- a/bank-feeds/docs/models/operations/getconnectionresponse.md +++ b/bank-feeds/docs/models/operations/getconnectionresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/getcreateoperationrequest.md b/bank-feeds/docs/models/operations/getcreateoperationrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/getcreateoperationresponse.md b/bank-feeds/docs/models/operations/getcreateoperationresponse.md old mode 100755 new mode 100644 index 9bcc91f06..cf2290abc --- a/bank-feeds/docs/models/operations/getcreateoperationresponse.md +++ b/bank-feeds/docs/models/operations/getcreateoperationresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_operation` | [Optional[shared.PushOperation]](../../models/shared/pushoperation.md) | :heavy_minus_sign: | OK | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/listcompaniesrequest.md b/bank-feeds/docs/models/operations/listcompaniesrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/listcompaniesresponse.md b/bank-feeds/docs/models/operations/listcompaniesresponse.md old mode 100755 new mode 100644 index d9c512cea..42b07950c --- a/bank-feeds/docs/models/operations/listcompaniesresponse.md +++ b/bank-feeds/docs/models/operations/listcompaniesresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `companies` | [Optional[shared.Companies]](../../models/shared/companies.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/listconnectionsrequest.md b/bank-feeds/docs/models/operations/listconnectionsrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/listconnectionsresponse.md b/bank-feeds/docs/models/operations/listconnectionsresponse.md old mode 100755 new mode 100644 index 0de0ad796..dacec2f64 --- a/bank-feeds/docs/models/operations/listconnectionsresponse.md +++ b/bank-feeds/docs/models/operations/listconnectionsresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `connections` | [Optional[shared.Connections]](../../models/shared/connections.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/listcreateoperationsrequest.md b/bank-feeds/docs/models/operations/listcreateoperationsrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/listcreateoperationsresponse.md b/bank-feeds/docs/models/operations/listcreateoperationsresponse.md old mode 100755 new mode 100644 index 0540ee668..897287138 --- a/bank-feeds/docs/models/operations/listcreateoperationsresponse.md +++ b/bank-feeds/docs/models/operations/listcreateoperationsresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | `push_operations` | [Optional[shared.PushOperations]](../../models/shared/pushoperations.md) | :heavy_minus_sign: | OK | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/listsourceaccountsrequest.md b/bank-feeds/docs/models/operations/listsourceaccountsrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/listsourceaccountsresponse.md b/bank-feeds/docs/models/operations/listsourceaccountsresponse.md old mode 100755 new mode 100644 index 0df3646e1..36c9e1501 --- a/bank-feeds/docs/models/operations/listsourceaccountsresponse.md +++ b/bank-feeds/docs/models/operations/listsourceaccountsresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `source_account` | [Optional[shared.SourceAccount]](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/unlinkconnectionrequest.md b/bank-feeds/docs/models/operations/unlinkconnectionrequest.md old mode 100755 new mode 100644 index 1f83e7cfa..37c72c7bc --- a/bank-feeds/docs/models/operations/unlinkconnectionrequest.md +++ b/bank-feeds/docs/models/operations/unlinkconnectionrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `request_body` | [Optional[UnlinkConnectionUpdateConnection]](../../models/operations/unlinkconnectionupdateconnection.md) | :heavy_minus_sign: | 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` | [Optional[operations.UnlinkConnectionUpdateConnection]](../../models/operations/unlinkconnectionupdateconnection.md) | :heavy_minus_sign: | 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/unlinkconnectionresponse.md b/bank-feeds/docs/models/operations/unlinkconnectionresponse.md old mode 100755 new mode 100644 index 642e8e815..d1754acb5 --- a/bank-feeds/docs/models/operations/unlinkconnectionresponse.md +++ b/bank-feeds/docs/models/operations/unlinkconnectionresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `connection` | [Optional[shared.Connection]](../../models/shared/connection.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/unlinkconnectionupdateconnection.md b/bank-feeds/docs/models/operations/unlinkconnectionupdateconnection.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/updatecompanyrequest.md b/bank-feeds/docs/models/operations/updatecompanyrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/updatecompanyresponse.md b/bank-feeds/docs/models/operations/updatecompanyresponse.md old mode 100755 new mode 100644 index b60ed7a56..d299179e8 --- a/bank-feeds/docs/models/operations/updatecompanyresponse.md +++ b/bank-feeds/docs/models/operations/updatecompanyresponse.md @@ -7,6 +7,5 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `company` | [Optional[shared.Company]](../../models/shared/company.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/updatesourceaccountrequest.md b/bank-feeds/docs/models/operations/updatesourceaccountrequest.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/updatesourceaccountresponse.md b/bank-feeds/docs/models/operations/updatesourceaccountresponse.md old mode 100755 new mode 100644 index 35f189b6d..69903d155 --- a/bank-feeds/docs/models/operations/updatesourceaccountresponse.md +++ b/bank-feeds/docs/models/operations/updatesourceaccountresponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | -| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `source_account` | [Optional[shared.SourceAccount]](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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/shared/bankaccountcredentials.md b/bank-feeds/docs/models/shared/bankaccountcredentials.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/bankfeedaccountmappingresponse.md b/bank-feeds/docs/models/shared/bankfeedaccountmappingresponse.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/bankfeedmapping.md b/bank-feeds/docs/models/shared/bankfeedmapping.md old mode 100755 new mode 100644 index 44de70cf0..2fc390bcd --- a/bank-feeds/docs/models/shared/bankfeedmapping.md +++ b/bank-feeds/docs/models/shared/bankfeedmapping.md @@ -16,4 +16,4 @@ A bank feed connection between a source account and a target account, including | `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_options` | List[[TargetAccountOption](../../models/shared/targetaccountoption.md)] | :heavy_minus_sign: | An array of potential target accounts. | | \ No newline at end of file +| `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 old mode 100755 new mode 100644 index 42d5267ce..130884118 --- a/bank-feeds/docs/models/shared/banktransactions.md +++ b/bank-feeds/docs/models/shared/banktransactions.md @@ -13,4 +13,4 @@ | `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[BankTransactionsBankTransactionType]](../../models/shared/banktransactionsbanktransactiontype.md) | :heavy_minus_sign: | Type of transaction for the bank statement line. | | \ No newline at end of file +| `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 diff --git a/bank-feeds/docs/models/shared/banktransactionsbanktransactiontype.md b/bank-feeds/docs/models/shared/banktransactiontype.md old mode 100755 new mode 100644 similarity index 95% rename from bank-feeds/docs/models/shared/banktransactionsbanktransactiontype.md rename to bank-feeds/docs/models/shared/banktransactiontype.md index d7afc4b81..db199507e --- a/bank-feeds/docs/models/shared/banktransactionsbanktransactiontype.md +++ b/bank-feeds/docs/models/shared/banktransactiontype.md @@ -1,4 +1,4 @@ -# BankTransactionsBankTransactionType +# BankTransactionType Type of transaction for the bank statement line. diff --git a/bank-feeds/docs/models/shared/clientratelimitreachedwebhook.md b/bank-feeds/docs/models/shared/clientratelimitreachedwebhook.md old mode 100755 new mode 100644 index 3d7030310..0e1855429 --- 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[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: | 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/clientratelimitreachedwebhookdata.md b/bank-feeds/docs/models/shared/clientratelimitreachedwebhookdata.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/clientratelimitresetwebhook.md b/bank-feeds/docs/models/shared/clientratelimitresetwebhook.md old mode 100755 new mode 100644 index 7336566a4..de4352761 --- 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[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: | 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 old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/companies.md b/bank-feeds/docs/models/shared/companies.md old mode 100755 new mode 100644 index eeaacf9de..05e8c5131 --- 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 | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[Company](../../models/shared/company.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.Company](../../models/shared/company.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/company.md b/bank-feeds/docs/models/shared/company.md old mode 100755 new mode 100644 index 59c05e4c7..73425e49a --- a/bank-feeds/docs/models/shared/company.md +++ b/bank-feeds/docs/models/shared/company.md @@ -13,7 +13,7 @@ When you create a company, you can specify a `name` and we will automatically ge | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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-23T00:00:00.000Z | | `created_by_user_name` | *Optional[str]* | :heavy_minus_sign: | Name of user that created the company in Codat. | | -| `data_connections` | List[[Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | | +| `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. | | `id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `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-23T00:00:00.000Z | diff --git a/bank-feeds/docs/models/shared/companyrequestbody.md b/bank-feeds/docs/models/shared/companyrequestbody.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/connection.md b/bank-feeds/docs/models/shared/connection.md old mode 100755 new mode 100644 index c4be356fb..d64d309b7 --- a/bank-feeds/docs/models/shared/connection.md +++ b/bank-feeds/docs/models/shared/connection.md @@ -19,7 +19,7 @@ Before you can use a data connection to pull or push data, the company must gran | `additional_properties` | *Optional[Any]* | :heavy_minus_sign: | N/A | | | `connection_info` | Dict[str, *str*] | :heavy_minus_sign: | N/A | | | `created` | *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-23T00:00:00.000Z | -| `data_connection_errors` | List[[DataConnectionError](../../models/shared/dataconnectionerror.md)] | :heavy_minus_sign: | N/A | | +| `data_connection_errors` | List[[shared.DataConnectionError](../../models/shared/dataconnectionerror.md)] | :heavy_minus_sign: | N/A | | | `id` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `integration_id` | *str* | :heavy_check_mark: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | | `integration_key` | *str* | :heavy_check_mark: | 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. | | @@ -27,5 +27,5 @@ Before you can use a data connection to pull or push data, the company must gran | `link_url` | *str* | :heavy_check_mark: | The link URL your customers can use to authorize access to their business application. | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start | | `platform_name` | *str* | :heavy_check_mark: | Name of integration connected to company. | | | `source_id` | *str* | :heavy_check_mark: | 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`. | 35b92968-9851-4095-ad60-395c95cbcba4 | -| `source_type` | [ConnectionSourceType](../../models/shared/connectionsourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | -| `status` | [DataConnectionStatus](../../models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | \ No newline at end of file +| `source_type` | [shared.SourceType](../../models/shared/sourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | +| `status` | [shared.DataConnectionStatus](../../models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/connections.md b/bank-feeds/docs/models/shared/connections.md old mode 100755 new mode 100644 index 87ee809ab..5a69d197d --- 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 | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.Connection](../../models/shared/connection.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/createbanktransactions.md b/bank-feeds/docs/models/shared/createbanktransactions.md old mode 100755 new mode 100644 index 8a76bce55..e8f6415e4 --- a/bank-feeds/docs/models/shared/createbanktransactions.md +++ b/bank-feeds/docs/models/shared/createbanktransactions.md @@ -3,7 +3,7 @@ ## Fields -| 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[[BankTransactions](../../models/shared/banktransactions.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| 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 diff --git a/bank-feeds/docs/models/shared/createbanktransactionsresponse.md b/bank-feeds/docs/models/shared/createbanktransactionsresponse.md old mode 100755 new mode 100644 index b695a61c2..b133ed839 --- a/bank-feeds/docs/models/shared/createbanktransactionsresponse.md +++ b/bank-feeds/docs/models/shared/createbanktransactionsresponse.md @@ -5,17 +5,17 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | List[[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. | | +| `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. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `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-23T00:00:00.000Z | -| `data` | [Optional[CreateBankTransactions]](../../models/shared/createbanktransactions.md) | :heavy_minus_sign: | N/A | | +| `data` | [Optional[shared.CreateBankTransactions]](../../models/shared/createbanktransactions.md) | :heavy_minus_sign: | N/A | | | `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `data_type` | [Optional[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 | | `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | | | `push_operation_key` | *str* | :heavy_check_mark: | 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* | :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-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `status` | [shared.PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | Push status code. | | | `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. | | -| `validation` | [Optional[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 +| `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 old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/dataconnectionstatus.md b/bank-feeds/docs/models/shared/dataconnectionstatus.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/datatype.md b/bank-feeds/docs/models/shared/datatype.md old mode 100755 new mode 100644 index 0e358dc70..7a5f16172 --- a/bank-feeds/docs/models/shared/datatype.md +++ b/bank-feeds/docs/models/shared/datatype.md @@ -22,6 +22,7 @@ Available Data types | `DIRECT_COSTS` | directCosts | | `DIRECT_INCOMES` | directIncomes | | `INVOICES` | invoices | +| `ITEM_RECEIPTS` | itemReceipts | | `ITEMS` | items | | `JOURNAL_ENTRIES` | journalEntries | | `JOURNALS` | journals | diff --git a/bank-feeds/docs/models/shared/halref.md b/bank-feeds/docs/models/shared/halref.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/links.md b/bank-feeds/docs/models/shared/links.md old mode 100755 new mode 100644 index 7aad1ea5d..5f80d2652 --- a/bank-feeds/docs/models/shared/links.md +++ b/bank-feeds/docs/models/shared/links.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `current` | [HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | -| `next` | [Optional[HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | -| `previous` | [Optional[HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | -| `self_` | [HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `current` | [shared.HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | +| `next` | [Optional[shared.HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | +| `previous` | [Optional[shared.HalRef]](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | +| `self_` | [shared.HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/pushchangetype.md b/bank-feeds/docs/models/shared/pushchangetype.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/pushoperation.md b/bank-feeds/docs/models/shared/pushoperation.md old mode 100755 new mode 100644 index 4e0594ecc..4283714b2 --- a/bank-feeds/docs/models/shared/pushoperation.md +++ b/bank-feeds/docs/models/shared/pushoperation.md @@ -5,16 +5,16 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | List[[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. | | +| `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. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `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-23T00:00:00.000Z | | `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `data_type` | [Optional[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 | | `error_message` | *Optional[str]* | :heavy_minus_sign: | A message about the error. | | | `push_operation_key` | *str* | :heavy_check_mark: | 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* | :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-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `status` | [shared.PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | Push status code. | | | `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. | | -| `validation` | [Optional[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 +| `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 old mode 100755 new mode 100644 index cf6e86896..3238ecf64 --- a/bank-feeds/docs/models/shared/pushoperationchange.md +++ b/bank-feeds/docs/models/shared/pushoperationchange.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `attachment_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the attachment created otherwise null. | -| `record_ref` | [Optional[PushOperationRef]](../../models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A | -| `type` | [Optional[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 +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `attachment_id` | *Optional[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 old mode 100755 new mode 100644 index df895faa0..44929acb0 --- a/bank-feeds/docs/models/shared/pushoperationref.md +++ b/bank-feeds/docs/models/shared/pushoperationref.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `data_type` | [Optional[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 +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `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 old mode 100755 new mode 100644 index 1f224ca9b..be6e80331 --- 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 | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | Current page number. | -| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | List[[PushOperation](../../models/shared/pushoperation.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `links` | [shared.Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | Current page number. | +| `page_size` | *int* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | List[[shared.PushOperation](../../models/shared/pushoperation.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/pushoperationstatus.md b/bank-feeds/docs/models/shared/pushoperationstatus.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/security.md b/bank-feeds/docs/models/shared/security.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/sourceaccount.md b/bank-feeds/docs/models/shared/sourceaccount.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/connectionsourcetype.md b/bank-feeds/docs/models/shared/sourcetype.md old mode 100755 new mode 100644 similarity index 92% rename from bank-feeds/docs/models/shared/connectionsourcetype.md rename to bank-feeds/docs/models/shared/sourcetype.md index 85e691690..e32b27ce4 --- a/bank-feeds/docs/models/shared/connectionsourcetype.md +++ b/bank-feeds/docs/models/shared/sourcetype.md @@ -1,4 +1,4 @@ -# ConnectionSourceType +# SourceType The type of platform of the connection. diff --git a/bank-feeds/docs/models/shared/targetaccountoption.md b/bank-feeds/docs/models/shared/targetaccountoption.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/shared/validation.md b/bank-feeds/docs/models/shared/validation.md old mode 100755 new mode 100644 index 294281b51..4cfc544dc --- a/bank-feeds/docs/models/shared/validation.md +++ b/bank-feeds/docs/models/shared/validation.md @@ -5,7 +5,7 @@ A human-readable object describing validation decisions Codat has made when push ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `errors` | List[[ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A | -| `warnings` | List[[ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `errors` | List[[shared.ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A | +| `warnings` | List[[shared.ValidationItem](../../models/shared/validationitem.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/validationitem.md b/bank-feeds/docs/models/shared/validationitem.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/operations/createbankaccountmappingbankfeedaccountmapping.md b/bank-feeds/docs/models/shared/zero.md old mode 100755 new mode 100644 similarity index 99% rename from bank-feeds/docs/models/operations/createbankaccountmappingbankfeedaccountmapping.md rename to bank-feeds/docs/models/shared/zero.md index 494d3978b..4f36d1526 --- a/bank-feeds/docs/models/operations/createbankaccountmappingbankfeedaccountmapping.md +++ b/bank-feeds/docs/models/shared/zero.md @@ -1,4 +1,4 @@ -# CreateBankAccountMappingBankFeedAccountMapping +# Zero A bank feed connection between a source account and a target account. diff --git a/bank-feeds/docs/models/utils/retryconfig.md b/bank-feeds/docs/models/utils/retryconfig.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md b/bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md old mode 100755 new mode 100644 index 690170c94..4408f824d --- a/bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md +++ b/bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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 old mode 100755 new mode 100644 index 9fdae0007..14a24dc94 --- a/bank-feeds/docs/models/webhooks/clientratelimitresetresponse.md +++ b/bank-feeds/docs/models/webhooks/clientratelimitresetresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `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_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `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 old mode 100755 new mode 100644 index 66836b24f..9a75a2440 --- a/bank-feeds/docs/sdks/accountmapping/README.md +++ b/bank-feeds/docs/sdks/accountmapping/README.md @@ -33,7 +33,7 @@ s = codatbankfeeds.CodatBankFeeds( ) req = operations.CreateBankAccountMappingRequest( - request_body=operations.CreateBankAccountMappingBankFeedAccountMapping( + zero=shared.Zero( feed_start_date='2022-10-23T00:00:00.000Z', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', @@ -58,7 +58,12 @@ if res.bank_feed_account_mapping_response is not None: ### Response **[operations.CreateBankAccountMappingResponse](../../models/operations/createbankaccountmappingresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get @@ -103,4 +108,9 @@ if res.bank_feed_mapping is not None: ### Response **[operations.GetBankAccountMappingResponse](../../models/operations/getbankaccountmappingresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/docs/sdks/codatbankfeeds/README.md b/bank-feeds/docs/sdks/codatbankfeeds/README.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/sdks/companies/README.md b/bank-feeds/docs/sdks/companies/README.md old mode 100755 new mode 100644 index 34faa119e..ba407178e --- a/bank-feeds/docs/sdks/companies/README.md +++ b/bank-feeds/docs/sdks/companies/README.md @@ -56,7 +56,12 @@ if res.company is not None: ### Response **[operations.CreateCompanyResponse](../../models/operations/createcompanyresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## delete @@ -97,7 +102,12 @@ if res.status_code == 200: ### 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 | 400-600 | */* | ## get @@ -137,7 +147,12 @@ if res.company is not None: ### Response **[operations.GetCompanyResponse](../../models/operations/getcompanyresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -179,7 +194,12 @@ if res.companies is not None: ### Response **[operations.ListCompaniesResponse](../../models/operations/listcompaniesresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## update @@ -223,4 +243,9 @@ if res.company is not None: ### Response **[operations.UpdateCompanyResponse](../../models/operations/updatecompanyresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/docs/sdks/connections/README.md b/bank-feeds/docs/sdks/connections/README.md old mode 100755 new mode 100644 index 85e6160a0..295e85d77 --- a/bank-feeds/docs/sdks/connections/README.md +++ b/bank-feeds/docs/sdks/connections/README.md @@ -56,7 +56,12 @@ if res.connection is not None: ### Response **[operations.CreateConnectionResponse](../../models/operations/createconnectionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## delete @@ -98,7 +103,12 @@ if res.status_code == 200: ### 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 | 400-600 | */* | ## get @@ -139,7 +149,12 @@ if res.connection is not None: ### Response **[operations.GetConnectionResponse](../../models/operations/getconnectionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -182,7 +197,12 @@ if res.connections is not None: ### Response **[operations.ListConnectionsResponse](../../models/operations/listconnectionsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## unlink @@ -224,4 +244,9 @@ if res.connection is not None: ### Response **[operations.UnlinkConnectionResponse](../../models/operations/unlinkconnectionresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/docs/sdks/sourceaccounts/README.md b/bank-feeds/docs/sdks/sourceaccounts/README.md old mode 100755 new mode 100644 index c7b3d64f0..a947e15db --- a/bank-feeds/docs/sdks/sourceaccounts/README.md +++ b/bank-feeds/docs/sdks/sourceaccounts/README.md @@ -80,7 +80,12 @@ if res.source_account is not None: ### Response **[operations.CreateSourceAccountResponse](../../models/operations/createsourceaccountresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## delete @@ -125,7 +130,12 @@ if res.status_code == 200: ### 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 | 400-600 | */* | ## delete_credentials @@ -168,7 +178,12 @@ if res.status_code == 200: ### 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 | 400-600 | */* | ## generate_credentials @@ -190,7 +205,7 @@ s = codatbankfeeds.CodatBankFeeds( ) req = operations.GenerateCredentialsRequest( - request_body='^upd|k\]Iy'.encode(), + request_body='0xeDCfFBde9E'.encode(), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', ) @@ -213,7 +228,12 @@ if res.bank_account_credentials is not None: ### Response **[operations.GenerateCredentialsResponse](../../models/operations/generatecredentialsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list @@ -257,7 +277,12 @@ if res.source_account is not None: ### Response **[operations.ListSourceAccountsResponse](../../models/operations/listsourceaccountsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## update @@ -307,4 +332,9 @@ if res.source_account is not None: ### Response **[operations.UpdateSourceAccountResponse](../../models/operations/updatesourceaccountresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/docs/sdks/transactions/README.md b/bank-feeds/docs/sdks/transactions/README.md old mode 100755 new mode 100644 index 0894c7b98..213e96c29 --- a/bank-feeds/docs/sdks/transactions/README.md +++ b/bank-feeds/docs/sdks/transactions/README.md @@ -76,7 +76,12 @@ if res.create_bank_transactions_response is not None: ### Response **[operations.CreateBankTransactionsResponse](../../models/operations/createbanktransactionsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## get_create_operation @@ -117,7 +122,12 @@ if res.push_operation is not None: ### Response **[operations.GetCreateOperationResponse](../../models/operations/getcreateoperationresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | ## list_create_operations @@ -160,4 +170,9 @@ if res.push_operations is not None: ### Response **[operations.ListCreateOperationsResponse](../../models/operations/listcreateoperationsresponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/files.gen b/bank-feeds/files.gen index 553c8e8e6..d5bdfefa7 100755 --- a/bank-feeds/files.gen +++ b/bank-feeds/files.gen @@ -1,20 +1,18 @@ src/codatbankfeeds/sdkconfiguration.py -src/codatbankfeeds/account_mapping.py src/codatbankfeeds/companies.py src/codatbankfeeds/connections.py +src/codatbankfeeds/account_mapping.py src/codatbankfeeds/source_accounts.py src/codatbankfeeds/transactions.py src/codatbankfeeds/sdk.py pylintrc setup.py src/codatbankfeeds/__init__.py -src/codatbankfeeds/models/__init__.py -src/codatbankfeeds/models/errors/sdkerror.py src/codatbankfeeds/utils/__init__.py src/codatbankfeeds/utils/retries.py src/codatbankfeeds/utils/utils.py -src/codatbankfeeds/models/operations/create_bank_account_mapping.py -src/codatbankfeeds/models/operations/get_bank_account_mapping.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 @@ -25,6 +23,8 @@ 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 @@ -34,11 +34,7 @@ src/codatbankfeeds/models/operations/update_source_account.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/__init__.py -src/codatbankfeeds/models/shared/errormessage.py -src/codatbankfeeds/models/shared/bankfeedaccountmappingresponse.py -src/codatbankfeeds/models/shared/bankfeedmapping.py -src/codatbankfeeds/models/shared/targetaccountoption.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 @@ -48,6 +44,9 @@ 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/createbanktransactionsresponse.py @@ -67,17 +66,15 @@ 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/shared/__init__.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/webhooks/__init__.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 USAGE.md -docs/models/operations/createbankaccountmappingbankfeedaccountmapping.md -docs/models/operations/createbankaccountmappingrequest.md -docs/models/operations/createbankaccountmappingresponse.md -docs/models/operations/getbankaccountmappingrequest.md -docs/models/operations/getbankaccountmappingresponse.md docs/models/operations/createcompanyresponse.md docs/models/operations/deletecompanyrequest.md docs/models/operations/deletecompanyresponse.md @@ -99,6 +96,10 @@ docs/models/operations/listconnectionsresponse.md docs/models/operations/unlinkconnectionupdateconnection.md docs/models/operations/unlinkconnectionrequest.md docs/models/operations/unlinkconnectionresponse.md +docs/models/operations/createbankaccountmappingrequest.md +docs/models/operations/createbankaccountmappingresponse.md +docs/models/operations/getbankaccountmappingrequest.md +docs/models/operations/getbankaccountmappingresponse.md docs/models/operations/createsourceaccountrequest.md docs/models/operations/createsourceaccountresponse.md docs/models/operations/deletesourceaccountrequest.md @@ -117,12 +118,9 @@ docs/models/operations/getcreateoperationrequest.md docs/models/operations/getcreateoperationresponse.md docs/models/operations/listcreateoperationsrequest.md docs/models/operations/listcreateoperationsresponse.md -docs/models/shared/errormessage.md -docs/models/shared/bankfeedaccountmappingresponse.md -docs/models/shared/bankfeedmapping.md -docs/models/shared/targetaccountoption.md +docs/models/shared/zero.md docs/models/shared/company.md -docs/models/shared/connectionsourcetype.md +docs/models/shared/sourcetype.md docs/models/shared/connection.md docs/models/shared/dataconnectionstatus.md docs/models/shared/dataconnectionerror.md @@ -131,6 +129,9 @@ docs/models/shared/companies.md docs/models/shared/links.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/createbanktransactionsresponse.md @@ -139,7 +140,7 @@ docs/models/shared/validationitem.md docs/models/shared/pushoperationstatus.md docs/models/shared/datatype.md docs/models/shared/createbanktransactions.md -docs/models/shared/banktransactionsbanktransactiontype.md +docs/models/shared/banktransactiontype.md docs/models/shared/banktransactions.md docs/models/shared/pushoperationchange.md docs/models/shared/pushchangetype.md @@ -151,13 +152,14 @@ 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/utils/retryconfig.md -docs/sdks/accountmapping/README.md docs/sdks/companies/README.md docs/sdks/connections/README.md +docs/sdks/accountmapping/README.md docs/sdks/sourceaccounts/README.md docs/sdks/transactions/README.md .gitattributes \ No newline at end of file diff --git a/bank-feeds/gen.yaml b/bank-feeds/gen.yaml index 0d9349bda..0c081e7b1 100644 --- a/bank-feeds/gen.yaml +++ b/bank-feeds/gen.yaml @@ -1,26 +1,43 @@ configVersion: 1.0.0 management: - docChecksum: d9b2a1016a2f9fa886f638661a6c9a2b + docChecksum: 3883df86e260290925331dc16726311d docVersion: 3.0.0 - speakeasyVersion: 1.100.2 - generationVersion: 2.159.2 + speakeasyVersion: 1.121.3 + generationVersion: 2.195.2 generation: + comments: {} sdkClassName: CodatBankFeeds - singleTagPerOp: false + repoURL: https://github.com/codatio/client-sdk-python.git + usageSnippets: + optionalPropertyRendering: withExample telemetryEnabled: true features: python: - core: 3.0.2 + core: 4.1.5 deprecations: 2.81.1 - examples: 2.81.2 - globalSecurity: 2.82.0 - globalServerURLs: 2.82.0 + examples: 2.81.3 + globalSecurity: 2.83.0 + globalServerURLs: 2.82.1 nameOverrides: 2.81.1 retries: 2.82.0 python: - version: 4.0.0 + version: 5.0.0 author: Codat + clientServerStatusCodesAsErrors: true description: Set up bank feeds from accounts in your application to supported accounting platforms. flattenGlobalSecurity: false + imports: + option: openapi + paths: + callbacks: models/callbacks + errors: models/errors + operations: models/operations + shared: models/shared + webhooks: models/webhooks + inputModelSuffix: input + installationURL: https://github.com/codatio/client-sdk-python.git#subdirectory=bank-feeds maxMethodParams: 0 + outputModelSuffix: output packageName: codat-bankfeeds + published: true + repoSubDirectory: bank-feeds diff --git a/bank-feeds/pylintrc b/bank-feeds/pylintrc old mode 100755 new mode 100644 diff --git a/bank-feeds/setup.py b/bank-feeds/setup.py old mode 100755 new mode 100644 index 8e5694093..98d79b26d --- a/bank-feeds/setup.py +++ b/bank-feeds/setup.py @@ -10,7 +10,7 @@ setuptools.setup( name="codat-bankfeeds", - version="4.0.0", + version="5.0.0", author="Codat", description="Set up bank feeds from accounts in your application to supported accounting platforms.", long_description=long_description, @@ -30,7 +30,7 @@ "six>=1.16.0", "typing-inspect>=0.9.0", "typing_extensions>=4.7.1", - "urllib3>=2.0.4", + "urllib3>=1.26.18", ], extras_require={ "dev":["pylint==2.16.2"] diff --git a/bank-feeds/src/codatbankfeeds/__init__.py b/bank-feeds/src/codatbankfeeds/__init__.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/account_mapping.py b/bank-feeds/src/codatbankfeeds/account_mapping.py old mode 100755 new mode 100644 index dfa8e305b..fe604bd19 --- a/bank-feeds/src/codatbankfeeds/account_mapping.py +++ b/bank-feeds/src/codatbankfeeds/account_mapping.py @@ -13,6 +13,7 @@ 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). @@ -27,13 +28,16 @@ def create(self, request: operations.CreateBankAccountMappingRequest, retries: O 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, "request_body", False, True, 'json') + req_content_type, data, form = utils.serialize_request_body(request, "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 - client = self.sdk_configuration.security_client + 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 @@ -52,7 +56,7 @@ def do_request(): '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: @@ -61,16 +65,20 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -86,7 +94,10 @@ def get(self, request: operations.GetBankAccountMappingRequest, retries: Optiona headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -105,7 +116,7 @@ def do_request(): '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: @@ -114,12 +125,15 @@ def do_request(): 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, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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 diff --git a/bank-feeds/src/codatbankfeeds/companies.py b/bank-feeds/src/codatbankfeeds/companies.py old mode 100755 new mode 100644 index b2d60e7ca..5c71c8510 --- a/bank-feeds/src/codatbankfeeds/companies.py +++ b/bank-feeds/src/codatbankfeeds/companies.py @@ -13,6 +13,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: self.sdk_configuration = sdk_config + def create(self, request: shared.CompanyRequestBody, retries: Optional[utils.RetryConfig] = None) -> operations.CreateCompanyResponse: r"""Create company Creates a new company that can be used to assign connections to. @@ -29,7 +30,10 @@ def create(self, request: shared.CompanyRequestBody, retries: Optional[utils.Ret headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -48,7 +52,7 @@ def do_request(): '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: @@ -57,16 +61,20 @@ def do_request(): 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, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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 Permanently deletes a company, its connections and any cached data. This operation is irreversible. If the company ID does not exist an error is returned. @@ -78,7 +86,10 @@ def delete(self, request: operations.DeleteCompanyRequest, retries: Optional[uti headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -97,21 +108,25 @@ def do_request(): '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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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 Returns the company for a valid identifier. If the identifier is for a deleted company, a not found response is returned. @@ -123,7 +138,10 @@ def get(self, request: operations.GetCompanyRequest, retries: Optional[utils.Ret headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -142,7 +160,7 @@ def do_request(): '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: @@ -151,16 +169,20 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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 Returns a list of your companies. The company schema contains a list of [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) related to the company. @@ -173,7 +195,10 @@ def list(self, request: operations.ListCompaniesRequest, retries: Optional[utils headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -192,7 +217,7 @@ def do_request(): '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: @@ -201,16 +226,20 @@ def do_request(): 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, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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 Updates both the name and description of the company. @@ -225,7 +254,10 @@ def update(self, request: operations.UpdateCompanyRequest, retries: Optional[uti headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -244,7 +276,7 @@ def do_request(): '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: @@ -253,12 +285,15 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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 diff --git a/bank-feeds/src/codatbankfeeds/connections.py b/bank-feeds/src/codatbankfeeds/connections.py old mode 100755 new mode 100644 index 7aed7dc9c..92904c1c5 --- a/bank-feeds/src/codatbankfeeds/connections.py +++ b/bank-feeds/src/codatbankfeeds/connections.py @@ -13,6 +13,7 @@ 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`. @@ -29,7 +30,10 @@ def create(self, request: operations.CreateConnectionRequest, retries: Optional[ headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -48,7 +52,7 @@ def do_request(): '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: @@ -57,16 +61,20 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -79,7 +87,10 @@ def delete(self, request: operations.DeleteConnectionRequest, retries: Optional[ headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -98,21 +109,25 @@ def do_request(): '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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -124,7 +139,10 @@ def get(self, request: operations.GetConnectionRequest, retries: Optional[utils. headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -143,7 +161,7 @@ def do_request(): '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: @@ -152,16 +170,20 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -174,7 +196,10 @@ def list(self, request: operations.ListConnectionsRequest, retries: Optional[uti headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -193,7 +218,7 @@ def do_request(): '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: @@ -202,16 +227,20 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -226,7 +255,10 @@ def unlink(self, request: operations.UnlinkConnectionRequest, retries: Optional[ headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -245,7 +277,7 @@ def do_request(): '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: @@ -254,12 +286,15 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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 diff --git a/bank-feeds/src/codatbankfeeds/models/__init__.py b/bank-feeds/src/codatbankfeeds/models/__init__.py old mode 100755 new mode 100644 index 36628d6cc..722bb9982 --- a/bank-feeds/src/codatbankfeeds/models/__init__.py +++ b/bank-feeds/src/codatbankfeeds/models/__init__.py @@ -1,3 +1,4 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" -# __init__.py + +# package diff --git a/bank-feeds/src/codatbankfeeds/models/errors/__init__.py b/bank-feeds/src/codatbankfeeds/models/errors/__init__.py old mode 100755 new mode 100644 index cfd848441..bf15fd116 --- a/bank-feeds/src/codatbankfeeds/models/errors/__init__.py +++ b/bank-feeds/src/codatbankfeeds/models/errors/__init__.py @@ -1,4 +1,6 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" -from .sdkerror import SDKError -__all__ = ["SDKError"] +from .errormessage import * +from .sdkerror import * + +__all__ = ["ErrorMessage","SDKError"] diff --git a/bank-feeds/src/codatbankfeeds/models/shared/errormessage.py b/bank-feeds/src/codatbankfeeds/models/errors/errormessage.py old mode 100755 new mode 100644 similarity index 92% rename from bank-feeds/src/codatbankfeeds/models/shared/errormessage.py rename to bank-feeds/src/codatbankfeeds/models/errors/errormessage.py index f642006b4..9c9ca8c36 --- a/bank-feeds/src/codatbankfeeds/models/shared/errormessage.py +++ b/bank-feeds/src/codatbankfeeds/models/errors/errormessage.py @@ -8,8 +8,10 @@ @dataclass_json(undefined=Undefined.EXCLUDE) + @dataclasses.dataclass -class ErrorMessage: +class ErrorMessage(Exception): + r"""Your `query` parameter was not correctly formed""" 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 }}) @@ -24,3 +26,5 @@ class ErrorMessage: r"""The HTTP status code returned by the error.""" + def __str__(self) -> str: + return utils.marshal_json(self) diff --git a/bank-feeds/src/codatbankfeeds/models/errors/sdkerror.py b/bank-feeds/src/codatbankfeeds/models/errors/sdkerror.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/operations/__init__.py b/bank-feeds/src/codatbankfeeds/models/operations/__init__.py old mode 100755 new mode 100644 index 54897f3de..588a15144 --- a/bank-feeds/src/codatbankfeeds/models/operations/__init__.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/__init__.py @@ -22,4 +22,4 @@ from .update_company import * from .update_source_account import * -__all__ = ["CreateBankAccountMappingBankFeedAccountMapping","CreateBankAccountMappingRequest","CreateBankAccountMappingResponse","CreateBankTransactionsRequest","CreateBankTransactionsResponse","CreateCompanyResponse","CreateConnectionRequest","CreateConnectionRequestBody","CreateConnectionResponse","CreateSourceAccountRequest","CreateSourceAccountResponse","DeleteBankFeedCredentialsRequest","DeleteBankFeedCredentialsResponse","DeleteCompanyRequest","DeleteCompanyResponse","DeleteConnectionRequest","DeleteConnectionResponse","DeleteSourceAccountRequest","DeleteSourceAccountResponse","GenerateCredentialsRequest","GenerateCredentialsResponse","GetBankAccountMappingRequest","GetBankAccountMappingResponse","GetCompanyRequest","GetCompanyResponse","GetConnectionRequest","GetConnectionResponse","GetCreateOperationRequest","GetCreateOperationResponse","ListCompaniesRequest","ListCompaniesResponse","ListConnectionsRequest","ListConnectionsResponse","ListCreateOperationsRequest","ListCreateOperationsResponse","ListSourceAccountsRequest","ListSourceAccountsResponse","UnlinkConnectionRequest","UnlinkConnectionResponse","UnlinkConnectionUpdateConnection","UpdateCompanyRequest","UpdateCompanyResponse","UpdateSourceAccountRequest","UpdateSourceAccountResponse"] +__all__ = ["CreateBankAccountMappingRequest","CreateBankAccountMappingResponse","CreateBankTransactionsRequest","CreateBankTransactionsResponse","CreateCompanyResponse","CreateConnectionRequest","CreateConnectionRequestBody","CreateConnectionResponse","CreateSourceAccountRequest","CreateSourceAccountResponse","DeleteBankFeedCredentialsRequest","DeleteBankFeedCredentialsResponse","DeleteCompanyRequest","DeleteCompanyResponse","DeleteConnectionRequest","DeleteConnectionResponse","DeleteSourceAccountRequest","DeleteSourceAccountResponse","GenerateCredentialsRequest","GenerateCredentialsResponse","GetBankAccountMappingRequest","GetBankAccountMappingResponse","GetCompanyRequest","GetCompanyResponse","GetConnectionRequest","GetConnectionResponse","GetCreateOperationRequest","GetCreateOperationResponse","ListCompaniesRequest","ListCompaniesResponse","ListConnectionsRequest","ListConnectionsResponse","ListCreateOperationsRequest","ListCreateOperationsResponse","ListSourceAccountsRequest","ListSourceAccountsResponse","UnlinkConnectionRequest","UnlinkConnectionResponse","UnlinkConnectionUpdateConnection","UpdateCompanyRequest","UpdateCompanyResponse","UpdateSourceAccountRequest","UpdateSourceAccountResponse"] 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 old mode 100755 new mode 100644 index 71f91e6e4..05f86cebd --- a/bank-feeds/src/codatbankfeeds/models/operations/create_bank_account_mapping.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/create_bank_account_mapping.py @@ -3,53 +3,18 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import bankfeedaccountmappingresponse as shared_bankfeedaccountmappingresponse -from ..shared import errormessage as shared_errormessage -from codatbankfeeds import utils -from dataclasses_json import Undefined, dataclass_json +from ...models.shared import bankfeedaccountmappingresponse as shared_bankfeedaccountmappingresponse +from ...models.shared import zero as shared_zero from typing import Optional -@dataclass_json(undefined=Undefined.EXCLUDE) -@dataclasses.dataclass -class CreateBankAccountMappingBankFeedAccountMapping: - r"""A bank feed connection between a source account and a target account.""" - 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=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('targetAccountId') }}) - r"""Unique ID for the target account""" - - - - @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.""" - request_body: Optional[CreateBankAccountMappingBankFeedAccountMapping] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }}) + zero: Optional[shared_zero.Zero] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }}) @@ -58,13 +23,11 @@ class CreateBankAccountMappingRequest: class CreateBankAccountMappingResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" bank_feed_account_mapping_response: Optional[shared_bankfeedaccountmappingresponse.BankFeedAccountMappingResponse] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_bank_transactions.py b/bank-feeds/src/codatbankfeeds/models/operations/create_bank_transactions.py old mode 100755 new mode 100644 index e7512d5b7..3d723be68 --- a/bank-feeds/src/codatbankfeeds/models/operations/create_bank_transactions.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/create_bank_transactions.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import createbanktransactions as shared_createbanktransactions -from ..shared import createbanktransactionsresponse as shared_createbanktransactionsresponse -from ..shared import errormessage as shared_errormessage +from ...models.shared import createbanktransactions as shared_createbanktransactions +from ...models.shared import createbanktransactionsresponse as shared_createbanktransactionsresponse from typing import Optional @@ -30,13 +29,11 @@ class CreateBankTransactionsRequest: class CreateBankTransactionsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" create_bank_transactions_response: Optional[shared_createbanktransactionsresponse.CreateBankTransactionsResponse] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_company.py b/bank-feeds/src/codatbankfeeds/models/operations/create_company.py old mode 100755 new mode 100644 index 3225796a8..6d6514892 --- a/bank-feeds/src/codatbankfeeds/models/operations/create_company.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/create_company.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import company as shared_company -from ..shared import errormessage as shared_errormessage +from ...models.shared import company as shared_company from typing import Optional @@ -12,13 +11,11 @@ class CreateCompanyResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company: Optional[shared_company.Company] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_connection.py b/bank-feeds/src/codatbankfeeds/models/operations/create_connection.py old mode 100755 new mode 100644 index a1af7208e..51344d86a --- a/bank-feeds/src/codatbankfeeds/models/operations/create_connection.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/create_connection.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import connection as shared_connection -from ..shared import errormessage as shared_errormessage +from ...models.shared import connection as shared_connection from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -32,13 +31,11 @@ class CreateConnectionRequest: class CreateConnectionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" connection: Optional[shared_connection.Connection] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/create_source_account.py b/bank-feeds/src/codatbankfeeds/models/operations/create_source_account.py old mode 100755 new mode 100644 index 480cec8f5..32e3c982d --- a/bank-feeds/src/codatbankfeeds/models/operations/create_source_account.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/create_source_account.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import sourceaccount as shared_sourceaccount +from ...models.shared import sourceaccount as shared_sourceaccount from typing import Optional @@ -23,12 +22,10 @@ class CreateSourceAccountRequest: class CreateSourceAccountResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""The request made is not valid.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - 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 old mode 100755 new mode 100644 index 43a29d71a..ee8274071 --- a/bank-feeds/src/codatbankfeeds/models/operations/delete_bank_feed_credentials.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/delete_bank_feed_credentials.py @@ -3,8 +3,6 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from typing import Optional @dataclasses.dataclass @@ -21,11 +19,9 @@ class DeleteBankFeedCredentialsRequest: class DeleteBankFeedCredentialsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - 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 old mode 100755 new mode 100644 index 0c7da43c5..cee215d50 --- a/bank-feeds/src/codatbankfeeds/models/operations/delete_company.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/delete_company.py @@ -3,8 +3,6 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from typing import Optional @dataclasses.dataclass @@ -19,11 +17,9 @@ class DeleteCompanyRequest: class DeleteCompanyResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - 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 old mode 100755 new mode 100644 index 568a81d83..f6c98ce2b --- a/bank-feeds/src/codatbankfeeds/models/operations/delete_connection.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/delete_connection.py @@ -3,8 +3,6 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from typing import Optional @dataclasses.dataclass @@ -21,11 +19,9 @@ class DeleteConnectionRequest: class DeleteConnectionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - 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 old mode 100755 new mode 100644 index 723b51fc2..bdec893fe --- a/bank-feeds/src/codatbankfeeds/models/operations/delete_source_account.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/delete_source_account.py @@ -3,8 +3,6 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from typing import Optional @dataclasses.dataclass @@ -23,11 +21,9 @@ class DeleteSourceAccountRequest: class DeleteSourceAccountResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - 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 old mode 100755 new mode 100644 index 9c31c99c5..4a863be60 --- a/bank-feeds/src/codatbankfeeds/models/operations/generate_credentials.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/generate_credentials.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import bankaccountcredentials as shared_bankaccountcredentials -from ..shared import errormessage as shared_errormessage +from ...models.shared import bankaccountcredentials as shared_bankaccountcredentials from typing import Optional @@ -23,13 +22,11 @@ class GenerateCredentialsRequest: class GenerateCredentialsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" bank_account_credentials: Optional[shared_bankaccountcredentials.BankAccountCredentials] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" 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 old mode 100755 new mode 100644 index 1ca7ebede..98687905e --- a/bank-feeds/src/codatbankfeeds/models/operations/get_bank_account_mapping.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/get_bank_account_mapping.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import bankfeedmapping as shared_bankfeedmapping -from ..shared import errormessage as shared_errormessage +from ...models.shared import bankfeedmapping as shared_bankfeedmapping from typing import Optional @@ -22,13 +21,11 @@ class GetBankAccountMappingRequest: class GetBankAccountMappingResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" bank_feed_mapping: Optional[shared_bankfeedmapping.BankFeedMapping] = dataclasses.field(default=None) r"""Success""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/get_company.py b/bank-feeds/src/codatbankfeeds/models/operations/get_company.py old mode 100755 new mode 100644 index 9660394e9..2938755e5 --- a/bank-feeds/src/codatbankfeeds/models/operations/get_company.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/get_company.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import company as shared_company -from ..shared import errormessage as shared_errormessage +from ...models.shared import company as shared_company from typing import Optional @@ -20,13 +19,11 @@ class GetCompanyRequest: class GetCompanyResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company: Optional[shared_company.Company] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/get_connection.py b/bank-feeds/src/codatbankfeeds/models/operations/get_connection.py old mode 100755 new mode 100644 index c21ca84ed..80642dd26 --- a/bank-feeds/src/codatbankfeeds/models/operations/get_connection.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/get_connection.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import connection as shared_connection -from ..shared import errormessage as shared_errormessage +from ...models.shared import connection as shared_connection from typing import Optional @@ -22,13 +21,11 @@ class GetConnectionRequest: class GetConnectionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" connection: Optional[shared_connection.Connection] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/get_create_operation.py b/bank-feeds/src/codatbankfeeds/models/operations/get_create_operation.py old mode 100755 new mode 100644 index 8f6d546bd..f3b99e5b2 --- a/bank-feeds/src/codatbankfeeds/models/operations/get_create_operation.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/get_create_operation.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import pushoperation as shared_pushoperation +from ...models.shared import pushoperation as shared_pushoperation from typing import Optional @@ -22,13 +21,11 @@ class GetCreateOperationRequest: class GetCreateOperationResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" push_operation: Optional[shared_pushoperation.PushOperation] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/list_companies.py b/bank-feeds/src/codatbankfeeds/models/operations/list_companies.py old mode 100755 new mode 100644 index 601c3326c..72bcc118a --- a/bank-feeds/src/codatbankfeeds/models/operations/list_companies.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/list_companies.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import companies as shared_companies -from ..shared import errormessage as shared_errormessage +from ...models.shared import companies as shared_companies from typing import Optional @@ -26,13 +25,11 @@ class ListCompaniesRequest: class ListCompaniesResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" companies: Optional[shared_companies.Companies] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/list_connections.py b/bank-feeds/src/codatbankfeeds/models/operations/list_connections.py old mode 100755 new mode 100644 index 8c85c3ad3..24f4c54f5 --- a/bank-feeds/src/codatbankfeeds/models/operations/list_connections.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/list_connections.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import connections as shared_connections -from ..shared import errormessage as shared_errormessage +from ...models.shared import connections as shared_connections from typing import Optional @@ -28,13 +27,11 @@ class ListConnectionsRequest: class ListConnectionsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" connections: Optional[shared_connections.Connections] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/list_create_operations.py b/bank-feeds/src/codatbankfeeds/models/operations/list_create_operations.py old mode 100755 new mode 100644 index 9aa9632cc..8aa0e0eb8 --- a/bank-feeds/src/codatbankfeeds/models/operations/list_create_operations.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/list_create_operations.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import pushoperations as shared_pushoperations +from ...models.shared import pushoperations as shared_pushoperations from typing import Optional @@ -28,13 +27,11 @@ class ListCreateOperationsRequest: class ListCreateOperationsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" push_operations: Optional[shared_pushoperations.PushOperations] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/list_source_accounts.py b/bank-feeds/src/codatbankfeeds/models/operations/list_source_accounts.py old mode 100755 new mode 100644 index 9e2486c1a..278933f15 --- a/bank-feeds/src/codatbankfeeds/models/operations/list_source_accounts.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/list_source_accounts.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import sourceaccount as shared_sourceaccount +from ...models.shared import sourceaccount as shared_sourceaccount from typing import Optional @@ -22,12 +21,10 @@ class ListSourceAccountsRequest: class ListSourceAccountsResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - 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/unlink_connection.py b/bank-feeds/src/codatbankfeeds/models/operations/unlink_connection.py old mode 100755 new mode 100644 index 1fe8e0c6c..25b3c0cc3 --- a/bank-feeds/src/codatbankfeeds/models/operations/unlink_connection.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/unlink_connection.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import connection as shared_connection -from ..shared import dataconnectionstatus as shared_dataconnectionstatus -from ..shared import errormessage as shared_errormessage +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 @@ -35,13 +34,11 @@ class UnlinkConnectionRequest: class UnlinkConnectionResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" connection: Optional[shared_connection.Connection] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/update_company.py b/bank-feeds/src/codatbankfeeds/models/operations/update_company.py old mode 100755 new mode 100644 index 6f159a98a..3df4f661f --- a/bank-feeds/src/codatbankfeeds/models/operations/update_company.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/update_company.py @@ -3,9 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import company as shared_company -from ..shared import companyrequestbody as shared_companyrequestbody -from ..shared import errormessage as shared_errormessage +from ...models.shared import company as shared_company +from ...models.shared import companyrequestbody as shared_companyrequestbody from typing import Optional @@ -22,13 +21,11 @@ class UpdateCompanyRequest: class UpdateCompanyResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" company: Optional[shared_company.Company] = dataclasses.field(default=None) r"""OK""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - r"""Raw HTTP response; suitable for custom response parsing""" diff --git a/bank-feeds/src/codatbankfeeds/models/operations/update_source_account.py b/bank-feeds/src/codatbankfeeds/models/operations/update_source_account.py old mode 100755 new mode 100644 index ea8dd4888..e48cc16ad --- a/bank-feeds/src/codatbankfeeds/models/operations/update_source_account.py +++ b/bank-feeds/src/codatbankfeeds/models/operations/update_source_account.py @@ -3,8 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import errormessage as shared_errormessage -from ..shared import sourceaccount as shared_sourceaccount +from ...models.shared import sourceaccount as shared_sourceaccount from typing import Optional @@ -25,12 +24,10 @@ class UpdateSourceAccountRequest: class UpdateSourceAccountResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - 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 old mode 100755 new mode 100644 index 247d7ba94..e8311a885 --- a/bank-feeds/src/codatbankfeeds/models/shared/__init__.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/__init__.py @@ -18,7 +18,6 @@ from .dataconnectionerror import * from .dataconnectionstatus import * from .datatype import * -from .errormessage import * from .halref import * from .links import * from .pushchangetype import * @@ -32,5 +31,6 @@ from .targetaccountoption import * from .validation import * from .validationitem import * +from .zero import * -__all__ = ["BankAccountCredentials","BankFeedAccountMappingResponse","BankFeedMapping","BankTransactions","BankTransactionsBankTransactionType","ClientRateLimitReachedWebhook","ClientRateLimitReachedWebhookData","ClientRateLimitResetWebhook","ClientRateLimitResetWebhookData","Companies","Company","CompanyRequestBody","Connection","ConnectionSourceType","Connections","CreateBankTransactions","CreateBankTransactionsResponse","DataConnectionError","DataConnectionStatus","DataType","ErrorMessage","HalRef","Links","PushChangeType","PushOperation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperations","Security","SourceAccount","TargetAccountOption","Validation","ValidationItem"] +__all__ = ["BankAccountCredentials","BankFeedAccountMappingResponse","BankFeedMapping","BankTransactionType","BankTransactions","ClientRateLimitReachedWebhook","ClientRateLimitReachedWebhookData","ClientRateLimitResetWebhook","ClientRateLimitResetWebhookData","Companies","Company","CompanyRequestBody","Connection","Connections","CreateBankTransactions","CreateBankTransactionsResponse","DataConnectionError","DataConnectionStatus","DataType","HalRef","Links","PushChangeType","PushOperation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperations","Security","SourceAccount","SourceType","TargetAccountOption","Validation","ValidationItem","Zero"] diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankaccountcredentials.py b/bank-feeds/src/codatbankfeeds/models/shared/bankaccountcredentials.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankfeedaccountmappingresponse.py b/bank-feeds/src/codatbankfeeds/models/shared/bankfeedaccountmappingresponse.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/bankfeedmapping.py b/bank-feeds/src/codatbankfeeds/models/shared/bankfeedmapping.py old mode 100755 new mode 100644 index d54c6ee45..f565b446a --- a/bank-feeds/src/codatbankfeeds/models/shared/bankfeedmapping.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/bankfeedmapping.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import targetaccountoption as shared_targetaccountoption +from .targetaccountoption import TargetAccountOption from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -56,7 +56,7 @@ class BankFeedMapping: 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[shared_targetaccountoption.TargetAccountOption]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('targetAccountOptions') }}) + target_account_options: Optional[List[TargetAccountOption]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('targetAccountOptions') }}) 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 old mode 100755 new mode 100644 index 47afc4522..e1f6f2d27 --- a/bank-feeds/src/codatbankfeeds/models/shared/banktransactions.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/banktransactions.py @@ -8,7 +8,7 @@ from enum import Enum from typing import Optional -class BankTransactionsBankTransactionType(str, Enum): +class BankTransactionType(str, Enum): r"""Type of transaction for the bank statement line.""" UNKNOWN = 'Unknown' CREDIT = 'Credit' @@ -68,7 +68,7 @@ class BankTransactions: 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=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference') }}) r"""An optional reference to the bank transaction.""" - transaction_type: Optional[BankTransactionsBankTransactionType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transactionType'), 'exclude': lambda f: f is None }}) + 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 old mode 100755 new mode 100644 index 519d7fd49..2b8e8ead0 --- a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhook.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhook.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import clientratelimitreachedwebhookdata as shared_clientratelimitreachedwebhookdata +from .clientratelimitreachedwebhookdata import ClientRateLimitReachedWebhookData from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -18,7 +18,7 @@ class ClientRateLimitReachedWebhook: 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[shared_clientratelimitreachedwebhookdata.ClientRateLimitReachedWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) + 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 }}) diff --git a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhookdata.py b/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitreachedwebhookdata.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhook.py b/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhook.py old mode 100755 new mode 100644 index d307c3008..aa8d8ab77 --- a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhook.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhook.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import clientratelimitresetwebhookdata as shared_clientratelimitresetwebhookdata +from .clientratelimitresetwebhookdata import ClientRateLimitResetWebhookData from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -18,7 +18,7 @@ class ClientRateLimitResetWebhook: 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[shared_clientratelimitresetwebhookdata.ClientRateLimitResetWebhookData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('Data'), 'exclude': lambda f: f is None }}) + 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 }}) diff --git a/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhookdata.py b/bank-feeds/src/codatbankfeeds/models/shared/clientratelimitresetwebhookdata.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/companies.py b/bank-feeds/src/codatbankfeeds/models/shared/companies.py old mode 100755 new mode 100644 index f6ae3e83f..4cb76bc61 --- a/bank-feeds/src/codatbankfeeds/models/shared/companies.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/companies.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import company as shared_company -from ..shared import links as shared_links +from .company import Company +from .links import Links from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Companies: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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[shared_company.Company]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + 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 old mode 100755 new mode 100644 index a11ebe98d..7901af5dd --- a/bank-feeds/src/codatbankfeeds/models/shared/company.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/company.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import connection as shared_connection +from .connection import Connection from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -46,7 +46,7 @@ class Company: """ 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[shared_connection.Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnections'), 'exclude': lambda f: f is None }}) + 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.""" last_sync: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastSync'), 'exclude': lambda f: f is None }}) diff --git a/bank-feeds/src/codatbankfeeds/models/shared/companyrequestbody.py b/bank-feeds/src/codatbankfeeds/models/shared/companyrequestbody.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/connection.py b/bank-feeds/src/codatbankfeeds/models/shared/connection.py old mode 100755 new mode 100644 index fc4fad231..55327060f --- a/bank-feeds/src/codatbankfeeds/models/shared/connection.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/connection.py @@ -2,14 +2,14 @@ from __future__ import annotations import dataclasses -from ..shared import dataconnectionerror as shared_dataconnectionerror -from ..shared import dataconnectionstatus as shared_dataconnectionstatus +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 ConnectionSourceType(str, Enum): +class SourceType(str, Enum): r"""The type of platform of the connection.""" ACCOUNTING = 'Accounting' BANKING = 'Banking' @@ -65,13 +65,13 @@ class Connection: 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: ConnectionSourceType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceType') }}) + source_type: SourceType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceType') }}) r"""The type of platform of the connection.""" - status: shared_dataconnectionstatus.DataConnectionStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + 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[shared_dataconnectionerror.DataConnectionError]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionErrors'), '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: diff --git a/bank-feeds/src/codatbankfeeds/models/shared/connections.py b/bank-feeds/src/codatbankfeeds/models/shared/connections.py old mode 100755 new mode 100644 index 96b9a95ac..e4b16c223 --- a/bank-feeds/src/codatbankfeeds/models/shared/connections.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/connections.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import connection as shared_connection -from ..shared import links as shared_links +from .connection import Connection +from .links import Links from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Connections: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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[shared_connection.Connection]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + 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 old mode 100755 new mode 100644 index d88a6c982..70d410ee5 --- a/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactions.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactions.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import banktransactions as shared_banktransactions +from .banktransactions import BankTransactions from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -13,6 +13,6 @@ 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[shared_banktransactions.BankTransactions]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transactions'), 'exclude': lambda f: f is None }}) + 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 old mode 100755 new mode 100644 index 3bfdd3fd8..0bfd06384 --- a/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactionsresponse.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/createbanktransactionsresponse.py @@ -2,11 +2,11 @@ from __future__ import annotations import dataclasses -from ..shared import createbanktransactions as shared_createbanktransactions -from ..shared import datatype as shared_datatype -from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus as shared_pushoperationstatus -from ..shared import validation as shared_validation +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 @@ -42,11 +42,11 @@ class CreateBankTransactionsResponse: > 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: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + 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[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) + changes: Optional[List[PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) 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: @@ -69,8 +69,8 @@ class CreateBankTransactionsResponse: > 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[shared_createbanktransactions.CreateBankTransactions] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) - data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) + 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=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage') }}) r"""A message about the error.""" @@ -81,7 +81,7 @@ class CreateBankTransactionsResponse: Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ - validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) + 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 old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/dataconnectionstatus.py b/bank-feeds/src/codatbankfeeds/models/shared/dataconnectionstatus.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/datatype.py b/bank-feeds/src/codatbankfeeds/models/shared/datatype.py old mode 100755 new mode 100644 index ea726125d..df149bcf0 --- a/bank-feeds/src/codatbankfeeds/models/shared/datatype.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/datatype.py @@ -20,6 +20,7 @@ class DataType(str, Enum): DIRECT_COSTS = 'directCosts' DIRECT_INCOMES = 'directIncomes' INVOICES = 'invoices' + ITEM_RECEIPTS = 'itemReceipts' ITEMS = 'items' JOURNAL_ENTRIES = 'journalEntries' JOURNALS = 'journals' diff --git a/bank-feeds/src/codatbankfeeds/models/shared/halref.py b/bank-feeds/src/codatbankfeeds/models/shared/halref.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/links.py b/bank-feeds/src/codatbankfeeds/models/shared/links.py old mode 100755 new mode 100644 index 3d9f80ac3..f18176ef6 --- a/bank-feeds/src/codatbankfeeds/models/shared/links.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/links.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import halref as shared_halref +from .halref import HalRef from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -11,9 +11,9 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Links: - current: shared_halref.HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('current') }}) - self_: shared_halref.HalRef = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('self') }}) - next: Optional[shared_halref.HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('next'), 'exclude': lambda f: f is None }}) - previous: Optional[shared_halref.HalRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('previous'), 'exclude': lambda f: f is None }}) + 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 old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/pushoperation.py b/bank-feeds/src/codatbankfeeds/models/shared/pushoperation.py old mode 100755 new mode 100644 index 37715ffd9..a7170cce1 --- a/bank-feeds/src/codatbankfeeds/models/shared/pushoperation.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/pushoperation.py @@ -2,10 +2,10 @@ from __future__ import annotations import dataclasses -from ..shared import datatype as shared_datatype -from ..shared import pushoperationchange as shared_pushoperationchange -from ..shared import pushoperationstatus as shared_pushoperationstatus -from ..shared import validation as shared_validation +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 @@ -41,11 +41,11 @@ class PushOperation: > 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: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) + 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[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) + changes: Optional[List[PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes') }}) 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: @@ -68,7 +68,7 @@ class PushOperation: > 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[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), '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=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage') }}) r"""A message about the error.""" @@ -79,7 +79,7 @@ class PushOperation: Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ - validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) + 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 old mode 100755 new mode 100644 index 3d1362c7d..2152c8f65 --- a/bank-feeds/src/codatbankfeeds/models/shared/pushoperationchange.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/pushoperationchange.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import pushchangetype as shared_pushchangetype -from ..shared import pushoperationref as shared_pushoperationref +from .pushchangetype import PushChangeType +from .pushoperationref import PushOperationRef from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -14,8 +14,8 @@ class PushOperationChange: attachment_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('attachmentId') }}) r"""Unique identifier for the attachment created otherwise null.""" - record_ref: Optional[shared_pushoperationref.PushOperationRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }}) - type: Optional[shared_pushchangetype.PushChangeType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + 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 old mode 100755 new mode 100644 index 270e3891e..8b34cafc5 --- a/bank-feeds/src/codatbankfeeds/models/shared/pushoperationref.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/pushoperationref.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import datatype as shared_datatype +from .datatype import DataType from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -11,7 +11,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class PushOperationRef: - data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), '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""" 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 old mode 100755 new mode 100644 index 1ed8490d1..9188a63c8 --- a/bank-feeds/src/codatbankfeeds/models/shared/pushoperations.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/pushoperations.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses -from ..shared import links as shared_links -from ..shared import pushoperation as shared_pushoperation +from .links import Links +from .pushoperation import PushOperation from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,13 +12,13 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class PushOperations: - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + 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[shared_pushoperation.PushOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + 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 old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/security.py b/bank-feeds/src/codatbankfeeds/models/shared/security.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/sourceaccount.py b/bank-feeds/src/codatbankfeeds/models/shared/sourceaccount.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/targetaccountoption.py b/bank-feeds/src/codatbankfeeds/models/shared/targetaccountoption.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/validation.py b/bank-feeds/src/codatbankfeeds/models/shared/validation.py old mode 100755 new mode 100644 index 428e83137..506c0bab9 --- a/bank-feeds/src/codatbankfeeds/models/shared/validation.py +++ b/bank-feeds/src/codatbankfeeds/models/shared/validation.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import validationitem as shared_validationitem +from .validationitem import ValidationItem from codatbankfeeds import utils from dataclasses_json import Undefined, dataclass_json from typing import List, Optional @@ -12,7 +12,7 @@ @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.""" - errors: Optional[List[shared_validationitem.ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors') }}) - warnings: Optional[List[shared_validationitem.ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings') }}) + errors: Optional[List[ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errors') }}) + warnings: Optional[List[ValidationItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('warnings') }}) diff --git a/bank-feeds/src/codatbankfeeds/models/shared/validationitem.py b/bank-feeds/src/codatbankfeeds/models/shared/validationitem.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/models/shared/zero.py b/bank-feeds/src/codatbankfeeds/models/shared/zero.py new file mode 100644 index 000000000..92b603226 --- /dev/null +++ b/bank-feeds/src/codatbankfeeds/models/shared/zero.py @@ -0,0 +1,40 @@ +"""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.""" + 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=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('targetAccountId') }}) + 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 20c411599..2e236f1a6 --- a/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reached.py +++ b/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reached.py @@ -3,16 +3,15 @@ from __future__ import annotations import dataclasses import requests as requests_http -from typing import Optional @dataclasses.dataclass class ClientRateLimitReachedResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - 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 old mode 100755 new mode 100644 index 7e4b65419..27dbf5cb4 --- a/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reset.py +++ b/bank-feeds/src/codatbankfeeds/models/webhooks/client_rate_limit_reset.py @@ -3,16 +3,15 @@ from __future__ import annotations import dataclasses import requests as requests_http -from typing import Optional @dataclasses.dataclass class ClientRateLimitResetResponse: content_type: str = dataclasses.field() r"""HTTP response content type for this operation""" + raw_response: requests_http.Response = dataclasses.field() + r"""Raw HTTP response; suitable for custom response parsing""" status_code: int = dataclasses.field() r"""HTTP response status code for this operation""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - 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 old mode 100755 new mode 100644 index fe3a16918..4c4a628e3 --- a/bank-feeds/src/codatbankfeeds/sdk.py +++ b/bank-feeds/src/codatbankfeeds/sdk.py @@ -9,7 +9,7 @@ from .transactions import Transactions from codatbankfeeds import utils from codatbankfeeds.models import shared -from typing import Dict +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. @@ -30,12 +30,12 @@ class CodatBankFeeds: | 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 | """ - account_mapping: AccountMapping - r"""Bank feed bank account mapping.""" 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.""" transactions: Transactions @@ -44,7 +44,7 @@ class CodatBankFeeds: sdk_configuration: SDKConfiguration def __init__(self, - security: shared.Security = None, + security: Union[shared.Security,Callable[[], shared.Security]] = None, server_idx: int = None, server_url: str = None, url_params: Dict[str, str] = None, @@ -54,7 +54,7 @@ def __init__(self, """Instantiates the SDK configuring it with the provided parameters. :param security: The security details required for authentication - :type security: shared.Security + :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 @@ -69,22 +69,18 @@ def __init__(self, if client is None: client = requests_http.Session() - - security_client = utils.configure_security_client(client, security) - - 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_client, server_url, server_idx, retry_config=retry_config) + self.sdk_configuration = SDKConfiguration(client, security, server_url, server_idx, retry_config=retry_config) self._init_sdks() def _init_sdks(self): - self.account_mapping = AccountMapping(self.sdk_configuration) 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.transactions = Transactions(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 old mode 100755 new mode 100644 index 62b6bce96..f31b2f7ec --- a/bank-feeds/src/codatbankfeeds/sdkconfiguration.py +++ b/bank-feeds/src/codatbankfeeds/sdkconfiguration.py @@ -2,9 +2,10 @@ import requests from dataclasses import dataclass -from typing import Dict, Tuple +from typing import Dict, Tuple, Callable, Union from .utils.retries import RetryConfig from .utils import utils +from codatbankfeeds.models import shared SERVERS = [ @@ -16,14 +17,14 @@ @dataclass class SDKConfiguration: client: requests.Session - security_client: requests.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 = '4.0.0' - gen_version: str = '2.159.2' - user_agent: str = 'speakeasy-sdk/python 4.0.0 2.159.2 3.0.0 codat-bankfeeds' + sdk_version: str = '5.0.0' + gen_version: str = '2.195.2' + user_agent: str = 'speakeasy-sdk/python 5.0.0 2.195.2 3.0.0 codat-bankfeeds' retry_config: RetryConfig = None def get_server_details(self) -> Tuple[str, Dict[str, str]]: diff --git a/bank-feeds/src/codatbankfeeds/source_accounts.py b/bank-feeds/src/codatbankfeeds/source_accounts.py old mode 100755 new mode 100644 index 272dfd7ce..7d17a4cc3 --- a/bank-feeds/src/codatbankfeeds/source_accounts.py +++ b/bank-feeds/src/codatbankfeeds/source_accounts.py @@ -13,6 +13,7 @@ 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. @@ -46,7 +47,10 @@ def create(self, request: operations.CreateSourceAccountRequest, retries: Option headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -65,7 +69,7 @@ def do_request(): '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: @@ -74,16 +78,20 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -97,7 +105,10 @@ def delete(self, request: operations.DeleteSourceAccountRequest, retries: Option headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -116,21 +127,25 @@ def do_request(): '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, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -144,7 +159,10 @@ def delete_credentials(self, request: operations.DeleteBankFeedCredentialsReques headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -163,21 +181,25 @@ def do_request(): '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, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -196,7 +218,10 @@ def generate_credentials(self, request: operations.GenerateCredentialsRequest, r headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -215,7 +240,7 @@ def do_request(): '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: @@ -224,16 +249,20 @@ def do_request(): 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, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -247,7 +276,10 @@ def list(self, request: operations.ListSourceAccountsRequest, retries: Optional[ headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -266,7 +298,7 @@ def do_request(): '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: @@ -275,16 +307,20 @@ def do_request(): 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 [401, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -299,7 +335,10 @@ def update(self, request: operations.UpdateSourceAccountRequest, retries: Option headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -318,7 +357,7 @@ def do_request(): '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: @@ -327,12 +366,15 @@ def do_request(): 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 [401, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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 diff --git a/bank-feeds/src/codatbankfeeds/transactions.py b/bank-feeds/src/codatbankfeeds/transactions.py old mode 100755 new mode 100644 index 1d76635ca..0e3c41595 --- a/bank-feeds/src/codatbankfeeds/transactions.py +++ b/bank-feeds/src/codatbankfeeds/transactions.py @@ -13,6 +13,7 @@ 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. @@ -36,7 +37,10 @@ def create(self, request: operations.CreateBankTransactionsRequest, retries: Opt headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -55,7 +59,7 @@ def do_request(): '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: @@ -64,16 +68,20 @@ def do_request(): 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 [401, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -85,7 +93,10 @@ def get_create_operation(self, request: operations.GetCreateOperationRequest, re headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -104,7 +115,7 @@ def do_request(): '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: @@ -113,16 +124,20 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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. @@ -135,7 +150,10 @@ def list_create_operations(self, request: operations.ListCreateOperationsRequest headers['Accept'] = 'application/json' headers['user-agent'] = self.sdk_configuration.user_agent - client = self.sdk_configuration.security_client + 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 @@ -154,7 +172,7 @@ def do_request(): '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: @@ -163,12 +181,15 @@ def do_request(): 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, 404, 429]: + 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, Optional[shared.ErrorMessage]) - res.error_message = out + 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 diff --git a/bank-feeds/src/codatbankfeeds/utils/__init__.py b/bank-feeds/src/codatbankfeeds/utils/__init__.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/utils/retries.py b/bank-feeds/src/codatbankfeeds/utils/retries.py old mode 100755 new mode 100644 diff --git a/bank-feeds/src/codatbankfeeds/utils/utils.py b/bank-feeds/src/codatbankfeeds/utils/utils.py old mode 100755 new mode 100644 index ccfad9f7a..416ef7949 --- a/bank-feeds/src/codatbankfeeds/utils/utils.py +++ b/bank-feeds/src/codatbankfeeds/utils/utils.py @@ -705,7 +705,7 @@ def marshal_json(val, encoder=None): val = json_dict["res"] if encoder is None else encoder(json_dict["res"]) - return json.dumps(val) + return json.dumps(val, separators=(',', ':'), sort_keys=True) def match_content_type(content_type: str, pattern: str) -> boolean: @@ -759,6 +759,8 @@ def bigintencode(val: int): def bigintdecoder(val): + if isinstance(val, float): + raise ValueError(f"{val} is a float") return int(val) @@ -828,6 +830,24 @@ def list_decode(val: List): 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): diff --git a/bank-feeds/tests/helpers.py b/bank-feeds/tests/helpers.py new file mode 100644 index 000000000..b3d095040 --- /dev/null +++ b/bank-feeds/tests/helpers.py @@ -0,0 +1,61 @@ +"""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")