diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 212e2652..fef6f89c 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 1e0c88f5-b1c8-4198-83d8-36bd00451cd3 management: - docChecksum: 90b8a240f2307f0383af66f212b0e35e - docVersion: v2.0.0-rc.33 - speakeasyVersion: 1.306.0 - generationVersion: 2.340.3 - releaseVersion: 2.3.1 - configChecksum: 7cd69437d1748415f50593e2df20ae04 + docChecksum: 3989f7570e3338d2f3ec297962927b19 + docVersion: v2.0.0-rc.34 + speakeasyVersion: 1.314.2 + generationVersion: 2.349.6 + releaseVersion: 2.3.2 + configChecksum: 70c7ad2f1908974a446afaf0abdccda9 repoURL: https://github.com/formancehq/formance-sdk-python.git repoSubDirectory: . installationURL: https://github.com/formancehq/formance-sdk-python.git @@ -15,7 +15,7 @@ features: python: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.3 - core: 4.6.9 + core: 4.6.13 deprecations: 2.81.1 errors: 2.81.10 getRequestBodies: 2.81.1 @@ -42,6 +42,7 @@ generatedFiles: - src/sdk/sdk.py - py.typed - pylintrc + - scripts/publish.sh - setup.py - src/sdk/__init__.py - src/sdk/utils/__init__.py diff --git a/RELEASES.md b/RELEASES.md index cef007df..4722995b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -78,4 +78,14 @@ Based on: ### Generated - [python v2.3.1] . ### Releases -- [PyPI v2.3.1] https://pypi.org/project/formance-sdk-python/2.3.1 - . \ No newline at end of file +- [PyPI v2.3.1] https://pypi.org/project/formance-sdk-python/2.3.1 - . + +## 2024-06-22 00:01:56 +### Changes +Based on: +- OpenAPI Doc v2.0.0-rc.34 +- Speakeasy CLI 1.314.2 (2.349.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.3.2] . +### Releases +- [PyPI v2.3.2] https://pypi.org/project/formance-sdk-python/2.3.2 - . \ No newline at end of file diff --git a/docs/models/operations/listaccountsresponse.md b/docs/models/operations/listaccountsresponse.md index d6663cab..11ff2efb 100644 --- a/docs/models/operations/listaccountsresponse.md +++ b/docs/models/operations/listaccountsresponse.md @@ -8,4 +8,5 @@ | `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | | `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `accounts_cursor_response` | [Optional[shared.AccountsCursorResponse]](../../models/shared/accountscursorresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file +| `accounts_cursor_response` | [Optional[shared.AccountsCursorResponse]](../../models/shared/accountscursorresponse.md) | :heavy_minus_sign: | OK | +| `error_response` | *Optional[errors.ErrorResponse]* | :heavy_minus_sign: | Not found | \ No newline at end of file diff --git a/docs/models/shared/connectorconfig.md b/docs/models/shared/connectorconfig.md index 58e54ecf..c262d02f 100644 --- a/docs/models/shared/connectorconfig.md +++ b/docs/models/shared/connectorconfig.md @@ -3,69 +3,69 @@ ## Supported Types -### StripeConfig +### `shared.StripeConfig` ```python -connectorConfig: shared.StripeConfig = /* values here */ +value: shared.StripeConfig = /* values here */ ``` -### DummyPayConfig +### `shared.DummyPayConfig` ```python -connectorConfig: shared.DummyPayConfig = /* values here */ +value: shared.DummyPayConfig = /* values here */ ``` -### WiseConfig +### `shared.WiseConfig` ```python -connectorConfig: shared.WiseConfig = /* values here */ +value: shared.WiseConfig = /* values here */ ``` -### ModulrConfig +### `shared.ModulrConfig` ```python -connectorConfig: shared.ModulrConfig = /* values here */ +value: shared.ModulrConfig = /* values here */ ``` -### CurrencyCloudConfig +### `shared.CurrencyCloudConfig` ```python -connectorConfig: shared.CurrencyCloudConfig = /* values here */ +value: shared.CurrencyCloudConfig = /* values here */ ``` -### BankingCircleConfig +### `shared.BankingCircleConfig` ```python -connectorConfig: shared.BankingCircleConfig = /* values here */ +value: shared.BankingCircleConfig = /* values here */ ``` -### MangoPayConfig +### `shared.MangoPayConfig` ```python -connectorConfig: shared.MangoPayConfig = /* values here */ +value: shared.MangoPayConfig = /* values here */ ``` -### MoneycorpConfig +### `shared.MoneycorpConfig` ```python -connectorConfig: shared.MoneycorpConfig = /* values here */ +value: shared.MoneycorpConfig = /* values here */ ``` -### AtlarConfig +### `shared.AtlarConfig` ```python -connectorConfig: shared.AtlarConfig = /* values here */ +value: shared.AtlarConfig = /* values here */ ``` -### AdyenConfig +### `shared.AdyenConfig` ```python -connectorConfig: shared.AdyenConfig = /* values here */ +value: shared.AdyenConfig = /* values here */ ``` -### GenericConfig +### `shared.GenericConfig` ```python -connectorConfig: shared.GenericConfig = /* values here */ +value: shared.GenericConfig = /* values here */ ``` diff --git a/docs/models/shared/stage.md b/docs/models/shared/stage.md index 2e988022..2b2a4dce 100644 --- a/docs/models/shared/stage.md +++ b/docs/models/shared/stage.md @@ -3,27 +3,27 @@ ## Supported Types -### StageSend +### `shared.StageSend` ```python -stage: shared.StageSend = /* values here */ +value: shared.StageSend = /* values here */ ``` -### StageDelay +### `shared.StageDelay` ```python -stage: shared.StageDelay = /* values here */ +value: shared.StageDelay = /* values here */ ``` -### StageWaitEvent +### `shared.StageWaitEvent` ```python -stage: shared.StageWaitEvent = /* values here */ +value: shared.StageWaitEvent = /* values here */ ``` -### Update +### `shared.Update` ```python -stage: shared.Update = /* values here */ +value: shared.Update = /* values here */ ``` diff --git a/docs/models/shared/subject.md b/docs/models/shared/subject.md index 06b2dcfc..8845afe0 100644 --- a/docs/models/shared/subject.md +++ b/docs/models/shared/subject.md @@ -3,15 +3,15 @@ ## Supported Types -### LedgerAccountSubject +### `shared.LedgerAccountSubject` ```python -subject: shared.LedgerAccountSubject = /* values here */ +value: shared.LedgerAccountSubject = /* values here */ ``` -### WalletSubject +### `shared.WalletSubject` ```python -subject: shared.WalletSubject = /* values here */ +value: shared.WalletSubject = /* values here */ ``` diff --git a/docs/models/shared/taskresponsedata.md b/docs/models/shared/taskresponsedata.md index eb4ebce3..2744a85e 100644 --- a/docs/models/shared/taskresponsedata.md +++ b/docs/models/shared/taskresponsedata.md @@ -3,51 +3,51 @@ ## Supported Types -### TaskStripe +### `shared.TaskStripe` ```python -taskResponseData: shared.TaskStripe = /* values here */ +value: shared.TaskStripe = /* values here */ ``` -### TaskWise +### `shared.TaskWise` ```python -taskResponseData: shared.TaskWise = /* values here */ +value: shared.TaskWise = /* values here */ ``` -### TaskCurrencyCloud +### `shared.TaskCurrencyCloud` ```python -taskResponseData: shared.TaskCurrencyCloud = /* values here */ +value: shared.TaskCurrencyCloud = /* values here */ ``` -### TaskDummyPay +### `shared.TaskDummyPay` ```python -taskResponseData: shared.TaskDummyPay = /* values here */ +value: shared.TaskDummyPay = /* values here */ ``` -### TaskModulr +### `shared.TaskModulr` ```python -taskResponseData: shared.TaskModulr = /* values here */ +value: shared.TaskModulr = /* values here */ ``` -### TaskBankingCircle +### `shared.TaskBankingCircle` ```python -taskResponseData: shared.TaskBankingCircle = /* values here */ +value: shared.TaskBankingCircle = /* values here */ ``` -### TaskMangoPay +### `shared.TaskMangoPay` ```python -taskResponseData: shared.TaskMangoPay = /* values here */ +value: shared.TaskMangoPay = /* values here */ ``` -### TaskMoneycorp +### `shared.TaskMoneycorp` ```python -taskResponseData: shared.TaskMoneycorp = /* values here */ +value: shared.TaskMoneycorp = /* values here */ ``` diff --git a/docs/models/shared/taskscursordata.md b/docs/models/shared/taskscursordata.md index 38ceb0c9..a65b464c 100644 --- a/docs/models/shared/taskscursordata.md +++ b/docs/models/shared/taskscursordata.md @@ -3,51 +3,51 @@ ## Supported Types -### TaskStripe +### `shared.TaskStripe` ```python -tasksCursorData: shared.TaskStripe = /* values here */ +value: shared.TaskStripe = /* values here */ ``` -### TaskWise +### `shared.TaskWise` ```python -tasksCursorData: shared.TaskWise = /* values here */ +value: shared.TaskWise = /* values here */ ``` -### TaskCurrencyCloud +### `shared.TaskCurrencyCloud` ```python -tasksCursorData: shared.TaskCurrencyCloud = /* values here */ +value: shared.TaskCurrencyCloud = /* values here */ ``` -### TaskDummyPay +### `shared.TaskDummyPay` ```python -tasksCursorData: shared.TaskDummyPay = /* values here */ +value: shared.TaskDummyPay = /* values here */ ``` -### TaskModulr +### `shared.TaskModulr` ```python -tasksCursorData: shared.TaskModulr = /* values here */ +value: shared.TaskModulr = /* values here */ ``` -### TaskBankingCircle +### `shared.TaskBankingCircle` ```python -tasksCursorData: shared.TaskBankingCircle = /* values here */ +value: shared.TaskBankingCircle = /* values here */ ``` -### TaskMangoPay +### `shared.TaskMangoPay` ```python -tasksCursorData: shared.TaskMangoPay = /* values here */ +value: shared.TaskMangoPay = /* values here */ ``` -### TaskMoneycorp +### `shared.TaskMoneycorp` ```python -tasksCursorData: shared.TaskMoneycorp = /* values here */ +value: shared.TaskMoneycorp = /* values here */ ``` diff --git a/docs/models/shared/v2bulkelement.md b/docs/models/shared/v2bulkelement.md index a409e68e..4a818f3f 100644 --- a/docs/models/shared/v2bulkelement.md +++ b/docs/models/shared/v2bulkelement.md @@ -3,27 +3,27 @@ ## Supported Types -### V2BulkElementAddMetadata +### `shared.V2BulkElementAddMetadata` ```python -v2BulkElement: shared.V2BulkElementAddMetadata = /* values here */ +value: shared.V2BulkElementAddMetadata = /* values here */ ``` -### V2BulkElementCreateTransaction +### `shared.V2BulkElementCreateTransaction` ```python -v2BulkElement: shared.V2BulkElementCreateTransaction = /* values here */ +value: shared.V2BulkElementCreateTransaction = /* values here */ ``` -### V2BulkElementDeleteMetadata +### `shared.V2BulkElementDeleteMetadata` ```python -v2BulkElement: shared.V2BulkElementDeleteMetadata = /* values here */ +value: shared.V2BulkElementDeleteMetadata = /* values here */ ``` -### V2BulkElementRevertTransaction +### `shared.V2BulkElementRevertTransaction` ```python -v2BulkElement: shared.V2BulkElementRevertTransaction = /* values here */ +value: shared.V2BulkElementRevertTransaction = /* values here */ ``` diff --git a/docs/models/shared/v2bulkelementresult.md b/docs/models/shared/v2bulkelementresult.md index e9ba8963..7fb75317 100644 --- a/docs/models/shared/v2bulkelementresult.md +++ b/docs/models/shared/v2bulkelementresult.md @@ -3,33 +3,33 @@ ## Supported Types -### Schemas +### `shared.Schemas` ```python -v2BulkElementResult: shared.Schemas = /* values here */ +value: shared.Schemas = /* values here */ ``` -### V2BulkElementResultCreateTransactionSchemas +### `shared.V2BulkElementResultCreateTransactionSchemas` ```python -v2BulkElementResult: shared.V2BulkElementResultCreateTransactionSchemas = /* values here */ +value: shared.V2BulkElementResultCreateTransactionSchemas = /* values here */ ``` -### V2BulkElementResultDeleteMetadataSchemas +### `shared.V2BulkElementResultDeleteMetadataSchemas` ```python -v2BulkElementResult: shared.V2BulkElementResultDeleteMetadataSchemas = /* values here */ +value: shared.V2BulkElementResultDeleteMetadataSchemas = /* values here */ ``` -### V2BulkElementResultErrorSchemas +### `shared.V2BulkElementResultErrorSchemas` ```python -v2BulkElementResult: shared.V2BulkElementResultErrorSchemas = /* values here */ +value: shared.V2BulkElementResultErrorSchemas = /* values here */ ``` -### V2BulkElementResultRevertTransactionSchemas +### `shared.V2BulkElementResultRevertTransactionSchemas` ```python -v2BulkElementResult: shared.V2BulkElementResultRevertTransactionSchemas = /* values here */ +value: shared.V2BulkElementResultRevertTransactionSchemas = /* values here */ ``` diff --git a/docs/models/shared/v2stage.md b/docs/models/shared/v2stage.md index 1e0b5ab4..425010dd 100644 --- a/docs/models/shared/v2stage.md +++ b/docs/models/shared/v2stage.md @@ -3,27 +3,27 @@ ## Supported Types -### V2StageSend +### `shared.V2StageSend` ```python -v2Stage: shared.V2StageSend = /* values here */ +value: shared.V2StageSend = /* values here */ ``` -### V2StageDelay +### `shared.V2StageDelay` ```python -v2Stage: shared.V2StageDelay = /* values here */ +value: shared.V2StageDelay = /* values here */ ``` -### V2StageWaitEvent +### `shared.V2StageWaitEvent` ```python -v2Stage: shared.V2StageWaitEvent = /* values here */ +value: shared.V2StageWaitEvent = /* values here */ ``` -### V2Update +### `shared.V2Update` ```python -v2Stage: shared.V2Update = /* values here */ +value: shared.V2Update = /* values here */ ``` diff --git a/docs/models/shared/v2subject.md b/docs/models/shared/v2subject.md index bd516ee2..e9894c3b 100644 --- a/docs/models/shared/v2subject.md +++ b/docs/models/shared/v2subject.md @@ -3,15 +3,15 @@ ## Supported Types -### V2LedgerAccountSubject +### `shared.V2LedgerAccountSubject` ```python -v2Subject: shared.V2LedgerAccountSubject = /* values here */ +value: shared.V2LedgerAccountSubject = /* values here */ ``` -### V2WalletSubject +### `shared.V2WalletSubject` ```python -v2Subject: shared.V2WalletSubject = /* values here */ +value: shared.V2WalletSubject = /* values here */ ``` diff --git a/docs/models/shared/v2targetid.md b/docs/models/shared/v2targetid.md index bfb9c559..c0d37043 100644 --- a/docs/models/shared/v2targetid.md +++ b/docs/models/shared/v2targetid.md @@ -3,15 +3,15 @@ ## Supported Types -### +### `str` ```python -v2TargetID: str = /* values here */ +value: str = /* values here */ ``` -### +### `int` ```python -v2TargetID: int = /* values here */ +value: int = /* values here */ ``` diff --git a/gen.yaml b/gen.yaml index c6da8772..23246876 100755 --- a/gen.yaml +++ b/gen.yaml @@ -12,7 +12,7 @@ generation: comments: {} telemetryEnabled: false python: - version: 2.3.1 + version: 2.3.2 additionalDependencies: dependencies: {} extraDependencies: @@ -36,3 +36,4 @@ python: packageName: formance-sdk-python projectUrls: {} responseFormat: envelope + templateVersion: v1 diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755 index 00000000..ed45d8a9 --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +export TWINE_USERNAME=__token__ +export TWINE_PASSWORD=${PYPI_TOKEN} + +python -m pip install --upgrade pip +pip install setuptools wheel twine +python setup.py sdist bdist_wheel +twine upload dist/* diff --git a/setup.py b/setup.py index 86b82cc9..8068b618 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setuptools.setup( name='formance-sdk-python', - version='2.3.1', + version='2.3.2', author='Formance', description='Python Client SDK Generated by Speakeasy', url='https://github.com/formancehq/formance-sdk-python.git', diff --git a/src/sdk/ledger.py b/src/sdk/ledger.py index 0c5c4503..1e72f66d 100644 --- a/src/sdk/ledger.py +++ b/src/sdk/ledger.py @@ -832,6 +832,14 @@ def list_accounts(self, request: operations.ListAccountsRequest) -> operations.L else: content_type = http_res.headers.get('Content-Type') raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code == 404: + # pylint: disable=no-else-return + if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): + out = utils.unmarshal_json(http_res.text, Optional[errors.ErrorResponse]) + res.error_response = out + else: + content_type = http_res.headers.get('Content-Type') + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) else: # pylint: disable=no-else-return if utils.match_content_type(http_res.headers.get('Content-Type') or '', 'application/json'): diff --git a/src/sdk/models/operations/listaccounts.py b/src/sdk/models/operations/listaccounts.py index 68b0bd60..957a9cdb 100644 --- a/src/sdk/models/operations/listaccounts.py +++ b/src/sdk/models/operations/listaccounts.py @@ -3,6 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ...models.errors import errorresponse as errors_errorresponse from ...models.shared import accountscursorresponse as shared_accountscursorresponse from typing import Any, Dict, Optional @@ -50,5 +51,7 @@ class ListAccountsResponse: r"""Raw HTTP response; suitable for custom response parsing""" accounts_cursor_response: Optional[shared_accountscursorresponse.AccountsCursorResponse] = dataclasses.field(default=None) r"""OK""" + error_response: Optional[errors_errorresponse.ErrorResponse] = dataclasses.field(default=None) + r"""Not found""" diff --git a/src/sdk/sdkconfiguration.py b/src/sdk/sdkconfiguration.py index 174e9ba9..b2af566b 100644 --- a/src/sdk/sdkconfiguration.py +++ b/src/sdk/sdkconfiguration.py @@ -23,10 +23,10 @@ class SDKConfiguration: server_url: Optional[str] = '' server_idx: Optional[int] = 0 language: str = 'python' - openapi_doc_version: str = 'v2.0.0-rc.33' - sdk_version: str = '2.3.1' - gen_version: str = '2.340.3' - user_agent: str = 'speakeasy-sdk/python 2.3.1 2.340.3 v2.0.0-rc.33 formance-sdk-python' + openapi_doc_version: str = 'v2.0.0-rc.34' + sdk_version: str = '2.3.2' + gen_version: str = '2.349.6' + user_agent: str = 'speakeasy-sdk/python 2.3.2 2.349.6 v2.0.0-rc.34 formance-sdk-python' retry_config: Optional[RetryConfig] = None def __post_init__(self):